[PATCH 1/4] arm/bootm: fix initrd_start init

Jean-Christophe PLAGNIOL-VILLARD plagnioj at jcrosoft.com
Mon Aug 13 02:57:11 EDT 2012


initrd_start need to be init to data->initrd_address and updated only if the
addr is invalid.

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj at jcrosoft.com>
---
 arch/arm/lib/bootm.c |    4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c
index a8840fe..c5b76ea 100644
--- a/arch/arm/lib/bootm.c
+++ b/arch/arm/lib/bootm.c
@@ -58,7 +58,9 @@ static int __do_bootm_linux(struct image_data *data, int swap)
 
 	kernel = data->os_res->start + data->os_entry;
 
-	if (data->initrd_file && data->initrd_address == UIMAGE_INVALID_ADDRESS) {
+	initrd_start = data->initrd_address;
+
+	if (data->initrd_file && initrd_start == UIMAGE_INVALID_ADDRESS) {
 		initrd_start = data->os_res->start + SZ_8M;
 
 		if (bootm_verbose(data)) {
-- 
1.7.10.4




More information about the barebox mailing list