All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] Combine zImage and rootfs in single uImage
@ 2012-05-22 15:28 Grant Edwards
  2012-05-22 16:08 ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Grant Edwards @ 2012-05-22 15:28 UTC (permalink / raw)
  To: u-boot

Currently, I build a linux kernel that contains the root fileystem in
the zImage file, when then gets converted into a uImage and booted
from NAND flash.  This is all working fine, but having the kernel
build depend on the rootfs build is a problem.

In another mailing list, somebody told me that if I was using U-Boot,
I could build the zImage and rootfs separately and then combine them
into a single uImage file for distribution.

I've been looking through the manual and FAQs, and can't figure out
how to do this.  I did find a vague reference in one of the Linux
kernel docs that some bootloaders will detect any "extra" bytes after
the end of the zImage data and assume that they are a rootfs image. Is
that how U-Boot does it?  I just cat the ziminage and rootfs.cpio.gz
files together and then prepend a uImage header?

-- 
Grant Edwards               grant.b.edwards        Yow! I selected E5 ... but
                                  at               I didn't hear "Sam the Sham
                              gmail.com            and the Pharoahs"!

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

* [U-Boot] Combine zImage and rootfs in single uImage
  2012-05-22 15:28 [U-Boot] Combine zImage and rootfs in single uImage Grant Edwards
@ 2012-05-22 16:08 ` Wolfgang Denk
  2012-05-22 17:19   ` Grant Edwards
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2012-05-22 16:08 UTC (permalink / raw)
  To: u-boot

Dear Grant Edwards,

In message <jpgbbm$1hk$1@dough.gmane.org> you wrote:
> Currently, I build a linux kernel that contains the root fileystem in
> the zImage file, when then gets converted into a uImage and booted
> from NAND flash.  This is all working fine, but having the kernel
> build depend on the rootfs build is a problem.
> 
> In another mailing list, somebody told me that if I was using U-Boot,
> I could build the zImage and rootfs separately and then combine them
> into a single uImage file for distribution.

The (deprecated) old style way (using legacy image format) is called
"multi-file images".

The modern, recommended way to do things like this is using FIT
images.

See the respective documentation.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Cleverness and Style have no place in getting a project completed.
                                                  -- Tom Christiansen

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

* [U-Boot] Combine zImage and rootfs in single uImage
  2012-05-22 16:08 ` Wolfgang Denk
@ 2012-05-22 17:19   ` Grant Edwards
  2012-05-22 18:10     ` Wolfgang Denk
  0 siblings, 1 reply; 5+ messages in thread
From: Grant Edwards @ 2012-05-22 17:19 UTC (permalink / raw)
  To: u-boot

On 2012-05-22, Wolfgang Denk <wd@denx.de> wrote:
> In message <jpgbbm$1hk$1@dough.gmane.org> Grant Edwards wrote:
[...]
>> somebody told me that if I was using U-Boot, I could build the zImage
>> and rootfs separately and then combine them into a single uImage file
>> for distribution.
>
> The (deprecated) old style way (using legacy image format) is called
> "multi-file images".
>
> The modern, recommended way to do things like this is using FIT
> images.
>
> See the respective documentation.

Thanks!

All our build/update infrastcture expects the uImage legacy image
format, so I'm going to stick with the multi-file "uImage" format for
now.

FWIW, I couldn't find any documentation for FIT images (it's not
mentioned in in either FAQs, Table of Contents, or Index), and various
google searches didn't find anything except old mailing list messages.
Having the manual chopped up into hundreds of separate web pages makes
impossible to search when looking for something. It would be very nice
if the Manual was available as a single page.

-- 
Grant Edwards               grant.b.edwards        Yow! BELA LUGOSI is my
                                  at               co-pilot ...
                              gmail.com            

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

* [U-Boot] Combine zImage and rootfs in single uImage
  2012-05-22 17:19   ` Grant Edwards
@ 2012-05-22 18:10     ` Wolfgang Denk
  2012-05-22 22:14       ` Grant Edwards
  0 siblings, 1 reply; 5+ messages in thread
From: Wolfgang Denk @ 2012-05-22 18:10 UTC (permalink / raw)
  To: u-boot

Dear Grant,

In message <jpghr5$1at$1@dough.gmane.org> you wrote:
>
> FWIW, I couldn't find any documentation for FIT images (it's not
> mentioned in in either FAQs, Table of Contents, or Index), and various
> google searches didn't find anything except old mailing list messages.

First, there is documentation in the doc/ directory - see the
doc/uImage.FIT/ directory.

Second, the man page for the mkimage command mentions it (not really
extensively, though).

> Having the manual chopped up into hundreds of separate web pages makes
> impossible to search when looking for something. It would be very nice
> if the Manual was available as a single page.

It is. It is available as single HTML, PDF and PostScript files. See
section 2.3. Availability for respective links.

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
If there was anything that depressed him more than his own  cynicism,
it was that quite often it still wasn't as cynical as real life.
                                 - Terry Pratchett, _Guards! Guards!_

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

* [U-Boot] Combine zImage and rootfs in single uImage
  2012-05-22 18:10     ` Wolfgang Denk
@ 2012-05-22 22:14       ` Grant Edwards
  0 siblings, 0 replies; 5+ messages in thread
From: Grant Edwards @ 2012-05-22 22:14 UTC (permalink / raw)
  To: u-boot

On 2012-05-22, Wolfgang Denk <wd@denx.de> wrote:
> In message <jpghr5$1at$1@dough.gmane.org> you wrote:
>
>> FWIW, I couldn't find any documentation for FIT images (it's not
>> mentioned in in either FAQs, Table of Contents, or Index), and
>> various google searches didn't find anything except old mailing list
>> messages.
>
> First, there is documentation in the doc/ directory - see the
> doc/uImage.FIT/ directory.

Doh!  I forgot to look in the source tree.

> Second, the man page for the mkimage command mentions it (not really
> extensively, though).

>> Having the manual chopped up into hundreds of separate web pages
>> makes impossible to search when looking for something. It would be
>> very nice if the Manual was available as a single page.
>
> It is. It is available as single HTML, PDF and PostScript files. See
> section 2.3. Availability for respective links.

Brilliant! I've been looking for that for a while...

Thanks again,

-- 
Grant Edwards               grant.b.edwards        Yow! Will it improve my
                                  at               CASH FLOW?
                              gmail.com            

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

end of thread, other threads:[~2012-05-22 22:14 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-05-22 15:28 [U-Boot] Combine zImage and rootfs in single uImage Grant Edwards
2012-05-22 16:08 ` Wolfgang Denk
2012-05-22 17:19   ` Grant Edwards
2012-05-22 18:10     ` Wolfgang Denk
2012-05-22 22:14       ` Grant Edwards

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.