[meta-freescale] Rebuilding kernel doesn't rebuild sdcard image
craig.mcqueen at beamcommunications.com
Mon Nov 10 19:52:31 PST 2014
I'm trying out Yocto to build core-image-minimal for imx28evk. I was
able to build with the linux-imx kernel provider (which builds a 2.6.35
kernel), and then switch to linux-fslc kernel provider (3.14.19 kernel).
That seemed fine.
But now I am trying to switch back to linux-imx kernel provider, to
check some things with the 2.6.35 kernel. But when I write the sdcard
image then boot, I find the sdcard image still contains the 3.14.19 kernel.
bitbake -c cleansstate linux-fslc
bitbake -c cleansstate linux-imx
But still the sdcard image contains the 3.14.19 kernel.
I had a closer look at what's in the build/tmp/deploy/images/imx28evk
directory. Here is the latest .sdcard file, and the latest uImage file:
-rw-r--r-- 1 craigm craigm 83886080 Nov 10 16:25
-rw-r--r-- 2 craigm craigm 2612944 Nov 10 17:13
I check the uImage file:
uImage--220.127.116.11-r45-imx28evk-20141110060936.bin: u-boot legacy
uImage, Linux-18.104.22.168-maintain+yocto+gb, Linux/ARM, OS Kernel Image
(Not compressed), 2612880 bytes, Mon Nov 10 17:12:44 2014, Load Address:
0x40008000, Entry Point: 0x40008000, Header CRC: 0x35886962, Data CRC:
So the uImage has been built fine. But it looks as though the
core-image-minimal-imx28evk-xxxx.rootfs.sdcard has not been subsequently
rebuilt. Perhaps the .sdcard file is only rebuilt if the root file
system changes, but not if the kernel only changes.
To confirm this, I mount the SD card and check its contents, and I see
the uImage still contains a 3.14.19 kernel:
file /media/craigm/Boot\ imx28e/uImage
/media/craigm/Boot imx28e/uImage: u-boot legacy uImage,
Linux-3.14.19-fslc+g00e4721, Linux/ARM, OS Kernel Image (Not
compressed), 3586912 bytes, Mon Nov 10 12:10:21 2014, Load Address:
0x40008000, Entry Point: 0x40008000, Header CRC: 0x9CFC9D94, Data CRC:
After this, I tried to force an SD card image rebuild, by rebuilding an
bitbake -c cleansstate nano
It rebuilt nano, but didn't rebuild _any_ of the images in
build/tmp/deploy/images/imx28evk. So it looks as though the problem is
bigger than I originally thought. I'm fairly new to Yocto, so I'm not
sure what is going on here.
Is it possible to update the recipe that builds the .sdcard file and
other images, to ensure it will run after any kernel or root filesystem
change? Meanwhile as a work-around, what is the command to manually
re-run this step?
More information about the meta-freescale