diff options
author | James Hogan <james.hogan@imgtec.com> | 2013-08-30 11:42:42 -0400 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2013-09-03 12:00:01 -0400 |
commit | 4defe4559e86e26545ab2f542656a4b966dcde53 (patch) | |
tree | a07b97f8eb9488b6f059100e93f2857620bba214 | |
parent | 3185557d1acf8cc0c937b1343de83e2483bde28b (diff) |
MIPS: Add uImage build target
Add a uImage build target for MIPS, which builds uImage.gz (a U-Boot
image of vmlinux.bin.gz), and then symlinks it to uImage. This allows
for the use of other compression algorithms in future, and is how a few
other architectures do it.
It's enabled conditionally on load-y >= 0xffffffff80000000 which
hopefully allows 64bit kernels to also work as long as the load and
entry address can be represented by the 32bit addresses in the U-Boot
image format.
Signed-off-by: James Hogan <james.hogan@imgtec.com>
Cc: Ralf Baechle <ralf@linux-mips.org>
Cc: Florian Fainelli <f.fainelli@gmail.com>
Cc: linux-mips@linux-mips.org
Patchwork: https://patchwork.linux-mips.org/patch/5795/
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
-rw-r--r-- | arch/mips/Makefile | 6 | ||||
-rw-r--r-- | arch/mips/boot/.gitignore | 1 | ||||
-rw-r--r-- | arch/mips/boot/Makefile | 15 |
3 files changed, 22 insertions, 0 deletions
diff --git a/arch/mips/Makefile b/arch/mips/Makefile index 91d5baa66540..75a36ad11ff5 100644 --- a/arch/mips/Makefile +++ b/arch/mips/Makefile | |||
@@ -263,6 +263,10 @@ drivers-$(CONFIG_PM) += arch/mips/power/ | |||
263 | boot-y := vmlinux.bin | 263 | boot-y := vmlinux.bin |
264 | boot-y += vmlinux.ecoff | 264 | boot-y += vmlinux.ecoff |
265 | boot-y += vmlinux.srec | 265 | boot-y += vmlinux.srec |
266 | ifeq ($(shell expr $(load-y) \< 0xffffffff80000000 2> /dev/null), 0) | ||
267 | boot-y += uImage | ||
268 | boot-y += uImage.gz | ||
269 | endif | ||
266 | 270 | ||
267 | # compressed boot image targets (arch/mips/boot/compressed/) | 271 | # compressed boot image targets (arch/mips/boot/compressed/) |
268 | bootz-y := vmlinuz | 272 | bootz-y := vmlinuz |
@@ -341,6 +345,8 @@ define archhelp | |||
341 | echo ' vmlinuz.ecoff - ECOFF zboot image' | 345 | echo ' vmlinuz.ecoff - ECOFF zboot image' |
342 | echo ' vmlinuz.bin - Raw binary zboot image' | 346 | echo ' vmlinuz.bin - Raw binary zboot image' |
343 | echo ' vmlinuz.srec - SREC zboot image' | 347 | echo ' vmlinuz.srec - SREC zboot image' |
348 | echo ' uImage - U-Boot image' | ||
349 | echo ' uImage.gz - U-Boot image (gzip)' | ||
344 | echo | 350 | echo |
345 | echo ' These will be default as appropriate for a configured platform.' | 351 | echo ' These will be default as appropriate for a configured platform.' |
346 | endef | 352 | endef |
diff --git a/arch/mips/boot/.gitignore b/arch/mips/boot/.gitignore index f210b09ececc..a73d6e2c4f64 100644 --- a/arch/mips/boot/.gitignore +++ b/arch/mips/boot/.gitignore | |||
@@ -4,3 +4,4 @@ vmlinux.* | |||
4 | zImage | 4 | zImage |
5 | zImage.tmp | 5 | zImage.tmp |
6 | calc_vmlinuz_load_addr | 6 | calc_vmlinuz_load_addr |
7 | uImage | ||
diff --git a/arch/mips/boot/Makefile b/arch/mips/boot/Makefile index 851261e9fdc0..1466c0026093 100644 --- a/arch/mips/boot/Makefile +++ b/arch/mips/boot/Makefile | |||
@@ -40,3 +40,18 @@ quiet_cmd_srec = OBJCOPY $@ | |||
40 | cmd_srec = $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $@ | 40 | cmd_srec = $(OBJCOPY) -S -O srec $(strip-flags) $(VMLINUX) $@ |
41 | $(obj)/vmlinux.srec: $(VMLINUX) FORCE | 41 | $(obj)/vmlinux.srec: $(VMLINUX) FORCE |
42 | $(call if_changed,srec) | 42 | $(call if_changed,srec) |
43 | |||
44 | UIMAGE_LOADADDR = $(VMLINUX_LOAD_ADDRESS) | ||
45 | UIMAGE_ENTRYADDR = $(VMLINUX_ENTRY_ADDRESS) | ||
46 | |||
47 | $(obj)/vmlinux.bin.gz: $(obj)/vmlinux.bin FORCE | ||
48 | $(call if_changed,gzip) | ||
49 | |||
50 | targets += uImage.gz | ||
51 | $(obj)/uImage.gz: $(obj)/vmlinux.bin.gz FORCE | ||
52 | $(call if_changed,uimage,gzip) | ||
53 | |||
54 | targets += uImage | ||
55 | $(obj)/uImage: $(obj)/uImage.gz FORCE | ||
56 | @ln -sf $(notdir $<) $@ | ||
57 | @echo ' Image $@ is ready' | ||