[yocto] yocto linux syslinux and intramfs

Lars Larsen lars at visionweeding.com
Thu Sep 22 11:23:13 PDT 2016


Hello yocto world

I desperately need some help
It spawns off my yocto build, so I guess (hope) there is a wise guy or 
two,that can give me some pointers
I realize is not 100% yocto related but, lean towards generic Linux - so 
please forgive me.

I want to be able to boot up from flash, using a rw ramdisk that 
'vanish' when I reboot.
I use SYSLINUX to boot the target.

I have a recipe that can build an image, that works fine.
Now I want it convoluted in an intramfs.

my image recipe

mybase.bb:

DESCRIPTION = "A base image that boots and work"

ALL_MY_APPS= " app1 app2 app3" ## all the software i want on target"
IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} \
  ${CORE_IMAGE_EXTRA_INSTALL} ${ALL_MYAPPS}"
inherit core-image


It creates a nice mybase-image-genericxx86..hdd image and  I copy the 
contents to my flash card.
All very nice
it gets booted,with these lines in syslinux.cfg

LABEL boot
KERNEL /vmlinuz
APPEND initrd=/rootfs.img LABEL=boot  root=/dev/ram0



But If I make a new

conf/initramfs.conf:

IMAGE_FSTYPES = "cpio.gz"

INITRAMFS_IMAGE = "mybase"
INITRAMFS_IMAGE_BUNDLE = "1"

and then run the command
bitbake -R conf/initramfs.conf mybase

I as expected get an bzImage-initramfs-genericx86.bin
I presume this file contains the kernel as well as my rootfs as the initrd
But what to put in syslinux.cfg ?
The logical choise seems to be:


LABEL boot
KERNEL /bzImage-initramfs-genericx86.bin
APPEND LABEL=boot root=/dev/ram0

but it doesn't boot at all. Only flicker on the console, seems to be 
invalid code.

Any advice any one ?
BR Lars



More information about the yocto mailing list