2021-02-10 13:52:34 +00:00
|
|
|
# SPDX-License-Identifier: GPL-2.0-only
|
2018-07-10 03:58:59 +00:00
|
|
|
#
|
2020-05-28 04:48:29 +00:00
|
|
|
# Copyright 2018-2020 NXP
|
2018-07-10 03:58:59 +00:00
|
|
|
|
|
|
|
define Device/Default
|
|
|
|
PROFILES := Default
|
|
|
|
FILESYSTEMS := squashfs
|
2020-05-28 04:48:29 +00:00
|
|
|
IMAGES := firmware.bin sysupgrade.bin
|
2018-07-10 03:58:59 +00:00
|
|
|
KERNEL := kernel-bin | uImage none
|
2020-10-26 09:41:36 +00:00
|
|
|
KERNEL_INITRAMFS = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
2018-07-10 03:58:59 +00:00
|
|
|
KERNEL_NAME := zImage
|
|
|
|
KERNEL_LOADADDR := 0x80008000
|
|
|
|
KERNEL_ENTRY_POINT := 0x80008000
|
2020-07-20 13:34:04 +00:00
|
|
|
DEVICE_DTS = $(lastword $(subst _, ,$(1)))
|
2020-06-29 08:18:57 +00:00
|
|
|
IMAGE_SIZE := 64m
|
2020-10-25 16:58:49 +00:00
|
|
|
IMAGE/sysupgrade.bin = \
|
|
|
|
ls-append-dtb $$(DEVICE_DTS) | pad-to 1M | \
|
2020-08-19 10:13:26 +00:00
|
|
|
append-kernel | pad-to 17M | \
|
2020-06-29 08:18:57 +00:00
|
|
|
append-rootfs | pad-rootfs | \
|
|
|
|
check-size $(LS_SYSUPGRADE_IMAGE_SIZE) | append-metadata
|
2018-07-10 03:58:59 +00:00
|
|
|
endef
|
|
|
|
|
2020-10-25 16:53:53 +00:00
|
|
|
define Device/fsl-sdboot
|
|
|
|
$(Device/rework-sdcard-images)
|
|
|
|
KERNEL = kernel-bin | gzip | fit gzip $$(DTS_DIR)/$$(DEVICE_DTS).dtb
|
|
|
|
IMAGES := sdcard.img.gz sysupgrade.bin
|
|
|
|
IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
|
|
|
|
endef
|
|
|
|
|
2020-07-20 13:34:04 +00:00
|
|
|
define Device/fsl_ls1021a-twr
|
2020-08-19 10:13:26 +00:00
|
|
|
$(Device/fix-sysupgrade)
|
2019-09-13 15:52:34 +00:00
|
|
|
DEVICE_VENDOR := NXP
|
|
|
|
DEVICE_MODEL := TWR-LS1021A
|
|
|
|
DEVICE_VARIANT := Default
|
2020-04-01 08:47:41 +00:00
|
|
|
DEVICE_PACKAGES += layerscape-rcw
|
2018-07-10 03:58:59 +00:00
|
|
|
IMAGE/firmware.bin := \
|
|
|
|
ls-clean | \
|
|
|
|
ls-append $(1)-rcw.bin | pad-to 1M | \
|
|
|
|
ls-append $(1)-uboot.bin | pad-to 3M | \
|
|
|
|
ls-append $(1)-uboot-env.bin | pad-to 15M | \
|
|
|
|
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
|
|
|
|
append-kernel | pad-to 32M | \
|
2020-06-29 08:18:57 +00:00
|
|
|
append-rootfs | pad-rootfs | check-size
|
2018-07-10 03:58:59 +00:00
|
|
|
endef
|
2020-07-20 13:34:04 +00:00
|
|
|
TARGET_DEVICES += fsl_ls1021a-twr
|
2018-07-18 06:14:40 +00:00
|
|
|
|
2020-07-20 13:34:04 +00:00
|
|
|
define Device/fsl_ls1021a-twr-sdboot
|
2020-10-25 16:53:53 +00:00
|
|
|
$(Device/fsl-sdboot)
|
2019-09-13 15:52:34 +00:00
|
|
|
DEVICE_VENDOR := NXP
|
|
|
|
DEVICE_MODEL := TWR-LS1021A
|
|
|
|
DEVICE_VARIANT := SD Card Boot
|
2018-07-18 06:14:40 +00:00
|
|
|
DEVICE_DTS := ls1021a-twr
|
2020-08-24 12:29:32 +00:00
|
|
|
IMAGE/sdcard.img.gz := \
|
2018-07-18 06:14:40 +00:00
|
|
|
ls-clean | \
|
|
|
|
ls-append-sdhead $(1) | pad-to 4K | \
|
|
|
|
ls-append $(1)-uboot.bin | pad-to 3M | \
|
2020-08-24 12:29:32 +00:00
|
|
|
ls-append $(1)-uboot-env.bin | pad-to 16M | \
|
|
|
|
ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
|
|
|
append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip
|
2018-07-18 06:14:40 +00:00
|
|
|
endef
|
2020-07-20 13:34:04 +00:00
|
|
|
TARGET_DEVICES += fsl_ls1021a-twr-sdboot
|
2018-11-02 10:30:57 +00:00
|
|
|
|
2020-07-20 13:34:04 +00:00
|
|
|
define Device/fsl_ls1021a-iot-sdboot
|
2020-10-25 16:53:53 +00:00
|
|
|
$(Device/fsl-sdboot)
|
2019-09-13 15:52:34 +00:00
|
|
|
DEVICE_VENDOR := NXP
|
|
|
|
DEVICE_MODEL := LS1021A-IoT
|
|
|
|
DEVICE_VARIANT := SD Card Boot
|
2018-11-02 10:30:57 +00:00
|
|
|
DEVICE_DTS := ls1021a-iot
|
2020-07-20 13:34:04 +00:00
|
|
|
SUPPORTED_DEVICES :=
|
2020-08-24 12:29:32 +00:00
|
|
|
IMAGE/sdcard.img.gz := \
|
2018-11-02 10:30:57 +00:00
|
|
|
ls-clean | \
|
|
|
|
ls-append-sdhead $(1) | pad-to 4K | \
|
|
|
|
ls-append $(1)-uboot.bin | pad-to 1M | \
|
2020-08-24 12:29:32 +00:00
|
|
|
ls-append $(1)-uboot-env.bin | pad-to 16M | \
|
|
|
|
ls-append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
|
|
|
|
append-rootfs | pad-to $(LS_SD_IMAGE_SIZE)M | gzip
|
2018-11-02 10:30:57 +00:00
|
|
|
endef
|
2020-07-20 13:34:04 +00:00
|
|
|
TARGET_DEVICES += fsl_ls1021a-iot-sdboot
|