linux/arch/powerpc/boot
David Gibson 79c8541924 [POWERPC] zImage: Cleanup and improve prep_kernel()
This patch rewrites prep_kernel() in the zImage wrapper code to be
clearer and more flexible.  Notable changes:

	- Handling of the initrd image from prep_kernel() has moved
into a new prep_initrd() function.
	- The address of the initrd image is now added as device tree
properties, as the kernel expects.
	- We only copy a packaged initrd image to a new location if it
is in danger of being clobbered when the kernel moves to its final
location, instead of always.
	- By default we decompress the kernel directly to address 0,
instead of requiring it to relocate itself.  Platforms (such as OF)
where doing this could clobber still-live firmware data structures can
override the vmlinux_alloc hook to provide an alternate place to
decompress the kernel.
	- We no longer pass lots of information between functions in
global variables.

Signed-off-by: David Gibson <dwg@au1.ibm.com>
Signed-off-by: Paul Mackerras <paulus@samba.org>
2007-03-13 13:35:01 +11:00
..
dts [POWERPC] Remove unused, undocumented #cpus property from cpus node 2007-03-09 15:03:24 +11:00
.gitignore [POWERPC] Add files build to .gitignore 2006-12-04 20:41:29 +11:00
addnote.c powerpc: Move ppc64 boot wrapper code over to arch/powerpc 2005-11-16 13:52:21 +11:00
addRamDisk.c powerpc: Move ppc64 boot wrapper code over to arch/powerpc 2005-11-16 13:52:21 +11:00
crt0.S [PATCH] powerpc: correct cacheflush loop in zImage 2006-03-16 16:54:57 +11:00
div64.S powerpc: Move ppc64 boot wrapper code over to arch/powerpc 2005-11-16 13:52:21 +11:00
dummy.c powerpc/32: Generate miboot images with ARCH=powerpc 2006-01-15 13:00:08 +11:00
elf.h powerpc: Move ppc64 boot wrapper code over to arch/powerpc 2005-11-16 13:52:21 +11:00
flatdevtree_env.h [POWERPC] Add flatdevtree source 2006-10-23 12:49:18 +10:00
flatdevtree_misc.c [POWERPC] Cleanup zImage handling of kernel entry with flat device tree 2006-12-04 20:39:34 +11:00
flatdevtree.c [POWERPC] Add flatdevtree source 2006-10-23 12:49:18 +10:00
flatdevtree.h [POWERPC] Add flatdevtree source 2006-10-23 12:49:18 +10:00
gunzip_util.c [POWERPC] zImage: Add more flexible gunzip convenience functions 2007-03-13 13:35:01 +11:00
gunzip_util.h [POWERPC] zImage: Add more flexible gunzip convenience functions 2007-03-13 13:35:01 +11:00
hack-coff.c powerpc: Make COFF zImages for old 32-bit powermacs 2006-01-14 15:04:06 +11:00
install.sh [PATCH] powerpc: trivial: modify comments to refer to new location of files 2006-02-10 16:53:51 +11:00
io.h [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
main.c [POWERPC] zImage: Cleanup and improve prep_kernel() 2007-03-13 13:35:01 +11:00
Makefile [POWERPC] zImage: Add more flexible gunzip convenience functions 2007-03-13 13:35:01 +11:00
mktree.c [POWERPC] Add mktree utility to arch/powerpc/boot 2006-10-24 15:01:27 +10:00
ns16550.c [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
of.c [POWERPC] zImage: Cleanup and improve prep_kernel() 2007-03-13 13:35:01 +11:00
ops.h [POWERPC] zImage: Cleanup and improve prep_kernel() 2007-03-13 13:35:01 +11:00
page.h powerpc: Move ppc64 boot wrapper code over to arch/powerpc 2005-11-16 13:52:21 +11:00
ppc_asm.h powerpc: Move ppc64 boot wrapper code over to arch/powerpc 2005-11-16 13:52:21 +11:00
README powerpc: Move ppc64 boot wrapper code over to arch/powerpc 2005-11-16 13:52:21 +11:00
rs6000.h powerpc: Make COFF zImages for old 32-bit powermacs 2006-01-14 15:04:06 +11:00
serial.c [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
simple_alloc.c [POWERPC] Add simple memory allocator to bootwrapper 2006-10-23 12:49:19 +10:00
stdio.c [POWERPC] More bootwrapper reorganization 2006-10-18 15:50:18 +10:00
stdio.h [POWERPC] Start arch/powerpc/boot code reorganization 2006-09-20 15:09:58 +10:00
string.h powerpc: Move ppc64 boot wrapper code over to arch/powerpc 2005-11-16 13:52:21 +11:00
string.S powerpc: Avoid unaligned loads and stores in boot memcpy code 2006-01-14 15:06:51 +11:00
types.h [POWERPC] Start arch/powerpc/boot code reorganization 2006-09-20 15:09:58 +10:00
util.S [POWERPC] Add non-OF serial console support 2006-10-23 12:49:19 +10:00
wrapper [PATCH] Remove dtb file created by wrapper script 2006-11-13 14:48:58 +11:00
zImage.coff.lds.S [POWERPC] More bootwrapper reorganization 2006-10-18 15:50:18 +10:00
zImage.lds.S [POWERPC] Make sure initrd and dtb sections get into zImage correctly 2006-11-09 16:00:06 +11:00

To extract the kernel vmlinux, System.map, .config or initrd from the zImage binary:

objcopy -j .kernel:vmlinux -O binary zImage vmlinux.gz
objcopy -j .kernel:System.map -O binary zImage System.map.gz
objcopy -j .kernel:.config -O binary zImage config.gz
objcopy -j .kernel:initrd -O binary zImage.initrd initrd.gz


	Peter