layerscape: Change to combined rootfs on sd images
[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 = ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \
20 append-kernel | pad-to 17M | \
21 append-rootfs | pad-rootfs | \
22 check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata
23 endef
24
25 define Device/fsl_ls1021a-twr
26 $(Device/fix-sysupgrade)
27 DEVICE_VENDOR := NXP
28 DEVICE_MODEL := TWR-LS1021A
29 DEVICE_VARIANT := Default
30 DEVICE_PACKAGES += layerscape-rcw
31 IMAGE/firmware.bin := \
32 ls-clean | \
33 ls-append $(1)-rcw.bin | pad-to 1M | \
34 ls-append $(1)-uboot.bin | pad-to 3M | \
35 ls-append $(1)-uboot-env.bin | pad-to 15M | \
36 ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
37 append-kernel | pad-to 32M | \
38 append-rootfs | pad-rootfs | check-size
39 endef
40 TARGET_DEVICES += fsl_ls1021a-twr
41
42 define Device/fsl_ls1021a-twr-sdboot
43 $(Device/rework-sdcard-images)
44 DEVICE_VENDOR := NXP
45 DEVICE_MODEL := TWR-LS1021A
46 DEVICE_VARIANT := SD Card Boot
47 DEVICE_DTS := ls1021a-twr
48 KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
49 IMAGES := sdcard.img.gz sysupgrade.bin
50 IMAGE/sdcard.img.gz := \
51 ls-clean | \
52 ls-append-sdhead $(1) | pad-to 4K | \
53 ls-append $(1)-uboot.bin | pad-to 3M | \
54 ls-append $(1)-uboot-env.bin | pad-to 16M | \
55 ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
56 append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip
57 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
58 endef
59 TARGET_DEVICES += fsl_ls1021a-twr-sdboot
60
61 define Device/fsl_ls1021a-iot-sdboot
62 $(Device/rework-sdcard-images)
63 DEVICE_VENDOR := NXP
64 DEVICE_MODEL := LS1021A-IoT
65 DEVICE_VARIANT := SD Card Boot
66 DEVICE_DTS := ls1021a-iot
67 SUPPORTED_DEVICES :=
68 KERNEL := kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
69 IMAGES := sdcard.img.gz sysupgrade.bin
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 IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
78 endef
79 TARGET_DEVICES += fsl_ls1021a-iot-sdboot