2013-11-05 08:00:34 +00:00
|
|
|
#
|
|
|
|
# Copyright (C) 2013 OpenWrt.org
|
|
|
|
#
|
|
|
|
# This is free software, licensed under the GNU General Public License v2.
|
|
|
|
# See /LICENSE for more information.
|
|
|
|
#
|
|
|
|
include $(TOPDIR)/rules.mk
|
|
|
|
include $(INCLUDE_DIR)/image.mk
|
|
|
|
|
2013-11-14 23:12:52 +00:00
|
|
|
BOARDS:= \
|
|
|
|
sun4i-a10-cubieboard \
|
2014-01-11 17:19:04 +00:00
|
|
|
sun4i-a10-olinuxino-lime \
|
2014-01-12 19:23:29 +00:00
|
|
|
sun4i-a10-pcduino \
|
2013-11-14 23:12:52 +00:00
|
|
|
sun5i-a13-olinuxino \
|
2014-01-12 19:23:29 +00:00
|
|
|
sun7i-a20-cubieboard2 \
|
|
|
|
sun7i-a20-cubietruck \
|
|
|
|
sun7i-a20-olinuxino-micro
|
2013-11-05 08:00:34 +00:00
|
|
|
|
2013-11-14 23:12:52 +00:00
|
|
|
define Image/BuildKernel
|
|
|
|
mkimage -A arm -O linux -T kernel -C none \
|
|
|
|
-a 0x40008000 -e 0x40008000 \
|
|
|
|
-n 'ARM OpenWrt Linux-$(LINUX_VERSION)' \
|
|
|
|
-d $(KDIR)/zImage $(BIN_DIR)/$(IMG_PREFIX)-uImage
|
|
|
|
|
|
|
|
ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
|
2013-11-05 08:00:34 +00:00
|
|
|
$(CP) $(KDIR)/zImage-initramfs $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
|
|
|
|
echo -ne '\x00\x00\x00\x00' >> $(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs
|
|
|
|
$(call Image/BuildKernel/MkuImage, \
|
|
|
|
none, 0x40008000, 0x40008000, \
|
|
|
|
$(BIN_DIR)/$(IMG_PREFIX)-zImage-initramfs, \
|
|
|
|
$(BIN_DIR)/$(IMG_PREFIX)-uImage-initramfs \
|
|
|
|
)
|
2013-11-14 23:12:52 +00:00
|
|
|
endif
|
2013-11-05 08:00:34 +00:00
|
|
|
|
2013-11-14 23:12:52 +00:00
|
|
|
$(foreach board,$(BOARDS),
|
|
|
|
$(CP) $(LINUX_DIR)/arch/arm/boot/dts/$(board).dtb $(BIN_DIR)/
|
2013-11-05 08:00:34 +00:00
|
|
|
)
|
|
|
|
endef
|
|
|
|
|
|
|
|
define Image/Build
|
2013-11-14 23:12:52 +00:00
|
|
|
$(call Image/Build/$(1),$(1))
|
2013-11-05 08:00:34 +00:00
|
|
|
endef
|
|
|
|
|
|
|
|
$(eval $(call BuildImage))
|