layerscape: convert to use TF-A for firmware

This patch is to convert to use TF-A for firmware.
- Use un-swapped rcw since swapping will be done in TF-A.
- Use u-boot with TF-A defconfig.
- Rework memory map for TF-A introduction.

Signed-off-by: Biwen Li <biwen.li@nxp.com>
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
This commit is contained in:
Biwen Li 2019-05-06 11:26:09 +08:00 committed by Petr Štetiar
parent 17dcbe1b8e
commit c07d3302b3
8 changed files with 59 additions and 69 deletions

View File

@ -29,52 +29,52 @@ endef
define U-Boot/ls1012ardb
NAME:=NXP LS1012ARDB
UBOOT_CONFIG:=ls1012ardb_qspi
UBOOT_CONFIG:=ls1012ardb_tfa
ENV_SIZE:=0x40000
endef
define U-Boot/ls1012afrwy
NAME:=NXP LS1012AFRWY
UBOOT_CONFIG:=ls1012afrwy_qspi
UBOOT_CONFIG:=ls1012afrwy_tfa
ENV_SIZE:=0x10000
endef
define U-Boot/ls1043ardb
NAME:=NXP LS1043ARDB
ENV_SIZE:=0x20000
UBOOT_CONFIG:=ls1043ardb_tfa
endef
define U-Boot/ls1043ardb-sdboot
NAME:=NXP LS1043ARDB SD Card Boot
UBOOT_CONFIG:=ls1043ardb_sdcard
UBOOT_IMAGE:=u-boot-with-spl-pbl.bin
UBOOT_CONFIG:=ls1043ardb_tfa
endef
define U-Boot/ls1046ardb
NAME:=NXP LS1046ARDB
UBOOT_CONFIG:=ls1046ardb_qspi
UBOOT_CONFIG:=ls1046ardb_tfa
endef
define U-Boot/ls1046ardb-sdboot
NAME:=NXP LS1046ARDB SD Card Boot
UBOOT_CONFIG:=ls1046ardb_sdcard
UBOOT_IMAGE:=u-boot-with-spl-pbl.bin
UBOOT_CONFIG:=ls1046ardb_tfa
endef
define U-Boot/ls1088ardb
NAME:=NXP LS1088ARDB
UBOOT_CONFIG:=ls1088ardb_qspi
UBOOT_CONFIG:=ls1088ardb_tfa
endef
define U-Boot/ls1088ardb-sdboot
NAME:=NXP LS1088ARDB SD Card Boot
UBOOT_CONFIG:=ls1088ardb_sdcard_qspi
UBOOT_IMAGE:=u-boot-with-spl.bin
UBOOT_CONFIG:=ls1088ardb_tfa
endef
define U-Boot/ls2088ardb
NAME:=NXP LS2088ARDB
UBOOT_CONFIG:=ls2080ardb
UBOOT_CONFIG:=ls2088ardb_tfa
endef
define U-Boot/ls1021atwr

View File

@ -3,6 +3,6 @@ loadaddr=0x81000000
fdt_high=0xffffffffffffffff
initrd_high=0xffffffffffffffff
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
bootargs=ubi.mtd=9 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(rcw),2m(u-boot),1m(u-boot-env),2m(ppa),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(ubifs)
bootargs=ubi.mtd=8 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(pfe),2m(reserved-2),1m(dtb),16m(kernel),32m(ubifs)
bootcmd=echo starting openwrt ...;pfe stop;run qspi_boot
bootdelay=3

View File

@ -4,6 +4,6 @@ fdt_high=0xffffffffffffffff
initrd_high=0xffffffffffffffff
hwconfig=fsl_ddr:bank_intlv=auto
nor_boot=cp.b 60f00000 $fdtaddr 100000;cp.b 61000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),2m(ppa),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs)
bootargs=root=/dev/mtdblock8 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=60000000.nor:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(rootfs)
bootcmd=echo starting openwrt ...;run nor_boot
bootdelay=3

View File

@ -4,6 +4,6 @@ fdt_high=0xffffffffffffffff
initrd_high=0xffffffffffffffff
hwconfig=fsl_ddr:bank_intlv=auto
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
bootargs=ubi.mtd=10 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(rcw),2m(u-boot),1m(u-boot-env),2m(ppa),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(ubifs)
bootargs=ubi.mtd=9 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=1550000.quadspi:1m(bl2),4m(fip),1m(u-boot-env),3m(reserved-1),256k(fman),5888k(reserved-2),1m(dtb),16m(kernel),32m(ubifs)
bootcmd=echo starting openwrt ...;run qspi_boot
bootdelay=3

