All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] Allow support for uImage and Zimage
@ 2013-10-05  1:36 Franklin S. Cooper Jr
  2013-10-10 17:04 ` Denys Dmytriyenko
  2013-10-10 18:37 ` Denys Dmytriyenko
  0 siblings, 2 replies; 3+ messages in thread
From: Franklin S. Cooper Jr @ 2013-10-05  1:36 UTC (permalink / raw)
  To: meta-arago; +Cc: Franklin S. Cooper Jr

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

Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
---
 lib/oesdk/bitbake-test-sdk-image |    2 +-
 lib/oesdk/package-sdks           |   11 ++++++-----
 lib/run-opentest                 |    4 ++--
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/lib/oesdk/bitbake-test-sdk-image b/lib/oesdk/bitbake-test-sdk-image
index 9122d89..7baa106 100644
--- a/lib/oesdk/bitbake-test-sdk-image
+++ b/lib/oesdk/bitbake-test-sdk-image
@@ -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
diff --git a/lib/oesdk/package-sdks b/lib/oesdk/package-sdks
index 8f4e5e2..df0ec07 100644
--- a/lib/oesdk/package-sdks
+++ b/lib/oesdk/package-sdks
@@ -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
+    # 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 uImage-$m.bin -o -e zImage-$m.bin ]
         then
-            mv uImage-$m.bin uImage
+            kernel_image=`ls | grep [uz]Image-$m.bin | grep -o [uz]Image`
+            mv [uz]Image-$m.bin $kernel_name
         fi
     else
-        rm -f uImage*
+        rm -f [uz]Image*
         rm -f *.dtb
     fi
 
