2 # Copyright (C) 2016 Jiang Yutang <jiangyutang1978@gmail.com>
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
7 include $(TOPDIR
)/rules.mk
8 include $(INCLUDE_DIR
)/image.mk
10 define Build
/append-ls-rcw
12 dd if
=$(STAGING_DIR_IMAGE
)/$(1)-rcw.bin
>> $@
15 define Build
/append-ls-uboot
16 dd if
=$(STAGING_DIR_IMAGE
)/$(1)-$(SUBTARGET
)-uboot.bin
>> $@
19 define Build
/append-ls-fman
20 dd if
=$(STAGING_DIR_IMAGE
)/$(1)-fman.bin
>> $@
23 define Build
/append-ls-dtb
24 $(call Image
/BuildDTB
,$(DTS_DIR
)/$(1).dts
,$(DTS_DIR
)/$(1).dtb
)
25 dd if
=$(DTS_DIR
)/$(1).dtb
>> $@
28 define Build
/append-ls-rootfs-ext4
29 $(STAGING_DIR_HOST
)/bin
/make_ext4fs
-l
$(word 2,$(1)) -b
4096 -i
6000 -m
0 -J
$(KDIR
)/$(word 1,$(1))-$(word 2,$(1)).root.ext4
$(TARGET_DIR
)
30 dd if
=$(KDIR
)/$(word 1,$(1))-$(word 2,$(1)).root.ext4
>> $@
35 FILESYSTEMS
:= squashfs
39 ifeq ($(SUBTARGET
),armv8_64b
)
40 KERNEL
:= kernel-bin | gzip | uImage gzip
41 KERNEL_LOADADDR
= 0x80080000
42 KERNEL_ENTRY_POINT
= 0x80080000
44 ifeq ($(SUBTARGET
),armv8_32b
)
45 KERNEL
:= kernel-bin | uImage none
47 KERNEL_LOADADDR
= 0x80008000
48 KERNEL_ENTRY_POINT
= 0x80008000
52 define Device
/ls1043ardb
53 DEVICE_TITLE
:= ls1043ardb-
$(SUBTARGET
)
54 DEVICE_PACKAGES
+= rcw-layerscape-ls1043ardb uboot-layerscape-
$(SUBTARGET
)-ls1043ardb fman-layerscape-ls1043ardb
55 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1043a-rdb
56 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
57 append-ls-uboot
$(1) | pad-to
9M | \
58 append-ls-fman
$(1) | pad-to
15M | \
59 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
60 append-kernel | pad-to
32M | \
61 append-rootfs | pad-rootfs | check-size
67108865
63 TARGET_DEVICES
+= ls1043ardb
65 define Device
/ls1046ardb
66 DEVICE_TITLE
:= ls1046ardb-
$(SUBTARGET
)
67 DEVICE_PACKAGES
+= rcw-layerscape-ls1046ardb uboot-layerscape-
$(SUBTARGET
)-ls1046ardb fman-layerscape-ls1046ardb
68 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1046a-rdb
69 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
70 append-ls-uboot
$(1) | pad-to
9M | \
71 append-ls-fman
$(1) | pad-to
15M | \
72 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
73 append-kernel | pad-to
32M | \
74 append-ls-rootfs-ext4
$(1) 22M | check-size
67108865
76 TARGET_DEVICES
+= ls1046ardb
78 define Device
/ls1012ardb
79 DEVICE_TITLE
:= ls1012ardb-
$(SUBTARGET
)
80 DEVICE_PACKAGES
+= rcw-layerscape-ls1012ardb uboot-layerscape-
$(SUBTARGET
)-ls1012ardb kmod-ppfe ppfe-ls1012ardb
81 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1012a-rdb
82 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
83 append-ls-uboot
$(1) | pad-to
15M | \
84 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
85 append-kernel | pad-to
32M | \
86 append-ls-rootfs-ext4
$(1) 23M | check-size
67108865
88 TARGET_DEVICES
+= ls1012ardb
90 define Device
/ls1088ardb
91 DEVICE_TITLE
:= ls1088ardb-
$(SUBTARGET
)
92 DEVICE_PACKAGES
+= rcw-layerscape-ls1088ardb uboot-layerscape-
$(SUBTARGET
)-ls1088ardb mc-binary-ls1088ardb
93 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1088a-rdb
94 IMAGE
/firmware.bin
= append-ls-dtb
$$(DEVICE_DTS
) | pad-to
1M | \
95 append-kernel | pad-to
17M | \
96 append-ls-rootfs-ext4
$(1) 17M | check-size
51380225
98 TARGET_DEVICES
+= ls1088ardb
100 define Device
/ls2088ardb
101 DEVICE_TITLE
:= ls2088ardb-
$(SUBTARGET
)
102 DEVICE_PACKAGES
+= rcw-layerscape-ls2088ardb uboot-layerscape-
$(SUBTARGET
)-ls2088ardb mc-binary-ls2088ardb
103 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls2088a-rdb
104 IMAGE
/firmware.bin
= append-ls-dtb
$$(DEVICE_DTS
) | pad-to
1M | \
105 append-kernel | pad-to
17M | \
106 append-rootfs | pad-rootfs | check-size
51380225
108 TARGET_DEVICES
+= ls2088ardb
110 $(eval
$(call BuildImage
))