1 # Copyright (c) 2014 The Linux Foundation. All rights reserved.
3 include $(TOPDIR)/rules.mk
4 include $(INCLUDE_DIR)/image.mk
6 UBIFS_OPTS = -m 2048 -e 124KiB -c 4096 -U -F
7 UBINIZE_OPTS = -m 2048 -p 128KiB
9 KERNEL_LOADADDR := 0x42208000
12 $(CP) $(LINUX_DIR)/vmlinux $(KDIR)/$(IMG_PREFIX)-vmlinux.elf
15 define Image/BuildKernel
16 $(CP) $(KDIR)/$(IMG_PREFIX)-vmlinux.elf $(BIN_DIR)
19 define Image/Build/squashfs
20 $(call prepare_generic_squashfs,$(KDIR)/root.squashfs)
24 $(call Image/Build/$(1),$(1))
25 dd if=$(KDIR)/root.$(1) of=$(BIN_DIR)/$(IMG_PREFIX)-$(1)-root.img bs=2k conv=sync
28 define Build/append-dtb
29 cat $(DTS_DIR)/$(DEVICE_DTS).dtb >> $@
34 KERNEL_INITRAMFS_PREFIX := $$(IMG_PREFIX)-$(1)-initramfs
36 KERNEL_PREFIX := $$(IMAGE_PREFIX)
38 DEVICE_VARS += DEVICE_DTS
40 define Device/LegacyImage
41 KERNEL_SUFFIX := -zImage
42 KERNEL = kernel-bin | append-dtb
47 define Device/FitImage
48 KERNEL_SUFFIX := -fit-uImage.itb
49 KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
55 $(call Device/FitImage)
56 DEVICE_DTS := qcom-ipq8064-ap148
59 define Device/AP148-legacy
60 $(call Device/LegacyImage)
61 DEVICE_DTS := qcom-ipq8064-ap148
65 $(call Device/FitImage)
66 DEVICE_DTS := qcom-ipq8064-db149
69 TARGET_DEVICES += AP148 AP148-legacy DB149
71 $(eval $(call BuildImage))