diff --git a/lib/run-opentest b/lib/run-opentest
index d3a04f3..b08f962 100644
--- a/lib/run-opentest
+++ b/lib/run-opentest
@@ -170,9 +170,9 @@ run_target_side_test() {
         return 1
     fi
 
-    if [ -f $test_dir/temp/board-support/prebuilt-images/uImage-$m.bin ]
+    if [ -f $test_dir/temp/board-support/prebuilt-images/uImage-$m.bin -o -f $test_dir/temp/board-support/prebuilt-images/zImage-$m.bin ]
     then
-        kernel=$test_dir/temp/board-support/prebuilt-images/uImage-$m.bin
+        kernel=$test_dir/temp/board-support/prebuilt-images/[uz]Image-$m.bin
         if [ "$odtb" ]
         then
             dtb="~dtb=$test_dir/temp/board-support/prebuilt-images/$odtb"
-- 
1.7.0.4



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* Re: [PATCH] Allow support for uImage and Zimage
  2013-10-05  1:36 [PATCH] Allow support for uImage and Zimage Franklin S. Cooper Jr
@ 2013-10-10 17:04 ` Denys Dmytriyenko
  2013-10-10 18:37 ` Denys Dmytriyenko
  1 sibling, 0 replies; 3+ messages in thread
From: Denys Dmytriyenko @ 2013-10-10 17:04 UTC (permalink / raw)
  To: Franklin S. Cooper Jr; +Cc: meta-arago

On Fri, Oct 04, 2013 at 08:36:06PM -0500, Franklin S. Cooper Jr wrote:
> * There is a possibility some SDKs will use uImage while others will use zImage.
> * Support both choices.
> 
> Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
> ---
>  lib/oesdk/bitbake-test-sdk-image |    2 +-
>  lib/oesdk/package-sdks           |   11 ++++++-----
>  lib/run-opentest                 |    4 ++--
>  3 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/oesdk/bitbake-test-sdk-image b/lib/oesdk/bitbake-test-sdk-image
> index 9122d89..7baa106 100644
> --- a/lib/oesdk/bitbake-test-sdk-image
> +++ b/lib/oesdk/bitbake-test-sdk-image
> @@ -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
> diff --git a/lib/oesdk/package-sdks b/lib/oesdk/package-sdks
> index 8f4e5e2..df0ec07 100644
> --- a/lib/oesdk/package-sdks
> +++ b/lib/oesdk/package-sdks
> @@ -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
> +    # 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 uImage-$m.bin -o -e zImage-$m.bin ]

This is fine, but [ -e [uz]Image-$m.bin ] should also work...


>          then
> -            mv uImage-$m.bin uImage
> +            kernel_image=`ls | grep [uz]Image-$m.bin | grep -o [uz]Image`

Bash is capable of expanding regular expressions, so "ls [uz]Image-$m.bin" 
should be fine.


> +            mv [uz]Image-$m.bin $kernel_name

Hmm, here you set kernel_image variable and then use $kernel_name instead.


>          fi
>      else
> -        rm -f uImage*
> +        rm -f [uz]Image*
>          rm -f *.dtb
>      fi
>  
> diff --git a/lib/run-opentest b/lib/run-opentest
> index d3a04f3..b08f962 100644
> --- a/lib/run-opentest
> +++ b/lib/run-opentest
> @@ -170,9 +170,9 @@ run_target_side_test() {
>          return 1
>      fi
>  
> -    if [ -f $test_dir/temp/board-support/prebuilt-images/uImage-$m.bin ]
> +    if [ -f $test_dir/temp/board-support/prebuilt-images/uImage-$m.bin -o -f $test_dir/temp/board-support/prebuilt-images/zImage-$m.bin ]

Same comment as above, you can pass regexp [uz]Image to [ ] test


>      then
> -        kernel=$test_dir/temp/board-support/prebuilt-images/uImage-$m.bin
> +        kernel=$test_dir/temp/board-support/prebuilt-images/[uz]Image-$m.bin

As we found out, assigning regexp to a variable doesn't always get it 
expanded, so you may end up with [uz]Image literal in your $kernel variable - 
make sure it's being used as is later on, or you may not get the epected 
resukts...


>          if [ "$odtb" ]
>          then
>              dtb="~dtb=$test_dir/temp/board-support/prebuilt-images/$odtb"
> -- 
> 1.7.0.4
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [PATCH] Allow support for uImage and Zimage
  2013-10-05  1:36 [PATCH] Allow support for uImage and Zimage Franklin S. Cooper Jr
  2013-10-10 17:04 ` Denys Dmytriyenko
@ 2013-10-10 18:37 ` Denys Dmytriyenko
  1 sibling, 0 replies; 3+ messages in thread
From: Denys Dmytriyenko @ 2013-10-10 18:37 UTC (permalink / raw)
  To: Franklin S. Cooper Jr; +Cc: meta-arago

On Fri, Oct 04, 2013 at 08:36:06PM -0500, Franklin S. Cooper Jr wrote:
> * There is a possibility some SDKs will use uImage while others will use zImage.
> * Support both choices.

And by the way, as Chase just noticed, run-opentest part has been already 
patched before, please rebase your tree with the mainline:

http://arago-project.org/git/projects/?p=tisdk-build-scripts.git;a=commitdiff;h=f9441104cae4c5ff44ad2583539d089a9910a1b3



> Signed-off-by: Franklin S. Cooper Jr <fcooper@ti.com>
> ---
>  lib/oesdk/bitbake-test-sdk-image |    2 +-
>  lib/oesdk/package-sdks           |   11 ++++++-----
>  lib/run-opentest                 |    4 ++--
>  3 files changed, 9 insertions(+), 8 deletions(-)
> 
> diff --git a/lib/oesdk/bitbake-test-sdk-image b/lib/oesdk/bitbake-test-sdk-image
> index 9122d89..7baa106 100644
> --- a/lib/oesdk/bitbake-test-sdk-image
> +++ b/lib/oesdk/bitbake-test-sdk-image
> @@ -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
> diff --git a/lib/oesdk/package-sdks b/lib/oesdk/package-sdks
> index 8f4e5e2..df0ec07 100644
> --- a/lib/oesdk/package-sdks
> +++ b/lib/oesdk/package-sdks
> @@ -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
> +    # 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 uImage-$m.bin -o -e zImage-$m.bin ]
>          then
> -            mv uImage-$m.bin uImage
> +            kernel_image=`ls | grep [uz]Image-$m.bin | grep -o [uz]Image`
> +            mv [uz]Image-$m.bin $kernel_name
>          fi
>      else
> -        rm -f uImage*
> +        rm -f [uz]Image*
>          rm -f *.dtb
>      fi
>  
> diff --git a/lib/run-opentest b/lib/run-opentest
> index d3a04f3..b08f962 100644
> --- a/lib/run-opentest
> +++ b/lib/run-opentest
> @@ -170,9 +170,9 @@ run_target_side_test() {
>          return 1
>      fi
>  
> -    if [ -f $test_dir/temp/board-support/prebuilt-images/uImage-$m.bin ]
> +    if [ -f $test_dir/temp/board-support/prebuilt-images/uImage-$m.bin -o -f $test_dir/temp/board-support/prebuilt-images/zImage-$m.bin ]
>      then
> -        kernel=$test_dir/temp/board-support/prebuilt-images/uImage-$m.bin
> +        kernel=$test_dir/temp/board-support/prebuilt-images/[uz]Image-$m.bin
>          if [ "$odtb" ]
>          then
>              dtb="~dtb=$test_dir/temp/board-support/prebuilt-images/$odtb"
> -- 
> 1.7.0.4
> 
> _______________________________________________
> meta-arago mailing list
> meta-arago@arago-project.org
> http://arago-project.org/cgi-bin/mailman/listinfo/meta-arago


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2013-10-10 18:37 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-10-05  1:36 [PATCH] Allow support for uImage and Zimage Franklin S. Cooper Jr
2013-10-10 17:04 ` Denys Dmytriyenko
2013-10-10 18:37 ` Denys Dmytriyenko

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.