776a6e5ac26ff44125b77ffc5b8d516d3195cce3
[openwrt/openwrt.git] / target / linux / layerscape / image / armv7.mk
1 #
2 # Copyright 2018-2020 NXP
3 #
4 # This is free software, licensed under the GNU General Public License v2.
5 # See /LICENSE for more information.
6 #
7
8 define Device/Default
9 PROFILES := Default
10 FILESYSTEMS := squashfs
11 IMAGES := firmware.bin sysupgrade.bin
12 KERNEL := kernel-bin | uImage none
13 KERNEL_NAME := zImage
14 KERNEL_LOADADDR := 0x80008000
15 KERNEL_ENTRY_POINT := 0x80008000
16 DEVICE_DTS = $(lastword $(subst _, ,$(1)))
17 SUPPORTED_DEVICES = $(subst _,$(comma),$(1))
18 IMAGE_SIZE := 64m
19 IMAGE/sysupgrade.bin = \
20 ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \
21 append-kernel | pad-to 17M | \
22 append-rootfs | pad-rootfs | \
23 check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata
24 endef
25
26 define Device/fsl-sdboot
27 $(Device/rework-sdcard-images)
28 KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
29 IMAGES := sdcard.img.gz sysupgrade.bin
30 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
31 endef
32
33 define Device/fsl_ls1021a-twr
34 $(Device/fix-sysupgrade)
35 DEVICE_VENDOR := NXP
36 DEVICE_MODEL := TWR-LS1021A
37 DEVICE_VARIANT := Default
38 DEVICE_PACKAGES += layerscape-rcw
39 IMAGE/firmware.bin := \
40 ls-clean | \
41 ls-append $(1)-rcw.bin | pad-to 1M | \
42 ls-append $(1)-uboot.bin | pad-to 3M | \
43 ls-append $(1)-uboot-env.bin | pad-to 15M | \
44 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
45 append-kernel | pad-to 32M | \
46 append-rootfs | pad-rootfs | check-size
47 endef
48 TARGET_DEVICES += fsl_ls1021a-twr
49
50 define Device/fsl_ls1021a-twr-sdboot
51 $(Device/fsl-sdboot)
52 DEVICE_VENDOR := NXP
53 DEVICE_MODEL := TWR-LS1021A
54 DEVICE_VARIANT := SD Card Boot
55 DEVICE_DTS := ls1021a-twr
56 IMAGE/sdcard.img.gz := \
57 ls-clean | \
58 ls-append-sdhead $(1) | pad-to 4K | \
59 ls-append $(1)-uboot.bin | pad-to 3M | \
60 ls-append $(1)-uboot-env.bin | pad-to 16M | \
61 ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
62 append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip
63 endef
64 TARGET_DEVICES += fsl_ls1021a-twr-sdboot
65
66 define Device/fsl_ls1021a-iot-sdboot
67 $(Device/fsl-sdboot)
68 DEVICE_VENDOR := NXP
69 DEVICE_MODEL := LS1021A-IoT
70 DEVICE_VARIANT := SD Card Boot
71 DEVICE_DTS := ls1021a-iot
72 SUPPORTED_DEVICES :=
73 IMAGE/sdcard.img.gz := \
74 ls-clean | \
75 ls-append-sdhead $(1) | pad-to 4K | \
76 ls-append $(1)-uboot.bin | pad-to 1M | \
77 ls-append $(1)-uboot-env.bin | pad-to 16M | \
78 ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
79 append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip
80 endef
81 TARGET_DEVICES += fsl_ls1021a-iot-sdboot