summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorj-h.choi <j-h.choi@samsung.com>2022-01-10 12:29:00 +0900
committerj-h.choi <j-h.choi@samsung.com>2022-01-10 12:32:12 +0900
commitb1555c706853322e39959498a13e8ed1cdee601e (patch)
treea717a614416806a06aa8c84b366acf2ccb522ba3
parenta4352f6118df99656d88bce621ddfa6df38cb2c7 (diff)
downloadmeta-mobile-b1555c706853322e39959498a13e8ed1cdee601e.tar.gz
meta-mobile-b1555c706853322e39959498a13e8ed1cdee601e.tar.bz2
meta-mobile-b1555c706853322e39959498a13e8ed1cdee601e.zip
[TRE-2857] Add patchelf, crossgen2-mic pkg & Modify dotnet-generate-ni.post scriptsubmit/tizen/20220111.003339submit/tizen/20220110.213957accepted/tizen/unified/20220111.010919
Change-Id: I476770794c8a4e17dee6732dd95038f1a25a81c7
-rw-r--r--patterns/mobile-dotnet-runtime.yaml2
-rwxr-xr-xscripts/mobile-dotnet-generate-ni.post33
2 files changed, 27 insertions, 8 deletions
diff --git a/patterns/mobile-dotnet-runtime.yaml b/patterns/mobile-dotnet-runtime.yaml
index 1343960..89aff71 100644
--- a/patterns/mobile-dotnet-runtime.yaml
+++ b/patterns/mobile-dotnet-runtime.yaml
@@ -7,3 +7,5 @@ Packages:
- corefx-native
- mscorlib
- coreclr-diagnostics
+- crossgen2-mic
+- patchelf
diff --git a/scripts/mobile-dotnet-generate-ni.post b/scripts/mobile-dotnet-generate-ni.post
index 75c32a0..2ef089d 100755
--- a/scripts/mobile-dotnet-generate-ni.post
+++ b/scripts/mobile-dotnet-generate-ni.post
@@ -35,20 +35,37 @@ DLL_LIST="
/usr/share/dotnet.tizen/framework/Tizen.System.Information.dll
"
-export IBCDATA_DIR=/usr/share/dotnet.tizen/ibcdata
-
# remove previous native image
dotnettool --ni-reset-system
+# set the patchelf
+export DOTNET_SYSTEM_GLOBALIZATION_INVARIANT=1
+export MIC_CROSSGEN2_ENABLED=1
+
+DOTNET_MIC_DIR=/opt/usr/dotnet/mic
+
+chmod 755 /usr/bin/patchelf
+chmod 755 $DOTNET_MIC_DIR/*
+
+/usr/bin/patchelf --set-interpreter $DOTNET_MIC_DIR/ld-linux-x86-64.so.2 $DOTNET_MIC_DIR/crossgen2
+/usr/bin/patchelf --set-rpath $DOTNET_MIC_DIR $DOTNET_MIC_DIR/crossgen2
+
+for file in $( find $DOTNET_MIC_DIR -type f \( -name "*.so" -or -name "*.so.*" \) -not -name "*.dbg" -not -name "ld-*.so*" )
+do
+ /usr/bin/patchelf --set-rpath $DOTNET_MIC_DIR ${file}
+done
+
# generate native image
for target in $DLL_LIST;
do
- dotnettool --ibc-dir $IBCDATA_DIR --ni-dll $target;
+ dotnettool --ni-dll $target --inputbubble;
done;
-# remove ibc data files
-if [ -d $IBCDATA_DIR ]
-then
- rm -rf $IBCDATA_DIR
-fi
+# generate native image for all app
+dotnettool --ni-regen-all-app
+dotnettool --tac-regen-all
+# remove files and package related to dotnet used only in MIC
+rm -rf $DOTNET_MIC_DIR
+rpm -e patchelf
+rpm -e crossgen2-mic