On 26 January 2018 at 06:28, Bishop, Mark (STRT) <MBishop@ smithsinterconnectinc.com> wrote:
> Playing around with petalinux in trying to have it create a squashfs image. > > > > I added > > > > IMAGE_FSTYPES += "squashfs" > Setting IMAGE_FSTYPES with a += will override the default value set in meta-xilinx (which is set via a ?=). This will likely mean that IMAGE_FSTYPES = "squashfs" only. Which is probably what you are after, but just so you are aware. > > > To build/conf/local.conf and got these errors after a build: > > > > Checking sstate mirror object availability: 100% > |########################################################### > ############################################################################## > Time: 0:00:00 > > NOTE: Executing SetScene Tasks > > NOTE: Executing RunQueue Tasks > > ERROR: linux-xlnx-4.9-xilinx-v2017.4+gitAUTOINC+b450e900fd-r0 > do_bundle_initramfs: oe_runmake failed > > ERROR: linux-xlnx-4.9-xilinx-v2017.4+gitAUTOINC+b450e900fd-r0 > do_bundle_initramfs: Function failed: do_bundle_initramfs (log file is > located at /home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work/plnx_arm- > xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx-v2017.4+gitAUT > OINC+b450e900fd-r0/temp/log.do_bundle_initramfs.28703) > > ERROR: Logfile of failure stored in: /home/mark/git_repo/temp/tempp > roject/ZMMP_7045_PetaLinux_PL2015_2/ZMMP_7045_PL2015_2/ > build/tmp/work/plnx_arm-xilinx-linux-gnueabi/linux- > xlnx/4.9-xilinx-v2017.4+gitAUTOINC+b450e900fd-r0/temp/log. > do_bundle_initramfs.28703 > > Log data follows: > > | DEBUG: Executing shell function do_bundle_initramfs > > | NOTE: make HOSTCC=gcc HOSTCPP=gcc -E zImage > CC=arm-xilinx-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd > LD=arm-xilinx-linux-gnueabi-ld.bfd UIMAGE_LOADADDR=0x8000 > CONFIG_INITRAMFS_SOURCE=/home/mark/git_repo/temp/tempproject > /ZMMP_7045_PetaLinux_PL2015_2/ZMMP_7045_PL2015_2/build/tmp/ > work/plnx_arm-xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx- > v2017.4+gitAUTOINC+b450e900fd-r0/linux-plnx_arm-standard- > build/usr/petalinux-user-image-plnx_arm.cpio > > | ERROR: oe_runmake failed > > | Creating a kernel image with a bundled initramfs... > > | Copying initramfs into ./usr ... > > | Finished copy of initramfs into ./usr > > | CHK include/config/kernel.release > > | Using /home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work-shared/plnx_arm/kernel-source > as source for kernel > > | GEN ./Makefile > > | CHK include/generated/uapi/linux/version.h > > | CHK include/generated/utsrelease.h > > | CHK include/generated/bounds.h > > | CHK include/generated/timeconst.h > > | CHK include/generated/asm-offsets.h > > | CALL /home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work-shared/plnx_ > arm/kernel-source/scripts/checksyscalls.sh > > | CHK include/generated/compile.h > > | /home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work-shared/plnx_ > arm/kernel-source/scripts/gen_initramfs_list.sh: Cannot open > '/home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work/plnx_arm- > xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx-v2017.4+gitAUT > OINC+b450e900fd-r0/linux-plnx_arm-standard-build/usr/ > petalinux-user-image-plnx_arm.cpio' > > | make[3]: *** [/home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work-shared/plnx_ > arm/kernel-source/usr/Makefile:73: usr/initramfs_data.cpio.gz] Error 1 > This error is because you are attempting to use INITRAMFS_IMAGE_BUNDLE but you are not building the cpio image. I believe the default in PetaLinux is to use the INITRAMFS_IMAGE_BUNDLE feature, as it has been the default since even the early versions of PetaLinux which were not using Yocto/OE in any way. If you don't want to bundle a cpio, then just disable bundling either in the PetaLinux config or by setting INITRAMFS_IMAGE_BUNDLE to something other than 1. Also it should be noted that cpio is the only supported format for the in-kernel initramfs bundle. To use a squashfs you will need to use an external ramdisk, which will need to be loaded by U-Boot (or some other boot loader). So you are probably after building the squashfs.u-boot fstype or using fitimage. > | make[2]: *** [/home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work-shared/plnx_ > arm/kernel-source/Makefile:988: usr] Error 2 > > | make[1]: *** [Makefile:150: sub-make] Error 2 > > | make: *** [Makefile:24: __sub-make] Error 2 > > | ERROR: Function failed: do_bundle_initramfs (log file is located at > /home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work/plnx_arm- > xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx-v2017.4+gitAUT > OINC+b450e900fd-r0/temp/log.do_bundle_initramfs.28703) > > ERROR: Task (/opt/pkg/petalinux/2017.4/components/yocto/source/arm/layer > s/meta-xilinx/recipes-kernel/linux/linux-xlnx_4.9.bb:do_bundle_initramfs) > failed with exit code '1' > > NOTE: Tasks Summary: Attempted 2243 tasks of which 2237 didn't need to be > rerun and 1 failed. > > > > Summary: 1 task failed: > > /opt/pkg/petalinux/2017.4/components/yocto/source/arm/layers > /meta-xilinx/recipes-kernel/linux/linux-xlnx_4.9.bb:do_bundle_initramfs > > Summary: There were 2 WARNING messages shown. > > Summary: There were 2 ERROR messages shown, returning a non-zero exit code. > > ERROR: Failed to build project > > > > > > The logfile is thus: > > DEBUG: Executing shell function do_bundle_initramfs > > NOTE: make HOSTCC=gcc HOSTCPP=gcc -E zImage > CC=arm-xilinx-linux-gnueabi-gcc -mno-thumb-interwork -marm -fuse-ld=bfd > LD=arm-xilinx-linux-gnueabi-ld.bfd UIMAGE_LOADADDR=0x8000 > CONFIG_INITRAMFS_SOURCE=/home/mark/git_repo/temp/tempproject > /ZMMP_7045_PetaLinux_PL2015_2/ZMMP_7045_PL2015_2/build/tmp/ > work/plnx_arm-xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx- > v2017.4+gitAUTOINC+b450e900fd-r0/linux-plnx_arm-standard- > build/usr/petalinux-user-image-plnx_arm.cpio > > ERROR: oe_runmake failed > > Creating a kernel image with a bundled initramfs... > > Copying initramfs into ./usr ... > > Finished copy of initramfs into ./usr > > CHK include/config/kernel.release > > Using /home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work-shared/plnx_arm/kernel-source > as source for kernel > > GEN ./Makefile > > CHK include/generated/uapi/linux/version.h > > CHK include/generated/utsrelease.h > > CHK include/generated/bounds.h > > CHK include/generated/timeconst.h > > CHK include/generated/asm-offsets.h > > CALL /home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work-shared/plnx_ > arm/kernel-source/scripts/checksyscalls.sh > > CHK include/generated/compile.h > > /home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work-shared/plnx_ > arm/kernel-source/scripts/gen_initramfs_list.sh: Cannot open > '/home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work/plnx_arm- > xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx-v2017.4+gitAUT > OINC+b450e900fd-r0/linux-plnx_arm-standard-build/usr/ > petalinux-user-image-plnx_arm.cpio' > > make[3]: *** [/home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work-shared/plnx_ > arm/kernel-source/usr/Makefile:73: usr/initramfs_data.cpio.gz] Error 1 > > make[2]: *** [/home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work-shared/plnx_ > arm/kernel-source/Makefile:988: usr] Error 2 > > make[1]: *** [Makefile:150: sub-make] Error 2 > > make: *** [Makefile:24: __sub-make] Error 2 > > ERROR: Function failed: do_bundle_initramfs (log file is located at > /home/mark/git_repo/temp/tempproject/ZMMP_7045_PetaLinux_ > PL2015_2/ZMMP_7045_PL2015_2/build/tmp/work/plnx_arm- > xilinx-linux-gnueabi/linux-xlnx/4.9-xilinx-v2017.4+gitAUT > OINC+b450e900fd-r0/temp/log.do_bundle_initramfs.28703) > > > > > > I’m not exactly sure what to do here or if it is even possible to have > Petalinux deal with squashfs correctly. Would it be better to just use > vanilla Yocto? If so, are there any guides available that could get me up > and running quickly going from petalinux to vanilla Yocto quickly? > Using PetaLinux or Yocto/OE directly should allow you to use a squashfs as either an init-ramdisk (initrd) or as a partition/block on another block device (flash/sd/etc.). Regards, Nathan >
-- _______________________________________________ meta-xilinx mailing list meta-xilinx@yoctoproject.org https://lists.yoctoproject.org/listinfo/meta-xilinx