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-ppa
20 dd if
=$(STAGING_DIR_IMAGE
)/$(1)-ppa.itb
>> $@
23 define Build
/append-ls-fman
24 dd if
=$(STAGING_DIR_IMAGE
)/$(1)-fman.bin
>> $@
27 define Build
/append-ls-mc
28 dd if
=$(STAGING_DIR_IMAGE
)/$(1)-mc.itb
>> $@
31 define Build
/append-ls-ppfe
32 dd if
=$(STAGING_DIR_IMAGE
)/pfe.itb
>> $@
35 define Build
/append-ls-dpl
36 dd if
=$(STAGING_DIR_IMAGE
)/$(1)-dpl.dtb
>> $@
39 define Build
/append-ls-dpc
40 dd if
=$(STAGING_DIR_IMAGE
)/$(1)-dpc.dtb
>> $@
43 define Build
/append-ls-dtb
44 $(call Image
/BuildDTB
,$(DTS_DIR
)/$(1).dts
,$(DTS_DIR
)/$(1).dtb
)
45 dd if
=$(DTS_DIR
)/$(1).dtb
>> $@
50 FILESYSTEMS
:= squashfs
54 ifeq ($(SUBTARGET
),armv8_64b
)
55 KERNEL
:= kernel-bin | gzip | uImage gzip
56 KERNEL_LOADADDR
= 0x80080000
57 KERNEL_ENTRY_POINT
= 0x80080000
59 ifeq ($(SUBTARGET
),armv8_32b
)
60 KERNEL
:= kernel-bin | uImage none
62 KERNEL_LOADADDR
= 0x80008000
63 KERNEL_ENTRY_POINT
= 0x80008000
67 define Device
/ls1043ardb
68 DEVICE_TITLE
:= ls1043ardb-
$(SUBTARGET
)
69 DEVICE_PACKAGES
+= rcw-layerscape-ls1043ardb uboot-layerscape-
$(SUBTARGET
)-ls1043ardb \
70 fman-layerscape-ls1043ardb layerscape-ppa-ls1043ardb
71 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1043a-rdb-sdk
72 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
73 append-ls-uboot
$(1) | pad-to
4M | \
74 append-ls-ppa
$(1) | pad-to
9M | \
75 append-ls-fman
$(1) | pad-to
15M | \
76 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
77 append-kernel | pad-to
32M | \
78 append-rootfs | pad-rootfs | check-size
67108865
80 TARGET_DEVICES
+= ls1043ardb
82 define Device
/ls1046ardb
83 DEVICE_TITLE
:= ls1046ardb-
$(SUBTARGET
)
84 DEVICE_PACKAGES
+= rcw-layerscape-ls1046ardb uboot-layerscape-
$(SUBTARGET
)-ls1046ardb \
85 fman-layerscape-ls1046ardb layerscape-ppa-ls1046ardb
86 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1046a-rdb-sdk
88 UBIFS_OPTS
:= -m
1 -e
262016 -c
128
92 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
93 append-ls-uboot
$(1) | pad-to
4M | \
94 append-ls-ppa
$(1) | pad-to
9M | \
95 append-ls-fman
$(1) | pad-to
15M | \
96 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
97 append-kernel | pad-to
32M | \
98 append-ubi | check-size
67108865
100 TARGET_DEVICES
+= ls1046ardb
102 define Device
/ls1012ardb
103 DEVICE_TITLE
:= ls1012ardb-
$(SUBTARGET
)
104 DEVICE_PACKAGES
+= rcw-layerscape-ls1012ardb uboot-layerscape-
$(SUBTARGET
)-ls1012ardb \
105 kmod-ppfe layerscape-ppfe layerscape-ppa-ls1012ardb
106 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1012a-rdb
108 UBIFS_OPTS
:= -m
1 -e
262016 -c
128
112 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
113 append-ls-uboot
$(1) | pad-to
4M | \
114 append-ls-ppa
$(1) | pad-to
10M | \
115 append-ls-ppfe | pad-to
15M | \
116 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
117 append-kernel | pad-to
32M | \
118 append-ubi | check-size
67108865
120 TARGET_DEVICES
+= ls1012ardb
122 define Device
/ls1012afrdm
123 DEVICE_TITLE
:= ls1012afrdm-
$(SUBTARGET
)
124 DEVICE_PACKAGES
+= rcw-layerscape-ls1012afrdm uboot-layerscape-
$(SUBTARGET
)-ls1012afrdm \
125 kmod-ppfe layerscape-ppfe layerscape-ppa-ls1012afrdm
126 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1012a-frdm
128 UBIFS_OPTS
:= -m
1 -e
262016 -c
128
132 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
133 append-ls-uboot
$(1) | pad-to
4M | \
134 append-ls-ppa
$(1) | pad-to
10M | \
135 append-ls-ppfe | pad-to
15M | \
136 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
137 append-kernel | pad-to
32M | \
138 append-ubi | check-size
67108865
140 TARGET_DEVICES
+= ls1012afrdm
142 ifeq ($(SUBTARGET
),armv8_64b
)
143 define Device
/ls1088ardb
144 DEVICE_TITLE
:= ls1088ardb-
$(SUBTARGET
)
145 DEVICE_PACKAGES
+= rcw-layerscape-ls1088ardb uboot-layerscape-
$(SUBTARGET
)-ls1088ardb \
146 layerscape-mc-ls1088ardb layerscape-dpl-ls1088ardb restool \
147 layerscape-ppa-ls1088ardb
148 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1088a-rdb
150 UBIFS_OPTS
:= -m
1 -e
262016 -c
128
154 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
155 append-ls-uboot
$(1) | pad-to
4M | \
156 append-ls-ppa
$(1) | pad-to
10M | \
157 append-ls-mc
$(1) | pad-to
13M | \
158 append-ls-dpl
$(1) | pad-to
14M | \
159 append-ls-dpc
$(1) | pad-to
15M | \
160 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
161 append-kernel | pad-to
32M | \
162 append-ubi | check-size
67108865
164 TARGET_DEVICES
+= ls1088ardb
166 define Device
/ls2088ardb
167 DEVICE_TITLE
:= ls2088ardb-
$(SUBTARGET
)
168 DEVICE_PACKAGES
+= rcw-layerscape-ls2088ardb uboot-layerscape-
$(SUBTARGET
)-ls2088ardb \
169 layerscape-mc-ls2088ardb layerscape-dpl-ls2088ardb restool \
170 layerscape-ppa-ls2088ardb
171 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls2088a-rdb
172 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
173 append-ls-uboot
$(1) | pad-to
4M | \
174 append-ls-ppa
$(1) | pad-to
10M | \
175 append-ls-mc
$(1) | pad-to
13M | \
176 append-ls-dpl
$(1) | pad-to
14M | \
177 append-ls-dpc
$(1) | pad-to
15M | \
178 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
179 append-kernel | pad-to
32M | \
180 append-rootfs | pad-rootfs | check-size
67108865
182 TARGET_DEVICES
+= ls2088ardb
185 $(eval
$(call BuildImage
))