Hi,
here's a small patch to make initrd working on ARM in u-boot-v2.

I use it to boot over the network like this:
tftp /tftpboot/kernel.uImage kernel
tftp /tftpboot/rootfs.uImage rootfs
bootm -r rootfs kernel

I create the rootfs image like this:
mkimage -A arm -O linux -T ramdisk -C none -a 0xA0800000 -n rootfs \
  -d rootfs.cpio.gz rootfs.uImage
(this is for imx27)

regards,

Eric


Signed-off-by: Eric Lammerts <[email protected]>

diff --git a/arch/arm/lib/armlinux.c b/arch/arm/lib/armlinux.c
index ce86ff8..7d686eb 100644
--- a/arch/arm/lib/armlinux.c
+++ b/arch/arm/lib/armlinux.c
@@ -68,14 +68,12 @@ static void __setup_memory_tags(void);
 #define setup_memory_tags() do {} while(0)
 #endif

-#if 0
 #ifdef CONFIG_INITRD_TAG
 static void __setup_initrd_tag(ulong initrd_start, ulong initrd_end);
 #define setup_initrd_tag __setup_initrd_tag
 #else
 #define setup_initrd_tag(a,b) do {} while(0)
 #endif
-#endif

 extern ulong calc_fbsize(void);
 #if defined (CONFIG_VFD) || defined (CONFIG_LCD)
@@ -156,10 +154,8 @@ int do_bootm_linux(struct image_data *data)
        setup_revision_tag(&params);
        setup_memory_tags();
        setup_commandline_tag(commandline);
-#if 0
-       if (initrd_start && initrd_end)
-               setup_initrd_tag (initrd_start, initrd_end);
-#endif
+       if (data->initrd->data)
+               setup_initrd_tag ((ulong)data->initrd->data, 
(ulong)data->initrd->data + ntohl(data->initrd->header.ih_size));
        setup_videolfb_tag((gd_t *) gd);
        setup_end_tag();

_______________________________________________
U-Boot mailing list
[email protected]
http://lists.denx.de/mailman/listinfo/u-boot

Reply via email to