View File

@ -5,6 +5,6 @@ initrd_high=0xffffffffffffffff
hwconfig=fsl_ddr:bank_intlv=auto
mc_init=sf probe 0:0;sf read 80000000 a00000 300000;sf read 80300000 e00000 100000;fsl_mc start mc 80000000 80300000;sf read 80400000 d00000 100000;fsl_mc apply dpl 80400000
qspi_boot=sf probe 0:0;sf read $fdtaddr f00000 100000;sf read $loadaddr 1000000 1000000;bootm $loadaddr - $fdtaddr
bootargs=ubi.mtd=11 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=20c0000.quadspi:1m(rcw),2m(u-boot),1m(u-boot-env),2m(ppa),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(ubifs)
bootargs=ubi.mtd=10 root=ubi0:rootfs rw rootfstype=ubifs noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 mtdparts=20c0000.quadspi:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(ubifs)
bootcmd=echo starting openwrt ...;run mc_init;run qspi_boot
bootdelay=3

View File

@ -5,6 +5,6 @@ initrd_high=0xffffffffffffffff
hwconfig=fsl_ddr:bank_intlv=auto
mc_init=fsl_mc start mc 580a00000 580e00000;fsl_mc apply dpl 580d00000
nor_boot=cp.b 580f00000 $fdtaddr 100000;cp.b 581000000 $loadaddr 1000000;bootm $loadaddr - $fdtaddr
bootargs=root=/dev/mtdblock10 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 mtdparts=580000000.nor:1m(rcw),2m(u-boot),1m(u-boot-env),2m(ppa),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs)
bootargs=root=/dev/mtdblock9 rootfstype=squashfs,jffs2 noinitrd earlycon=uart8250,mmio,0x21c0500 console=ttyS1,115200 mtdparts=580000000.nor:1m(bl2),4m(fip),1m(u-boot-env),4m(reserved-1),3m(mc),1m(dpl),1m(dpc),1m(dtb),16m(kernel),32m(rootfs)
bootcmd=echo starting openwrt ...;run mc_init;run nor_boot
bootdelay=3

View File

@ -30,12 +30,12 @@ endef
define Package/layerscape-rcw/ls1012ardb
TITLE:=NXP LS1012ARDB RCW binary
CONFIG:=ls1012ardb/R_SPNH_3508/rcw_1000_default.bin.swapped
CONFIG:=ls1012ardb/R_SPNH_3508/rcw_1000_default.bin
endef
define Package/layerscape-rcw/ls1012afrwy
TITLE:=NXP LS1012AFRWY RCW binary
CONFIG:=ls1012afrwy/N_SSNP_3305/rcw_1000_default.bin.swapped
CONFIG:=ls1012afrwy/N_SSNP_3305/rcw_1000_default.bin
endef
define Package/layerscape-rcw/ls1043ardb
@ -50,7 +50,7 @@ endef
define Package/layerscape-rcw/ls1046ardb
TITLE:=NXP LS1046ARDB RCW binary
CONFIG:=ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot.bin.swapped
CONFIG:=ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot.bin
endef
define Package/layerscape-rcw/ls1046ardb-sdboot

View File

