* [U-Boot] initramfs support through the initrd mechanism of u-boot
@ 2011-07-14 14:17 Cao, Da-Shi
2011-07-14 14:40 ` Albert ARIBAUD
0 siblings, 1 reply; 3+ messages in thread
From: Cao, Da-Shi @ 2011-07-14 14:17 UTC (permalink / raw)
To: u-boot
Currently the support of Linux initial file system by u-boot is a file system image through "initrd". I tweaked a little of both the "lib_arm/armlinux.c" and the initramfs of Linux (a gziped cpio) so that the initramfs file could be passed to the kernel.
For example: bootm c0008000 c1008000 will pass c1008000 to kernel as the start address of a initramfs.
However in the Linux kernel it seems that it expects a physical address of initrd start, but u-boot passes a virtual address if MMU is enable.
So a "virt_to_phy" should be used on the address before it is passed to the kernel.
I'm currently using a Mini6410 (with Samsung S3C6410 CPU), an ARM board from China.
Thanks,
Thomas
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] initramfs support through the initrd mechanism of u-boot
2011-07-14 14:17 [U-Boot] initramfs support through the initrd mechanism of u-boot Cao, Da-Shi
@ 2011-07-14 14:40 ` Albert ARIBAUD
[not found] ` <C12A6026D660AE43A63DC2270B27335475BBA43F25@GVW1154EXB.americas.hpqcorp.net>
0 siblings, 1 reply; 3+ messages in thread
From: Albert ARIBAUD @ 2011-07-14 14:40 UTC (permalink / raw)
To: u-boot
Hi Thomas,
Le 14/07/2011 16:17, Cao, Da-Shi (EB-Presales-ZTE/HW-GZ) a ?crit :
> Currently the support of Linux initial file system by u-boot is a file system image through "initrd". I tweaked a little of both the "lib_arm/armlinux.c" and the initramfs of Linux (a gziped cpio) so that the initramfs file could be passed to the kernel.
Not sure why you need this. Can you not simply make a uImage of the
initrd and leave bootm untouched?
> For example: bootm c0008000 c1008000 will pass c1008000 to kernel as the start address of a initramfs.
That's already what's being done except for the format of the initramfs
IIUC, see <http://www.denx.de/wiki/view/DULG/LinuxRamdiskRoot> for instance.
> However in the Linux kernel it seems that it expects a physical address of initrd start, but u-boot passes a virtual address if MMU is enable.
> So a "virt_to_phy" should be used on the address before it is passed to the kernel.
Hmm... This should be a problem anyway, whether you pass a gzipped CPIO
or an U-Boot initrd image I guess. How do you get to this diagnostic?
> I'm currently using a Mini6410 (with Samsung S3C6410 CPU), an ARM board from China.
>
> Thanks,
> Thomas
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] initramfs support through the initrd mechanism of u-boot
[not found] ` <C12A6026D660AE43A63DC2270B27335475BBA43F25@GVW1154EXB.americas.hpqcorp.net>
@ 2011-07-16 9:25 ` Albert ARIBAUD
0 siblings, 0 replies; 3+ messages in thread
From: Albert ARIBAUD @ 2011-07-16 9:25 UTC (permalink / raw)
To: u-boot
Hi Thomas,
Le 15/07/2011 09:53, Cao, Da-Shi (EB-Presales-ZTE/HW-GZ) a ?crit :
> Hi Albert?
> I did not know how to make a uImage of initrd. I guess u-boot does not support the gzipped cpio as an initrd. As I'm new to u-boot, so I would be glad if I can make the gzipped cpio to be acceptable by u-boot as a valid initrd.
This is something that you can probably find answers to in Denx' ELDK --
see the Denx website.
> As for the physical address, it is in the file arch/arm/mm/init.c of Linux kernel. It works when I pass a physical address of initrd to it. It seems that if the old format of initrd is passed to Linux kernel, it expects a virtual address!
>
> I can either change the init.c of Linux kernel to expect a virtual address, or change the u-boot to give a physical address. It is more dependable to make u-boot send out a physical address, as the virtual address of u-boot may not be the virtual address of the Linux kernel, although it is now identical for current moment.
I am surprised that U-Boot provides a virtual address. If you are sure
that it does -- i.e. if you have traced the current (git u-boot/master)
U-Boot code and made sure that the address passed is not correct as a
physical address and is correct as a virtual one, then please open a new
discussion thread here with an adequate subject and mention the exact SW
and HW setup you're using, along with your observations.
> Thanks a lot.
> Thomas
Amicalement,
--
Albert.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-16 9:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-14 14:17 [U-Boot] initramfs support through the initrd mechanism of u-boot Cao, Da-Shi
2011-07-14 14:40 ` Albert ARIBAUD
[not found] ` <C12A6026D660AE43A63DC2270B27335475BBA43F25@GVW1154EXB.americas.hpqcorp.net>
2011-07-16 9:25 ` Albert ARIBAUD
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox