From 6dad56d733b0334f55a10276e4a3bccc8ca32e43 Mon Sep 17 00:00:00 2001 From: Keerthy Date: Wed, 20 Feb 2019 18:17:22 +0530 Subject: arm: lib: bootm: Push the Starting kernel print to the end Push the Starting kernel print to the end just before the dm_remove_devices call. Signed-off-by: Keerthy Reviewed-by: Simon Glass --- arch/arm/lib/bootm.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/arch/arm/lib/bootm.c b/arch/arm/lib/bootm.c index 329f20c2bf..bf68a5ba62 100644 --- a/arch/arm/lib/bootm.c +++ b/arch/arm/lib/bootm.c @@ -88,8 +88,6 @@ __weak void board_quiesce_devices(void) */ static void announce_and_cleanup(int fake) { - printf("\nStarting kernel ...%s\n\n", fake ? - "(fake run for tracing)" : ""); bootstage_mark_name(BOOTSTAGE_ID_BOOTM_HANDOFF, "start_kernel"); #ifdef CONFIG_BOOTSTAGE_FDT bootstage_fdt_add_report(); @@ -104,6 +102,8 @@ static void announce_and_cleanup(int fake) board_quiesce_devices(); + printf("\nStarting kernel ...%s\n\n", fake ? + "(fake run for tracing)" : ""); /* * Call remove function of all devices with a removal flag set. * This may be useful for last-stage operations, like cancelling -- cgit v1.2.1 From 08b1165ca4beecdc9d6f3a36e843612189bd3ad4 Mon Sep 17 00:00:00 2001 From: Faiz Abbas Date: Tue, 26 Feb 2019 22:45:44 +0530 Subject: configs: dra7xx_evm: Remove ENV_IS_IN_FAT With U-boot supporting environment in multiple places, enable only ENV_IS_IN_EMMC Signed-off-by: Faiz Abbas Reviewed-by: Lokesh Vutla Reviewed-by: Tom Rini --- configs/dra7xx_evm_defconfig | 1 + configs/dra7xx_hs_evm_defconfig | 1 + 2 files changed, 2 insertions(+) diff --git a/configs/dra7xx_evm_defconfig b/configs/dra7xx_evm_defconfig index ef061501ef..3f25a2ec28 100644 --- a/configs/dra7xx_evm_defconfig +++ b/configs/dra7xx_evm_defconfig @@ -36,6 +36,7 @@ CONFIG_OF_LIST="dra7-evm dra72-evm dra72-evm-revc dra71-evm dra76-evm" CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ=0x9000 CONFIG_OF_SPL_REMOVE_PROPS="clocks clock-names interrupt-parent" +# CONFIG_ENV_IS_IN_FAT is not set CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_DM=y diff --git a/configs/dra7xx_hs_evm_defconfig b/configs/dra7xx_hs_evm_defconfig index 3cf7659496..ee28e0c6ec 100644 --- a/configs/dra7xx_hs_evm_defconfig +++ b/configs/dra7xx_hs_evm_defconfig @@ -40,6 +40,7 @@ CONFIG_OF_LIST="dra7-evm dra72-evm dra72-evm-revc dra71-evm dra76-evm" CONFIG_SPL_MULTI_DTB_FIT=y CONFIG_SPL_MULTI_DTB_FIT_UNCOMPRESS_SZ=0x9000 CONFIG_OF_SPL_REMOVE_PROPS="clocks clock-names interrupt-parent" +# CONFIG_ENV_IS_IN_FAT is not set CONFIG_ENV_IS_IN_MMC=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_DM=y -- cgit v1.2.1 From 9eebaba2a843e3fa456ef2f6d244bc1bbecfd18b Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Thu, 28 Feb 2019 06:17:56 +0100 Subject: cmd: set CONFIG_SYS_HELP_CMD_WIDTH = 10 CONFIG_SYS_HELP_CMD_WIDTH is used to format the output of help without any arguments. CONFIG_SYS_HELP_CMD_WIDTH = 8 is too narrow to fit all our commands. Signed-off-by: Heinrich Schuchardt --- include/command.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/command.h b/include/command.h index 2e24e8ad3e..be74f6ac92 100644 --- a/include/command.h +++ b/include/command.h @@ -18,7 +18,7 @@ /* Default to a width of 8 characters for help message command width */ #ifndef CONFIG_SYS_HELP_CMD_WIDTH -#define CONFIG_SYS_HELP_CMD_WIDTH 8 +#define CONFIG_SYS_HELP_CMD_WIDTH 10 #endif #ifndef __ASSEMBLY__ -- cgit v1.2.1 From 7a77836996837e07f3ba42da090010cb4b3af7ea Mon Sep 17 00:00:00 2001 From: Marek Vasut Date: Wed, 6 Mar 2019 22:04:00 +0100 Subject: Makefile: Do not pass -E to mkimage when SPL has full fitImage support When the SPL has full fitImage support, do not generate fitImage with external data. The full fitImage code assumes the entire fitImage is loaded in RAM, and the SPL uses fdt_totalsize() to determine the size of the whole fitImage, which can not work with external data. Signed-off-by: Marek Vasut Cc: Tom Rini --- Makefile | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/Makefile b/Makefile index c52a33b403..c1af9307b3 100644 --- a/Makefile +++ b/Makefile @@ -893,7 +893,7 @@ cmd_mkimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -d $< $@ \ >$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=), && cat $(MKIMAGEOUTPUT)) quiet_cmd_mkfitimage = MKIMAGE $@ -cmd_mkfitimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -f $(U_BOOT_ITS) -E -p $(CONFIG_FIT_EXTERNAL_OFFSET) $@\ +cmd_mkfitimage = $(objtree)/tools/mkimage $(MKIMAGEFLAGS_$(@F)) -f $(U_BOOT_ITS) -p $(CONFIG_FIT_EXTERNAL_OFFSET) $@\ >$(MKIMAGEOUTPUT) $(if $(KBUILD_VERBOSE:0=), && cat $(MKIMAGEOUTPUT)) quiet_cmd_cat = CAT $@ @@ -1200,6 +1200,12 @@ u-boot-dtb.img u-boot.img u-boot.kwb u-boot.pbl u-boot-ivt.img: \ $(call if_changed,mkimage) $(BOARD_SIZE_CHECK) +ifeq ($(CONFIG_SPL_LOAD_FIT_FULL),y) +MKIMAGEFLAGS_u-boot.itb = +else +MKIMAGEFLAGS_u-boot.itb = -E +endif + u-boot.itb: u-boot-nodtb.bin dts/dt.dtb $(U_BOOT_ITS) FORCE $(call if_changed,mkfitimage) $(BOARD_SIZE_CHECK) -- cgit v1.2.1 From ef331e3685fed584708055ad81804c6e4a1f64e2 Mon Sep 17 00:00:00 2001 From: Alexander Graf Date: Wed, 20 Feb 2019 17:14:49 +0100 Subject: armv8: Disable exception vectors in SPL by default Commit 1416e2d2253 ("armv8: make SPL exception vectors optional") had a typo in it which effectively disabled exception handling in SPL code always. Since nobody complained, I guess we may as well disable exception handling in SPL always by default. So fix the bug to make the config option effective, but disable exception handling in SPL by default. This gets us to the same functionality as before by default, but with much less code included in the binary. Signed-off-by: Alexander Graf Reviewed-by: Matthias Brugger Reviewed-by: Andre Przywara --- arch/arm/cpu/armv8/Kconfig | 2 +- arch/arm/cpu/armv8/start.S | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/arch/arm/cpu/armv8/Kconfig b/arch/arm/cpu/armv8/Kconfig index f0536038d6..7405c3a4a1 100644 --- a/arch/arm/cpu/armv8/Kconfig +++ b/arch/arm/cpu/armv8/Kconfig @@ -3,7 +3,7 @@ if ARM64 config ARMV8_SPL_EXCEPTION_VECTORS bool "Install crash dump exception vectors" depends on SPL - default y + default n help The default exception vector table is only used for the crash dump, but still takes quite a lot of space in the image size. diff --git a/arch/arm/cpu/armv8/start.S b/arch/arm/cpu/armv8/start.S index 12a78ee38b..fe52166e28 100644 --- a/arch/arm/cpu/armv8/start.S +++ b/arch/arm/cpu/armv8/start.S @@ -88,7 +88,7 @@ pie_fixup_done: bl reset_sctrl #endif -#if defined(CONFIG_ARMV8__SPL_EXCEPTION_VECTORS) || !defined(CONFIG_SPL_BUILD) +#if defined(CONFIG_ARMV8_SPL_EXCEPTION_VECTORS) || !defined(CONFIG_SPL_BUILD) .macro set_vbar, regname, reg msr \regname, \reg .endm @@ -354,7 +354,7 @@ ENDPROC(smp_kick_all_cpus) /*-----------------------------------------------------------------------*/ ENTRY(c_runtime_cpu_setup) -#if defined(CONFIG_ARMV8__SPL_EXCEPTION_VECTORS) || !defined(CONFIG_SPL_BUILD) +#if defined(CONFIG_ARMV8_SPL_EXCEPTION_VECTORS) || !defined(CONFIG_SPL_BUILD) /* Relocate vBAR */ adr x0, vectors switch_el x1, 3f, 2f, 1f -- cgit v1.2.1 From cf8dcc5d02c32173b74bf1b7600dd2b990a90b13 Mon Sep 17 00:00:00 2001 From: Abel Vesa Date: Tue, 12 Mar 2019 08:34:31 +0000 Subject: common: spl_fit: Default to IH_OS_U_BOOT if FIT_IMAGE_TINY enabled If FIT_IMAGE_TINY is enabled, spl_fit_image_get_os returns -ENOTSUPP. In this case, we should default to IH_OS_U_BOOT not to IH_OS_INVALID. Signed-off-by: Abel Vesa Tested-by: Fabio Estevam --- common/spl/spl_fit.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/common/spl/spl_fit.c b/common/spl/spl_fit.c index db436268cb..c9bfe0cc8a 100644 --- a/common/spl/spl_fit.c +++ b/common/spl/spl_fit.c @@ -491,6 +491,10 @@ int spl_load_simple_fit(struct spl_image_info *spl_image, if (!spl_fit_image_get_os(fit, node, &os_type)) debug("Loadable is %s\n", genimg_get_os_name(os_type)); +#if CONFIG_IS_ENABLED(FIT_IMAGE_TINY) + else + os_type = IH_OS_U_BOOT; +#endif if (os_type == IH_OS_U_BOOT) { spl_fit_append_fdt(&image_info, info, sector, -- cgit v1.2.1 From cabde449b97799d4377f62b90374f261327a3a90 Mon Sep 17 00:00:00 2001 From: Abel Vesa Date: Tue, 12 Mar 2019 08:34:32 +0000 Subject: tools: fit_image: Add the loadable property to configs When running mkimage with "-f auto", the loadable property needs to be set in order to allow SPL FIT support to boot. Signed-off-by: Abel Vesa Tested-by: Fabio Estevam --- tools/fit_image.c | 1 + 1 file changed, 1 insertion(+) diff --git a/tools/fit_image.c b/tools/fit_image.c index 4b626354fb..3b867e0656 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -298,6 +298,7 @@ static void fit_write_configs(struct image_tool_params *params, char *fdt) typename = genimg_get_type_short_name(params->fit_image_type); snprintf(str, sizeof(str), "%s-1", typename); fdt_property_string(fdt, typename, str); + fdt_property_string(fdt, FIT_LOADABLE_PROP, str); if (params->fit_ramdisk) fdt_property_string(fdt, FIT_RAMDISK_PROP, -- cgit v1.2.1 From 89c2b5c02049aea746b1edee0b4e1d8519dec2f4 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 14 Mar 2019 14:58:33 +0900 Subject: ARM: fix arch/arm/dts/Makefile Since commit 27cb7300ffda ("Ensure device tree DTS is compiled"), build succeeds irrespective of the correctness of Makefile. In fact, you can compile any defconfig without adding any entry in arch/*/dts/Makefile. As a result, a lot of wrong code have been merged unnoticed. I am going to revert that commit, and lots of hidden issues have come to light: [1] Typos armada-3720-uDPU.dts, sun8i-a83t-tbs-a711.dts use the extension ".dts" instead of ".dtb" [2] DTB is associated to undefined CONFIG option For example, mx6sllevk_defconfig defines CONFIG_MX6SLL, but associates its device tree to CONFIG_MX6SL, which is undefined. [3] Lots of entries are missing Signed-off-by: Masahiro Yamada Reviewed-by: Chris Packham [trini: add imx6ul pico dtbs] Signed-off-by: Tom Rini --- arch/arm/dts/Makefile | 111 +++++++++++++++++++++++++++++++++++++++++++++----- 1 file changed, 100 insertions(+), 11 deletions(-) diff --git a/arch/arm/dts/Makefile b/arch/arm/dts/Makefile index 2a040b20a5..0e2ffdb87f 100644 --- a/arch/arm/dts/Makefile +++ b/arch/arm/dts/Makefile @@ -16,6 +16,8 @@ dtb-$(CONFIG_EXYNOS4) += exynos4210-origen.dtb \ dtb-$(CONFIG_TARGET_HIKEY) += hi6220-hikey.dtb +dtb-$(CONFIG_TARGET_POPLAR) += hi3798cv200-poplar.dtb + dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5250-snow.dtb \ exynos5250-spring.dtb \ @@ -25,10 +27,44 @@ dtb-$(CONFIG_EXYNOS5) += exynos5250-arndale.dtb \ exynos5800-peach-pi.dtb \ exynos5422-odroidxu3.dtb dtb-$(CONFIG_EXYNOS7420) += exynos7420-espresso7420.dtb + +dtb-$(CONFIG_ARCH_DAVINCI) += \ + da850-evm.dtb \ + da850-lcdk.dtb + +dtb-$(CONFIG_KIRKWOOD) += \ + kirkwood-atl-sbx81lifkw.dtb \ + kirkwood-atl-sbx81lifxcat.dtb \ + kirkwood-blackarmor-nas220.dtb \ + kirkwood-d2net.dtb \ + kirkwood-dns325.dtb \ + kirkwood-dockstar.dtb \ + kirkwood-dreamplug.dtb \ + kirkwood-ds109.dtb \ + kirkwood-goflexnet.dtb \ + kirkwood-guruplug-server-plus.dtb \ + kirkwood-ib62x0.dtb \ + kirkwood-iconnect.dtb \ + kirkwood-is2.dtb \ + kirkwood-km_kirkwood.dtb \ + kirkwood-lsxhl.dtb \ + kirkwood-lschlv2.dtb \ + kirkwood-net2big.dtb \ + kirkwood-ns2.dtb \ + kirkwood-ns2lite.dtb \ + kirkwood-ns2max.dtb \ + kirkwood-ns2mini.dtb \ + kirkwood-pogo_e02.dtb \ + kirkwood-sheevaplug.dtb + +dtb-$(CONFIG_ARCH_OWL) += \ + bubblegum_96.dtb + dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3036-sdk.dtb \ rk3128-evb.dtb \ rk3188-radxarock.dtb \ + rk3229-evb.dtb \ rk3288-evb.dtb \ rk3288-fennec.dtb \ rk3288-firefly.dtb \ @@ -50,6 +86,7 @@ dtb-$(CONFIG_ARCH_ROCKCHIP) += \ rk3368-px5-evb.dtb \ rk3399-evb.dtb \ rk3399-firefly.dtb \ + rk3399-gru-bob.dtb \ rk3399-puma-ddr1333.dtb \ rk3399-puma-ddr1600.dtb \ rk3399-puma-ddr1866.dtb \ @@ -96,12 +133,13 @@ dtb-$(CONFIG_ARCH_MVEBU) += \ armada-3720-db.dtb \ armada-3720-espressobin.dtb \ armada-3720-turris-mox.dtb \ - armada-3720-uDPU.dts \ + armada-3720-uDPU.dtb \ armada-375-db.dtb \ armada-388-clearfog.dtb \ armada-388-gp.dtb \ armada-388-helios4.dtb \ armada-385-amc.dtb \ + armada-385-turris-omnia.dtb \ armada-7040-db.dtb \ armada-7040-db-nand.dtb \ armada-8040-db.dtb \ @@ -140,6 +178,7 @@ dtb-$(CONFIG_ARCH_UNIPHIER_SLD8) += \ uniphier-sld8-ref.dtb dtb-$(CONFIG_ARCH_ZYNQ) += \ + bitmain-antminer-s9.dtb \ zynq-cc108.dtb \ zynq-cse-nand.dtb \ zynq-cse-nor.dtb \ @@ -156,6 +195,7 @@ dtb-$(CONFIG_ARCH_ZYNQ) += \ zynq-zc706.dtb \ zynq-zc770-xm010.dtb \ zynq-zc770-xm011.dtb \ + zynq-zc770-xm011-x16.dtb \ zynq-zc770-xm012.dtb \ zynq-zc770-xm013.dtb \ zynq-zed.dtb \ @@ -192,7 +232,14 @@ dtb-$(CONFIG_ARCH_VERSAL) += \ versal-mini-emmc1.dtb dtb-$(CONFIG_ARCH_ZYNQMP_R5) += \ zynqmp-r5.dtb -dtb-$(CONFIG_AM33XX) += am335x-boneblack.dtb am335x-bone.dtb \ +dtb-$(CONFIG_AM33XX) += \ + am335x-baltos.dtb \ + am335x-bone.dtb \ + am335x-boneblack.dtb \ + am335x-brppt1-mmc.dtb \ + am335x-brppt1-nand.dtb \ + am335x-brppt1-spi.dtb \ + am335x-brxre1.dtb \ am335x-draco.dtb \ am335x-evm.dtb \ am335x-evmsk.dtb \ @@ -209,6 +256,7 @@ dtb-$(CONFIG_AM43XX) += am437x-gp-evm.dtb am437x-sk-evm.dtb \ am43x-epos-evm.dtb \ am437x-idk-evm.dtb \ am4372-generic.dtb +dtb-$(CONFIG_TARGET_AM3517_EVM) += am3517-evm.dtb dtb-$(CONFIG_TI816X) += dm8168-evm.dtb dtb-$(CONFIG_THUNDERX) += thunderx-88xx.dtb @@ -355,6 +403,7 @@ dtb-$(CONFIG_MACH_SUN7I) += \ sun7i-a20-olinuxino-lime2.dtb \ sun7i-a20-olinuxino-lime2-emmc.dtb \ sun7i-a20-olinuxino-micro.dtb \ + sun7i-a20-olinuxino-micro-emmc.dtb \ sun7i-a20-orangepi.dtb \ sun7i-a20-orangepi-mini.dtb \ sun7i-a20-pcduino3.dtb \ @@ -383,7 +432,7 @@ dtb-$(CONFIG_MACH_SUN8I_A83T) += \ sun8i-a83t-allwinner-h8homlet-v2.dtb \ sun8i-a83t-bananapi-m3.dtb \ sun8i-a83t-cubietruck-plus.dtb \ - sun8i-a83t-tbs-a711.dts + sun8i-a83t-tbs-a711.dtb dtb-$(CONFIG_MACH_SUN8I_H3) += \ sun8i-h2-plus-bananapi-m2-zero.dtb \ sun8i-h2-plus-libretech-all-h3-cc.dtb \ @@ -408,6 +457,7 @@ dtb-$(CONFIG_MACH_SUN8I_R40) += \ dtb-$(CONFIG_MACH_SUN8I_V3S) += \ sun8i-v3s-licheepi-zero.dtb dtb-$(CONFIG_MACH_SUN50I_H5) += \ + sun50i-h5-bananapi-m2-plus.dtb \ sun50i-h5-emlid-neutis-n5-devboard.dtb \ sun50i-h5-libretech-all-h3-cc.dtb \ sun50i-h5-nanopi-neo2.dtb \ @@ -426,6 +476,7 @@ dtb-$(CONFIG_MACH_SUN50I) += \ sun50i-a64-nanopi-a64.dtb \ sun50i-a64-olinuxino.dtb \ sun50i-a64-orangepi-win.dtb \ + sun50i-a64-pine64-lts.dtb \ sun50i-a64-pine64-plus.dtb \ sun50i-a64-pine64.dtb \ sun50i-a64-pinebook.dtb \ @@ -441,7 +492,12 @@ dtb-$(CONFIG_VF610) += vf500-colibri.dtb \ pcm052.dtb \ bk4r1.dtb -dtb-$(CONFIG_MX53) += imx53-cx9020.dtb +dtb-$(CONFIG_MX53) += imx53-cx9020.dtb \ + imx53-kp.dtb + +dtb-$(CONFIG_MX6Q) += \ + imx6q-display5.dtb \ + imx6q-logicpd.dtb dtb-$(CONFIG_MX6QDL) += \ imx6dl-icore.dtb \ @@ -452,7 +508,6 @@ dtb-$(CONFIG_MX6QDL) += \ imx6q-icore.dtb \ imx6q-icore-mipi.dtb \ imx6q-icore-rqs.dtb \ - imx6q-logicpd.dtb \ imx6q-sabreauto.dtb \ imx6q-sabresd.dtb \ imx6dl-sabreauto.dtb \ @@ -462,7 +517,7 @@ dtb-$(CONFIG_MX6QDL) += \ dtb-$(CONFIG_MX6SL) += imx6sl-evk.dtb -dtb-$(CONFIG_MX6SL) += imx6sll-evk.dtb +dtb-$(CONFIG_MX6SLL) += imx6sll-evk.dtb dtb-$(CONFIG_MX6SX) += \ imx6sx-sabreauto.dtb \ @@ -477,12 +532,19 @@ dtb-$(CONFIG_MX6UL) += \ imx6ul-9x9-evk.dtb \ imx6ul-9x9-evk.dtb \ imx6ul-liteboard.dtb \ - imx6ul-phycore-segin.dtb + imx6ul-phycore-segin.dtb \ + imx6ul-pico-hobbit.dtb \ + imx6ul-pico-pi.dtb -dtb-$(CONFIG_MX6ULL) += imx6ull-14x14-evk.dtb +dtb-$(CONFIG_MX6ULL) += \ + imx6ull-14x14-evk.dtb \ + imx6ull-colibri.dtb \ dtb-$(CONFIG_MX7) += imx7d-sdb.dtb \ - imx7d-sdb-qspi.dtb + imx7d-sdb-qspi.dtb \ + imx7-colibri-emmc.dtb \ + imx7-colibri-rawnand.dtb \ + imx7s-warp.dtb dtb-$(CONFIG_ARCH_MX7ULP) += imx7ulp-evk.dtb @@ -490,6 +552,16 @@ dtb-$(CONFIG_ARCH_IMX8) += fsl-imx8qxp-mek.dtb dtb-$(CONFIG_ARCH_IMX8M) += fsl-imx8mq-evk.dtb +dtb-$(CONFIG_RCAR_GEN2) += \ + r8a7790-lager-u-boot.dtb \ + r8a7790-stout-u-boot.dtb \ + r8a7791-koelsch-u-boot.dtb \ + r8a7791-porter-u-boot.dtb \ + r8a7792-blanche-u-boot.dtb \ + r8a7793-gose-u-boot.dtb \ + r8a7794-alt-u-boot.dtb \ + r8a7794-silk-u-boot.dtb + dtb-$(CONFIG_RCAR_GEN3) += \ r8a7795-h3ulcb-u-boot.dtb \ r8a7795-salvator-x-u-boot.dtb \ @@ -509,8 +581,12 @@ dtb-$(CONFIG_SOC_KEYSTONE) += keystone-k2hk-evm.dtb \ dtb-$(CONFIG_TARGET_AT91SAM9261EK) += at91sam9261ek.dtb +dtb-$(CONFIG_TARGET_PM9261) += at91sam9261ek.dtb + dtb-$(CONFIG_TARGET_PM9263) += at91sam9263ek.dtb +dtb-$(CONFIG_TARGET_MEESC) += at91sam9263ek.dtb + dtb-$(CONFIG_TARGET_AT91SAM9263EK) += at91sam9263ek.dtb dtb-$(CONFIG_TARGET_AT91SAM9RLEK) += at91sam9rlek.dtb @@ -531,9 +607,15 @@ dtb-$(CONFIG_TARGET_AT91SAM9X5EK) += \ dtb-$(CONFIG_TARGET_AT91SAM9N12EK) += at91sam9n12ek.dtb +dtb-$(CONFIG_TARGET_ETHERNUT5) += ethernut5.dtb + +dtb-$(CONFIG_TARGET_USB_A9263) += usb_a9263.dtb + dtb-$(CONFIG_TARGET_OMAP3_LOGIC) += \ - logicpd-torpedo-37xx-devkit.dtb \ - logicpd-som-lv-37xx-devkit.dtb + logicpd-som-lv-35xx-devkit.dtb \ + logicpd-som-lv-37xx-devkit.dtb \ + logicpd-torpedo-35xx-devkit.dtb \ + logicpd-torpedo-37xx-devkit.dtb dtb-$(CONFIG_TARGET_OMAP3_EVM) += \ omap3-evm-37xx.dtb \ @@ -582,9 +664,16 @@ dtb-$(CONFIG_ARCH_BCM283X) += \ bcm2835-rpi-b-plus.dtb \ bcm2835-rpi-b-rev2.dtb \ bcm2835-rpi-b.dtb \ + bcm2835-rpi-zero-w.dtb \ bcm2836-rpi-2-b.dtb \ bcm2837-rpi-3-b.dtb +dtb-$(CONFIG_ARCH_BCM63158) += \ + bcm963158.dtb + +dtb-$(CONFIG_ARCH_BCM6858) += \ + bcm968580xref.dtb + dtb-$(CONFIG_ARCH_ASPEED) += ast2500-evb.dtb dtb-$(CONFIG_ARCH_STI) += stih410-b2260.dtb -- cgit v1.2.1 From 680207a1c59bd678c6e56473c70326b4c50a7abf Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 14 Mar 2019 14:58:34 +0900 Subject: powerpc: fix arch/powerpc/dts/Makefile Since commit 27cb7300ffda ("Ensure device tree DTS is compiled"), build succeeds irrespective of the correctness of Makefile. I am going to revert that commit, so wrong code must be fixed. CONFIG_MCR3000 is not defined anywhere. CONFIG_TARGET_MCR3000 is the correct one. Signed-off-by: Masahiro Yamada --- arch/powerpc/dts/Makefile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/powerpc/dts/Makefile b/arch/powerpc/dts/Makefile index 172bed4c20..f080a96891 100644 --- a/arch/powerpc/dts/Makefile +++ b/arch/powerpc/dts/Makefile @@ -1,7 +1,7 @@ # SPDX-License-Identifier: GPL-2.0+ dtb-$(CONFIG_TARGET_T2080QDS) += t2080qds.dtb -dtb-$(CONFIG_MCR3000) += mcr3000.dtb +dtb-$(CONFIG_TARGET_MCR3000) += mcr3000.dtb targets += $(dtb-y) -- cgit v1.2.1 From 344db3f3307de7c852a0d112c4553a1161c108e7 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 14 Mar 2019 14:58:35 +0900 Subject: mips: add missing dtb-y to arch/mips/dts/Makefile Since commit 27cb7300ffda ("Ensure device tree DTS is compiled"), build succeeds irrespective of the correctness of Makefile. In fact, you can compile any defconfig without adding any entry in arch/*/dts/Makefile. I am going to revert that commit, so device tree must be explicitly listed in Makefile. Signed-off-by: Masahiro Yamada Reviewed-by: Daniel Schwierzeck --- arch/mips/dts/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/arch/mips/dts/Makefile b/arch/mips/dts/Makefile index b94b582837..665d3cc8c1 100644 --- a/arch/mips/dts/Makefile +++ b/arch/mips/dts/Makefile @@ -1,5 +1,8 @@ # SPDX-License-Identifier: GPL-2.0+ +dtb-$(CONFIG_ARCH_MT7620) += \ + gardena-smart-gateway-mt7688.dtb \ + linkit-smart-7688.dtb dtb-$(CONFIG_TARGET_AP121) += ap121.dtb dtb-$(CONFIG_TARGET_AP143) += ap143.dtb dtb-$(CONFIG_TARGET_BOSTON) += img,boston.dtb @@ -17,6 +20,8 @@ dtb-$(CONFIG_BOARD_NETGEAR_DGND3700V2) += netgear,dgnd3700v2.dtb dtb-$(CONFIG_BOARD_SAGEM_FAST1704) += sagem,f@st1704.dtb dtb-$(CONFIG_BOARD_TPLINK_WDR4300) += tplink_wdr4300.dtb dtb-$(CONFIG_TARGET_JZ4780_CI20) += ci20.dtb +dtb-$(CONFIG_SOC_BMIPS_BCM6358) += sfr,nb4-ser.dtb +dtb-$(CONFIG_SOC_BMIPS_BCM6838) += brcm,bcm968380gerg.dtb dtb-$(CONFIG_SOC_LUTON) += luton_pcb090.dtb luton_pcb091.dtb dtb-$(CONFIG_SOC_OCELOT) += ocelot_pcb120.dtb ocelot_pcb123.dtb dtb-$(CONFIG_SOC_JR2) += jr2_pcb110.dtb jr2_pcb111.dtb serval2_pcb112.dtb -- cgit v1.2.1 From a3444bd09af9d92b50149f239facbfc0f0d41290 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Thu, 14 Mar 2019 14:58:36 +0900 Subject: Revert "Ensure device tree DTS is compiled" This reverts commit 27cb7300ffda7a3f1581f0f5a2d3bfe59b97ad67. I am not sure if I correctly understood the log of commit 27cb7300ffda ("Ensure device tree DTS is compiled"), but the code-diff looks like it was trying to solve the missed re-compilation when .dts was modified. Recently, commit 2737dfe096b6 ("kbuild: make arch-dtbs target PHONY") fixed the issue in a more correct and more complete way. Anyway, since the former commit, we see a clumsy log like this: make[2]: 'arch/sandbox/dts/sandbox.dtb' is up to date Another problem is, it created multiple paths to descend into arch/*/dts/, causing a race in parallel building. So, let's revert it. Signed-off-by: Masahiro Yamada --- dts/Makefile | 13 +++---------- 1 file changed, 3 insertions(+), 10 deletions(-) diff --git a/dts/Makefile b/dts/Makefile index 4970223b3d..1f83e615e8 100644 --- a/dts/Makefile +++ b/dts/Makefile @@ -10,14 +10,10 @@ ifeq ($(DEVICE_TREE),) DEVICE_TREE := unset endif -ARCH_PATH := arch/$(ARCH)/dts -dtb_depends := arch-dtbs - ifneq ($(EXT_DTB),) DTB := $(EXT_DTB) else -DTB := $(ARCH_PATH)/$(DEVICE_TREE).dtb -dtb_depends += $(DTB:.dtb=.dts) +DTB := arch/$(ARCH)/dts/$(DEVICE_TREE).dtb endif $(obj)/dt-spl.dtb: $(DTB) $(objtree)/tools/fdtgrep FORCE @@ -28,10 +24,7 @@ $(obj)/dt.dtb: $(DTB) FORCE targets += dt.dtb dt-spl.dtb -$(DTB): $(dtb_depends) -ifeq ($(EXT_DTB),) - $(Q)$(MAKE) $(build)=$(ARCH_PATH) $@ -endif +$(DTB): arch-dtbs $(Q)test -e $@ || ( \ echo >&2; \ echo >&2 "Device Tree Source is not correctly specified."; \ @@ -42,7 +35,7 @@ endif PHONY += arch-dtbs arch-dtbs: - $(Q)$(MAKE) $(build)=$(ARCH_PATH) dtbs + $(Q)$(MAKE) $(build)=arch/$(ARCH)/dts dtbs ifeq ($(CONFIG_SPL_BUILD),y) obj-$(CONFIG_OF_EMBED) := dt-spl.dtb.o -- cgit v1.2.1 From 72987d38f6170f5fe4a592f5fc542543704e6d39 Mon Sep 17 00:00:00 2001 From: Faiz Abbas Date: Thu, 14 Mar 2019 19:39:04 +0530 Subject: configs: am335x_evm: Add CONFIG_BLK With DM_MMC and DM_USB enabled, enable CONFIG_BLK. Signed-off-by: Faiz Abbas --- configs/am335x_evm_defconfig | 1 - configs/am335x_hs_evm_defconfig | 1 - configs/am335x_hs_evm_uart_defconfig | 1 - 3 files changed, 3 deletions(-) diff --git a/configs/am335x_evm_defconfig b/configs/am335x_evm_defconfig index 9241168352..6c791be374 100644 --- a/configs/am335x_evm_defconfig +++ b/configs/am335x_evm_defconfig @@ -31,7 +31,6 @@ CONFIG_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2" CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_BLK is not set CONFIG_BOOTCOUNT_LIMIT=y CONFIG_DFU_MMC=y CONFIG_DFU_NAND=y diff --git a/configs/am335x_hs_evm_defconfig b/configs/am335x_hs_evm_defconfig index faa6c2b05f..825b0f31a1 100644 --- a/configs/am335x_hs_evm_defconfig +++ b/configs/am335x_hs_evm_defconfig @@ -32,7 +32,6 @@ CONFIG_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2" CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_BLK is not set CONFIG_BOOTCOUNT_LIMIT=y CONFIG_DFU_MMC=y CONFIG_DFU_NAND=y diff --git a/configs/am335x_hs_evm_uart_defconfig b/configs/am335x_hs_evm_uart_defconfig index 02332db0a6..9d662b5aaf 100644 --- a/configs/am335x_hs_evm_uart_defconfig +++ b/configs/am335x_hs_evm_uart_defconfig @@ -34,7 +34,6 @@ CONFIG_OF_CONTROL=y CONFIG_DEFAULT_DEVICE_TREE="am335x-evm" CONFIG_OF_LIST="am335x-evm am335x-bone am335x-boneblack am335x-evmsk am335x-bonegreen am335x-icev2" CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y -# CONFIG_BLK is not set CONFIG_BOOTCOUNT_LIMIT=y CONFIG_DFU_MMC=y CONFIG_DFU_NAND=y -- cgit v1.2.1 From e63bf1b13b3a7ac610c238cc19041381e890900f Mon Sep 17 00:00:00 2001 From: Eugeniu Rosca Date: Thu, 14 Mar 2019 18:31:39 +0100 Subject: common: image-android-dt: Fix out-of-bounds access Currently, 'dtimg' allows users to check indexes equal to dt_entry_count [1]. Forbid that [2]. [1] Behavior w/o the patch: => ext2load mmc 0:1 0x48000000 dtb.img 105695 bytes read in 5 ms (20.2 MiB/s) => dtimg dump 0x48000000 dt_table_header: magic = d7b7ab1e total_size = 105695 header_size = 32 dt_entry_size = 32 dt_entry_count = 2 dt_entries_offset = 32 page_size = 4096 version = 0 dt_table_entry[0]: dt_size = 105599 dt_offset = 96 id = 0b779520 rev = 00000000 custom[0] = 00000000 custom[1] = 00000000 custom[2] = 00000000 custom[3] = 00000000 (FDT)size = 105599 (FDT)compatible = shimafuji,kingfisher dt_table_entry[1]: dt_size = 105599 dt_offset = 96 id = 0b779530 rev = 00000000 custom[0] = 00000000 custom[1] = 00000000 custom[2] = 00000000 custom[3] = 00000000 (FDT)size = 105599 (FDT)compatible = shimafuji,kingfisher => dtimg size 0x48000000 0 z; print z z=19c7f => dtimg size 0x48000000 1 z; print z z=19c7f => dtimg size 0x48000000 2 z; print z z=d00dfeed => dtimg size 0x48000000 3 z Error: index > dt_entry_count (3 > 2) [2] Behavior with the patch: => dtimg size 0x48000000 0 z; print z z=19c7f => dtimg size 0x48000000 1 z; print z z=19c7f => dtimg size 0x48000000 2 z Error: index >= dt_entry_count (2 >= 2) Fixes: c04473345712 ("common: Add support for Android DT image") Signed-off-by: Eugeniu Rosca --- common/image-android-dt.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/common/image-android-dt.c b/common/image-android-dt.c index c0683ee70f..6916826179 100644 --- a/common/image-android-dt.c +++ b/common/image-android-dt.c @@ -53,8 +53,8 @@ bool android_dt_get_fdt_by_index(ulong hdr_addr, u32 index, ulong *addr, entry_size = fdt32_to_cpu(hdr->dt_entry_size); unmap_sysmem(hdr); - if (index > entry_count) { - printf("Error: index > dt_entry_count (%u > %u)\n", index, + if (index >= entry_count) { + printf("Error: index >= dt_entry_count (%u >= %u)\n", index, entry_count); return false; } -- cgit v1.2.1 From 2253d648f11e844d2dcf572b3bb961e1a7a2b00b Mon Sep 17 00:00:00 2001 From: Stefan Roese Date: Mon, 11 Feb 2019 08:43:25 +0100 Subject: pci: Add comment to mention difference in DEVFN usage in U-Boot vs Linux This patch adds a comment to the header with the PCI_foo macros related to DEVFN to explain the difference in U-Boot vs Linux. Signed-off-by: Stefan Roese Cc: Simon Glass Cc: Bin Meng Reviewed-by: Simon Glass --- include/pci.h | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/include/pci.h b/include/pci.h index 936cfe975c..5fb212cab1 100644 --- a/include/pci.h +++ b/include/pci.h @@ -499,9 +499,20 @@ static inline void pci_set_region(struct pci_region *reg, typedef int pci_dev_t; #define PCI_BUS(d) (((d) >> 16) & 0xff) + +/* + * Please note the difference in DEVFN usage in U-Boot vs Linux. U-Boot + * uses DEVFN in bits 15-8 but Linux instead expects DEVFN in bits 7-0. + * Please see the Linux header include/uapi/linux/pci.h for more details. + * This is relevant for the following macros: + * PCI_DEV, PCI_FUNC, PCI_DEVFN + * The U-Boot macro PCI_DEV is equivalent to the Linux PCI_SLOT version with + * the remark from above (input d in bits 15-8 instead of 7-0. + */ #define PCI_DEV(d) (((d) >> 11) & 0x1f) #define PCI_FUNC(d) (((d) >> 8) & 0x7) #define PCI_DEVFN(d, f) ((d) << 11 | (f) << 8) + #define PCI_MASK_BUS(bdf) ((bdf) & 0xffff) #define PCI_ADD_BUS(bus, devfn) (((bus) << 16) | (devfn)) #define PCI_BDF(b, d, f) ((b) << 16 | PCI_DEVFN(d, f)) -- cgit v1.2.1 From 50580a0e7053599abdaa467cb43cff0c66564369 Mon Sep 17 00:00:00 2001 From: "Andrew F. Davis" Date: Mon, 11 Feb 2019 08:00:08 -0600 Subject: board: ti: Move fastboot functions out of TI_SECURE_DEVICE ifdef When these were moved from mach-omap2 to board files they got placed inside TI_SECURE_DEVICE ifdef block, they are not secure only, move them up and out. Fixes: 413b90777f8d ("ti: fastboot: Move weak overrides to board files") Signed-off-by: Andrew F. Davis Reviewed-by: Lokesh Vutla --- board/ti/am57xx/board.c | 20 ++++++++++---------- board/ti/dra7xx/evm.c | 20 ++++++++++---------- 2 files changed, 20 insertions(+), 20 deletions(-) diff --git a/board/ti/am57xx/board.c b/board/ti/am57xx/board.c index 7063345dcc..1a903f13a6 100644 --- a/board/ti/am57xx/board.c +++ b/board/ti/am57xx/board.c @@ -1096,6 +1096,16 @@ int board_fit_config_name_match(const char *name) } #endif +#if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) +int fastboot_set_reboot_flag(void) +{ + printf("Setting reboot to fastboot flag ...\n"); + env_set("dofastboot", "1"); + env_save(); + return 0; +} +#endif + #ifdef CONFIG_TI_SECURE_DEVICE void board_fit_image_post_process(void **p_image, size_t *p_size) { @@ -1107,15 +1117,5 @@ void board_tee_image_process(ulong tee_image, size_t tee_size) secure_tee_install((u32)tee_image); } -#if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) -int fastboot_set_reboot_flag(void) -{ - printf("Setting reboot to fastboot flag ...\n"); - env_set("dofastboot", "1"); - env_save(); - return 0; -} -#endif - U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_TEE, board_tee_image_process); #endif diff --git a/board/ti/dra7xx/evm.c b/board/ti/dra7xx/evm.c index d69641e3a0..060c471032 100644 --- a/board/ti/dra7xx/evm.c +++ b/board/ti/dra7xx/evm.c @@ -1092,6 +1092,16 @@ int board_fit_config_name_match(const char *name) } #endif +#if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) +int fastboot_set_reboot_flag(void) +{ + printf("Setting reboot to fastboot flag ...\n"); + env_set("dofastboot", "1"); + env_save(); + return 0; +} +#endif + #ifdef CONFIG_TI_SECURE_DEVICE void board_fit_image_post_process(void **p_image, size_t *p_size) { @@ -1103,15 +1113,5 @@ void board_tee_image_process(ulong tee_image, size_t tee_size) secure_tee_install((u32)tee_image); } -#if CONFIG_IS_ENABLED(FASTBOOT) && !CONFIG_IS_ENABLED(ENV_IS_NOWHERE) -int fastboot_set_reboot_flag(void) -{ - printf("Setting reboot to fastboot flag ...\n"); - env_set("dofastboot", "1"); - env_save(); - return 0; -} -#endif - U_BOOT_FIT_LOADABLE_HANDLER(IH_TYPE_TEE, board_tee_image_process); #endif -- cgit v1.2.1 From 2e7365518acdb8fb6e9be332c8a6c57b457188d9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?S=C3=A9bastien=20Szymanski?= Date: Fri, 22 Mar 2019 09:33:52 +0100 Subject: fs: ext4: do not write on filesystem with metadata_csum feature MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit U-Boot doesn't support metadata_csum feature. Writing to filesystem with metadata_csum feature makes the filesystem corrupted and unbootable by Linux: [ 2.527495] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 0 failed (52188!=0) [ 2.537421] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 1 failed (5262!=0) ... [ 2.653308] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 14 failed (42611!=0) [ 2.662179] EXT4-fs (mmcblk0p2): ext4_check_descriptors: Checksum for group 15 failed (21527!=0) [ 2.687920] JBD2: journal checksum error [ 2.691982] EXT4-fs (mmcblk0p2): error loading journal [ 2.698292] VFS: Cannot open root device "mmcblk0p2" or unknown-block(179,2): error -74 Don't write to filesystem with meatadata_csum feature to not corrupt the filesystem. Signed-off-by: Sébastien Szymanski --- fs/ext4/ext4_write.c | 6 ++++++ include/ext4fs.h | 1 + 2 files changed, 7 insertions(+) diff --git a/fs/ext4/ext4_write.c b/fs/ext4/ext4_write.c index a7f543f7df..4eb77c327e 100644 --- a/fs/ext4/ext4_write.c +++ b/fs/ext4/ext4_write.c @@ -864,6 +864,12 @@ int ext4fs_write(const char *fname, unsigned char *buffer, printf("error in File System init\n"); return -1; } + + if (le32_to_cpu(fs->sb->feature_ro_compat) & EXT4_FEATURE_RO_COMPAT_METADATA_CSUM) { + printf("Unsupported feature metadata_csum found, not writing.\n"); + return -1; + } + inodes_per_block = fs->blksz / fs->inodesz; parent_inodeno = ext4fs_get_parent_inode_num(fname, filename, F_FILE); if (parent_inodeno == -1) diff --git a/include/ext4fs.h b/include/ext4fs.h index bb55639107..2421011341 100644 --- a/include/ext4fs.h +++ b/include/ext4fs.h @@ -32,6 +32,7 @@ #define EXT4_EXTENTS_FL 0x00080000 /* Inode uses extents */ #define EXT4_EXT_MAGIC 0xf30a #define EXT4_FEATURE_RO_COMPAT_GDT_CSUM 0x0010 +#define EXT4_FEATURE_RO_COMPAT_METADATA_CSUM 0x0400 #define EXT4_FEATURE_INCOMPAT_EXTENTS 0x0040 #define EXT4_FEATURE_INCOMPAT_64BIT 0x0080 #define EXT4_INDIRECT_BLOCKS 12 -- cgit v1.2.1