From 371a2e775322bd995a945f108c5c91bde342062a Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Sun, 31 May 2020 00:44:24 +0200 Subject: [PATCH 01/21] test/py: use actual core count for parallel builds When building U-Boot we should not blindly use make -j8 but consider the actual core count given by os.cpu_count(). Signed-off-by: Heinrich Schuchardt Reviewed-by: Simon Glass Acked-by: Stephen Warren --- test/py/conftest.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test/py/conftest.py b/test/py/conftest.py index e3392ff6bc4..30920474b36 100644 --- a/test/py/conftest.py +++ b/test/py/conftest.py @@ -156,7 +156,7 @@ def pytest_configure(config): o_opt = '' cmds = ( ['make', o_opt, '-s', board_type + '_defconfig'], - ['make', o_opt, '-s', '-j8'], + ['make', o_opt, '-s', '-j{}'.format(os.cpu_count())], ) name = 'make' From 72be2375614a6e5036a8c3207b187ac318a74991 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 30 May 2020 10:29:03 -0600 Subject: [PATCH 02/21] usb: ohci: Add header file for ARCH_DMA_MINALIGN This is defined in the asm/cache.h header file. Update this header file to include it so it gets the same value consistently across U-Boot. This fixes 'usb host' on omapl138_lcdk. Fixes: 90526e9fbac ("common: Drop net.h from common header") Reported-by: Adam Ford Signed-off-by: Simon Glass Tested-by: Adam Ford Reviewed-by: Tom Rini --- drivers/usb/host/ohci.h | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/usb/host/ohci.h b/drivers/usb/host/ohci.h index 9b264bd92ab..a38cd25eb85 100644 --- a/drivers/usb/host/ohci.h +++ b/drivers/usb/host/ohci.h @@ -11,6 +11,7 @@ * e.g. PCI controllers need this */ +#include #include #ifdef CONFIG_SYS_OHCI_SWAP_REG_ACCESS From 6d39fccc176051bd970f97df9bb7e578f9854677 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Sat, 30 May 2020 10:29:04 -0600 Subject: [PATCH 03/21] dma-mapping: Add header file for ARCH_DMA_MINALIGN This is defined in the asm/cache.h header file. Update this header file to include it. Signed-off-by: Simon Glass Reviewed-by: Tom Rini Tested-by: Adam Ford #da850-evm --- include/linux/dma-mapping.h | 1 + 1 file changed, 1 insertion(+) diff --git a/include/linux/dma-mapping.h b/include/linux/dma-mapping.h index 20b6d60dd88..6a107d52e07 100644 --- a/include/linux/dma-mapping.h +++ b/include/linux/dma-mapping.h @@ -2,6 +2,7 @@ #ifndef _LINUX_DMA_MAPPING_H #define _LINUX_DMA_MAPPING_H +#include #include #include #include From 95712afc17bb4141e7f902983fb27e5bbc5aa62f Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Fri, 29 May 2020 17:53:45 +0200 Subject: [PATCH 04/21] image: android: fix abootimg support abootimg creates images where all load addresses are 0. Android Boot Image Info: * file name = artifacts/fastboot.img * image size = 31381504 bytes (29.93 MB) page size = 2048 bytes * Boot Name = "" * kernel size = 9397406 bytes (8.96 MB) ramdisk size = 21981144 bytes (20.96 MB) * load addresses: kernel: 0x00000000 ramdisk: 0x00000000 tags: 0x00000000 Without this fix we end in a data abort: Booting kernel at 0x15000000... * kernel: cmdline image address = 0x15000000 Kernel load addr 0x00000000 size 9178 KiB Kernel command line: ip=dhcp console=ttymxc0,115200n8 kernel data at 0x15000800, len = 0x008f649e (9397406) * ramdisk: cmdline image address = 0x15000000 RAM disk load addr 0x00000000 size 21473 KiB ramdisk start = 0x158f7000, ramdisk end = 0x16def35c kernel loaded at 0x00000000, end = 0x00000000 Loading Kernel Image data abort pc : [<8ff8c004>] lr : [<5d7ac70f>] sp : 8f57ed64 ip : 48f17668 fp : 00000000 r10: 00000002 r9 : 8f58aed0 r8 : 03fa4c58 r7 : 5e842497 r6 : fbe73965 r5 : 7c459955 r4 : df020fde r3 : 1b7aa45b r2 : 007f23fe r1 : 15104820 r0 : 00104000 Flags: nzCv IRQs off FIQs off Mode SVC_32 (T) Code: f07c e8b1 51f8 3a20 (e8a0) 51f8 Resetting CPU ... resetting ... Signed-off-by: Christian Gmeiner --- common/image-android.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/common/image-android.c b/common/image-android.c index 6af9baa121d..18f7c8db03b 100644 --- a/common/image-android.c +++ b/common/image-android.c @@ -33,6 +33,13 @@ static ulong android_image_get_kernel_addr(const struct andr_img_hdr *hdr) if (hdr->kernel_addr == ANDROID_IMAGE_DEFAULT_KERNEL_ADDR) return (ulong)hdr + hdr->page_size; + /* + * abootimg creates images where all load addresses are 0 + * and we need to fix them. + */ + if (hdr->kernel_addr == 0 && hdr->ramdisk_addr == 0) + return env_get_ulong("kernel_addr_r", 16, 0); + return hdr->kernel_addr; } From 50bb682c5cc52769e7cbd835a00dbcbc75a4f0e7 Mon Sep 17 00:00:00 2001 From: Harald Seiler Date: Thu, 28 May 2020 17:54:45 +0200 Subject: [PATCH 05/21] tools: fw_env: Fix warning when reading too little When using CONFIG_ENV_IS_IN_FAT and the config-file specifies a size larger than what U-Boot wrote into the env-file, a confusing error message is shown: $ fw_printenv Read error on /boot/uboot.env: Success Fix this by showing a different error message when read returns too little data. Signed-off-by: Harald Seiler --- tools/env/fw_env.c | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/tools/env/fw_env.c b/tools/env/fw_env.c index 8734663cd4c..c6378ecf34f 100644 --- a/tools/env/fw_env.c +++ b/tools/env/fw_env.c @@ -946,11 +946,17 @@ static int flash_read_buf(int dev, int fd, void *buf, size_t count, lseek(fd, blockstart + block_seek, SEEK_SET); rc = read(fd, buf + processed, readlen); - if (rc != readlen) { + if (rc == -1) { fprintf(stderr, "Read error on %s: %s\n", DEVNAME(dev), strerror(errno)); return -1; } + if (rc != readlen) { + fprintf(stderr, "Read error on %s: " + "Attempted to read %d bytes but got %d\n", + DEVNAME(dev), readlen, rc); + return -1; + } #ifdef DEBUG fprintf(stderr, "Read 0x%x bytes at 0x%llx on %s\n", rc, (unsigned long long)blockstart + block_seek, From 317291167701480da6c235a17b0a7e89dafcff78 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Wed, 27 May 2020 07:24:55 -0600 Subject: [PATCH 06/21] mkimage: Default to adding a crc32 hash with '-f auto' This option currently does not add any sort of hash to the images in the FIT. Add a hash node requesting a crc32 checksum, which at least provides some protection. The crc32 value is easily ignored (e.g. in SPL) if not needed. and takes up only about 48 bytes per image, including overhead. Suggested-by: Wolfgang Denk Signed-off-by: Simon Glass Reviewed-by: Wolfgang Denk --- tools/fit_image.c | 18 ++++++++++++++++-- 1 file changed, 16 insertions(+), 2 deletions(-) diff --git a/tools/fit_image.c b/tools/fit_image.c index 88ff093d05b..a082d9386d2 100644 --- a/tools/fit_image.c +++ b/tools/fit_image.c @@ -111,7 +111,7 @@ static int fit_calc_size(struct image_tool_params *params) if (size < 0) return -1; - /* Add space for properties */ + /* Add space for properties and hash node */ total_size += size + 300; } @@ -192,6 +192,18 @@ static void get_basename(char *str, int size, const char *fname) str[len] = '\0'; } +/** + * add_crc_node() - Add a hash node to request a CRC checksum for an image + * + * @fdt: Device tree to add to (in sequential-write mode) + */ +static void add_crc_node(void *fdt) +{ + fdt_begin_node(fdt, "hash-1"); + fdt_property_string(fdt, FIT_ALGO_PROP, "crc32"); + fdt_end_node(fdt); +} + /** * fit_write_images() - Write out a list of images to the FIT * @@ -230,6 +242,7 @@ static int fit_write_images(struct image_tool_params *params, char *fdt) ret = fdt_property_file(params, fdt, FIT_DATA_PROP, params->datafile); if (ret) return ret; + add_crc_node(fdt); fdt_end_node(fdt); /* Now the device tree files if available */ @@ -252,6 +265,7 @@ static int fit_write_images(struct image_tool_params *params, char *fdt) genimg_get_arch_short_name(params->arch)); fdt_property_string(fdt, FIT_COMP_PROP, genimg_get_comp_short_name(IH_COMP_NONE)); + add_crc_node(fdt); fdt_end_node(fdt); } @@ -269,7 +283,7 @@ static int fit_write_images(struct image_tool_params *params, char *fdt) params->fit_ramdisk); if (ret) return ret; - + add_crc_node(fdt); fdt_end_node(fdt); } From 7b4116d449315c65599802f7472ddf58c86814e5 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 26 May 2020 20:39:03 -0400 Subject: [PATCH 07/21] Azure: Add 'tools-only' build for macOS X hosts Add building the 'tools-only' target on macOS X 'Catalina'. Hopefully this will catch changes to host tools that are incompatible on BSD style environments. Signed-off-by: Tom Rini --- .azure-pipelines.yml | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/.azure-pipelines.yml b/.azure-pipelines.yml index 88438e77a1f..636500d6cea 100644 --- a/.azure-pipelines.yml +++ b/.azure-pipelines.yml @@ -1,6 +1,7 @@ variables: windows_vm: vs2017-win2016 ubuntu_vm: ubuntu-18.04 + macos_vm: macOS-10.15 ci_runner_image: trini/u-boot-gitlab-ci-runner:bionic-20200403-27Apr2020 # Add '-u 0' options for Azure pipelines, otherwise we get "permission # denied" error when it tries to "useradd -m -u 1001 vsts_azpcontainer", @@ -44,6 +45,20 @@ jobs: # Tell MSYS2 not to ‘cd’ our startup directory to HOME CHERE_INVOKING: yes + - job: tools_only_macOS + displayName: 'Ensure host tools build for macOS X' + pool: + vmImage: $(macos_vm) + steps: + - script: brew install make + displayName: Brew install dependencies + - script: | + gmake tools-only_config tools-only NO_SDL=1 \ + HOSTCFLAGS="-I/usr/local/opt/openssl@1.1/include" \ + HOSTLDFLAGS="-L/usr/local/opt/openssl@1.1/lib" \ + -j$(sysctl -n hw.logicalcpu) + displayName: 'Perform tools-only build' + - job: cppcheck displayName: 'Static code analysis with cppcheck' pool: From 3fadc9ea2f612331c8177f2eef6849591d55400d Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 26 May 2020 14:36:48 -0400 Subject: [PATCH 08/21] amlogic: Remove ARCH= references from documentation When building U-Boot we select the architecture via Kconfig and not ARCH being passed in via the environment or make cmdline. Cc: Beniamino Galvani Acked-by: Neil Armstrong Cc: u-boot-amlogic@groups.io Signed-off-by: Tom Rini --- board/amlogic/p200/README.nanopi-k2 | 1 - board/amlogic/p200/README.odroid-c2 | 1 - board/amlogic/p200/README.p200 | 1 - board/amlogic/p201/README.p201 | 1 - board/amlogic/p212/README.khadas-vim | 1 - board/amlogic/p212/README.libretech-ac | 1 - board/amlogic/p212/README.libretech-cc | 1 - board/amlogic/p212/README.p212 | 1 - board/amlogic/q200/README.khadas-vim2 | 1 - board/amlogic/q200/README.q200 | 1 - board/amlogic/s400/README | 1 - board/amlogic/sei510/README | 1 - board/amlogic/sei610/README | 1 - board/amlogic/u200/README | 1 - board/amlogic/w400/README.khadas-vim3 | 1 - board/amlogic/w400/README.khadas-vim3l | 1 - board/amlogic/w400/README.odroid-n2 | 1 - board/amlogic/w400/README.w400 | 1 - 18 files changed, 18 deletions(-) diff --git a/board/amlogic/p200/README.nanopi-k2 b/board/amlogic/p200/README.nanopi-k2 index d450d3c2b2a..c8dec3569b4 100644 --- a/board/amlogic/p200/README.nanopi-k2 +++ b/board/amlogic/p200/README.nanopi-k2 @@ -24,7 +24,6 @@ Currently the u-boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make nanopi-k2_defconfig > make diff --git a/board/amlogic/p200/README.odroid-c2 b/board/amlogic/p200/README.odroid-c2 index bed48c5728b..3b9f80df29d 100644 --- a/board/amlogic/p200/README.odroid-c2 +++ b/board/amlogic/p200/README.odroid-c2 @@ -29,7 +29,6 @@ Currently the u-boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make odroid-c2_defconfig > make diff --git a/board/amlogic/p200/README.p200 b/board/amlogic/p200/README.p200 index 01d82d1e79e..84d5ca53569 100644 --- a/board/amlogic/p200/README.p200 +++ b/board/amlogic/p200/README.p200 @@ -31,7 +31,6 @@ Currently the u-boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make p200_defconfig > make diff --git a/board/amlogic/p201/README.p201 b/board/amlogic/p201/README.p201 index c251096ce14..4bb5e959053 100644 --- a/board/amlogic/p201/README.p201 +++ b/board/amlogic/p201/README.p201 @@ -31,7 +31,6 @@ Currently the u-boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make p201_defconfig > make diff --git a/board/amlogic/p212/README.khadas-vim b/board/amlogic/p212/README.khadas-vim index a2c7606454f..ccf933861b7 100644 --- a/board/amlogic/p212/README.khadas-vim +++ b/board/amlogic/p212/README.khadas-vim @@ -30,7 +30,6 @@ Currently the u-boot port supports the following devices: U-Boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make khadas-vim_defconfig > make diff --git a/board/amlogic/p212/README.libretech-ac b/board/amlogic/p212/README.libretech-ac index 538604261b8..3f713ec3263 100644 --- a/board/amlogic/p212/README.libretech-ac +++ b/board/amlogic/p212/README.libretech-ac @@ -25,7 +25,6 @@ Currently the U-Boot port supports the following devices: U-Boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make libretech-ac_defconfig > make diff --git a/board/amlogic/p212/README.libretech-cc b/board/amlogic/p212/README.libretech-cc index 6af7de3cfa7..74434d4435e 100644 --- a/board/amlogic/p212/README.libretech-cc +++ b/board/amlogic/p212/README.libretech-cc @@ -30,7 +30,6 @@ Currently the U-Boot port supports the following devices: U-Boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make libretech-cc_defconfig > make diff --git a/board/amlogic/p212/README.p212 b/board/amlogic/p212/README.p212 index ef5370c763c..3776f244939 100644 --- a/board/amlogic/p212/README.p212 +++ b/board/amlogic/p212/README.p212 @@ -31,7 +31,6 @@ Currently the u-boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make p212_defconfig > make diff --git a/board/amlogic/q200/README.khadas-vim2 b/board/amlogic/q200/README.khadas-vim2 index 8bcfc296f3e..595998c4fab 100644 --- a/board/amlogic/q200/README.khadas-vim2 +++ b/board/amlogic/q200/README.khadas-vim2 @@ -31,7 +31,6 @@ Currently the u-boot port supports the following devices: U-Boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make khadas-vim2_defconfig > make diff --git a/board/amlogic/q200/README.q200 b/board/amlogic/q200/README.q200 index 55d730a0d20..d4142c88bd4 100644 --- a/board/amlogic/q200/README.q200 +++ b/board/amlogic/q200/README.q200 @@ -30,7 +30,6 @@ Currently the u-boot port supports the following devices: U-Boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make khadas-vim2_defconfig > make diff --git a/board/amlogic/s400/README b/board/amlogic/s400/README index ab21998dc83..a48db22a428 100644 --- a/board/amlogic/s400/README +++ b/board/amlogic/s400/README @@ -31,7 +31,6 @@ Currently the u-boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make s400_defconfig > make diff --git a/board/amlogic/sei510/README b/board/amlogic/sei510/README index e47ebc7b3a5..d9358aa5018 100644 --- a/board/amlogic/sei510/README +++ b/board/amlogic/sei510/README @@ -22,7 +22,6 @@ Currently the u-boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make sei510_defconfig > make diff --git a/board/amlogic/sei610/README b/board/amlogic/sei610/README index 1cc2b3c2a4e..d96a94b5e97 100644 --- a/board/amlogic/sei610/README +++ b/board/amlogic/sei610/README @@ -18,7 +18,6 @@ specifications: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make sei610_defconfig > make diff --git a/board/amlogic/u200/README b/board/amlogic/u200/README index bffac5e7ae0..a4080eb299c 100644 --- a/board/amlogic/u200/README +++ b/board/amlogic/u200/README @@ -27,7 +27,6 @@ Currently the u-boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make u200_defconfig > make diff --git a/board/amlogic/w400/README.khadas-vim3 b/board/amlogic/w400/README.khadas-vim3 index 45ef90c1b0a..399bf49295f 100644 --- a/board/amlogic/w400/README.khadas-vim3 +++ b/board/amlogic/w400/README.khadas-vim3 @@ -29,7 +29,6 @@ Currently the U-Boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make khadas-vim3_defconfig > make diff --git a/board/amlogic/w400/README.khadas-vim3l b/board/amlogic/w400/README.khadas-vim3l index 0afff16c0c2..b2d9abbfd9b 100644 --- a/board/amlogic/w400/README.khadas-vim3l +++ b/board/amlogic/w400/README.khadas-vim3l @@ -29,7 +29,6 @@ Currently the U-Boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make khadas-vim3l_defconfig > make diff --git a/board/amlogic/w400/README.odroid-n2 b/board/amlogic/w400/README.odroid-n2 index a8f2c3d7daa..8142eebea00 100644 --- a/board/amlogic/w400/README.odroid-n2 +++ b/board/amlogic/w400/README.odroid-n2 @@ -28,7 +28,6 @@ Currently the u-boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make odroid-n2_defconfig > make diff --git a/board/amlogic/w400/README.w400 b/board/amlogic/w400/README.w400 index 25b786d817c..c129717a118 100644 --- a/board/amlogic/w400/README.w400 +++ b/board/amlogic/w400/README.w400 @@ -27,7 +27,6 @@ Currently the u-boot port supports the following devices: u-boot compilation ================== - > export ARCH=arm > export CROSS_COMPILE=aarch64-none-elf- > make w400_defconfig > make From 2b41e19cc54717e0be940b98243de3ae340a32c9 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 26 May 2020 14:36:49 -0400 Subject: [PATCH 09/21] imx: Remove ARCH= references from documentation When building U-Boot we select the architecture via Kconfig and not ARCH being passed in via the environment or make cmdline. Cc: Adam Ford Cc: Vanessa Maegima Cc: Otavio Salvador Cc: Igor Opaniuk Cc: Manivannan Sadhasivam Signed-off-by: Tom Rini --- board/beacon/imx8mm/README | 2 +- board/logicpd/imx6/README | 2 +- board/technexion/pico-imx7d/README.pico-imx7d_BL33 | 2 +- doc/board/toradex/colibri_imx7.rst | 1 - 4 files changed, 3 insertions(+), 4 deletions(-) diff --git a/board/beacon/imx8mm/README b/board/beacon/imx8mm/README index 4223fbd15dd..dce176fa0b2 100644 --- a/board/beacon/imx8mm/README +++ b/board/beacon/imx8mm/README @@ -26,7 +26,7 @@ $ cp firmware-imx-8.5/firmware/ddr/synopsys/lpddr4*.bin $(srctree) Build U-Boot ============ $ make imx8mm_beacon_defconfig -$ make flash.bin ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- ATF_LOAD_ADDR=0x920000 +$ make flash.bin CROSS_COMPILE=aarch64-linux-gnu- ATF_LOAD_ADDR=0x920000 Burn U-Boot to microSD Card =========================== diff --git a/board/logicpd/imx6/README b/board/logicpd/imx6/README index 26d053a32c3..19f79c5734b 100644 --- a/board/logicpd/imx6/README +++ b/board/logicpd/imx6/README @@ -17,7 +17,7 @@ Building U-Boot for Logic PD Development Kit To build U-Boot for the Dual and Quad variants: make imx6q_logic_defconfig - make u-boot.imx ARCH=arm CROSS_COMPILE=arm-linux- + make u-boot.imx CROSS_COMPILE=arm-linux- Flashing U-Boot into the SD card diff --git a/board/technexion/pico-imx7d/README.pico-imx7d_BL33 b/board/technexion/pico-imx7d/README.pico-imx7d_BL33 index 40324ffe5f3..1b346093b88 100644 --- a/board/technexion/pico-imx7d/README.pico-imx7d_BL33 +++ b/board/technexion/pico-imx7d/README.pico-imx7d_BL33 @@ -4,7 +4,7 @@ The boot sequence is ATF -> OPTEE -> U-Boot -> Linux. U-Boot is in non-secure world in this case. - Build u-boot - Set environment variable of CROSS_COMPILE for your toolchain and ARCH=arm + Set environment variable of CROSS_COMPILE for your toolchain $ make pico-imx7d_bl33_defconfig $ make all diff --git a/doc/board/toradex/colibri_imx7.rst b/doc/board/toradex/colibri_imx7.rst index 6fb95266666..a30e721379e 100644 --- a/doc/board/toradex/colibri_imx7.rst +++ b/doc/board/toradex/colibri_imx7.rst @@ -18,7 +18,6 @@ Build U-Boot .. code-block:: bash $ export CROSS_COMPILE=arm-linux-gnueabi- - $ export ARCH=arm $ make colibri_imx7_emmc_defconfig # For NAND: colibri_imx7_defconfig $ make From 0d172d2a0f1c0fdf5513bb8e7f0a1930424594c3 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 26 May 2020 14:36:50 -0400 Subject: [PATCH 10/21] powerpc: Remove ARCH= references from documentation When building U-Boot we select the architecture via Kconfig and not ARCH being passed in via the environment or make cmdline. Cc: Po Liu Cc: Qiang Zhao Signed-off-by: Tom Rini --- board/freescale/c29xpcie/README | 1 - board/freescale/p1010rdb/README.P1010RDB-PA | 1 - board/freescale/p1010rdb/README.P1010RDB-PB | 1 - 3 files changed, 3 deletions(-) diff --git a/board/freescale/c29xpcie/README b/board/freescale/c29xpcie/README index 2e249cbb3a2..a6120f1845d 100644 --- a/board/freescale/c29xpcie/README +++ b/board/freescale/c29xpcie/README @@ -56,7 +56,6 @@ Note: 1 stands for 'off', 0 stands for 'on' Build and program U-Boot to NOR flash ================================== 1. Build u-boot.bin image example: - export ARCH=powerpc export CROSS_COMPILE=/your_path/powerpc-linux-gnu- make C293PCIE diff --git a/board/freescale/p1010rdb/README.P1010RDB-PA b/board/freescale/p1010rdb/README.P1010RDB-PA index 105942f7a54..46c61237c72 100644 --- a/board/freescale/p1010rdb/README.P1010RDB-PA +++ b/board/freescale/p1010rdb/README.P1010RDB-PA @@ -98,7 +98,6 @@ instead of to CAN/UART1. Build and burn U-Boot to NOR flash ================================== 1. Build u-boot.bin image - export ARCH=powerpc export CROSS_COMPILE=/your_path/powerpc-linux-gnu- make P1010RDB_NOR diff --git a/board/freescale/p1010rdb/README.P1010RDB-PB b/board/freescale/p1010rdb/README.P1010RDB-PB index dc82f0df098..4a3b389877f 100644 --- a/board/freescale/p1010rdb/README.P1010RDB-PB +++ b/board/freescale/p1010rdb/README.P1010RDB-PB @@ -128,7 +128,6 @@ To enable IFC in case of SD boot Build images for different boot mode ==================================== First setup cross compile environment on build host - $ export ARCH=powerpc $ export CROSS_COMPILE=/powerpc-linux-gnu- 1. For NOR boot From 358b6f72c28c80699536f7137063095116e1675e Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 26 May 2020 14:36:51 -0400 Subject: [PATCH 11/21] rockchip: Remove ARCH= references from documentation When building U-Boot we select the architecture via Kconfig and not ARCH being passed in via the environment or make cmdline. Acked-by: Kever Yang Cc: Simon Glass Cc: Philipp Tomsich Acked-by: Klaus Goger Cc: Jagan Teki Signed-off-by: Tom Rini Reviewed-by: Simon Glass --- board/rockchip/evb_rk3229/README | 1 - board/rockchip/evb_rk3399/README | 1 - board/theobroma-systems/lion_rk3368/README | 4 ++-- board/vamrs/rock960_rk3399/README | 1 - 4 files changed, 2 insertions(+), 5 deletions(-) diff --git a/board/rockchip/evb_rk3229/README b/board/rockchip/evb_rk3229/README index 93328c75b20..9068225e272 100644 --- a/board/rockchip/evb_rk3229/README +++ b/board/rockchip/evb_rk3229/README @@ -22,7 +22,6 @@ Compile the U-Boot > cd ../u-boot > export CROSS_COMPILE=arm-linux-gnueabihf- - > export ARCH=arm > make evb-rk3229_defconfig > make > make u-boot.itb diff --git a/board/rockchip/evb_rk3399/README b/board/rockchip/evb_rk3399/README index da7ae89ab1e..c6f58203ebe 100644 --- a/board/rockchip/evb_rk3399/README +++ b/board/rockchip/evb_rk3399/README @@ -54,7 +54,6 @@ Compile U-Boot ============== > cd ../u-boot - > export ARCH=arm64 > export CROSS_COMPILE=aarch64-linux-gnu- > make evb-rk3399_defconfig for firefly-rk3399, use below instead: diff --git a/board/theobroma-systems/lion_rk3368/README b/board/theobroma-systems/lion_rk3368/README index ad3ac93bd44..7488b18326b 100644 --- a/board/theobroma-systems/lion_rk3368/README +++ b/board/theobroma-systems/lion_rk3368/README @@ -17,12 +17,12 @@ Configure U-Boot Build the TPL/SPL stage ======================= - > make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm + > make CROSS_COMPILE=aarch64-unknown-elf- Build the full U-Boot and a FIT image including the ATF ======================================================= - > make CROSS_COMPILE=aarch64-unknown-elf- ARCH=arm u-boot.itb + > make CROSS_COMPILE=aarch64-unknown-elf- u-boot.itb Flash the image =============== diff --git a/board/vamrs/rock960_rk3399/README b/board/vamrs/rock960_rk3399/README index c5c675c4ead..15df027fbcd 100644 --- a/board/vamrs/rock960_rk3399/README +++ b/board/vamrs/rock960_rk3399/README @@ -57,7 +57,6 @@ Compile the U-Boot > cd ../u-boot > cp ../rkbin/rk33/rk3399_bl31_v1.00.elf ./bl31.elf - > export ARCH=arm64 > export CROSS_COMPILE=aarch64-linux-gnu- > make rock960-rk3399_defconfig > make From 897135809a046fa95f964abeb6858a5a7dcb6717 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 26 May 2020 14:36:52 -0400 Subject: [PATCH 12/21] arm: ti: Remove ARCH= references from documentation When building U-Boot we select the architecture via Kconfig and not ARCH being passed in via the environment or make cmdline. Cc: Lokesh Vutla Cc: Vitaly Andrianov Signed-off-by: Tom Rini --- board/ti/am65x/README | 8 ++++---- board/ti/j721e/README | 8 ++++---- board/ti/ks2_evm/README | 2 +- doc/uImage.FIT/beaglebone_vboot.txt | 1 - 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/board/ti/am65x/README b/board/ti/am65x/README index 00be1ffe44d..67081ce349d 100644 --- a/board/ti/am65x/README +++ b/board/ti/am65x/README @@ -133,12 +133,12 @@ $ make PLATFORM=k3-am65x CFG_ARM64_core=y 4. U-Boot: 4.1. R5: -$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- am65x_evm_r5_defconfig O=/tmp/r5 -$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=/tmp/r5 +$ make CROSS_COMPILE=arm-linux-gnueabihf- am65x_evm_r5_defconfig O=/tmp/r5 +$ make CROSS_COMPILE=arm-linux-gnueabihf- O=/tmp/r5 4.2. A53: -$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- am65x_evm_a53_defconfig O=/tmp/a53 -$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- ATF=/build/k3/generic/release/bl31.bin TEE=/out/arm-plat-k3/core/tee-pager_v2.bin O=/tmp/a53 +$ make CROSS_COMPILE=aarch64-linux-gnu- am65x_evm_a53_defconfig O=/tmp/a53 +$ make CROSS_COMPILE=aarch64-linux-gnu- ATF=/build/k3/generic/release/bl31.bin TEE=/out/arm-plat-k3/core/tee-pager_v2.bin O=/tmp/a53 Target Images -------------- diff --git a/board/ti/j721e/README b/board/ti/j721e/README index 7dcf3363329..757a59cdb44 100644 --- a/board/ti/j721e/README +++ b/board/ti/j721e/README @@ -149,12 +149,12 @@ $ make PLATFORM=k3-j721e CFG_ARM64_core=y 4. U-Boot: 4.1. R5: -$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- j721e_evm_r5_defconfig O=/tmp/r5 -$ make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- O=/tmp/r5 +$ make CROSS_COMPILE=arm-linux-gnueabihf- j721e_evm_r5_defconfig O=/tmp/r5 +$ make CROSS_COMPILE=arm-linux-gnueabihf- O=/tmp/r5 4.2. A72: -$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- j721e_evm_a72_defconfig O=/tmp/a72 -$ make ARCH=arm CROSS_COMPILE=aarch64-linux-gnu- ATF=/build/k3/generic/release/bl31.bin TEE=/out/arm-plat-k3/core/tee-pager_v2.bin O=/tmp/a72 +$ make CROSS_COMPILE=aarch64-linux-gnu- j721e_evm_a72_defconfig O=/tmp/a72 +$ make CROSS_COMPILE=aarch64-linux-gnu- ATF=/build/k3/generic/release/bl31.bin TEE=/out/arm-plat-k3/core/tee-pager_v2.bin O=/tmp/a72 Target Images -------------- diff --git a/board/ti/ks2_evm/README b/board/ti/ks2_evm/README index a26b7f81313..ff0ec5a3637 100644 --- a/board/ti/ks2_evm/README +++ b/board/ti/ks2_evm/README @@ -74,7 +74,7 @@ Supported image formats: Build instructions: =================== Examples for k2hk, for k2e, k2l and k2g just replace k2hk prefix accordingly. -Don't forget to add ARCH=arm and CROSS_COMPILE. +Don't forget to add CROSS_COMPILE. To build u-boot.bin, u-boot-spi.gph, MLO: >make k2hk_evm_defconfig diff --git a/doc/uImage.FIT/beaglebone_vboot.txt b/doc/uImage.FIT/beaglebone_vboot.txt index 685ec1f46d9..ebd2068ed38 100644 --- a/doc/uImage.FIT/beaglebone_vboot.txt +++ b/doc/uImage.FIT/beaglebone_vboot.txt @@ -67,7 +67,6 @@ or if you just installed gcc-arm-linux-gnueabi then it might be b. Configure and build U-Boot with verified boot enabled: - export ARCH=arm export UBOOT=/path/to/u-boot cd $UBOOT # You can add -j10 if you have 10 CPUs to make it faster From ee67ec98c8e8501810e12bc179e873d0ba471a68 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 26 May 2020 14:36:53 -0400 Subject: [PATCH 13/21] m68k: Remove ARCH= references from documentation When building U-Boot we select the architecture via Kconfig and not ARCH being passed in via the environment or make cmdline. While in here, add the doc file to the MAINTAINERS entry for coldfire. Cc: Huan Wang Cc: Angelo Dureghello Signed-off-by: Tom Rini --- MAINTAINERS | 1 + doc/arch/m68k.rst | 6 +++--- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index 9da0459bf74..660b12f1a87 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -590,6 +590,7 @@ M: Angelo Dureghello S: Maintained T: git https://gitlab.denx.de/u-boot/custodians/u-boot-coldfire.git F: arch/m68k/ +F: doc/arch/m68k.rst DFU M: Lukasz Majewski diff --git a/doc/arch/m68k.rst b/doc/arch/m68k.rst index 34b2593eb85..44e1a5dfa38 100644 --- a/doc/arch/m68k.rst +++ b/doc/arch/m68k.rst @@ -35,7 +35,7 @@ development boards. Supported CPU families ---------------------- -Please "make menuconfig" with ARCH=m68k, or check arch/m68k/cpu to see the +Please "make menuconfig" and select "m68k" or check arch/m68k/cpu to see the currently supported processor and families. @@ -75,8 +75,8 @@ A bash script similar to the one below may be used: board=M5475DFE make distclean - make ARCH=m68k ${board}_defconfig - make ARCH=m68k KBUILD_VERBOSE=1 + make ${board}_defconfig + make KBUILD_VERBOSE=1 Adopted toolchains From e836a71b700862b4eacc20209ec225aa427c56e3 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 26 May 2020 14:36:54 -0400 Subject: [PATCH 14/21] fu540: Remove ARCH= references from documentation When building U-Boot we select the architecture via Kconfig and not ARCH being passed in via the environment or make cmdline. While in here, add the doc file to the MAINTAINERS entry. Cc: Paul Walmsley Cc: Palmer Dabbelt Cc: Anup Patel Cc: Atish Patra Signed-off-by: Tom Rini --- board/sifive/fu540/MAINTAINERS | 1 + doc/board/sifive/fu540.rst | 1 - 2 files changed, 1 insertion(+), 1 deletion(-) diff --git a/board/sifive/fu540/MAINTAINERS b/board/sifive/fu540/MAINTAINERS index 5381fc0639d..27620727bd9 100644 --- a/board/sifive/fu540/MAINTAINERS +++ b/board/sifive/fu540/MAINTAINERS @@ -5,5 +5,6 @@ M: Anup Patel M: Atish Patra S: Maintained F: board/sifive/fu540/ +F: doc/board/sifive/fu540.rst F: include/configs/sifive-fu540.h F: configs/sifive_fu540_defconfig diff --git a/doc/board/sifive/fu540.rst b/doc/board/sifive/fu540.rst index 610ba87074b..43402cb2e51 100644 --- a/doc/board/sifive/fu540.rst +++ b/doc/board/sifive/fu540.rst @@ -39,7 +39,6 @@ Building .. code-block:: none - export ARCH=riscv export CROSS_COMPILE= 3. make sifive_fu540_defconfig From 1e374089bdfb4fd41a34204b53474180e0be0125 Mon Sep 17 00:00:00 2001 From: Tom Rini Date: Tue, 26 May 2020 14:36:55 -0400 Subject: [PATCH 15/21] cubieboard7: Remove ARCH= references from documentation When building U-Boot we select the architecture via Kconfig and not ARCH being passed in via the environment or make cmdline. While in here, add the doc file to the MAINTAINERS entry. Cc: Amit Singh Tomar Cc: Manivannan Sadhasivam Signed-off-by: Tom Rini Reviewed-by: Amit Singh Tomar --- MAINTAINERS | 1 + doc/board/actions/cubieboard7.rst | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/MAINTAINERS b/MAINTAINERS index 660b12f1a87..1fd975c72f0 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -275,6 +275,7 @@ M: Manivannan Sadhasivam S: Maintained F: arch/arm/include/asm/arch-owl/ F: arch/arm/mach-owl/ +F: doc/board/actions/ F: drivers/clk/owl/ F: drivers/serial/serial_owl.c F: include/configs/owl-common.h diff --git a/doc/board/actions/cubieboard7.rst b/doc/board/actions/cubieboard7.rst index e01d2d0370a..74f2b12e41f 100644 --- a/doc/board/actions/cubieboard7.rst +++ b/doc/board/actions/cubieboard7.rst @@ -102,7 +102,7 @@ Building U-BOOT proper image $ make clean $ export CROSS_COMPILE=aarch64-linux-gnu- - $ make ARCH=arm cubieboard7_defconfig + $ make cubieboard7_defconfig $ make u-boot-dtb.img -j16 u-boot-dtb.img can now be flashed to debian image partition mounted on host machine. From 8e8059ccc55a3725046e628c87450dbc41e1a504 Mon Sep 17 00:00:00 2001 From: Heinrich Schuchardt Date: Tue, 26 May 2020 18:34:15 +0200 Subject: [PATCH 16/21] cmd: fitupd: move config check to Kconfig Configuration checks should not be in the C files but in the Kconfig files. Signed-off-by: Heinrich Schuchardt Reviewed-by: Tom Rini --- cmd/Kconfig | 1 + cmd/fitupd.c | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/cmd/Kconfig b/cmd/Kconfig index 153864c5876..192b3b262f1 100644 --- a/cmd/Kconfig +++ b/cmd/Kconfig @@ -491,6 +491,7 @@ config CMD_SPL_WRITE_SIZE config CMD_FITUPD bool "fitImage update command" + depends on UPDATE_TFTP help Implements the 'fitupd' command, which allows to automatically store software updates present on a TFTP server in NOR Flash diff --git a/cmd/fitupd.c b/cmd/fitupd.c index f6270d9c15b..0f490c58fc8 100644 --- a/cmd/fitupd.c +++ b/cmd/fitupd.c @@ -8,10 +8,6 @@ #include #include -#if !defined(CONFIG_UPDATE_TFTP) -#error "CONFIG_UPDATE_TFTP required" -#endif - static int do_fitupd(struct cmd_tbl *cmdtp, int flag, int argc, char *const argv[]) { From 3e2aea790ec19ded3cf82fe27772fee4c117823e Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 26 May 2020 19:07:14 +0200 Subject: [PATCH 17/21] kconfig: mark SPL/TPL options for DM_KEYBOARD All three options had the same description. Signed-off-by: Marcin Juszkiewicz --- drivers/input/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/input/Kconfig b/drivers/input/Kconfig index a3bdd9fa346..a17e55e9972 100644 --- a/drivers/input/Kconfig +++ b/drivers/input/Kconfig @@ -21,7 +21,7 @@ config DM_KEYBOARD input and update LEDs if the keyboard has them. config SPL_DM_KEYBOARD - bool "Enable driver model keyboard support" + bool "Enable driver model keyboard support for SPL" depends on SPL_DM help This adds a uclass for keyboards and implements keyboard support @@ -30,7 +30,7 @@ config SPL_DM_KEYBOARD input and update LEDs if the keyboard has them. config TPL_DM_KEYBOARD - bool "Enable driver model keyboard support" + bool "Enable driver model keyboard support for TPL" depends on TPL_DM help This adds a uclass for keyboards and implements keyboard support From 43e442a59e523d69f6815d723ee707a80a3c94b0 Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 26 May 2020 19:07:15 +0200 Subject: [PATCH 18/21] kconfig: fix some typos Signed-off-by: Marcin Juszkiewicz --- lib/Kconfig | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/Kconfig b/lib/Kconfig index f18bf3778b9..af5c38afd98 100644 --- a/lib/Kconfig +++ b/lib/Kconfig @@ -162,7 +162,7 @@ config LIB_RAND bool "Pseudo-random library support" config LIB_HW_RAND - bool "HW Engine for random libray support" + bool "HW Engine for random library support" endchoice @@ -448,7 +448,7 @@ config ZSTD config SPL_LZ4 bool "Enable LZ4 decompression support in SPL" help - This enables support for tge LZ4 decompression algorithm in SPL. LZ4 + This enables support for the LZ4 decompression algorithm in SPL. LZ4 is a lossless data compression algorithm that is focused on fast compression and decompression speed. It belongs to the LZ77 family of byte-oriented compression schemes. @@ -456,7 +456,7 @@ config SPL_LZ4 config SPL_LZMA bool "Enable LZMA decompression support for SPL build" help - This enables support for LZMA compression altorithm for SPL boot. + This enables support for LZMA compression algorithm for SPL boot. config SPL_LZO bool "Enable LZO decompression support in SPL" From d67df1ee5fb295b74c09e643cabaaa2d89e8933c Mon Sep 17 00:00:00 2001 From: Marcin Juszkiewicz Date: Tue, 26 May 2020 19:07:16 +0200 Subject: [PATCH 19/21] kconfig: fix typo for OHCI host and add to DM list Description said that OHCI is not supported for driver model while it was converted too. Signed-off-by: Marcin Juszkiewicz --- drivers/usb/Kconfig | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/usb/Kconfig b/drivers/usb/Kconfig index 928a89133cf..756a4ec402e 100644 --- a/drivers/usb/Kconfig +++ b/drivers/usb/Kconfig @@ -39,8 +39,8 @@ config DM_USB help Enable driver model for USB. The USB interface is then implemented by the USB uclass. Multiple USB controllers of different types - (XHCI, EHCI) can be attached and used. The 'usb' command works as - normal. OCHI is not supported at present. + (XHCI, EHCI, OHCI) can be attached and used. The 'usb' command works + as normal. Much of the code is shared but with this option enabled the USB uclass takes care of device enumeration. USB devices can be From 4f6abf159a17a3923fa40d7fc7e46d09ad24c055 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Danis?= Date: Wed, 20 May 2020 09:13:26 +0200 Subject: [PATCH 20/21] bootcount_ext: Add Ext4 build dependency MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit This config option depends on EXT4 support. If Ext4 write capability is not selected, it generate write error messages and is unable to maintain boot counter. Signed-off-by: Frédéric Danis --- drivers/bootcount/Kconfig | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/bootcount/Kconfig b/drivers/bootcount/Kconfig index 0356f8ba181..c8e6fa7f892 100644 --- a/drivers/bootcount/Kconfig +++ b/drivers/bootcount/Kconfig @@ -27,6 +27,8 @@ config BOOTCOUNT_GENERIC config BOOTCOUNT_EXT bool "Boot counter on EXT filesystem" + depends on FS_EXT4 + select EXT4_WRITE help Add support for maintaining boot count in a file on an EXT filesystem. From 9f8aa0fbee40b66ceeaab06d3a0ce9a7a7d692a7 Mon Sep 17 00:00:00 2001 From: Masahiro Yamada Date: Wed, 20 May 2020 11:43:34 +0900 Subject: [PATCH 21/21] ARM: add psci_arch_init() declaration for CONFIG_ARMV7_PSCI arch/arm/include/asm/system.h declares psci_arch_init(), but it is surrounded by #ifdef CONFIG_ARMV8_PSCI. psci_arch_init() is called for CONFIG_ARMV7_PSCI too. Add the missing function declaration. Signed-off-by: Masahiro Yamada --- arch/arm/include/asm/system.h | 1 + 1 file changed, 1 insertion(+) diff --git a/arch/arm/include/asm/system.h b/arch/arm/include/asm/system.h index 1e3f574403a..7a40b56acdc 100644 --- a/arch/arm/include/asm/system.h +++ b/arch/arm/include/asm/system.h @@ -528,6 +528,7 @@ void mmu_page_table_flush(unsigned long start, unsigned long stop); #ifdef CONFIG_ARMV7_PSCI void psci_arch_cpu_entry(void); +void psci_arch_init(void); u32 psci_version(void); s32 psci_features(u32 function_id, u32 psci_fid); s32 psci_cpu_off(void);