I am using ls1012aFRDM development board. I used following method to add my application executable file in rootfs
1. rename your RAM disk image to rootfs.ext2.gz.uboot
2. sudo apt-get install u-boot-tools
3.dd if=rootfs.ext2.gz.uboot of=rootfs.ext2.gz bs=64 skip=1
4. gunzip rootfs.ext2.gz
5. mkdir /mnt/iso_1
6. sudo mount -oloop rootfs.ext2 /mnt/iso_1
7. Now, I copped files into appropriate location under “./mnt/iso_1” directory.
8. sudo umount /mnt/iso_1
9. gzip -9 rootfs.ext2
10 mkimage -A arm64 -O linux -T ramdisk -C gzip -n 'rootfs.ext2.gz.uboot' -d rootfs.ext2.gz rootfs.ext2.gz.uboot
My questions are
1. Is the above method is correct.
2. How to create kernel.itb with this file system.
3. While create mkimage, What should be the Load Address and Entry Point address for rootfs and kernel image
4. I also tried files/merge method, but it gives following error after performing bitbake fsl-image-core
WARNING: Duplicate inclusion for /home/nntechsol/source/yacto/QorIQ-SDK-V2.0-20160527-yocto/sources/meta-virtualization/conf/distro/include/virt_security_flags.inc in /home/nntechsol/source/yacto/QorIQ-SDK-V2.0-20160527-yocto/sources/meta-virtualization/conf/layer.conf
ERROR: QA Issue: merge-files: Recipe inherits the allarch class, but has packaged architecture-specific binaries [arch]
WARNING: QA Issue: /home/root/hello.elf_merge-files contained in package merge-files requires libc.so.6(GLIBC_2.2.5)(64bit), but no providers found in its RDEPENDS [file-rdeps]
ERROR: QA run found fatal errors. Please consider fixing them.
ERROR: Function failed: do_package_qa
ERROR: Logfile of failure stored in: /home/nntechsol/source/yacto/QorIQ-SDK-V2.0-20160527-yocto/build_ls1012afrdm/tmp/work/all-fsl-linux/merge-files/1.0-r0/temp/log.do_package_qa.24128
ERROR: Task 1288 (/home/nntechsol/source/yacto/QorIQ-SDK-V2.0-20160527-yocto/sources/meta-freescale/recipes-extended/merge-files/merge-files_1.0.bb, do_package_qa) failed with exit code '1'
NOTE: Tasks Summary: Attempted 3491 tasks of which 3479 didn't need to be rerun and 1 failed.
Waiting for 0 running tasks to finish:
Summary: 1 task failed:
/home/nntechsol/source/yacto/QorIQ-SDK-V2.0-20160527-yocto/sources/meta-freescale/recipes-extended/merge-files/merge-files_1.0.bb, do_package_qa
Summary: There were 31 WARNING messages shown.
Summary: There were 3 ERROR messages shown, returning a non-zero exit code.
So please suggest
Thanks
Minal
Pavel - thank you for he reply. I had updated the file name already to be correct for LSDK 19.03. My commands and associated output are shown below with step numbers prepended. I do not understand why the dd operation is performed on the compressed image. I think this is why I am getting the bad format error. Are the steps out of order?
Thanks,
Dan
cd flexbuild_lsdk1903/packages/rfs/ramdiskrfs
1 - $ sudo mv ramdisk_rootfs_arm64.ext4.gz ramdisk_rootfs_arm64.ext4.gz.uboot
3 - $ sudo dd if=ramdisk_rootfs_arm64.ext4.gz.uboot of=ramdisk_rootfs_arm64.ext4.gz bs=64 skip=1
175728+1 records in
175728+1 records out
11246634 bytes (11 MB, 11 MiB) copied, 0.304536 s, 36.9 MB/s
4 - $ sudo gunzip ramdisk_rootfs_arm64.ext4.gz
gzip: ramdisk_rootfs_arm64.ext4.gz: not in gzip format
Use the following command:
sudo gunzip ramdisk_rootfs_arm64.ext4.gz
Have a great day,
Pavel Chubakov
-------------------------------------------------------------------------------
Note:
This thread is continued as a private discussion with the submitter,
NXP support is not following the thread anymore.
-------------------------------------------------------------------------------
Hello Minal / Pavel - I attempted to use your method with LSDK 19.03 but after step 4 I get "gzip: ramdisk_rootfs_arm64.ext4.gz: not in gzip format" . Could either of you give more detail about what your are doing in steps 1-10 above so as to help me debug my error?
Thanks,
Dan
http://code.metager.de/source/xref/denx/u-boot/doc/uImage.FIT/howto.txt
and
http://manpages.ubuntu.com/manpages/xenial/man1/mkimage.1.html
and
https://linux.die.net/man/1/mkimage
Use the following command:
mkimage -f kernel.its kernel.itb
Have a great day,
Pavel Chubakov
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------