From: Yangbo Lu Date: Mon, 3 Jul 2017 02:48:27 +0000 (+0800) Subject: layerscape: update packages with LSDK git trees X-Git-Url: http://git.lede-project.org./?a=commitdiff_plain;h=2e2203ff72fd1556bab2c32e808ce7bb79a9858c;p=openwrt%2Fstaging%2Frobimarko.git layerscape: update packages with LSDK git trees NXP Layerscape LSDK had set up its own open source web site and github for release. https://lsdk.github.io https://github.com/qoriq-open-source This patch is to update rcw/fman_ucode/u-boot packages with LSDK git trees. Also add some patches of packages to support LEDE. Since ARMv8 32-bit u-boot images are same with ARMv8 64-bit images but 64-bit toolchain couldn't be used for 32-bit targets, we still use a private tree for ARMv8 32-bit u-boot images. This is in plan to move this private tree to NXP Layerscape github. Signed-off-by: Yangbo Lu --- diff --git a/package/boot/uboot-layerscape-armv8_32b/Makefile b/package/boot/uboot-layerscape-armv8_32b/Makefile index 85e338ade4..d204a30ec4 100644 --- a/package/boot/uboot-layerscape-armv8_32b/Makefile +++ b/package/boot/uboot-layerscape-armv8_32b/Makefile @@ -8,18 +8,19 @@ include $(TOPDIR)/rules.mk PKG_NAME:=uboot-layerscape-armv8_32b -PKG_VERSION:=v1.0 +PKG_VERSION:=2017.09 PKG_RELEASE:=1 +# Layerscape ARMv8 platforms use 64-bit u-boot to support both 32-bit and 64-bit +# kernel/rootfs. Since LEDE could only provide 32-bit toolchain for 32-bit targets, +# 64-bit u-boot images git tree is provided here whose source code actually is +# uboot-layerscape's source code. PKG_SOURCE_PROTO:=git -PKG_MIRROR_HASH:=a29edbeddde4b3007ac349c2a5ee434719049ac4753e459dbb1bab21e1c585da -PKG_SOURCE_URL:=https://github.com/fsl-jyt/uboot-ls-32b.git -PKG_SOURCE_VERSION:=6476195551ea83193afd06d0c441483c04729c8d +PKG_SOURCE_URL:=https://github.com/yangbolu1991/u-boot-lede.git +PKG_SOURCE_VERSION:=6c811b70dc7b9f34ad666d48d071c4dbc4b8365a +PKG_MIRROR_HASH:=db5e277885cae722fcd31e58fd1a6a04456fbe1fe2d50869a1ae4bca44b74989 -PKG_LICENSE:=GPL-2.0 GPL-2.0+ -PKG_LICENSE_FILES:=Licenses/README - -PKG_MAINTAINER:=Jiang Yutang +PKG_MAINTAINER:=Yangbo Lu include $(INCLUDE_DIR)/package.mk include $(INCLUDE_DIR)/kernel.mk @@ -45,7 +46,7 @@ define Build/InstallDev $(INSTALL_DIR) $(STAGING_DIR_IMAGE) $(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.swap $(STAGING_DIR_IMAGE)/ls1012ardb-armv8_32b-uboot.bin + $(CP) $(PKG_BUILD_DIR)/ls1012ardb-uboot.bin $(STAGING_DIR_IMAGE)/ls1012ardb-armv8_32b-uboot.bin endef $(eval $(call BuildPackage,uboot-layerscape-armv8_32b)) diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile index f933141e89..01ebd6e511 100644 --- a/package/boot/uboot-layerscape/Makefile +++ b/package/boot/uboot-layerscape/Makefile @@ -9,13 +9,13 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/kernel.mk PKG_NAME:=uboot-layerscape -PKG_VERSION:=v1.0 +PKG_VERSION:=2017.09 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_MIRROR_HASH:=462fea9bdf03ec4bc23f2f1bb3917c2ec57017eca1e11b8a609bf60cd51a94e7 -PKG_SOURCE_URL:=https://github.com/fsl-jyt/u-boot.git -PKG_SOURCE_VERSION:=69b5ea576a2b0448391a910114d6c05859bf78d0 +PKG_SOURCE_URL:=https://github.com/qoriq-open-source/u-boot.git +PKG_SOURCE_VERSION:=503eff00a7119d2690a662ed64e83e4782b7d3d9 +PKG_MIRROR_HASH:=67dbf765b91a5f181e693bd87b6e9521ffeec163c7c037f71b19b3d8715dc32a include $(INCLUDE_DIR)/u-boot.mk include $(INCLUDE_DIR)/package.mk @@ -40,7 +40,6 @@ endef define U-Boot/ls1012ardb NAME:=NXP ls1012ardb 64b Dev Board UBOOT_CONFIG:=ls1012ardb_qspi - UBOOT_IMAGE:=u-boot-swap.bin endef UBOOT_TARGETS := \ diff --git a/package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch b/package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch new file mode 100644 index 0000000000..5973831665 --- /dev/null +++ b/package/boot/uboot-layerscape/patches/0001-armv8-ls1043a-add-LEDE-boot-support-in-environment.patch @@ -0,0 +1,51 @@ +From 74be1b50f96b3ada0a4fc18f0283659739edbadf Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Fri, 22 Sep 2017 11:00:12 +0800 +Subject: [PATCH 1/3] armv8: ls1043a: add LEDE boot support in environment + +Signed-off-by: Yangbo Lu +--- + include/configs/ls1043a_common.h | 20 +++++++++++++++++++- + 1 file changed, 19 insertions(+), 1 deletion(-) + +diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h +index 0b3fb4e..5c01111 100644 +--- a/include/configs/ls1043a_common.h ++++ b/include/configs/ls1043a_common.h +@@ -336,7 +336,19 @@ + "sd_bootcmd=echo Trying load from SD ..;" \ + "mmcinfo; mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd ;" \ +- " bootm $load_addr#$board\0" ++ " bootm $load_addr#$board\0" \ ++ "lede_setenv=setenv loadaddr 82000000 && " \ ++ "setenv fdtaddr 8f000000 && " \ ++ "setenv bootargs root=/dev/mtdblock8 " \ ++ "rootfstype=squashfs,jffs2 noinitrd " \ ++ "earlycon=uart8250,mmio,0x21c0500 console=ttyS0,115200 " \ ++ "mtdparts=60000000.nor:1M(rcw),2M(u-boot),1M(u-boot-env)," \ ++ "5M(reserved-1),256k(fman),5888k(reserved-2),1M(dtb)," \ ++ "16M(kernel),32M(rootfs),64M(otherbank)\0" \ ++ "lede_run=cp.b 60f00000 $fdtaddr 100000 && " \ ++ "cp.b 61000000 $loadaddr 1000000 && " \ ++ "bootm $loadaddr - $fdtaddr\0" \ ++ "lede_boot=run lede_setenv;run lede_run\0" + + + #undef CONFIG_BOOTCOMMAND +@@ -351,6 +363,12 @@ + "env exists secureboot && esbc_halt;" + #endif + ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND "run lede_boot" ++ ++#undef CONFIG_BOOTDELAY ++#define CONFIG_BOOTDELAY 3 ++ + #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \ + "earlycon=uart8250,mmio,0x21c0500 " \ + MTDPARTS_DEFAULT +-- +2.7.4 + diff --git a/package/boot/uboot-layerscape/patches/0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch b/package/boot/uboot-layerscape/patches/0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch new file mode 100644 index 0000000000..715d7869a1 --- /dev/null +++ b/package/boot/uboot-layerscape/patches/0002-armv8-ls1046ardb-add-LEDE-boot-support-in-environmen.patch @@ -0,0 +1,57 @@ +From dc0e8734ea1c679738377d13bdd9bf3fa644e6b3 Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Fri, 22 Sep 2017 11:36:43 +0800 +Subject: [PATCH 2/3] armv8: ls1046ardb: add LEDE boot support in environment + +Signed-off-by: Yangbo Lu +--- + include/configs/ls1046a_common.h | 15 ++++++++++++++- + include/configs/ls1046ardb.h | 6 ++++++ + 2 files changed, 20 insertions(+), 1 deletion(-) + +diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h +index 4fc2f94..53bd41b 100644 +--- a/include/configs/ls1046a_common.h ++++ b/include/configs/ls1046a_common.h +@@ -276,7 +276,20 @@ + "sd_bootcmd=echo Trying load from SD ..;" \ + "mmcinfo; mmc read $load_addr " \ + "$kernel_addr_sd $kernel_size_sd ;" \ +- " bootm $load_addr#$board\0" ++ " bootm $load_addr#$board\0" \ ++ "lede_setenv=setenv loadaddr 82000000 && " \ ++ "setenv fdtaddr 8f000000 && " \ ++ "setenv bootargs root=/dev/mtdblock9 " \ ++ "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),22M(ext4rfs),10M(user)\0" \ ++ "lede_run=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" + + + #define CONFIG_BOOTARGS "console=ttyS0,115200 root=/dev/ram0 " \ +diff --git a/include/configs/ls1046ardb.h b/include/configs/ls1046ardb.h +index f8c15a6..c3b50b1 100644 +--- a/include/configs/ls1046ardb.h ++++ b/include/configs/ls1046ardb.h +@@ -251,6 +251,12 @@ + "env exists secureboot && esbc_halt;" + #endif + ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND "run lede_boot" ++ ++#undef CONFIG_BOOTDELAY ++#define CONFIG_BOOTDELAY 3 ++ + #define MTDPARTS_DEFAULT "mtdparts=1550000.quadspi:1m(rcw)," \ + "15m(u-boot),48m(kernel.itb);" \ + "7e800000.flash:16m(nand_uboot)," \ +-- +2.7.4 + diff --git a/package/boot/uboot-layerscape/patches/0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch b/package/boot/uboot-layerscape/patches/0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch new file mode 100644 index 0000000000..427b93948a --- /dev/null +++ b/package/boot/uboot-layerscape/patches/0003-armv8-ls1012ardb-add-LEDE-boot-support-in-environmen.patch @@ -0,0 +1,51 @@ +From 8d6efca7eb2de012b98493206c87f31ee9b9e967 Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Thu, 28 Sep 2017 11:25:58 +0800 +Subject: [PATCH 3/3] armv8: ls1012ardb: add LEDE boot support in environment + +Signed-off-by: Yangbo Lu +--- + include/configs/ls1012ardb.h | 21 ++++++++++++++++++++- + 1 file changed, 20 insertions(+), 1 deletion(-) + +diff --git a/include/configs/ls1012ardb.h b/include/configs/ls1012ardb.h +index 5fe3218..242cdf0 100644 +--- a/include/configs/ls1012ardb.h ++++ b/include/configs/ls1012ardb.h +@@ -127,13 +127,32 @@ + "$kernel_addr $kernel_size; env exists secureboot " \ + "&& sf read $kernelheader_addr_r $kernelheader_addr " \ + "$kernelheader_size && esbc_validate ${kernelheader_addr_r}; " \ +- "bootm $load_addr#$board\0" ++ "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),23M(ext4rfs),9M(user)\0" \ ++ "lede_run=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; " \ + "env exists secureboot && esbc_halt;" + #endif ++#undef CONFIG_BOOTCOMMAND ++#define CONFIG_BOOTCOMMAND "run lede_boot" ++ ++#undef CONFIG_BOOTDELAY ++#define CONFIG_BOOTDELAY 3 ++ + + #include + +-- +2.7.4 + diff --git a/package/firmware/fman-ucode/Makefile b/package/firmware/fman-ucode/Makefile index 396750f804..e2969323e4 100644 --- a/package/firmware/fman-ucode/Makefile +++ b/package/firmware/fman-ucode/Makefile @@ -9,19 +9,16 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk PKG_NAME:=fman-ucode -PKG_VERSION:=fsl-sdk-v2.0 +PKG_VERSION:=2017.09 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_MIRROR_HASH:=209c60e4efaa3ce9c9a954266a7210fa0047a2de47ce00a412aa0318d94d0d88 -PKG_SOURCE_URL:=https://github.com/fsl-jyt/fm-ucode.git -PKG_SOURCE_VERSION:=b19c645821941493fbef32e616b5a16404259976 +PKG_SOURCE_URL:=https://github.com/qoriq-open-source/fm-ucode.git +PKG_SOURCE_VERSION:=c275e91392e2adab1ed22f3867b8269ca3c54014 +PKG_MIRROR_HASH:=80d8d2454063b7f730ef49d7a44be8f8870711ee5109c53a0881b62026037a37 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_LICENSE:=GPL-2.0 GPL-2.0+ -PKG_LICENSE_FILES:=Licenses/README - PKG_FLAGS:=nonshared include $(INCLUDE_DIR)/package.mk @@ -33,12 +30,12 @@ endef define fman/ls1043ardb TITLE=FMAN UCODE $(PKG_NAME)-$(PKG_VERSION) for NXP ls1043ardb 64b/32b Dev Board - CONFIG=fsl_fman_ucode_ls1043_r1.0_108_4_5.bin + CONFIG=fsl_fman_ucode_ls1043_r1.1_106_4_18.bin endef define fman/ls1046ardb TITLE=FMAN UCODE $(PKG_NAME)-$(PKG_VERSION) for NXP ls1046ardb 64b/32b Dev Board - CONFIG=fsl_fman_ucode_t2080_r1.1_106_4_18.bin + CONFIG=fsl_fman_ucode_ls1046_r1.0_106_4_18.bin endef FMANS := \ @@ -51,7 +48,7 @@ define Package/fman-layerscape-$(1) CATEGORY:=Firmware DEPENDS:=@TARGET_layerscape TITLE:=$(2) - URL:=http://git.freescale.com/git/cgit.cgi/ppc/sdk/fm-ucode.git + URL:=https://github.com/qoriq-open-source/fm-ucode.git VARIANT:=$(1) MAINTAINER:=Jiang Yutang endef diff --git a/package/firmware/rcw/Makefile b/package/firmware/rcw/Makefile index bae9c95b6c..a065385189 100644 --- a/package/firmware/rcw/Makefile +++ b/package/firmware/rcw/Makefile @@ -9,18 +9,18 @@ include $(TOPDIR)/rules.mk include $(INCLUDE_DIR)/image.mk PKG_NAME:=rcw -PKG_VERSION:=v1.0 +PKG_VERSION:=2017.09 PKG_RELEASE:=1 PKG_SOURCE_PROTO:=git -PKG_MIRROR_HASH:=8082979dbdef57e36a3096986aa426ef678c152403eb1dbd132da28f01490b6d -PKG_SOURCE_URL:=https://github.com/fsl-jyt/rcw.git -PKG_SOURCE_VERSION:=17e09e19bd5cf94e5ebc84916b4607743c29723e +PKG_SOURCE_URL:=https://github.com/qoriq-open-source/rcw.git +PKG_SOURCE_VERSION:=1a6236a34166219de324a105971eb9de05cde76e +PKG_MIRROR_HASH:=6da17ad6b4d148bd991a85bf601f845a41231d6f0bf20153ba1a7a387727aef0 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(PKG_VERSION)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION) -PKG_LICENSE:=GPL-2.0 GPL-2.0+ -PKG_LICENSE_FILES:=Licenses/README +PKG_LICENSE:=BSD-3-Clause +PKG_LICENSE_FILES:=LICENSE PKG_FLAGS:=nonshared @@ -33,17 +33,17 @@ endef define rcw/ls1043ardb TITLE=RCW binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1043ardb 64b/32b Dev Board - CONFIG=ls1043ardb-rcw.bin + CONFIG=ls1043ardb/RR_FQPP_1455/rcw_1600.bin endef define rcw/ls1046ardb TITLE=RCW binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1046ardb 64b/32b Dev Board - CONFIG=ls1046ardb-rcw.bin + CONFIG=ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot_swap.bin endef define rcw/ls1012ardb TITLE=RCW binary $(PKG_NAME)-$(PKG_VERSION) for NXP ls1012ardb 64b/32b Dev Board - CONFIG=ls1012ardb-rcw.bin + CONFIG=ls1012ardb/R_SPNH_3508/PBL_0x35_0x08_800_250_1000_default.bin endef RCWS := \ @@ -77,9 +77,6 @@ endif define Build/Configure endef -define Build/Compile -endef - define Package/rcw/install/default $(INSTALL_DIR) $(STAGING_DIR_IMAGE) $(CP) $(PKG_BUILD_DIR)/$(RCW_CONFIG) $(STAGING_DIR_IMAGE)/$(1)-rcw.bin diff --git a/package/firmware/rcw/patches/0001-makefile-generate-byte_swap-rcw-for-ls1046ardb.patch b/package/firmware/rcw/patches/0001-makefile-generate-byte_swap-rcw-for-ls1046ardb.patch new file mode 100644 index 0000000000..1eac881899 --- /dev/null +++ b/package/firmware/rcw/patches/0001-makefile-generate-byte_swap-rcw-for-ls1046ardb.patch @@ -0,0 +1,26 @@ +From 6836519a638a0c30ef3d2137c248a1a9f1befbc4 Mon Sep 17 00:00:00 2001 +From: Yangbo Lu +Date: Tue, 4 Jul 2017 20:25:40 +0800 +Subject: [PATCH] makefile: generate byte_swap rcw for ls1046ardb + +Signed-off-by: Yangbo Lu +--- + Makefile | 2 ++ + 1 file changed, 2 insertions(+) + +diff --git a/Makefile b/Makefile +index fb55c8b..ab1b573 100644 +--- a/Makefile ++++ b/Makefile +@@ -11,6 +11,8 @@ all install clean: + @for board in $(BOARDS); do \ + $(MAKE) -C $$board $@ DESTDIR=$(DESTDIR)/$$board; \ + done ++ tclsh ./tools/byte_swap.tcl ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot.bin \ ++ ls1046ardb/RR_FFSSPPPH_1133_5559/rcw_1800_qspiboot_swap.bin 8 + + release: $(foreach board,$(BOARDS),rcw-$(board)-$(VER).tar.gz) + +-- +2.7.4 +