Bug 5150 - In 3.10.x linux kernel, uImage can't be compiled by default.
Summary: In 3.10.x linux kernel, uImage can't be compiled by default.
Status: VERIFIED OBSOLETE
Alias: None
Product: BSPs
Classification: Build System, Metadata & Runtime
Component: bsps-meta-yocto (show other bugs)
Version: 1.5
Hardware: Beagleboard Multiple
: Medium+ minor
Target Milestone: 1.6.1
Assignee: Bruce Ashfield
QA Contact: Lucian Musat
URL:
Whiteboard:
Depends on:
Blocks:
 
Reported: 2013-09-09 21:15 UTC by Robert Berger
Modified: 2014-09-24 10:40 UTC (History)
3 users (show)

See Also:
OS type for building Yocto: ---
Type of Regression: ---
Verified:
Documentation change: No (bug/feature does not impact docs)


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Robert Berger 2013-09-09 21:15:55 UTC
In this commit [1] the following is mentioned:

In 3.10.x linux kernel, uImage can't be compiled by default. But zImage has been supported by the latest u-boot, so use zImage as the default kernel image file. In u-boot command, use "bootz", instead of "bootm", to boot the kernel.

Why?

I built a uImage for 3.10.6.[2] 

What exactly is the problem?

Note I don't say that it will work without patches, but it should build.

[1] http://git.yoctoproject.org/cgit/cgit.cgi/poky/commit/?id=6727d1d3807fcf713cbe8bb696e0c27a56166a78

[2] http://osdir.com/ml/beagleboard/2013-09/msg00101.html
Comment 1 Robert Berger 2013-09-09 21:45:56 UTC
I just tried to build a mainline 3.10.11 uImage:

 Kernel: arch/arm/boot/Image is ready
  AS      arch/arm/boot/compressed/head.o
  GZIP    arch/arm/boot/compressed/piggy.gzip
  CC      arch/arm/boot/compressed/misc.o
  CC      arch/arm/boot/compressed/decompress.o
  CC      arch/arm/boot/compressed/string.o
  SHIPPED arch/arm/boot/compressed/hyp-stub.S
  SHIPPED arch/arm/boot/compressed/lib1funcs.S
  SHIPPED arch/arm/boot/compressed/ashldi3.S
  AS      arch/arm/boot/compressed/hyp-stub.o
  AS      arch/arm/boot/compressed/lib1funcs.o
  AS      arch/arm/boot/compressed/ashldi3.o
  AS      arch/arm/boot/compressed/piggy.gzip.o
  LD      arch/arm/boot/compressed/vmlinux
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-3.10.11-stable-student
Created:      Mon Sep  9 21:44:34 2013
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    4009904 Bytes = 3915.92 kB = 3.82 MB
Load Address: 80008000
Entry Point:  80008000
Comment 2 Robert Berger 2013-09-09 22:00:24 UTC
with some minor configurations it also runs:

root@generic-armv7a:~# uname -a
Linux generic-armv7a 3.10.11-stable-student #2 SMP Tue Sep 10 00:56:38 EEST 2013 armv7l GNU/Linux
Comment 3 Bruce Ashfield 2013-09-10 07:47:13 UTC
uImage requires a LOADDADDR to be set in the most recent kernels, something
which is not currently set in machine configs and passed to the yocto
kernel build by default.

Note: we didn't say there's a problem with the uImage, but given that
zImage works fine, doesn't require us to encode the load address into
the machine configuration .. there's not reason to force ourselves to
use it.

Other BSP layers are obviously still free to build uImage, we just decided
to go with zImage for this reference.
Comment 4 Robert Berger 2013-09-10 08:40:18 UTC
Yes something like:

UBOOT_ENTRYPOINT = "0x80008000"
UBOOT_LOADADDRESS = "0x80008000"

KERNEL_EXTRA_ARGS += "LOADADDR=${UBOOT_ENTRYPOINT}"

I believe the whole reason behind uImage is just that it seems more robust against download errors compared to zImage due to chechsums and stuff in the u-boot header.

But I understood you decided to use zImage.
Comment 5 Bruce Ashfield 2013-09-10 14:47:31 UTC
On second thought, I'll re-open this bugzilla as a documentation item. Since we should make sure that the load and entry point details are captured.
Comment 6 Paul Eggleton 2014-07-24 14:59:14 UTC
So we no longer support the beagleboard in meta-yocto-bsp; I've checked the beaglebone configuration and these values are set there already. Thus I'm marking this as obsolete.
Comment 7 Lucian Musat 2014-09-24 10:40:33 UTC
Verified on 7d80f8e9468253496a7097685aac8f468940a9c5. Beaglebone configuration present.