From 8a0746dba0c78f297d9db8911acddb6f1ede6dbe Mon Sep 17 00:00:00 2001 From: Baruch Siach Date: Wed, 2 Jan 2019 08:58:28 +0200 Subject: [PATCH 1/7] tools/imx8m_image.sh: remove bashism Use a single '=' to test string equality for compatibility with non-bash shells. Otherwise, if /bin/sh is dash, build fails: ./tools/imx8m_image.sh: 15: [: signed_hdmi_imx8m.bin: unexpected operator ./tools/imx8m_image.sh: 15: [: signed_hdmi_imx8m.bin: unexpected operator ./tools/imx8m_image.sh: 15: [: spl/u-boot-spl-ddr.bin: unexpected operator ./tools/imx8m_image.sh: 15: [: spl/u-boot-spl-ddr.bin: unexpected operator WARNING './spl/u-boot-spl-ddr.bin' not found, resulting binary is not-functional Signed-off-by: Baruch Siach Tested-by: Chris Spencer --- tools/imx8m_image.sh | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tools/imx8m_image.sh b/tools/imx8m_image.sh index 6346fb64d8..ec0881a128 100755 --- a/tools/imx8m_image.sh +++ b/tools/imx8m_image.sh @@ -12,7 +12,7 @@ blobs=`awk '/^SIGNED_HDMI/ {print $2} /^LOADER/ {print $2} /^SECOND_LOADER/ {pri for f in $blobs; do tmp=$srctree/$f - if [ $f == "spl/u-boot-spl-ddr.bin" ] || [ $f == "u-boot.itb" ]; then + if [ $f = "spl/u-boot-spl-ddr.bin" ] || [ $f = "u-boot.itb" ]; then continue fi @@ -28,7 +28,7 @@ for f in $blobs; do sed -in "s;$f;$tmp;" $file done -if [ $post_process == 1 ]; then +if [ $post_process = 1 ]; then if [ -f $srctree/lpddr4_pmu_train_1d_imem.bin ]; then objcopy -I binary -O binary --pad-to 0x8000 --gap-fill=0x0 $srctree/lpddr4_pmu_train_1d_imem.bin lpddr4_pmu_train_1d_imem_pad.bin objcopy -I binary -O binary --pad-to 0x4000 --gap-fill=0x0 $srctree/lpddr4_pmu_train_1d_dmem.bin lpddr4_pmu_train_1d_dmem_pad.bin From 0adc3f8538a3875ab0a48ccdc83b7884e9831f98 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 13 Mar 2019 15:02:56 -0300 Subject: [PATCH 2/7] imx8mq_evk: README: Need to copy bl31.bin to U-Boot source tree After building ATF it is needed to copy the generated bl31.bin file to the U-Boot source tree. Make this step explicit in the instructions. Signed-off-by: Fabio Estevam --- board/freescale/imx8mq_evk/README | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/board/freescale/imx8mq_evk/README b/board/freescale/imx8mq_evk/README index 2529f7da3d..bd5ee12722 100644 --- a/board/freescale/imx8mq_evk/README +++ b/board/freescale/imx8mq_evk/README @@ -9,13 +9,14 @@ Quick Start Get and Build the ARM Trusted firmware ==================== +Note: srctree is U-Boot source directory Get ATF from: https://source.codeaurora.org/external/imx/imx-atf branch: imx_4.14.62_1.0.0_beta $ make PLAT=imx8mq bl31 +$ cp build/imx8mq/release/bl31.bin $(srctree) Get the ddr and hdmi firmware ==================== -Note: srctree is U-Boot source directory $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.9.bin $ chmod +x firmware-imx-7.9.bin $ ./firmware-imx-7.9.bin From d3c8727bcf4942fb40f527d1e4b83832dd6ff06e Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 13 Mar 2019 15:02:57 -0300 Subject: [PATCH 3/7] imx8mq_evk: README: Fix a typo in the destination path The DDR firmware binaries should be copied to '$(srctree)', so fix a typo. Signed-off-by: Fabio Estevam --- board/freescale/imx8mq_evk/README | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/board/freescale/imx8mq_evk/README b/board/freescale/imx8mq_evk/README index bd5ee12722..aa9fbd8eaf 100644 --- a/board/freescale/imx8mq_evk/README +++ b/board/freescale/imx8mq_evk/README @@ -21,7 +21,7 @@ $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.9.bin $ chmod +x firmware-imx-7.9.bin $ ./firmware-imx-7.9.bin $ cp firmware-imx-7.9/firmware/hdmi/cadence/signed_hdmi_imx8m.bin $(srctree) -$ cp firmware-imx-7.9/firmware/ddr/synopsys/lpddr4*.bin $(srctee) +$ cp firmware-imx-7.9/firmware/ddr/synopsys/lpddr4*.bin $(srctree) Build U-Boot ==================== From 657493173201f47188b7e03411b9f3f331365ee3 Mon Sep 17 00:00:00 2001 From: Fabio Estevam Date: Wed, 13 Mar 2019 15:02:58 -0300 Subject: [PATCH 4/7] imx8mq_evk: README: Make the underline marker fill the whole sentence Let the underline marker "=" fill the whole sentence for better readability. Signed-off-by: Fabio Estevam --- board/freescale/imx8mq_evk/README | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/board/freescale/imx8mq_evk/README b/board/freescale/imx8mq_evk/README index aa9fbd8eaf..c1d400bcf9 100644 --- a/board/freescale/imx8mq_evk/README +++ b/board/freescale/imx8mq_evk/README @@ -1,14 +1,14 @@ U-Boot for the NXP i.MX8MQ EVK board Quick Start -==================== +=========== - Build the ARM Trusted firmware binary - Get ddr and hdmi fimware - Build U-Boot - Boot Get and Build the ARM Trusted firmware -==================== +====================================== Note: srctree is U-Boot source directory Get ATF from: https://source.codeaurora.org/external/imx/imx-atf branch: imx_4.14.62_1.0.0_beta @@ -16,7 +16,7 @@ $ make PLAT=imx8mq bl31 $ cp build/imx8mq/release/bl31.bin $(srctree) Get the ddr and hdmi firmware -==================== +============================= $ wget https://www.nxp.com/lgfiles/NMG/MAD/YOCTO/firmware-imx-7.9.bin $ chmod +x firmware-imx-7.9.bin $ ./firmware-imx-7.9.bin @@ -24,7 +24,7 @@ $ cp firmware-imx-7.9/firmware/hdmi/cadence/signed_hdmi_imx8m.bin $(srctree) $ cp firmware-imx-7.9/firmware/ddr/synopsys/lpddr4*.bin $(srctree) Build U-Boot -==================== +============ $ export CROSS_COMPILE=aarch64-poky-linux- $ make imx8mq_evk_defconfig $ make flash.bin @@ -33,5 +33,5 @@ Burn the flash.bin to MicroSD card offset 33KB $sudo dd if=flash.bin of=/dev/sd[x] bs=1024 seek=33 Boot -==================== +==== Set Boot switch SW801: 1100 and Bmode: 10 to boot from Micro SD. From f73c09e735bffc2b229bd20de6ca41e4d7efbc1d Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Mon, 1 Apr 2019 16:00:03 +0200 Subject: [PATCH 5/7] cosmetic: config: Remove empty #ifdefs After running tools/moveconfig.py it turned out that for various boards there are an empty #ifdef statements. Remove them to clean u-boot source code. Signed-off-by: Lukasz Majewski --- include/configs/bg0900.h | 4 ---- include/configs/dreamplug.h | 3 --- include/configs/ds109.h | 3 --- include/configs/km/km_arm.h | 3 --- 4 files changed, 13 deletions(-) diff --git a/include/configs/bg0900.h b/include/configs/bg0900.h index 832dbbaafc..c05b06a417 100644 --- a/include/configs/bg0900.h +++ b/include/configs/bg0900.h @@ -19,10 +19,6 @@ #define CONFIG_FEC_MXC #endif -/* SPI FLASH */ -#ifdef CONFIG_CMD_SF -#endif - /* Boot Linux */ #define CONFIG_BOOTFILE "uImage" #define CONFIG_BOOTCOMMAND "bootm" diff --git a/include/configs/dreamplug.h b/include/configs/dreamplug.h index 28bda14c3d..f7f9141dd0 100644 --- a/include/configs/dreamplug.h +++ b/include/configs/dreamplug.h @@ -34,9 +34,6 @@ #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64k */ #endif -#ifdef CONFIG_CMD_SF -#endif - /* * max 4k env size is enough, but in case of nand * it has to be rounded to sector size diff --git a/include/configs/ds109.h b/include/configs/ds109.h index 07367cfef0..31abb4bc85 100644 --- a/include/configs/ds109.h +++ b/include/configs/ds109.h @@ -37,9 +37,6 @@ #define CONFIG_ENV_SECT_SIZE 0x10000 /* 64k */ #endif -#ifdef CONFIG_CMD_SF -#endif - /* * max 4k env size is enough, but in case of nand * it has to be rounded to sector size diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h index a2e9cf1fa5..8a00ac015a 100644 --- a/include/configs/km/km_arm.h +++ b/include/configs/km/km_arm.h @@ -34,9 +34,6 @@ /* SPI NOR Flash default params, used by sf commands */ -#if defined CONFIG_KM_ENV_IS_IN_SPI_NOR -#endif - /* Reserve 4 MB for malloc */ #define CONFIG_SYS_MALLOC_LEN (4 * 1024 * 1024) From 8e2b1f2251b4935f6e1b6619ab7421e0600e259c Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Mon, 1 Apr 2019 16:00:04 +0200 Subject: [PATCH 6/7] cosmetic: Remove not needed string from kp_imx53.h config Signed-off-by: Lukasz Majewski --- include/configs/kp_imx53.h | 2 -- 1 file changed, 2 deletions(-) diff --git a/include/configs/kp_imx53.h b/include/configs/kp_imx53.h index 080eec47ca..3ea75fa120 100644 --- a/include/configs/kp_imx53.h +++ b/include/configs/kp_imx53.h @@ -20,8 +20,6 @@ #define CONFIG_SYS_FSL_ESDHC_ADDR 0 #define CONFIG_SYS_FSL_ESDHC_NUM 1 -/* Eth Configs */ - /* USB Configs */ #define CONFIG_USB_EHCI_MX5 #define CONFIG_MXC_USB_PORT 1 From da60b4301c77fdc0ce16a4f6fb6dc04b69b6282c Mon Sep 17 00:00:00 2001 From: Lukasz Majewski Date: Mon, 1 Apr 2019 16:00:05 +0200 Subject: [PATCH 7/7] DTS: Fix ETH PHY reset on HSC|DDC boards (imx53) After the commit: "eth: dm: fec: Add gpio phy reset binding" SHA1: efd0b791069af93e9d439a70d1fe2ae8994dbbfa The FEC ETH driver switched to PHY GPIO reset performed with data defined in DTS. For the HSC|DDC boards the GPIO reset signal is active low and hence the wrong DTS description must be changed (otherwise the reset for ETH is not properly setup). Signed-off-by: Lukasz Majewski --- arch/arm/dts/imx53-kp.dts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/dts/imx53-kp.dts b/arch/arm/dts/imx53-kp.dts index ca98fb59c6..4e1d8af957 100644 --- a/arch/arm/dts/imx53-kp.dts +++ b/arch/arm/dts/imx53-kp.dts @@ -23,7 +23,7 @@ pinctrl-names = "default"; pinctrl-0 = <&pinctrl_eth>; phy-mode = "rmii"; - phy-reset-gpios = <&gpio7 6 0>; + phy-reset-gpios = <&gpio7 6 GPIO_ACTIVE_LOW>; status = "okay"; };