arm64: add ARM 64-bits target
[openwrt/svn-archive/archive.git] / target / linux / arm64 / image / Makefile
1 #
2 # Copyright (C) 2010 OpenWrt.org
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7 include $(TOPDIR)/rules.mk
8 include $(INCLUDE_DIR)/image.mk
9
10 define Image/Prepare
11 -rm -rf $(KDIR)/linux-system.axf
12 cp $(LINUX_DIR)/arch/$(LINUX_KARCH)/boot/Image $(KDIR)/Image
13 $(MAKE) -C boot-wrapper clean
14 $(MAKE) -C boot-wrapper compile
15 endef
16
17 define Build/Clean
18 $(MAKE) -C boot-wrapper clean
19 endef
20
21 define Image/Build/QemuVirt
22 $(CP) $(KDIR)/Image $(BIN_DIR)/openwrt-$(BOARD)-qemu-virt.Image
23 ifneq ($(CONFIG_TARGET_ROOTFS_INITRAMFS),)
24 $(CP) $(KDIR)/Image-initramfs $(BIN_DIR)/openwrt-$(BOARD)-qemu-virt-initramfs.Image
25 endif
26 endef
27
28 define Image/Build/VexpressFoundation
29 $(CP) $(KDIR)/linux-system.axf $(BIN_DIR)/openwrt-$(BOARD)-vexpress-foundation.axf
30 endef
31
32 define Image/BuildKernel
33 $(call Image/Build/QemuVirt)
34 $(call Image/Build/VexpressFoundation)
35 endef
36
37 define Image/Build/squashfs
38 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
39 endef
40
41 define Image/Build
42 $(call Image/Build/$(1))
43 dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/openwrt-$(BOARD)-root.$(1) bs=128k conv=sync
44 endef
45
46 $(eval $(call BuildImage))