rk: support make kernel.img and board_kernel.img
author黄涛 <huangtao@rock-chips.com>
Mon, 6 Jan 2014 02:36:57 +0000 (10:36 +0800)
committer黄涛 <huangtao@rock-chips.com>
Mon, 6 Jan 2014 02:36:57 +0000 (10:36 +0800)
arch/arm/Makefile

index 3a2d49cd94cf7aba1f733f98743b440aabe57f9b..9526bdf7c166fd74d990d9540f1690c23010ae31 100644 (file)
@@ -327,3 +327,13 @@ define archhelp
   echo  '                  (distribution) /sbin/$(INSTALLKERNEL) or'
   echo  '                  install to $$(INSTALL_PATH) and run lilo'
 endef
+
+kernel.img: zImage
+       $(Q)$(srctree)/mkkrnlimg $(objtree)/arch/arm/boot/zImage $(objtree)/kernel.img >/dev/null
+       @echo '  Image:  kernel.img is ready'
+
+%_kernel.img: %.dtb zImage
+       $(Q)cat $(objtree)/arch/arm/boot/zImage $(objtree)/arch/arm/boot/dts/$*.dtb > $(objtree)/zImage-dtb && \
+       $(srctree)/mkkrnlimg $(objtree)/zImage-dtb $(objtree)/kernel.img >/dev/null && \
+       rm -f $(objtree)/zImage-dtb
+       @echo '  Image:  kernel.img (with $*.dtb) is ready'