This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Linux/AM3352: Adding zImage to boot directory in Arago

Part Number: AM3352

Tool/software: Linux

I am having a hard time how to get the zImage to be installed to the /boot directory in the Arago Bitbake environment. I'm sure I am missing something simple but I havn't been able to figure it out. I really dont want to unpack, copy and repack the rootfs.

  • The software team have been notified. They will respond here.
  • Hello Chris,

    In Arago bitbake environment you can find the zImage, MLO, u-boot.img and device tree blobs at <tisdk>/build/arago-tmp-external-linaro-toolchain/deploy/images/am335x-evm/ and copy them to SD card's /boot partition without need of unpacking the rootfs.

    Best regards,
    Kemal

  • Hi Kemal,

    I am not loading the files onto an SD card. Instead I am creating an archive to NFS boot from. I want to be able to provide the factory an archive with everything needed so that when the archive is uncompressed into eMMC everything is there. Is this not possible though bitbake? 

    Thanks,

    Chris

  • Yes, it is possible. You need to add this to the build/conf/local.conf file and build the target.

    WKS_FILE = "sdimage-bootpart.wks"
    IMAGE_BOOT_FILES = "MLO u-boot.img"
    IMAGE_FSTYPES += "wic"
    do_image_wic[depends] += "mtools-native:do_populate_sysroot dosfstools-native:do_populate_sysroot"

    When the specified target completed you need to run.
    MACHINE=am335x-evm wic create sdimage-bootpart -e <target>

    Then transfer the /var/tmp/wic/build/sdimage-bootpart-<date-time>-mmcblk.direct to SD card and dd it to the emmc.
    dd if=sdimage-bootpart-<date-time>-mmcblk.direct of=/dev/mmcblk1

  • Hi Kemal,

    I am not looking to create an SD card image. If I understand correctly, that is what the instructions your provided will do. In fact, I got it working finally in what I think is the correct way. I simply add:

    IMAGE_INSTALL += "kernel-image"

    and there it is. Now however, I am running into the same problem with kernel modules. I tried:

    IMAGE_INSTALL += "kernel-modules"

    and I also tried adding 

    MACHINE_EXTRA_RRECOMMENDS = "kernel-modules"

    but nothing. I do see warnings when I compile the kernel though: "QA Issue: linux-ti-staging: Files/directories were installed but not shipped in any package:" and then the list of kernel modules. I don't understand why they wouldn't be packaged since they are being included in the IMAGE_INSTALL. But they are definitely not included in the rootfs. Just in case i didn't mention it, I am building arago-base-image. 

    Thanks,

    Chris

  • Have you tried to add:

    RRECOMMENDS_${PN} = "\
    kernel-modules \
    "
    in sources/meta-arago/meta-arago-distro/recipes-core/packagegroups/packagegroup-arago-base.bb

  • I just tried adding that and it didn't make any difference. It still says the packages are installed but not shipped and none of the kernel modules end up in the rootfs. One interesting thing is that FILES_kernel-modules is actually empty. I am not sure why that is but it doesn't seem correct. I would have expected that all the kernel modules be listed in there, but they are not. 

  • I finally figured it out. The problem is that by default the kernel modules are compress so they have the .ko.gz suffix. Well in ./oe-core/meta/classes/kernel-module-split.bbclass which collects the kernel modules, it searches based on the *.ko suffix only. Therefore it ignores compressed kernel modules.

    122 module_regex = '^(.*)\.k?o$'

    To verify I changed my kernel config to be uncompressed and now they appear in the rootfs. However I would rather fix the root problem so I could update the regex but then I have to patch that file. Not sure if I submit it back upstream if it will come down morty or not. Either way I would like to point this out to the oe-core maintainers because I think it should be fixed.