Signed-off-by: Hongmei Gou <a0271...@ti.com>
---
 lib/oesdk/package-sdks | 38 ++++++++++++++++++++++++++++++++++++++
 1 file changed, 38 insertions(+)

diff --git a/lib/oesdk/package-sdks b/lib/oesdk/package-sdks
index 1e5ee00..2316d40 100644
--- a/lib/oesdk/package-sdks
+++ b/lib/oesdk/package-sdks
@@ -267,6 +267,44 @@ package_web_content() {
         return 1
     fi
 
+    # remove scripts which have dependency on devkit
+    rm  $tmp_dir/bin/unshallow-repositories.sh
+    rm  $tmp_dir/bin/create-ubifs.sh
+
+    # modify create-sdcard.sh to use the tarball extraction directory
+    sed -i -e "s|ti-sdk.*\[0-9\]|${tmp_dir##*/}|g" 
$tmp_dir/bin/create-sdcard.sh
+
+    # modify setup-target-nfs.sh to get the absolute path when running the 
scripts
+    # 1. remove the line to set up "SDKinstall" with TI_SDK_PATH
+    sed -i -e '/^SDKinstall/d' $tmp_dir/bin/setup-targetfs-nfs.sh
+
+    # 2. add the lines before setting dstdefault to get the absolute path of 
the scripts and SDKinstall,
+    #    using the same way as in create-sdcard.sh: PWD=`pwd`; EXE=`echo $0 | 
sed s=$PWD==`;
+    #    EXEPATH="$PWD"/"$EXE"; SDKinstall=`echo $EXEPATH | grep -o 
.*ti-sdk.*.[0-9]`
+    sed -i -e '/dstdefault=$SDKinstall\/targetNFS/i\PWD=`pwd`\nEXE=`echo $0 | 
sed s=$PWD==`\nEXEPATH="$PWD"/"$EXE"\nSDKinstall=`echo $EXEPATH | grep -o 
'.*ti-sdk.*.[0-9]'`\n' $tmp_dir/bin/setup-targetfs-nfs.sh
+
+    # 3. use the tarball extraction directory for SDKinstall
+    sed -i -e "s|ti-sdk.*\[0-9\]|${tmp_dir##*/}|g" 
$tmp_dir/bin/setup-targetfs-nfs.sh
+
+    # create Rules.make with variables to be used from the binary package
+    echo "#platform" >> $tmp_dir/Rules.make
+    echo "PLATFORM=$m" >> $tmp_dir/Rules.make
+    echo >> $tmp_dir/Rules.make
+
+    echo "#root of the target file system for installing applications" >> 
$tmp_dir/Rules.make
+    echo "DESTDIR=__DESTDIR__" >> $tmp_dir/Rules.make
+    echo >> $tmp_dir/Rules.make
+
+    echo "# Set EXEC_DIR to install example binaries" >> $tmp_dir/Rules.make
+    echo "EXEC_DIR=__EXEC_DIR__" >> $tmp_dir/Rules.make
+
+    if [ "$?" != 0 ]
+    then
+        echo "Could not create Rules.make"
+        echo "FAILED" > $LOG_DIR/$m-web-results.txt
+        return 1
+    fi
+
     cp -f setup.sh $tmp_dir/
     if [ "$?" != 0 ]
     then
-- 
1.9.1

_______________________________________________
meta-arago mailing list
meta-arago@arago-project.org
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago

Reply via email to