can you build bootable SD card / SPI flash images from upstream yocto?

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

can you build bootable SD card / SPI flash images from upstream yocto?

Jump to solution
845 Views
t-naruka
Contributor I

Hello all,

I am building yocto images without the SDK instructions (which I am also doing separately now).

These are the layers and image that I use:

git clone -b kirkstone git://git.yoctoproject.org/poky.git

# for nxp/freescale, get this bitbake layer
git clone -b kirkstone git://git.yoctoproject.org/meta-freescale

# Then edit bblayers.conf for above layer, and add MACHINE in local.conf
# Build core-image-minimal

bitbake core-image-minimal

I can generate some images in build/tmp/deploy/images/ls1046ardb, and in these, there is a SD card image as core-image-minimal-ls1046ardb-20230530023005.rootfs.wic.bz2.

This SD card is bootable, and u-boot runs fine, however, I cannot boot the kernel as is. The 'Image' file is not bootable by uboot. The file type for it is:

Image--5.10.52+git0+a11753a89e-r0-ls1046ardb-20230530023005.bin: MS-DOS executable PE32+ executable (EFI application) Aarch64 (stripped to external PDB), for MS Windows

Second issue I have is that when I copied the fitImage generated here, u-boot fails to read the file (or anything in the partition). I made the partition 32-bit again with 'resize2fs -s', but that didn't solve the problem, so I recreated the partition with mkfs.ext2 instead and I could boot the kernel (wrong commandline, so not rootfs was found, and kernel panic happened).

What I would like to know is if we can build a image that can be directly booted with the board, without tweaking anything and using just meta-freescale layer?

Labels (1)
Tags (3)
0 Kudos
Reply
1 Solution
813 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please download Yocto SDK recipes with the following command.

Install 'repo' tool
===================
To use this manifest repo, the 'repo' tool must be isntalled first
$: mkdir ~/bin
$: curl http://commondatastorage.googleapis.com/git-repo-downloads/repo  > ~/bin/repo
$: chmod a+x ~/bin/repo
$: PATH=${PATH}:~/bin

Download Yocto Layers
$: mkdir yocto-sdk
$: cd yocto-sdk
$: repo init -u https://github.com/nxp-qoriq/yocto-sdk -b kirkstone
$: repo sync --force-sync

 Linux Kernel recipe in meta-qoriq/recipes-kernel/linux/linux-qoriq_5.15.bb was missed.

View solution in original post

0 Kudos
Reply
1 Reply
814 Views
yipingwang
NXP TechSupport
NXP TechSupport

Please download Yocto SDK recipes with the following command.

Install 'repo' tool
===================
To use this manifest repo, the 'repo' tool must be isntalled first
$: mkdir ~/bin
$: curl http://commondatastorage.googleapis.com/git-repo-downloads/repo  > ~/bin/repo
$: chmod a+x ~/bin/repo
$: PATH=${PATH}:~/bin

Download Yocto Layers
$: mkdir yocto-sdk
$: cd yocto-sdk
$: repo init -u https://github.com/nxp-qoriq/yocto-sdk -b kirkstone
$: repo sync --force-sync

 Linux Kernel recipe in meta-qoriq/recipes-kernel/linux/linux-qoriq_5.15.bb was missed.

0 Kudos
Reply