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
>> $@
48 define Build
/append-ls-rootfs-ext4
49 $(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
)
50 dd if
=$(KDIR
)/$(word 1,$(1))-$(word 2,$(1)).root.ext4
>> $@
55 FILESYSTEMS
:= squashfs
59 ifeq ($(SUBTARGET
),armv8_64b
)
60 KERNEL
:= kernel-bin | gzip | uImage gzip
61 KERNEL_LOADADDR
= 0x80080000
62 KERNEL_ENTRY_POINT
= 0x80080000
64 ifeq ($(SUBTARGET
),armv8_32b
)
65 KERNEL
:= kernel-bin | uImage none
67 KERNEL_LOADADDR
= 0x80008000
68 KERNEL_ENTRY_POINT
= 0x80008000
72 define Device
/ls1043ardb
73 DEVICE_TITLE
:= ls1043ardb-
$(SUBTARGET
)
74 DEVICE_PACKAGES
+= rcw-layerscape-ls1043ardb uboot-layerscape-
$(SUBTARGET
)-ls1043ardb \
75 fman-layerscape-ls1043ardb layerscape-ppa-ls1043ardb
76 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1043a-rdb-sdk
77 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
78 append-ls-uboot
$(1) | pad-to
4M | \
79 append-ls-ppa
$(1) | pad-to
9M | \
80 append-ls-fman
$(1) | pad-to
15M | \
81 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
82 append-kernel | pad-to
32M | \
83 append-rootfs | pad-rootfs | check-size
67108865
85 TARGET_DEVICES
+= ls1043ardb
87 define Device
/ls1046ardb
88 DEVICE_TITLE
:= ls1046ardb-
$(SUBTARGET
)
89 DEVICE_PACKAGES
+= rcw-layerscape-ls1046ardb uboot-layerscape-
$(SUBTARGET
)-ls1046ardb \
90 fman-layerscape-ls1046ardb layerscape-ppa-ls1046ardb
91 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1046a-rdb-sdk
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-ls-rootfs-ext4
$(1) 30M | 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
107 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
108 append-ls-uboot
$(1) | pad-to
4M | \
109 append-ls-ppa
$(1) | pad-to
10M | \
110 append-ls-ppfe | pad-to
15M | \
111 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
112 append-kernel | pad-to
32M | \
113 append-ls-rootfs-ext4
$(1) 30M | check-size
67108865
115 TARGET_DEVICES
+= ls1012ardb
117 ifeq ($(SUBTARGET
),armv8_64b
)
118 define Device
/ls1088ardb
119 DEVICE_TITLE
:= ls1088ardb-
$(SUBTARGET
)
120 DEVICE_PACKAGES
+= rcw-layerscape-ls1088ardb uboot-layerscape-
$(SUBTARGET
)-ls1088ardb \
121 layerscape-mc-ls1088ardb layerscape-dpl-ls1088ardb restool \
122 layerscape-ppa-ls1088ardb
123 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls1088a-rdb
124 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
125 append-ls-uboot
$(1) | pad-to
4M | \
126 append-ls-ppa
$(1) | pad-to
10M | \
127 append-ls-mc
$(1) | pad-to
13M | \
128 append-ls-dpl
$(1) | pad-to
14M | \
129 append-ls-dpc
$(1) | pad-to
15M | \
130 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
131 append-kernel | pad-to
32M | \
132 append-ls-rootfs-ext4
$(1) 30M | check-size
67108865
134 TARGET_DEVICES
+= ls1088ardb
136 define Device
/ls2088ardb
137 DEVICE_TITLE
:= ls2088ardb-
$(SUBTARGET
)
138 DEVICE_PACKAGES
+= rcw-layerscape-ls2088ardb uboot-layerscape-
$(SUBTARGET
)-ls2088ardb \
139 layerscape-mc-ls2088ardb layerscape-dpl-ls2088ardb restool \
140 layerscape-ppa-ls2088ardb
141 DEVICE_DTS
= ..
/..
/..
/arm64
/boot
/dts
/freescale
/fsl-ls2088a-rdb
142 IMAGE
/firmware.bin
= append-ls-rcw
$(1) | pad-to
1M | \
143 append-ls-uboot
$(1) | pad-to
4M | \
144 append-ls-ppa
$(1) | pad-to
10M | \
145 append-ls-mc
$(1) | pad-to
13M | \
146 append-ls-dpl
$(1) | pad-to
14M | \
147 append-ls-dpc
$(1) | pad-to
15M | \
148 append-ls-dtb
$$(DEVICE_DTS
) | pad-to
16M | \
149 append-kernel | pad-to
32M | \
150 append-rootfs | pad-rootfs | check-size
67108865
152 TARGET_DEVICES
+= ls2088ardb
155 $(eval
$(call BuildImage
))