@ -18,9 +18,8 @@ endef
define Device/ls1012ardb
DEVICE_TITLE := LS1012ARDB
DEVICE_PACKAGES += \
layerscape-rcw-ls1012ardb \
layerscape-ppfe \
layerscape-ppa-ls1012ardb \
tfa-ls1012ardb \
kmod-ppfe
DEVICE_DTS := freescale/fsl-ls1012a-rdb
UBINIZE_OPTS := -E 5
@ -28,10 +27,9 @@ define Device/ls1012ardb
PAGESIZE := 1
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 4M | \
ls-append $(1)-ppa.itb | pad-to 10M | \
ls-append $(1)-bl2.pbl | pad-to 1M | \
ls-append $(1)-fip.bin | pad-to 5M | \
ls-append $(1)-uboot-env.bin | pad-to 10M | \
ls-append pfe.itb | pad-to 15M | \
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
append-kernel | pad-to 32M | \
@ -42,19 +40,17 @@ TARGET_DEVICES += ls1012ardb
define Device/ls1012afrwy
DEVICE_TITLE := LS1012AFRWY
DEVICE_PACKAGES += \
layerscape-rcw-ls1012afrwy \
layerscape-ppfe \
layerscape-ppa-ls1012afrwy \
tfa-ls1012afrwy \
kmod-ppfe
DEVICE_DTS := freescale/fsl-ls1012a-frwy
FILESYSTEMS := ext4
IMAGES := firmware.bin sdcard.img
IMAGE/firmware.bin := \
ls-clean | \
ls-append $(1)-rcw.bin | pad-to 128K | \
ls-append $(1)-bl2.pbl | pad-to 128K | \
ls-append pfe.itb | pad-to 384K | \
ls-append $(1)-ppa.itb | pad-to 1024K | \
ls-append $(1)-uboot.bin | pad-to 1856K | \
ls-append $(1)-fip.bin | pad-to 1856K | \
ls-append $(1)-uboot-env.bin | pad-to 2048K | \
check-size 2097153
IMAGE/sdcard.img := \
@ -69,17 +65,16 @@ TARGET_DEVICES += ls1012afrwy
define Device/ls1043ardb
DEVICE_TITLE := LS1043ARDB
DEVICE_PACKAGES += \
layerscape-rcw-ls1043ardb \
layerscape-fman-ls1043ardb \
layerscape-ppa-ls1043ardb
tfa-ls1043ardb \
fmc fmc-eth-config
DEVICE_DTS := freescale/fsl-ls1043a-rdb-sdk
FILESYSTEMS := squashfs
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 4M | \
ls-append $(1)-ppa.itb | pad-to 9M | \
ls-append $(1)-bl2.pbl | pad-to 1M | \
ls-append $(1)-fip.bin | pad-to 5M | \
ls-append $(1)-uboot-env.bin | pad-to 9M | \
ls-append $(1)-fman.bin | pad-to 15M | \
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
append-kernel | pad-to 32M | \
@ -91,16 +86,17 @@ define Device/ls1043ardb-sdboot
DEVICE_TITLE := LS1043ARDB (SD Card Boot)
DEVICE_PACKAGES += \
layerscape-fman-ls1043ardb \
layerscape-ppa-ls1043ardb
tfa-ls1043ardb-sdboot \
fmc fmc-eth-config
DEVICE_DTS := freescale/fsl-ls1043a-rdb-sdk
FILESYSTEMS := ext4
IMAGES := sdcard.img
IMAGE/sdcard.img := \
ls-clean | \
ls-append-sdhead $(1) | pad-to 4K | \
ls-append $(1)-uboot.bin | pad-to 3M | \
ls-append $(1)-uboot-env.bin | pad-to 4M | \
ls-append ls1043ardb-ppa.itb | pad-to 9M | \
ls-append $(1)-bl2.pbl | pad-to 1M | \
ls-append $(1)-fip.bin | pad-to 5M | \
ls-append $(1)-uboot-env.bin | pad-to 9M | \
ls-append ls1043ardb-fman.bin | pad-to 15M | \
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
@ -111,19 +107,18 @@ TARGET_DEVICES += ls1043ardb-sdboot
define Device/ls1046ardb
DEVICE_TITLE := LS1046ARDB
DEVICE_PACKAGES += \
layerscape-rcw-ls1046ardb \
layerscape-fman-ls1046ardb \
layerscape-ppa-ls1046ardb
tfa-ls1046ardb \
fmc fmc-eth-config
DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk
UBINIZE_OPTS := -E 5
BLOCKSIZE := 256KiB
PAGESIZE := 1
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 4M | \
ls-append $(1)-ppa.itb | pad-to 9M | \
ls-append $(1)-bl2.pbl | pad-to 1M | \
ls-append $(1)-fip.bin | pad-to 5M | \
ls-append $(1)-uboot-env.bin | pad-to 9M | \
ls-append $(1)-fman.bin | pad-to 15M | \
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
append-kernel | pad-to 32M | \
@ -135,16 +130,17 @@ define Device/ls1046ardb-sdboot
DEVICE_TITLE := LS1046ARDB (SD Card Boot)
DEVICE_PACKAGES += \
layerscape-fman-ls1046ardb \
layerscape-ppa-ls1046ardb
tfa-ls1046ardb-sdboot \
fmc fmc-eth-config
DEVICE_DTS := freescale/fsl-ls1046a-rdb-sdk
FILESYSTEMS := ext4
IMAGES := sdcard.img
IMAGE/sdcard.img := \
ls-clean | \
ls-append-sdhead $(1) | pad-to 4K | \
ls-append $(1)-uboot.bin | pad-to 3M | \
ls-append $(1)-uboot-env.bin | pad-to 4M | \
ls-append ls1046ardb-ppa.itb | pad-to 9M | \
ls-append $(1)-bl2.pbl | pad-to 1M | \
ls-append $(1)-fip.bin | pad-to 5M | \
ls-append $(1)-uboot-env.bin | pad-to 9M | \
ls-append ls1046ardb-fman.bin | pad-to 15M | \
ls-append-dtb $$(DEVICE_DTS) | pad-to 16M | \
append-kernel | pad-to $(LS_SD_ROOTFSPART_OFFSET)M | \
@ -155,10 +151,9 @@ TARGET_DEVICES += ls1046ardb-sdboot
define Device/ls1088ardb
DEVICE_TITLE := LS1088ARDB
DEVICE_PACKAGES += \
layerscape-rcw-ls1088ardb \
layerscape-mc-ls1088ardb \
layerscape-dpl-ls1088ardb \
layerscape-ppa-ls1088ardb \
tfa-ls1088ardb \
restool
DEVICE_DTS := freescale/fsl-ls1088a-rdb
UBINIZE_OPTS := -E 5
@ -166,10 +161,9 @@ define Device/ls1088ardb
PAGESIZE := 1
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 4M | \
ls-append $(1)-ppa.itb | pad-to 10M | \
ls-append $(1)-bl2.pbl | pad-to 1M | \
ls-append $(1)-fip.bin | pad-to 5M | \
ls-append $(1)-uboot-env.bin | pad-to 10M | \
ls-append $(1)-mc.itb | pad-to 13M | \
ls-append $(1)-dpl.dtb | pad-to 14M | \
ls-append $(1)-dpc.dtb | pad-to 15M | \
@ -182,10 +176,9 @@ TARGET_DEVICES += ls1088ardb
define Device/ls1088ardb-sdboot
DEVICE_TITLE := LS1088ARDB (SD Card Boot)
DEVICE_PACKAGES += \
layerscape-rcw-ls1088ardb-sdboot \
layerscape-mc-ls1088ardb \
layerscape-dpl-ls1088ardb \
layerscape-ppa-ls1088ardb \
tfa-ls1088ardb-sdboot \
restool
DEVICE_DTS := freescale/fsl-ls1088a-rdb
FILESYSTEMS := ext4
@ -193,10 +186,9 @@ define Device/ls1088ardb-sdboot
IMAGE/sdcard.img := \
ls-clean | \
ls-append-sdhead $(1) | pad-to 4K | \
ls-append $(1)-rcw.bin | pad-to 1M | \
ls-append $(1)-uboot.bin | pad-to 3M | \
ls-append $(1)-uboot-env.bin | pad-to 4M | \
ls-append ls1088ardb-ppa.itb | pad-to 10M | \
ls-append $(1)-bl2.pbl | pad-to 1M | \
ls-append $(1)-fip.bin | pad-to 5M | \
ls-append $(1)-uboot-env.bin | pad-to 10M | \
ls-append ls1088ardb-mc.itb | pad-to 13M | \
ls-append ls1088ardb-dpl.dtb | pad-to 14M | \
ls-append ls1088ardb-dpc.dtb | pad-to 15M | \
@ -209,19 +201,17 @@ TARGET_DEVICES += ls1088ardb-sdboot
define Device/ls2088ardb
DEVICE_TITLE := LS2088ARDB
DEVICE_PACKAGES += \
layerscape-rcw-ls2088ardb \
layerscape-mc-ls2088ardb \
layerscape-dpl-ls2088ardb \
layerscape-ppa-ls2088ardb \
tfa-ls2088ardb \
restool
DEVICE_DTS := freescale/fsl-ls2088a-rdb
FILESYSTEMS := squashfs
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 4M | \
ls-append $(1)-ppa.itb | pad-to 10M | \
ls-append $(1)-bl2.pbl | pad-to 1M | \
ls-append $(1)-fip.bin | pad-to 5M | \
ls-append $(1)-uboot-env.bin | pad-to 10M | \
ls-append $(1)-mc.itb | pad-to 13M | \
ls-append $(1)-dpl.dtb | pad-to 14M | \
ls-append $(1)-dpc.dtb | pad-to 15M | \