=== modified file 'grub-core/kern/arm/uboot/startup.S' --- grub-core/kern/arm/uboot/startup.S 2013-04-28 23:59:17 +0000 +++ grub-core/kern/arm/uboot/startup.S 2013-04-30 20:55:46 +0000 @@ -79,6 +79,8 @@ add r3, r0, r2 @ blob end cmp r1, r3 @ _end < blob end? movlt r1, r3 @ dst = blob end + blob size + ldr r12, =EXT_C(grub_modbase) + str r1, [r12] @ grub_modbase = dst 1: ldr r3, [r0], #4 @ r3 = *src++ str r3, [r1], #4 @ *dst++ = r3 === modified file 'grub-core/kern/uboot/init.c' --- grub-core/kern/uboot/init.c 2013-04-28 22:14:05 +0000 +++ grub-core/kern/uboot/init.c 2013-04-30 20:59:19 +0000 @@ -31,8 +31,6 @@ #include #include -extern char __bss_start[]; -extern char _end[]; extern grub_size_t grub_total_module_size; extern int (*grub_uboot_syscall_ptr) (int, int *, ...); @@ -70,7 +68,6 @@ void grub_machine_init (void) { - grub_addr_t end, real_bss_start; int ver; /* First of all - establish connection with U-Boot */ @@ -86,26 +83,12 @@ grub_uboot_puts ("invalid U-Boot API version\n"); } - /* - * Modules were relocated to _end, or __bss_start + grub_total_module_size, - * whichever greater. (And __bss_start may not point to actual BSS start...) - */ - real_bss_start = grub_uboot_get_real_bss_start (); - end = real_bss_start + grub_total_module_size; - if (end < (grub_addr_t) _end) - end = (grub_addr_t) _end; - grub_modbase = end; - /* Initialize the console so that GRUB can display messages. */ grub_console_init_early (); /* Enumerate memory and initialize the memory management system. */ grub_uboot_mm_init (); - grub_dprintf ("init", "__bss_start: 0x%08x, real_bss_start: 0x%08x\n", - (grub_addr_t) __bss_start, real_bss_start); - grub_dprintf ("init", "end: 0x%08x, _end: 0x%08x\n", - (grub_addr_t) end, (grub_addr_t) _end); grub_dprintf ("init", "grub_modbase: %p\n", (void *) grub_modbase); grub_dprintf ("init", "grub_modules_get_end(): %p\n", (void *) grub_modules_get_end ());