Skip to contentSkip to conversation

tisdk-build-scripts: Allow support for uImage and zImage

PATCH In review Franklin S. Cooper Jr 2 participants 2 messages Oct 10, 2013 – Oct 16, 2013

lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 tisdk-build-scripts: Allow support for uImage and zImage

* There is a possibility some SDKs will use uImage while others will use zImage.
* Support both choices.

Version 2 changes:
* Rebase and drop 1 out of the 3 changes that were already in mainline.
* Simplify if statement conditional.
* Use Bash's regular expression expansion capability.
* Fix inconsistent variable name usage.

---
 lib/oesdk/bitbake-test-sdk-image |    2 +-
 lib/oesdk/package-sdks           |   15 ++++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)
lib/oesdk/bitbake-test-sdk-image +1 -1
index 9122d89..7baa106 100644
@@ -174,7 +174,7 @@ extract_sdk_image() {
         cp $sdk_path/$filesys $test_dir/temp/filesystem
 
         # Find the kernel image
-        kernel=`find ./$sdk_path -name "uImage-$m.bin" | xargs basename`
+        kernel=`find ./$sdk_path -name "[uz]Image-$m.bin" | xargs basename`
         # This is a critical failure and will not be able to be skipped
         if [ -z "$kernel" ]
         then
lib/oesdk/package-sdks +8 -7
index 8f4e5e2..d6b01f7 100644
@@ -48,18 +48,19 @@ create_sd_card_content() {
         rm u-boot-spl.bin-$m
     fi
 
-    # For some devices the uImage  and dtb files are read from the /boot
-    # directory of the rootfs.  In this case do not package the uImage
-    # and device tree files into the boot partition as it will cause
-    # confusion.
+    # For some devices the uImage/zImage and dtb files are read
+    # from the /boot directory of the rootfs. In this case do
+    # not package the uImage/zImage and device tree files into
+    # the boot partition as it will cause confusion.
     if [ "$PACKAGE_BOOT_KERNEL_FILES" = "true" ]
     then
-        if [ -e uImage-$m.bin ]
+        if [ -e [uz]Image-$m.bin ]
         then
-            mv uImage-$m.bin uImage
+            kernel_image=`ls [uz]Image-$m.bin | grep -o [uz]Image`
+            mv [uz]Image-$m.bin $kernel_image
         fi
     else
-        rm -f uImage*
+        rm -f [uz]Image*
         rm -f *.dtb
     fi
 
Signature · 1 line
1.7.0.4
#1 lore raw
Quoted 9 lines · Franklin S. Cooper Jr

* There is a possibility some SDKs will use uImage while others will use zImage.
* Support both choices.

Version 2 changes:
* Rebase and drop 1 out of the 3 changes that were already in mainline.
* Simplify if statement conditional.
* Use Bash's regular expression expansion capability.
* Fix inconsistent variable name usage.

Seems reasonable. Haven't tried it myself yet...

Quoted 57 lines
---
 lib/oesdk/bitbake-test-sdk-image |    2 +-
 lib/oesdk/package-sdks           |   15 ++++++++-------
 2 files changed, 9 insertions(+), 8 deletions(-)
lib/oesdk/bitbake-test-sdk-image +1 -1
index 9122d89..7baa106 100644
@@ -174,7 +174,7 @@ extract_sdk_image() {
         cp $sdk_path/$filesys $test_dir/temp/filesystem
 
         # Find the kernel image
-        kernel=`find ./$sdk_path -name "uImage-$m.bin" | xargs basename`
+        kernel=`find ./$sdk_path -name "[uz]Image-$m.bin" | xargs basename`
         # This is a critical failure and will not be able to be skipped
         if [ -z "$kernel" ]
         then
lib/oesdk/package-sdks +8 -7
index 8f4e5e2..d6b01f7 100644
@@ -48,18 +48,19 @@ create_sd_card_content() {
         rm u-boot-spl.bin-$m
     fi
 
-    # For some devices the uImage  and dtb files are read from the /boot
-    # directory of the rootfs.  In this case do not package the uImage
-    # and device tree files into the boot partition as it will cause
-    # confusion.
+    # For some devices the uImage/zImage and dtb files are read
+    # from the /boot directory of the rootfs. In this case do
+    # not package the uImage/zImage and device tree files into
+    # the boot partition as it will cause confusion.
     if [ "$PACKAGE_BOOT_KERNEL_FILES" = "true" ]
     then
-        if [ -e uImage-$m.bin ]
+        if [ -e [uz]Image-$m.bin ]
         then
-            mv uImage-$m.bin uImage
+            kernel_image=`ls [uz]Image-$m.bin | grep -o [uz]Image`
+            mv [uz]Image-$m.bin $kernel_image
         fi
     else
-        rm -f uImage*
+        rm -f [uz]Image*
         rm -f *.dtb
     fi
 
Signature · 6 lines
1.7.0.4

_______________________________________________
meta-arago mailing list
[email protected]
http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago