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