All of lore.kernel.org
 help / color / mirror / Atom feed
* Rebuilding kernel doesn't rebuild sdcard image
@ 2014-11-11  3:52 Craig McQueen
  2014-11-11  7:34 ` Nikolay Dimitrov
  2014-11-11 10:36 ` Gary Thomas
  0 siblings, 2 replies; 3+ messages in thread
From: Craig McQueen @ 2014-11-11  3:52 UTC (permalink / raw)
  To: meta-freescale

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.

I tried:

     bitbake -c cleansstate linux-fslc
     bitbake -c cleansstate linux-imx
     bitbake core-image-minimal

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 
core-image-minimal-imx28evk-20141110052334.rootfs.sdcard
     -rw-r--r-- 2 craigm craigm  2612944 Nov 10 17:13 
uImage--2.6.35.3-r45-imx28evk-20141110060936.bin

I check the uImage file:

     file uImage--2.6.35.3-r45-imx28evk-20141110060936.bin
     uImage--2.6.35.3-r45-imx28evk-20141110060936.bin: u-boot legacy 
uImage, Linux-2.6.35.3-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: 
0x37FEB8CE

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: 
0x7C476150


After this, I tried to force an SD card image rebuild, by rebuilding an 
arbitrary package:

     bitbake -c cleansstate nano
     bitbake core-image-minimal

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?

Thanks,
Craig McQueen



^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Rebuilding kernel doesn't rebuild sdcard image
  2014-11-11  3:52 Rebuilding kernel doesn't rebuild sdcard image Craig McQueen
@ 2014-11-11  7:34 ` Nikolay Dimitrov
  2014-11-11 10:36 ` Gary Thomas
  1 sibling, 0 replies; 3+ messages in thread
From: Nikolay Dimitrov @ 2014-11-11  7:34 UTC (permalink / raw)
  To: Craig McQueen, meta-freescale

Hi Craig,

On 11/11/2014 05:52 AM, Craig McQueen wrote:
> After this, I tried to force an SD card image rebuild, by rebuilding an
> arbitrary package:
>
>      bitbake -c cleansstate nano
>      bitbake core-image-minimal
>
> It rebuilt nano, but didn't rebuild _any_ of the images in
> build/tmp/deploy/images/imx28evk.

Can you please try the following:

bitbake -c cleanall nano
bitbake -c cleanall core-image-minimal
bitbake core-image-minimal

...and share if it works for you? Same could be applied when changing 
the kernel version.

Regards,
Nikolay


^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: Rebuilding kernel doesn't rebuild sdcard image
  2014-11-11  3:52 Rebuilding kernel doesn't rebuild sdcard image Craig McQueen
  2014-11-11  7:34 ` Nikolay Dimitrov
@ 2014-11-11 10:36 ` Gary Thomas
  1 sibling, 0 replies; 3+ messages in thread
From: Gary Thomas @ 2014-11-11 10:36 UTC (permalink / raw)
  To: meta-freescale

On 2014-11-10 20:52, Craig McQueen wrote:
> 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.
>
> I tried:
>
>      bitbake -c cleansstate linux-fslc
>      bitbake -c cleansstate linux-imx
>      bitbake core-image-minimal
>
> 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 core-image-minimal-imx28evk-20141110052334.rootfs.sdcard
>      -rw-r--r-- 2 craigm craigm  2612944 Nov 10 17:13 uImage--2.6.35.3-r45-imx28evk-20141110060936.bin
>
> I check the uImage file:
>
>      file uImage--2.6.35.3-r45-imx28evk-20141110060936.bin
>      uImage--2.6.35.3-r45-imx28evk-20141110060936.bin: u-boot legacy uImage, Linux-2.6.35.3-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: 0x37FEB8CE
>
> 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: 0x7C476150
>
>
> After this, I tried to force an SD card image rebuild, by rebuilding an arbitrary package:
>
>      bitbake -c cleansstate nano
>      bitbake core-image-minimal
>
> 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.

Since nano is not included in core-image-minimal, this makes total sense.

>
>
> 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?

How are you choosing which kernel is built?

Also, just because you rebuild some component, e.g. the kernel, bitbake
won't rebuild other things you might have previously built that depends
on that component.  If, as in your case, you have an image that depends
on the component, you'll need to explicitly rebuild that image.

Hopefully this sequence will help you understand the process:
   % bitbake core-image-minimal
builds all of the component pieces for the resulting image (root file
system), including the kernel, etc.
   % ... make some change, e.g. choose a different kernel
   % bitbake core-image-minimal
will [re]build any components which need to be updated.  One key thing
to understand is that the version of components are expected to increase
so if you first force the 2.6.35 kernel to be built, then build a 3.14.19
version, if you rebuild the 2.6.35 version, the core-image-minimal WILL
NOT be rebuilt automatically.  The only way to get back to the older
kernel will be to forceably remove all traces of the new kernel and
then force a rebuild of the image.  For example:
   % bitbake linux-fslc -c cleansstate
   % bitbake core-image-minimal -c cleansstate
   ... change preference for linux-imx
   % bitbake core-image-minimal
This sequence will let you rebuild the older kernel and then build
the root file system (.sdcard) image.


-- 
------------------------------------------------------------
Gary Thomas                 |  Consulting for the
MLB Associates              |    Embedded world
------------------------------------------------------------


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2014-11-11 10:36 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-11-11  3:52 Rebuilding kernel doesn't rebuild sdcard image Craig McQueen
2014-11-11  7:34 ` Nikolay Dimitrov
2014-11-11 10:36 ` Gary Thomas

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.