35af89eb49
This makes 2 changes to clean up the flat device tree handling logic in the zImage wrapper. First, there were two callbacks from the dt_ops structure used for producing a final flat tree to pass to the kerne: dt_ops.ft_pack() which packed the flat tree (possibly a no-op) and dt_ops.ft_addr() which retreived the address of the final blob. Since they were only ever called together, this patch combines the two into a single new callback, dt_ops.finalize(). This new callback does whatever platform-dependent things are necessary to produce a final flat device tree blob, and returns the blob's addres. Second, the current logic calls the kernel with a flat device tree if one is build into the zImage wrapper, otherwise it boots the kernel with a PROM pointer, expecting the kernel to copy the OF device tree itself. This approach precludes the possibility of the platform wrapper code building a flat device tree from whatever platform-specific information firmware provides. Thus, this patch takes the more sensible approach of invoking the kernel with a flat tree if the dt_ops.finalize callback provides one (by whatever means). So, the dt_ops.finalize callback can be NULL, or can be a function which returns NULL. In either case, the zImage wrapper logic assumes that this is a platform with OF and invokes the kernel accordingly. Signed-off-by: David Gibson <dwg@au1.ibm.com> Signed-off-by: Paul Mackerras <paulus@samba.org> |
||
---|---|---|
.. | ||
dts | ||
.gitignore | ||
Makefile | ||
README | ||
addRamDisk.c | ||
addnote.c | ||
crt0.S | ||
div64.S | ||
dummy.c | ||
elf.h | ||
flatdevtree.c | ||
flatdevtree.h | ||
flatdevtree_env.h | ||
flatdevtree_misc.c | ||
hack-coff.c | ||
install.sh | ||
io.h | ||
main.c | ||
mktree.c | ||
ns16550.c | ||
of.c | ||
ops.h | ||
page.h | ||
ppc_asm.h | ||
rs6000.h | ||
serial.c | ||
simple_alloc.c | ||
stdio.c | ||
stdio.h | ||
string.S | ||
string.h | ||
types.h | ||
util.S | ||
wrapper | ||
zImage.coff.lds.S | ||
zImage.lds.S |
README
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