creating a ubuntu rootfs
Hi,
I'm trying to create a Yocto kernel with a ubuntu-core rootfs. At the moment I'm creating a core-image-base and then splatting an ubuntu-core-12.04.5-core-armhf.tar.gz over the rootfs on the image. eg
Create a core-image-base image
$ bitbake core-image-base
Insert a sdcard and copy the core image on to it and then mount the rootfs
$ sudo dd if=~/core-image-base-imx6qsabresd.sdcard of=/dev/sdb bs=1M && sync sudo mount /dev/sdb2 /mnt/sdcard/
Remove all files on the sdcard rootfs (eg sdb2) and then untar the unbuntu core over the old rootfs, eg
$ cd /mnt/sdcard $ sudo tar -xf ~/ubuntu-precise-12.04.3-armhf.com-20131129.tar.xz
Then copy the original fsl-image-base lib/modules/* & boot/* over the ubuntu core rootfs
$ cd ~ $ sudo mount -o loop -t ext3 core-image-base-imx6qsabresd.ext3 rootfs $ sudo rsync -artv rootfs/lib/modules/ /mnt/sdcard/lib/modules/ $ sudo rsync -artv rootfs/boot/ /mnt/sdcard/boot/
This all works, but I would really like to create a recipe that does all of this work for me. But I believe my new recipe can't delete anything already installed on the rootfs.
So I need to create a recipe that only installs /lib/modules/* /boot/* and kernel source files (I also want to build kernel drivers on the target so I guess I will also need recipe kernel-devsrc) on the rootfs.
I've looked at core-image-base (and others) and this seems to inherit image.bbclass, but this adds a basic rootfs which will stop me from splatting my ubuntu-core over it.
Can Yocto be configured to achieve this or should I stick to my current hack?
Cheers
Chris