1
votes

I am try to understand the build and booting process of Linux kernel for ARM. I took vanila linux from www.kernel.org and build it after run configuration for AT91SAM9260. In message when we compile the kernel showed that:

==========================================

LD vmlinux

SORTEX vmlinux

SYSMAP System.map

OBJCOPY arch/arm/boot/Image

Kernel: arch/arm/boot/Image is ready

GZIP arch/arm/boot/compressed/piggy.gzip

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.9.1+

Created: Sat Nov 23 18:15:58 2013

Image Type: ARM Linux Kernel Image (uncompressed)

Data Size: 1635544 Bytes = 1597.21 kB = 1.56 MB

Load Address: 20008000

Entry Point: 20008000

Image arch/arm/boot/uImage is ready

==========================================

My questions are:

  1. Image type is uncompressed, this means that we don't compress vmlinux to zImage ?

  2. Load Address: 20008000: this is address of decompressed image = ZRELADDR defined in arch/arm/boot/Makefile ? This address also is address of ../arm/kernel/head.o ? It seems that we don't use address KERNEL_PHYS , this method is common way or just for AT91SAM family ?

  3. Basically, our procedures to build and booting are:

a. building kernel steps: vmlinux -> uImage (skip to create zImage).

b. kernel booting steps: DataFlash/NAND --load-->uImage (@ 0x22200000) ---decompress--> uncompressed image (@ 0x20008000).

In this case, no zImage in booting process although in build message I saw zImage created. I'm wrong ?

4 . How about the address 0xC0008000 which I found in /arch/arm/kernel/vmlinux.lds at line: . = 0xC0000000 + 0x00008000; Do we use it ?. I confuse this address with the ZRELADDR.

Regards.

1

1 Answers

2
votes
  1. The uImage file has most probably been built using the zImage. It says uncompressed because the uImage itself is not compressed.

  2. The load address can be used by the boot-loader to store data necessary for the early phases of the Linux kernel boot (such as the command line defined in the bootloader.)

  3. You're right about the boot process. But when the zImage is used then the decompression is done by the kernel instead of the bootloader. See decompress_kernel()

  4. The address 0xc0008000 is a virtual address. It maps to the physical address 0x20008000. Virtual addresses can be used only after Linux sets up the memory translation (MMU).