Skip to contentSkip to conversation

image/FIT: Ramdisk Load, Entry address and OS tag inclusion

PATCH New Jagan 2 participants 4 messages Jul 28, 2012 – Sep 2, 2012

lore
Share & tools
lore

Jagan

author
#0 lore raw

PATCH 1/1 image/FIT: Ramdisk Load, Entry address and OS tag inclusion

From: Jagannadha Sutradharudu Teki <[email protected]>

The current code in image.c doesn't include the Load, Entry address and OS tag to FIT image through mkimage tool.

Due to this while extracting the ramdisk from FIT blob, bootm showing an error like...
Can't get ramdisk subimage load address!
Ramdisk image is corrupt or invalid

So, I was added Load, Entry address and also OS tag on image.c. Now mkimage is able to include these details and it's works fine.

Regards,
Jagan.

Jagannadha Sutradharudu Teki (1):
image/FIT: Add ramdisk load, entry address and OS tag inclusion

 common/image.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
author
#1 lore raw

PATCH 1/1 image/FIT: Add ramdisk load, entry address and OS tag inclusion

From: Jagannadha Sutradharudu Teki <[email protected]>

This patch adds support to include Load, Entry address and OS tag of ramdisk on to FIT image through mkimage tool.

---
 common/image.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
common/image.c +4 -3
index 91954ac..70a112d 100644
@@ -2042,13 +2042,13 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
 		printf("%s  Architecture: %s\n", p, genimg_get_arch_name(arch));
 	}
 
-	if (type == IH_TYPE_KERNEL) {
+	if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_RAMDISK)) {
 		fit_image_get_os(fit, image_noffset, &os);
 		printf("%s  OS:           %s\n", p, genimg_get_os_name(os));
 	}
 
 	if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_STANDALONE) ||
-		(type == IH_TYPE_FIRMWARE)) {
+		(type == IH_TYPE_FIRMWARE) || (type == IH_TYPE_RAMDISK)) {
 		ret = fit_image_get_load(fit, image_noffset, &load);
 		printf("%s  Load Address: ", p);
 		if (ret)
@@ -2057,7 +2057,8 @@ void fit_image_print(const void *fit, int image_noffset, const char *p)
 			printf("0x%08lx\n", load);
 	}
 
-	if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_STANDALONE)) {
+	if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_STANDALONE) ||
+		(type == IH_TYPE_RAMDISK)) {
 		fit_image_get_entry(fit, image_noffset, &entry);
 		printf("%s  Entry Point:  ", p);
 		if (ret)
Signature · 1 line
1.7.0.4
author
#2 lore raw

PATCH 1/1 image/FIT: Add ramdisk load, entry address and OS tag inclusion

Any point to consider this..or we have any solution that may not require this change?

Regards,
Jagan.

Quoted 48 lines · Jagan

From: Jagannadha Sutradharudu Teki <[email protected]>

This patch adds support to include Load, Entry address and OS tag of ramdisk on to FIT image through mkimage tool.

---
 common/image.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)
common/image.c +2 -2
index 91954ac..70a112d 100644
@@ -2042,13 +2042,13 @@ void fit_image_print(const void *fit, int
 image_noffset, const char *p)
                printf("%s  Architecture: %s\n", p,
 genimg_get_arch_name(arch));
        }
 
-       if (type == IH_TYPE_KERNEL) {
+       if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_RAMDISK)) {
                fit_image_get_os(fit, image_noffset, &os);
                printf("%s  OS:           %s\n", p,
 genimg_get_os_name(os));
        }
 
        if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_STANDALONE) ||
-               (type == IH_TYPE_FIRMWARE)) {
+               (type == IH_TYPE_FIRMWARE) || (type == IH_TYPE_RAMDISK)) {
                ret = fit_image_get_load(fit, image_noffset, &load);
                printf("%s  Load Address: ", p);
                if (ret)
common/image.c +2 -1
@@ -2057,7 +2057,8 @@ void fit_image_print(const void *fit, int
 image_noffset, const char *p)
                        printf("0x%08lx\n", load);
        }
 
-       if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_STANDALONE)) {
+       if ((type == IH_TYPE_KERNEL) || (type == IH_TYPE_STANDALONE) ||
+               (type == IH_TYPE_RAMDISK)) {
                fit_image_get_entry(fit, image_noffset, &entry);
                printf("%s  Entry Point:  ", p);

if (ret)
--
1.7.0.4

#3 lore raw

PATCH 1/1 image/FIT: Add ramdisk load, entry address and OS tag inclusion

In reply to Jagan

Dear Jagan,

Quoted 9 lines · In message <[email protected]> you wrote:

From: Jagannadha Sutradharudu Teki <[email protected]>

This patch adds support to include Load, Entry address and OS tag of ramdisk on to FIT image through mkimage tool.

---
 common/image.c |    7 ++++---
 1 files changed, 4 insertions(+), 3 deletions(-)

Applied, thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
"Spock, did you see the looks on their faces?"
"Yes, Captain, a sort of vacant contentment."