Skip to content

RFC MIPS: add vmlinu{x,z}.bin appended dtb support

Jonas Gorski linux-devicetree linux-mips 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v3 RFC Latest4 patches 1 replyIn review

Changes in v3 from the cover letter

* Switched to UHI specs interface instead of manipulating initial_boot_params
* fixed boot on !SMP
* Changed PTR_LW to lw and PTR_LI to li to ensure 32bit loads/ comparisons are done also on 64 bit
* Added vmlinuz.bin support
* Added bmips as a user

Patches in v3 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/4MIPS: add support for vmlinux.bin appended dtbarch/mips/Kconfig arch/mips/kernel/head.S arch/mips/kernel/vmlinux.lds.S+50 -10 replies
2/4MIPS: add support for vmlinuz.bin appended dtbarch/mips/Kconfig arch/mips/boot/compressed/head.S arch/mips/boot/compressed/ld.script+39 -10 replies
3/4MIPS: BMIPS: build all dtbs if no builtin dtbarch/mips/boot/dts/brcm/Makefile+13 -00 replies
4/4MIPS: BMIPS: accept UHI interface for passing a dtbarch/mips/bmips/setup.c+2 -01 reply

Reviews trailers per patch

No Reviewed-by, Acked-by or Tested-by trailers for v3 yet.

Read the v3 thread

Cover letter [PATCH RFC v3 0/4] MIPS: add vmlinu{x,z}.bin appended dtb support

This patch series implements vmlinux.bin and vmlinuz.bin appended dtb support, and adds a user for the vmlinux one.

The first two patches add the appropriate support for vmlinux.bin and vmlinuz.bin. Since enabling it for both does not make sense (and is potentially dangerous) I made it a choice for which variant it should be enabled.

Patches three and four then add BMIPS as a test user for this implementation. vmlinuz.bin was tested by selecting SYS_SUPPORTS_ZBOOT and setting zload-y to 0x81000000 (ramstart + 16 MiB, so the kernel is loaded behind CFE), then wrapping vmlinuz_w_dtb.bin in the CFE expected lzma with appropriate header to unpack there.

For easier testing/using I changed boot/dts/brcm to build all dts files as dtb blobs in case no built in dtb is selected.

Completely untested on anything except MIPS32 / big endian.

Obviously it won't work with an ELF kernel. I did not have a reasonable idea how to do that except by parsing the elf header from head.S, and that seemed a bit insane.

Regards
Jonas

Changes RFC v2 -> v3
* Switched to UHI specs interface instead of manipulating initial_boot_params
* fixed boot on !SMP
* Changed PTR_LW to lw and PTR_LI to li to ensure 32bit loads/ comparisons are done also on 64 bit
* Added vmlinuz.bin support
* Added bmips as a user

Changes RFC v1 -> v2

* changed all occurences of vmlinux to vmlinux.bin
* clarified this applies to the raw vmlinux.bin without decompressor
* s/initial_device_params/initial_boot_params/

Jonas Gorski (4):
MIPS: add support for vmlinux.bin appended dtb
MIPS: add support for vmlinuz.bin appended dtb
MIPS: BMIPS: build all dtbs if no builtin dtb
MIPS: BMIPS: accept UHI interface for passing a dtb

 arch/mips/Kconfig                   |   45 +++++++++++++++++++++++++++++++++++
 arch/mips/bmips/setup.c             |    2 ++
 arch/mips/boot/compressed/head.S    |   16 +++++++++++++
 arch/mips/boot/compressed/ld.script |    6 ++++-
 arch/mips/boot/dts/brcm/Makefile    |   13 ++++++++++
 arch/mips/kernel/head.S             |   16 +++++++++++++
 arch/mips/kernel/vmlinux.lds.S      |    8 ++++++-
 7 files changed, 104 insertions(+), 2 deletions(-)
Signature · 5 lines
1.7.10.4
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html