Skip to contentSkip to conversation

image.c: Fix non-Android booting with ramdisk and/or device tree

PATCH New Tom Rini 1 participant 2 messages Oct 27, 2015 – Oct 28, 2015

lore
Share & tools
lore

Tom Rini

author
#0 lore raw

PATCH 1/1 image.c: Fix non-Android booting with ramdisk and/or device tree

In 1fec3c5 I added a check that if we had an Android image we default to trying the kernel address for a ramdisk. However when we don't have an Android image buf is NULL and we oops here. Ensure that we have 'buf' to check first.

---
 common/image.c |    2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/image.c +1 -1
index e607109..85c4f39 100644
@@ -913,7 +913,7 @@ int boot_get_ramdisk(int argc, char * const argv[], bootm_headers_t *images,
 	 * Look for an Android boot image.
 	 */
 	buf = map_sysmem(images->os.start, 0);
-	if (genimg_get_format(buf) == IMAGE_FORMAT_ANDROID)
+	if (buf && genimg_get_format(buf) == IMAGE_FORMAT_ANDROID)
 		select = argv[0];
 #endif
 
Signature · 1 line
1.7.9.5
author
#1 lore raw

PATCH 1/1 image.c: Fix non-Android booting with ramdisk and/or device tree

Quoted 7 lines · Tom Rini

In 1fec3c5 I added a check that if we had an Android image we default to trying the kernel address for a ramdisk. However when we don't have an Android image buf is NULL and we oops here. Ensure that we have 'buf' to check first.

Applied to u-boot/master, thanks!

Signature · 8 lines
Tom
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 836 bytes
Desc: Digital signature
URL: <http://lists.denx.de/pipermail/u-boot/attachments/20151028/134baebf/attachment.sig>