Hello All,
I know the procedure to build ramdisk in ltib set up but wanted to try similar thing in yocto. Does anybody know how to build ramdisk?
Regards,
Manju
Solved! Go to Solution.
Hello All,
I guess i have found out a way. Now yocto is not supporting .u-boot format for filesystem compilation.
The yocto now is supporting following image fstypes by default.
jffs2
jffs2.sum
cramfs
ext2
ext2.gz
ext2.bz2
ext3
ext3.gz
ext2.lzma
btrfs
live
squashfs
squashfs-xz
ubi
ubifs
tar
tar.gz
tar.bz2
tar.xz
cpio
cpio.gz
cpio.xz
cpio.lzma
vmdk
elf
So what i did was,
1. First i compiled with option ext3 and ext3.gz in local.conf.
IMAGE_FSTYPES += "ext3 ext3.gz "
Then, i used below command to get what i wanted.
2. Do bitbake again.
bitbake core-image-minimal // Now the image is of ext3.gz format
3. Now
cd tmp/deploy/images/imx6qsabresd/
4. Run the below command to generate ramdisk image.
mkimage -A arm -O linux -T ramdisk -C gzip -n core-image-minimal -d core-image-minimal-imx6qsabresd-XXXX.rootfs.ext3.gz core-image-minimal-imx6qsabresd-XXXXX.rootfs.ext3.gz.u-boot
Here core-image-minimal is the name of the RAMDISK image.
NOTE: MAKE SURE "mkimage" is there on UBUNTU else run
sudo apt-get install u-boot-tools
To burn ramdisk
dd if=ramdiskimageXXX.uboot of=/dev/mmcblk0 bs=10M seek=1
Bootargs to boot from RAMDISK
U-Boot > setenv bootargs 'root=/dev/ram rw ramdisk_size=13239 console=ttymxc0,115200'
U-Boot > setenv bootcmd 'mmc dev 1;fatload mmc 1 0x12000000 uImage;fatload mmc 1 0x18000000 imx6q-magik2.dtb; mmc read 0x20000000 0x5000 0x2200;bootm 0x12000000 0x20000000 0x18000000'
U-Boot > boot
Thanks all,
This may be a bit late to be helpful, but I found I can accomplish this by adding these two lines to my image configuration:
inherit image_types_uboot
IMAGE_FSTYPES = "ext3.gz.u-boot"
P.S. I am using "morty".
Hello Jeremy,
Thanks for the reply. But where exactly should i add this?
If i try to add it to core-image-minimal.bb file i get error like below,
ERROR: Unbuildable tasks were found.
These are usually caused by circular dependencies and any circular dependency chains found will be printed below. Increase the debug level to see a list of unbuildable tasks.
Please attach the .bb file
Regards,
Manju
Hello All,
I guess i have found out a way. Now yocto is not supporting .u-boot format for filesystem compilation.
The yocto now is supporting following image fstypes by default.
jffs2
jffs2.sum
cramfs
ext2
ext2.gz
ext2.bz2
ext3
ext3.gz
ext2.lzma
btrfs
live
squashfs
squashfs-xz
ubi
ubifs
tar
tar.gz
tar.bz2
tar.xz
cpio
cpio.gz
cpio.xz
cpio.lzma
vmdk
elf
So what i did was,
1. First i compiled with option ext3 and ext3.gz in local.conf.
IMAGE_FSTYPES += "ext3 ext3.gz "
Then, i used below command to get what i wanted.
2. Do bitbake again.
bitbake core-image-minimal // Now the image is of ext3.gz format
3. Now
cd tmp/deploy/images/imx6qsabresd/
4. Run the below command to generate ramdisk image.
mkimage -A arm -O linux -T ramdisk -C gzip -n core-image-minimal -d core-image-minimal-imx6qsabresd-XXXX.rootfs.ext3.gz core-image-minimal-imx6qsabresd-XXXXX.rootfs.ext3.gz.u-boot
Here core-image-minimal is the name of the RAMDISK image.
NOTE: MAKE SURE "mkimage" is there on UBUNTU else run
sudo apt-get install u-boot-tools
To burn ramdisk
dd if=ramdiskimageXXX.uboot of=/dev/mmcblk0 bs=10M seek=1
Bootargs to boot from RAMDISK
U-Boot > setenv bootargs 'root=/dev/ram rw ramdisk_size=13239 console=ttymxc0,115200'
U-Boot > setenv bootcmd 'mmc dev 1;fatload mmc 1 0x12000000 uImage;fatload mmc 1 0x18000000 imx6q-magik2.dtb; mmc read 0x20000000 0x5000 0x2200;bootm 0x12000000 0x20000000 0x18000000'
U-Boot > boot
Thanks all,
Hi Manjunath
for building manufacturing tool image one can look
at attached Yocto Guide sect.6.2 Manufacturing Tool, MFGTool
Best regards
igor
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------
Hello Igor,
Thanks for the immediate reply but i need a RAMDISK filesystem for a normal image like fsl-image-fb, or fsl-image-multimedia or even core-image-minimal is fine.
Regards,
Manju
Hello All,
I don't know why this thread is assumed answered. The fact of the matter is, It is still not answered. Is there any way to build rootfs.ext3.gz and rootfs.ext3.gz.u-boot .
Do i need to build with specific options in conf/local.conf or the .bb file or the ./poky/meta/classes/image_types.bbclass.
If there is a way please anybody let me know.
Or give me a link where i can get this info.
Regards,
Manju