General bug fixes
authorYaniv Machani <yanivma@ti.com>
Mon, 9 Feb 2015 21:56:48 +0000 (23:56 +0200)
committerYaniv Machani <yanivma@ti.com>
Mon, 9 Feb 2015 21:58:28 +0000 (23:58 +0200)
Fixed some typo's and file verification issues.

Signed-off-by: Yaniv Machani <yanivma@ti.com>
build_wl18xx.sh
setup-env.sample

index a3dd9afd449f3d47c21217195bf9aa1f4e0a0a07..7148484842a2a97ff4c0f4c398861497af3009bb 100755 (executable)
@@ -25,7 +25,7 @@ function usage ()
     echo "Usage : "
     echo ""
     echo "Building full package : "
-    echo "        ./wl18xx_build.sh init         <head|TAG>  [ Download and Update w/o build  ] "
+    echo "        ./build_wl18xx.sh init         <head|TAG>  [ Download and Update w/o build  ] "
     echo "                          update       <head|TAG>  [ Update to specific TAG & Build ] "
     echo "                          clean                    [ Clean & Build                  ] "
     echo "                          <empty>                  [ Build w/o update               ] "
@@ -273,7 +273,7 @@ function build_uimage()
        [ -z $NO_CONFIG ] && cp `path configuration`/kernel_$KERNEL_VERSION.$KERNEL_PATCHLEVEL.config `repo_path kernel`/.config
        [ -z $NO_CLEAN ] && make clean
        [ -z $NO_CLEAN ] && assert_no_error
-       
+
     if [ "$KERNEL_VERSION" -eq 3 ] && [ "$KERNEL_PATCHLEVEL" -eq 2 ]
     then
         make -j${PROCESSORS_NUMBER} uImage
@@ -490,18 +490,22 @@ function build_outputs()
         tar cpjf `path outputs`/${tar_filesystem[0]} .
         cd_back
                
-        if [ "$KERNEL_VERSION" -eq 3 ] && [ "$KERNEL_PATCHLEVEL" -eq 2 ]
-        then
-            cp `path tftp`/uImage `path outputs`/uImage
-        else
-            if [ -z $NO_DTB ]
-            then
-                cp `path tftp`/zImage `path outputs`/zImage
-                cp `path tftp`/*.dtb `path outputs`/*.dtb
-            else
-                cp `path tftp`/uImage `path outputs`/uImage
-            fi
-        fi             
+               # Copy kernel files only if default kernel is used(for now)
+               if [ "$DEFAULT_KERNEL" -eq 1 ]
+               then
+                       if [ "$KERNEL_VERSION" -eq 3 ] && [ "$KERNEL_PATCHLEVEL" -eq 2 ]
+                       then
+                               cp `path tftp`/uImage `path outputs`/uImage
+                       else
+                               if [ -z $NO_DTB ]
+                               then
+                                       cp `path tftp`/zImage `path outputs`/zImage
+                                       cp `path tftp`/*.dtb `path outputs`/*.dtb
+                               else
+                                       cp `path tftp`/uImage `path outputs`/uImage
+                               fi
+                       fi
+               fi
     fi
 }
 
@@ -665,7 +669,7 @@ function verify_installs()
 
     i="0"
        while [ $i -lt ${#apps_to_verify[@]} ]; do
-        if !( hash ${apps_to_verify[i]} 2>/dev/null; )then
+        if !( dpkg-query -s ${apps_to_verify[i]} 2>/dev/null | grep -q ^"Status: install ok installed"$ )then
             echo  "${apps_to_verify[i]} is missing"
             echo  "Please use 'sudo apt-get install ${apps_to_verify[i]}'"
             read -p "Do you want to install it now [y/n] ? (requires sudo) " yn
index 6d37e0ba0cf07792c9a64fb051e03bd858179d64..e96b0f30d819151cc3cf12f2831397c3fac581ec 100644 (file)
@@ -11,7 +11,7 @@
 
 # if DEFAULT toolchain path is set toolchain will be downloaded to ./toolchain.
 export TOOLCHAIN_PATH=DEFAULT
-# if DEAFULT path to root filesystem is set ./fs folder will be used.
+# if DEFAULT path to root filesystem is set ./fs folder will be used.
 export ROOTFS=DEFAULT
 #if DEFAULT kernel path is set - kernel will be downloaded (set branch to match kernel version)
 export KERNEL_PATH=DEFAULT