Specifications

This installs a lot of kernel modules in "./lib/modules/" and a kernel ELF file in "./boot" :
$ ls -l boot
total 8792
-rw-r--r-- 1 root root 1226119 Oct 17 17:31 System.map-2.6.30.9-90.fc11.ppc
-rw-r--r-- 1 root root 96224 Oct 17 17:31 config-2.6.30.9-90.fc11.ppc
-rwxr-xr-x 1 root root 7673768 Oct 17 18:20 vmlinuz-2.6.30.9-90.fc11.ppc
Now convert the ELF kernel image into an uImage file:
$ ppc_4xxFP-objcopy -O binary boot/vmlinuz-2.6.30.9-90.fc11.ppc /tmp/vmlinux.bin
$ gzip -v9 /tmp/vmlinux.bin
/tmp/vmlinux.bin: 58.1% -- replaced with /tmp/vmlinux.bin.gz
$ mkimage -A ppc -O linux -T kernel -C gzip \
> -a 0x00000000 -e 0x00000000 \
> -n Linux-2.6.30.9-90.fc11.ppc \
> -d /tmp/vmlinux.bin.gz /tftpboot/uImage-2.6.30.9-90.fc11.ppc
Image Name: Linux-2.6.30.9-90.fc11.ppc
Created: Sun Nov 1 17:00:37 2009
Image Type: PowerPC Linux Kernel Image (gzip compressed)
Data Size: 3187431 Bytes = 3112.73 kB = 3.04 MB
Load Address: 0x00000000
Entry Point: 0x00000000
There you go.
Note: you still need the Device Tree Blob for your specific target board. This usually does not
come with any of the standard distributions. Also, you may find that you need a ramdisk image to get
some modules loaded that might be needed to mount your root file system.
14.2.20. My standalone program does not work
Question:
I tried adding some new code to the hellow_world.c demo program. This works well as soon as I
only add code to the existing hello_world() function, but as soon as I add some functions of my own,
things go all haywire: the code of the hello_world() function does not get executed correctly, and my
new function gets called with unexpected arguments. What's wrong?
Answer:
You probably failed to notice that any code you add to the example program may shift the entry point
address. You should check this using the nm program:
$ ${CROSS_COMPILE}nm -n examples/hello_world
0000000000040004 T testfunc
0000000000040058 T hello_world
000000000004016c t dummy
...
As you can see, the entry point (function hello_world()) is no longer at 0x40004 as it was before and
as it's documented. Instead, it is now at 0x40058. So you have to start your standalone program at this
address, and everything should work well.
14.2.21. Linux hangs after uncompressing the
kernel
14.2.21. Linux hangs after uncompressing the kernel 172