x86: Passing arbitrary data from bootloader to kernel
Hi Guys, I'm working with the U-Boot bootloader on an embedded x86 system. Recently a patch series was comitted to U-Boot mainline which allows the boot sequence to be profiled. This produces an array of 'Boot Stage Records' which indicate how long it took U-Boot to reach a given point in the boot sequence. I would like to pass this information to the Linux kernel and ultimately into user space. ARM has device tree support and the creator of the boot stage patches is planning to put the U-Boot boot stage data into the device tree that is passed to the kernel. x86 does not have device tree support. So I started to think about ramfs... What if U-Boot created a cpio archive on the fly and passed this to the Linux kernel as a persistent ramfs? The ramfs would be sperate fromt he initramfs (not used in the boot process - simply used to efficiently pass data from the boot loader to user-space). This could allow the passing of arbitrary data from the boot loader, through the kernel and into user space. Does this sound like a harebrained idea? Regards, Graeme
Hi Graeme... On Wed, Mar 28, 2012 at 10:16, Graeme Russ <graeme.russ@gmail.com> wrote:
What if U-Boot created a cpio archive on the fly and passed this to the Linux kernel as a persistent ramfs? The ramfs would be sperate fromt he initramfs (not used in the boot process - simply used to efficiently pass data from the boot loader to user-space). This could allow the passing of arbitrary data from the boot loader, through the kernel and into user space.
Does this sound like a harebrained idea?
I have no experience in boot loader thingies and such, but I think your idea sounds simple but efficient enough to transport the data gathered during boot stage into user space. And it's quite platform independent too.... -- regards, Mulyadi Santosa Freelance Linux trainer and consultant blog: the-hydra.blogspot.com training: mulyaditraining.blogspot.com
participants (2)
-
Graeme Russ -
Mulyadi Santosa