2012-09-28

Mk802 -- uImage

changyongid.blog.chinaunix.net

Extract an uImage

According to the U-Boot header definition an uImage begins with the hex byte sequence 27 05 19 56 and the header is 64 bytes long.

dd if=uImage of=zImage ibs=64 skip=1


1.
root@arm:~# uname -a
Linux arm 3.0.42-slitaz #2 PREEMPT Thu Sep 27 18:30:18 UTC 2012 armv7l GNU/Linux


2.
# tazpkg install u-boot-tools-2012.04.01-2.tazpkg

3.
root@slitaz:/usr/src/linux# time make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- -j4 uImage
[..]
  OBJCOPY arch/arm/boot/zImage
  Kernel: arch/arm/boot/zImage is ready
  UIMAGE  arch/arm/boot/uImage
Image Name:   Linux-3.0.42-slitaz
Created:      Thu Sep 27 18:30:24 2012
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3906268 Bytes = 3814.71 kB = 3.73 MB
Load Address: 40008000
Entry Point:  40008000
  Image arch/arm/boot/uImage is ready

real    5m53.737s
user    10m26.467s
sys     0m47.126s


4.
root@slitaz:/usr/src/linux# ls -l arch/arm/boot/*mage
-rwxr-xr-x    1 root     root       8171044 Sep 27 18:30 arch/arm/boot/Image
-rw-r--r--    1 root     root       3906332 Sep 27 18:30 arch/arm/boot/uImage
-rwxr-xr-x    1 root     root       3906268 Sep 27 18:30 arch/arm/boot/zImage


5.
root@slitaz:/usr/src/linux# calc 3906332-3906268
64


Ref:
Building

make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- sun4i_defconfig
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- -j4 uImage modules
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabi- INSTALL_MOD_PATH=output modules_install
.