[yocto] Network booting

Chris Tapp opensource at keylevel.com
Thu Aug 1 11:50:43 PDT 2013


Hi Paul,

On 1 Aug 2013, at 09:35, Paul Eggleton wrote:

> Hi Chris,
> 
> On Wednesday 31 July 2013 22:25:42 Chris Tapp wrote:
>> On 31 Jul 2013, at 21:30, Chris Tapp wrote:
>>> Is there an easy way to have a system boot and load the rootfs from a
>>> network server?
>>> 
>>> I'm using an x86 system and can have the kernel and an initrd on it. I
>>> would use bootp, but a lot of end users either don't have this or will
>>> not allow it to be used. I think it needs to go something like:
>>> 
>>> 1) Kernel loads the initrd and bring the network up (static or DHCP);
>>> 2) The rootfs image can then be download;
>>> 3) Some magic then makes this run...
>>> 
>>> This would allow easy update of the rootfs and makes it non-volatile
>>> (which is good for this project).
>>> 
>>> Does this make sense, or is there a better / easier way to do it?
>> 
>> Looks like http://ipxe.org/ could be what's needed.
> 
> FWIW, a couple of years ago I did write a recipe for ipxe which I successfully
> used for over-the-network booting with atom-pc. I never found a proper home
> for it though so it's still sitting in one of my poky-contrib branches:
> 
> http://git.yoctoproject.org/cgit/cgit.cgi/poky-contrib/tree/meta/recipes-bsp/ipxe?h=paule/ipxe
> 
> Feel free to make use of it if it helps you. (I can't promise it hasn't
> bitrotted in the time since I wrote it, so it may need tweaking; I notice
> I didn't even specify a SRCREV which really should be specified, and
> I'm not sure if it's cross-compiling properly either).


I'm running on Cedartrail, so this will probably work nearly as-is. Thanks.

I need to use http rather then tftp, but that looks simple enough to do.

I think I need to add a new image so that a SYSLINUX (or EXTLINUX) USB boot disk image gets created at the same time as the kernel / rootfs. I can do this manually, but it'll probably be worth adding it as another build option (note to self: make it usable as in installer as well). Just need to find a recipe that installs syslinux to see how to do it...

Chris Tapp

opensource at keylevel.com
www.keylevel.com






More information about the yocto mailing list