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
)
40 DEVICE_VARS
+= DEVICE_DTS KERNEL_IN_UBI
42 define Device
/LegacyImage
43 KERNEL_SUFFIX
:= -uImage
44 KERNEL
= kernel-bin | append-dtb | uImage none
48 define Device
/FitImage
49 KERNEL_SUFFIX
:= -fit-uImage.itb
50 KERNEL
= kernel-bin | gzip | fit gzip
$$(DTS_DIR
)/$$(DEVICE_DTS
).dtb
56 IMAGES
:= nand-factory.ubi nand-sysupgrade.
tar
57 IMAGE
/nand-factory.ubi
:= append-ubi
58 IMAGE
/nand-sysupgrade.
tar := sysupgrade-nand
62 $(call Device
/FitImage
)
64 DEVICE_DTS
:= qcom-ipq8064-ap148
69 define Device
/AP148-legacy
70 $(call Device
/LegacyImage
)
72 DEVICE_DTS
:= qcom-ipq8064-ap148
79 $(call Device
/FitImage
)
80 DEVICE_DTS
:= qcom-ipq8064-db149
84 TARGET_DEVICES
+= AP148 AP148-legacy DB149
86 $(eval
$(call BuildImage
))