The following two patches modify the appended dtb and UHI detection in a way to allow keeping all four firmware arguments. Patch one changes the handling of ZBOOT appended dtbs by copying the appended dtb to the place where the extracted kernel will expect it. This takes advantage of the fact that the compression Makefile recipe will always append the uncompressed kernel size to the compressed kernel if not done by the compression format itself. This has the nice side effect that we don't need to special case ZBOOT appended dtb anymore. Patch two then introduces a new global variable for a UHI passed dtb address, and stores the appended dtb's address in there if support is enabled, or the UHI passed address if the arguments match the UHI interface. It will only do a FDT MAGIC sanity check for appended dtbs, and not for UHI passed ones, since just because a0 is -2, doesn't mean a1 will contain a valid address. Both have been run tested on BMIPS on BCM9EJTAGPRB. v1 -> v2: * drop #ifdefs and use IS_ENABLED * drop accidentially added empty line Jonas Gorski (2): MIPS: ZBOOT: copy appended dtb to the end of the kernel MIPS: store the appended dtb address in a variable arch/mips/Kconfig | 22 ++-------------------- arch/mips/ath79/setup.c | 4 ++-- arch/mips/bmips/setup.c | 4 ++-- arch/mips/boot/compressed/decompress.c | 17 +++++++++++++++++ arch/mips/boot/compressed/head.S | 16 ---------------- arch/mips/include/asm/bootinfo.h | 4 ++++ arch/mips/kernel/head.S | 21 ++++++++++++++------- arch/mips/kernel/setup.c | 4 ++++ arch/mips/lantiq/prom.c | 4 ++-- arch/mips/pic32/pic32mzda/init.c | 4 ++-- 10 files changed, 49 insertions(+), 51 deletions(-) -- 2.1.4