Skids/Prowl: Add support for building uImage
Add support for building uImage during kernel build, so that we can
remove all ARC-related special cases in buildroot code.
In Linux 4.7, ARC uses uImage as the default image target.
Change-Id: I8d7d78ff78096fc346fd175148f192f2ca182632
diff --git a/arch/arc/boot/Makefile b/arch/arc/boot/Makefile
index 58dfc7c..655d0cb 100755
--- a/arch/arc/boot/Makefile
+++ b/arch/arc/boot/Makefile
@@ -12,9 +12,10 @@
#obj-y += initrd.o
-MKIMAGE =mkimage
-MKIMAGEFLAGS =-A arc -O linux -C none -T kernel -a 0x80000000 -e 0x80002000 -n "ARC700 Linux kernel" -d Image
-OBJCOPYFLAGS =-O binary -R .note -R .note.gnu.build-id -R .comment -S vmlinux
+LZMA := $(shell which lzma)
+MKIMAGE := $(srctree)/scripts/mkuboot.sh
+MKIMAGEFLAGS := -A arc -O linux -C lzma -T kernel -a 0x84938000 -e 0x84938000 -n "ARC700 Linux kernel" -Q 0x1 -d
+OBJCOPYFLAGS := -O binary -R .note -R .note.gnu.build-id -R .comment -S
# From Beta's doc:
# ZTEXTADDR - Address where zImage is located by the bootloader
@@ -42,19 +43,17 @@
targets := uImage
-#arch/arc/boot/bootpImage: $(SYSTEM)
-# cp -f $(SYSTEM) $@
+$(obj)/Image: vmlinux FORCE
+ $(OBJCOPY) $(OBJCOPYFLAGS) $< $@
-$(obj)/Image: vmlinux
- $(OBJCOPY) $(OBJCOPYFLAGS) $@
+$(obj)/Image.lzma: $(obj)/Image FORCE
+ $(LZMA) -k -f --best $<
-Image: bootpImage
- $(OBJCOPY) $(OBJCOPYFLAGS) $@
+$(obj)/uImage: $(obj)/Image.lzma FORCE
+ $(MKIMAGE) $(MKIMAGEFLAGS) $< $@
-uImage: Image
- $(MKIMAGE) $(MKIMAGEFLAGS) $@
clean:
- $(RM) Image zImage bootpImage initrd.c jffsimg.c
+ $(RM) Image Image.lzma uImage initrd.c jffsimg.c
#@$(MAKE) -C compressed clean