layerscape: add ls1012afrdm device support

The QorIQ FRDM-LS1012A Board is an ultra-low-cost
development platform for QorIQ LS1012A Series Network
Processors built on ARM Cortex-A53 processor.

Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
This commit is contained in:
Yangbo Lu 2017-10-24 18:07:38 +08:00 committed by John Crispin
parent 9e7b166704
commit 2b1ec44dbd
6 changed files with 88 additions and 5 deletions

View file

@ -17,8 +17,8 @@ PKG_RELEASE:=1
# uboot-layerscape's source code.
PKG_SOURCE_PROTO:=git
PKG_SOURCE_URL:=https://github.com/yangbolu1991/u-boot-lede.git
PKG_SOURCE_VERSION:=050c7f11e2ad1a005baa8816699a5c4543dab70c
PKG_MIRROR_HASH:=ebd63c29417616240090930d50bbce46956de8ddc3f2aa1b238da286ff66794a
PKG_SOURCE_VERSION:=43cb4c0fcab237f8daa39c393cc1441b76b99fcf
PKG_MIRROR_HASH:=f0ef74cd0a4aecd727e8c4046b50a869ddec8a4f382da77475ec433f86cdc39a
PKG_MAINTAINER:=Yangbo Lu <yangbo.lu@nxp.com>
@ -47,6 +47,7 @@ define Build/InstallDev
$(CP) $(PKG_BUILD_DIR)/ls1043ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1043ardb-armv8_32b-uboot.bin
$(CP) $(PKG_BUILD_DIR)/ls1046ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1046ardb-armv8_32b-uboot.bin
$(CP) $(PKG_BUILD_DIR)/ls1012ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1012ardb-armv8_32b-uboot.bin
$(CP) $(PKG_BUILD_DIR)/ls1012afrdm-uboot.bin $(STAGING_DIR_IMAGE)/ls1012afrdm-armv8_32b-uboot.bin
endef
$(eval $(call BuildPackage,uboot-layerscape-armv8_32b))

View file

@ -52,12 +52,18 @@ define U-Boot/ls2088ardb
UBOOT_CONFIG:=ls2080ardb
endef
define U-Boot/ls1012afrdm
NAME:=NXP ls1012afrdm 64b Dev Board
UBOOT_CONFIG:=ls1012afrdm_qspi
endef
UBOOT_TARGETS := \
ls1043ardb \
ls1046ardb \
ls1012ardb \
ls1088ardb \
ls2088ardb
ls2088ardb \
ls1012afrdm
define Build/InstallDev
$(INSTALL_DIR) $(STAGING_DIR_IMAGE)

View file

@ -0,0 +1,49 @@
From a5e454a3bb33a456655f08592606e4df34e40110 Mon Sep 17 00:00:00 2001
From: Yangbo Lu <yangbo.lu@nxp.com>
Date: Tue, 24 Oct 2017 17:48:08 +0800
Subject: [PATCH] armv8: ls1012afrdm: add LEDE boot support in environment
Signed-off-by: Yangbo Lu <yangbo.lu@nxp.com>
---
include/configs/ls1012afrdm.h | 19 +++++++++++++++++++
1 file changed, 19 insertions(+)
diff --git a/include/configs/ls1012afrdm.h b/include/configs/ls1012afrdm.h
index a3f8824d27..36dff19bdd 100644
--- a/include/configs/ls1012afrdm.h
+++ b/include/configs/ls1012afrdm.h
@@ -73,12 +73,31 @@
"qspi_bootcmd=echo Trying load from qspi..;" \
"sf probe && sf read $load_addr " \
"$kernel_addr $kernel_size && bootm $load_addr#$board\0" \
+ "lede_setenv=setenv loadaddr 82000000 && " \
+ "setenv fdtaddr 8f000000 && " \
+ "setenv bootargs root=/dev/mtdblock8 " \
+ "rootfstype=ext4 noinitrd " \
+ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \
+ "mtdparts=1550000.quadspi:1M(rcw),2M(u-boot),1M(u-boot-env)," \
+ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \
+ "16M(kernel),30M(ext4rfs),2M(user)\0" \
+ "lede_run=pfe stop && sf probe 0:0 && " \
+ "sf read $fdtaddr f00000 100000 && " \
+ "sf read $loadaddr 1000000 1000000 && " \
+ "bootm $loadaddr - $fdtaddr\0" \
+ "lede_boot=run lede_setenv;run lede_run\0"
#undef CONFIG_BOOTCOMMAND
#if defined(CONFIG_QSPI_BOOT) || defined(CONFIG_SD_BOOT_QSPI)
#define CONFIG_BOOTCOMMAND "run distro_bootcmd;run qspi_bootcmd"
#endif
+#undef CONFIG_BOOTCOMMAND
+#define CONFIG_BOOTCOMMAND "run lede_boot"
+
+#undef CONFIG_BOOTDELAY
+#define CONFIG_BOOTDELAY 3
+
/*
* USB
*/
--
2.14.1

View file

@ -53,12 +53,18 @@ define ppa/ls2088ardb
CONFIG=ppa-ls2088a.itb
endef
define ppa/ls1012afrdm
TITLE=PPA firmware $(PKG_NAME)-$(PKG_VERSION) for NXP ls1012afrdm 64b/32b Dev Board
CONFIG=ppa-ls1012a.itb
endef
PPAS := \
ls1043ardb \
ls1046ardb \
ls1012ardb \
ls1088ardb \
ls2088ardb
ls2088ardb \
ls1012afrdm
define Package/ppa/template
define Package/layerscape-ppa-$(1)

View file

@ -56,12 +56,18 @@ define rcw/ls2088ardb
CONFIG=ls2088ardb/FFFFFFFF_PP_HH_0x2a_0x41/PBL_0x2a_0x41_1800_700_1866_1600.bin
endef
define rcw/ls1012afrdm
TITLE=RCW binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1012afrdm 64b/32b Dev Board
CONFIG=ls1012afrdm/N_SSNP_3305/PBL_0x33_0x05_800_250_1000_default.bin
endef
RCWS := \
ls1043ardb \
ls1046ardb \
ls1012ardb \
ls1088ardb \
ls2088ardb
ls2088ardb \
ls1012afrdm
define Package/rcw/template
define Package/rcw-layerscape-$(1)

View file

@ -114,6 +114,21 @@ define Device/ls1012ardb
endef
TARGET_DEVICES += ls1012ardb
define Device/ls1012afrdm
DEVICE_TITLE := ls1012afrdm-$(SUBTARGET)
DEVICE_PACKAGES += rcw-layerscape-ls1012afrdm uboot-layerscape-$(SUBTARGET)-ls1012afrdm \
kmod-ppfe layerscape-ppfe layerscape-ppa-ls1012afrdm
DEVICE_DTS = ../../../arm64/boot/dts/freescale/fsl-ls1012a-frdm
IMAGE/firmware.bin = append-ls-rcw $(1) | pad-to 1M | \
append-ls-uboot $(1) | pad-to 4M | \
append-ls-ppa $(1) | pad-to 10M | \
append-ls-ppfe | pad-to 15M | \
append-ls-dtb $$(DEVICE_DTS) | pad-to 16M | \
append-kernel | pad-to 32M | \
append-ls-rootfs-ext4 $(1) 30M | check-size 67108865
endef
TARGET_DEVICES += ls1012afrdm
ifeq ($(SUBTARGET),armv8_64b)
define Device/ls1088ardb
DEVICE_TITLE := ls1088ardb-$(SUBTARGET)