Yocto with Initial RamFS
Hello,
I have an initial ramfs image that I want to convert to Yocto. That is in addition to the main yocto-based custom distro.
The initial ram fs is a tiny image based on uclibc (poky-tiny) and having busybox and two other compiled apps. The main file system is eglibc-based.
How is this sort of thing typically done in the Yocto world? Since the toolchain is totally different for the initial ramfs, do I need to have another distro and totally different directory for creating the initialramfs, giving two different distros and yocto directories? Or can I somehow do it under the umbrella of one Yocto distro?
I would like some feedback on how this should be done.
Thanks,
Brian
Hi,
Was wondering why this has not been answered. Maybe it is too dumb of a question? If so, let me know or point me to some documentation.
Thanks.
Brian
Quoted 13 lines · Brian Smucker
Hello,
I have an initial ramfs image that I want to convert to Yocto. That is in addition to the main yocto-based custom distro.
The initial ram fs is a tiny image based on uclibc (poky-tiny) and having busybox and two other compiled apps. The main file system is eglibc-based.
How is this sort of thing typically done in the Yocto world? Since the toolchain is totally different for the initial ramfs, do I need to have another distro and totally different directory for creating the initialramfs, giving two different distros and yocto directories? Or can I somehow do it under the umbrella of one Yocto distro?
I would like some feedback on how this should be done.
Thanks,
Brian
Torsdag den 29. maj 2014 08:07:11 skrev Brian Smucker:
Quoted 5 lines
Hi,
Was wondering why this has not been answered. Maybe it is too dumb of a question? If so, let me know or point me to some documentation.
I'm declaring an initramfs-image like this. As you can see the recipe is derived from core-image-minimal-initramfs. The package initramfs-vm provides the script /init executed on boot.
The "assembling" of the actual bootable image with initramfs and rootfs (in my case a squashfs) is done in another script.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
# initramfs for vm-image. Derived from core-image-minimal-initramfs DESCRIPTION = "Small image capable of booting a a squashfs+aufs filesystem"
IMAGE_INSTALL = "initramfs-vm-boot busybox udev base-passwd"
# Do not pollute the initrd image with rootfs features IMAGE_FEATURES = ""IMAGE_LINGUAS = ""
#DISTRO_FEATURES = ""
inherit core-image
IMAGE_FSTYPES = "cpio"
IMAGE_PREPROCESS_COMMAND = "cb16_remote_bloat;"
cb16_remote_bloat() {
rm -r ${IMAGE_ROOTFS}/boot
}<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Signature · 1 line
Søren Holm
Thanks Soren,
My followup question is: Can I mix toolchains in this situation?
Can I compile the initramfs binaries with the uclibc toolchain based on the poky-tiny distro and the regular file system binaries with the glibc-based toolchain (based on a different distro)?
If this is possible, how would I begin to do it?
Thanks,
Brian
Quoted 35 lines · Søren Holm
Torsdag den 29. maj 2014 08:07:11 skrev Brian Smucker:
Quoted 5 lines
Hi,
Was wondering why this has not been answered. Maybe it is too dumb of a question? If so, let me know or point me to some documentation.
I'm declaring an initramfs-image like this. As you can see the recipe is derived from core-image-minimal-initramfs. The package initramfs-vm provides the script /init executed on boot.
The "assembling" of the actual bootable image with initramfs and rootfs (in my case a squashfs) is done in another script.
<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
# initramfs for vm-image. Derived from core-image-minimal-initramfs DESCRIPTION = "Small image capable of booting a a squashfs+aufs filesystem"
IMAGE_INSTALL= "initramfs-vm-boot busybox udev base-passwd"# Do not pollute the initrd image with rootfs features
IMAGE_FEATURES= ""IMAGE_LINGUAS= ""
#DISTRO_FEATURES = ""inherit core-image
IMAGE_FSTYPES= "cpio"
IMAGE_PREPROCESS_COMMAND= "cb16_remote_bloat;"cb16_remote_bloat() { rm -r ${IMAGE_ROOTFS}/boot }<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
Torsdag den 29. maj 2014 09:49:55 skrev Brian Smucker:
Quoted 9 lines
Thanks Soren,
My followup question is: Can I mix toolchains in this situation?
Can I compile the initramfs binaries with the uclibc toolchain based on the poky-tiny distro and the regular file system binaries with the glibc-based toolchain (based on a different distro)?
If this is possible, how would I begin to do it?
I don't know, but I've got a simmilar need. Basically I was a very minimal busybox-static for the initramfs, but a "full-fledged" version for the main rootfs. I guess that's somehow the same thing.
Maybe you have an idea on how to do that?
Signature · 1 line
Søren Holm
Quoted 9 lines · Søren Holm
Torsdag den 29. maj 2014 09:49:55 skrev Brian Smucker:
Quoted 8 lines
Thanks Soren,
My followup question is: Can I mix toolchains in this situation?
Can I compile the initramfs binaries with the uclibc toolchain based on the poky-tiny distro and the regular file system binaries with the glibc-based toolchain (based on a different distro)?
Quoted 6 lines
Quoted 1 line
If this is possible, how would I begin to do it?
I don't know, but I've got a simmilar need. Basically I was a very minimal busybox-static for the initramfs, but a "full-fledged" version for the main rootfs. I guess that's somehow the same thing.
Maybe you have an idea on how to do that?
I don't know. I'm somewhat of a newbie here.
It seems this type of requirement should not be unusual in the embedded space.
Am hoping others can weigh in on this.
Thanks,
Brian
Quoted 2 lines · Brian Smucker
My followup question is: Can I mix toolchains in this situation?
No, not easily. Although you can see if klibc is an option for you. meta-initramfs has support for that
Quoted 7 lines
Can I compile the initramfs binaries with the uclibc toolchain based on the poky-tiny distro and the regular file system binaries with the glibc-based toolchain (based on a different distro)?
If this is possible, how would I begin to do it?
T