diff --git a/01_git_sync.sh b/01_git_sync.sh index 6db690e..30a1c48 100755 --- a/01_git_sync.sh +++ b/01_git_sync.sh @@ -6,12 +6,10 @@ GCC_VERSION="11.4.0" HSS_BRANCH="v2023.02" HSS_REPO="https://github.com/polarfire-soc/hart-software-services.git" -#UBOOT_BRANCH="mpfs-uboot-2022.01" -#UBOOT_BRANCH="linux4microchip+fpga-2023.02" -#UBOOT_REPO="https://github.com/polarfire-soc/u-boot.git" -UBOOT_BRANCH="v2023.02-BeagleV-Fire" -UBOOT_REPO="https://github.com/beagleboard/beaglev-fire-u-boot.git" -#UBOOT_REPO="git@openbeagle.org:beaglev-fire/beaglev-fire-u-boot.git" +#UBOOT_BRANCH="v2023.02-BeagleV-Fire" +#UBOOT_REPO="https://openbeagle.org/beaglev-fire/beaglev-fire-u-boot.git" +UBOOT_BRANCH="linux4microchip+fpga-2025.03" +UBOOT_REPO="https://github.com/linux4microchip/u-boot-mchp.git" DT_BRANCH="v6.6.x-Beagle" DT_REPO="https://github.com/beagleboard/BeagleBoard-DeviceTrees.git" diff --git a/03_build_u-boot.sh b/03_build_u-boot.sh index d2f276d..cdc81da 100755 --- a/03_build_u-boot.sh +++ b/03_build_u-boot.sh @@ -4,19 +4,27 @@ CORES=$(getconf _NPROCESSORS_ONLN) wdir=`pwd` CC=${CC:-"${wdir}/riscv-toolchain/bin/riscv64-linux-"} -make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} distclean +cd ./u-boot/ -make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} microchip_mpfs_icicle_defconfig -#make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} menuconfig +if [ ! -f ./.patched ] ; then + if [ -f configs/beaglev_fire_defconfig ] ; then + git am ../patches/u-boot/0001-drivers-mailbox-mpfs-mbox-add-missing-include.patch + git am ../patches/u-boot/0002-board-beagle-beaglev_fire-fix-compilation-warning.patch + fi + touch .patched +fi -make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} olddefconfig +make ARCH=riscv CROSS_COMPILE=${CC} distclean -make -C u-boot ARCH=riscv CROSS_COMPILE=${CC} savedefconfig -cp -v ./u-boot/defconfig ./u-boot/configs/microchip_mpfs_icicle_defconfig -cp -v ./u-boot/defconfig ./patches/u-boot/beaglev-fire/microchip_mpfs_icicle_defconfig +make ARCH=riscv CROSS_COMPILE=${CC} beaglev_fire_defconfig +#make ARCH=riscv CROSS_COMPILE=${CC} menuconfig -echo "make -C u-boot -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} all" -make -C u-boot -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} all +make ARCH=riscv CROSS_COMPILE=${CC} olddefconfig + +echo "make -j${CORES} ARCH=riscv CROSS_COMPILE=${CC} all" +make ARCH=riscv CROSS_COMPILE=${CC} all + +cd ../ cp -v ./u-boot/u-boot.bin ./deploy/ cp -v ./u-boot/u-boot.bin ./deploy/src.bin diff --git a/patches/u-boot/0001-drivers-mailbox-mpfs-mbox-add-missing-include.patch b/patches/u-boot/0001-drivers-mailbox-mpfs-mbox-add-missing-include.patch new file mode 100644 index 0000000..d2fd899 --- /dev/null +++ b/patches/u-boot/0001-drivers-mailbox-mpfs-mbox-add-missing-include.patch @@ -0,0 +1,28 @@ +From 57872430bba5228024b5089f3daa78935414a567 Mon Sep 17 00:00:00 2001 +From: Jamie Gibbons +Date: Fri, 13 Jun 2025 11:23:03 +0100 +Subject: [PATCH 1/2] drivers: mailbox: mpfs-mbox: add missing include + +Implicit declaration of function dev_set_priv() compilation warning due +to a missing include. Add missing include to fix warning. + +Signed-off-by: Jamie Gibbons +--- + drivers/mailbox/mpfs-mbox.c | 1 + + 1 file changed, 1 insertion(+) + +diff --git a/drivers/mailbox/mpfs-mbox.c b/drivers/mailbox/mpfs-mbox.c +index 699fdfd2..55238847 100644 +--- a/drivers/mailbox/mpfs-mbox.c ++++ b/drivers/mailbox/mpfs-mbox.c +@@ -10,6 +10,7 @@ + + #include + #include ++#include + #include + #include + #include +-- +2.39.5 + diff --git a/patches/u-boot/0002-board-beagle-beaglev_fire-fix-compilation-warning.patch b/patches/u-boot/0002-board-beagle-beaglev_fire-fix-compilation-warning.patch new file mode 100644 index 0000000..f9df14c --- /dev/null +++ b/patches/u-boot/0002-board-beagle-beaglev_fire-fix-compilation-warning.patch @@ -0,0 +1,41 @@ +From bd2c0909eafd30c93f8a54c87efbb18e69c5c63b Mon Sep 17 00:00:00 2001 +From: Jamie Gibbons +Date: Fri, 13 Jun 2025 11:23:05 +0100 +Subject: [PATCH 2/2] board: beagle: beaglev_fire: fix compilation warning + +Pointer not initialised prior to usage. Fix uninitialised pointer +compilation warning by ensuring correct initialisation before use. + +Signed-off-by: Jamie Gibbons +--- + board/beagle/beaglev_fire/beaglev_fire.c | 8 ++++---- + 1 file changed, 4 insertions(+), 4 deletions(-) + +diff --git a/board/beagle/beaglev_fire/beaglev_fire.c b/board/beagle/beaglev_fire/beaglev_fire.c +index a95a6972..443ff612 100644 +--- a/board/beagle/beaglev_fire/beaglev_fire.c ++++ b/board/beagle/beaglev_fire/beaglev_fire.c +@@ -47,16 +47,16 @@ int board_late_init(void) + struct udevice *dev; + struct mpfs_sys_serv *sys_serv_priv; + +- sys_serv_priv = devm_kzalloc(dev, sizeof(*sys_serv_priv), GFP_KERNEL); +- if (!sys_serv_priv) +- return -ENOMEM; +- + ret = uclass_get_device_by_name(UCLASS_MISC, "syscontroller", &dev); + if (ret) { + debug("%s: system controller setup failed\n", __func__); + return ret; + } + ++ sys_serv_priv = devm_kzalloc(dev, sizeof(*sys_serv_priv), GFP_KERNEL); ++ if (!sys_serv_priv) ++ return -ENOMEM; ++ + sys_serv_priv->dev = dev; + + sys_serv_priv->sys_controller = mpfs_syscontroller_get(dev); +-- +2.39.5 + diff --git a/patches/u-boot/beaglev-fire/microchip-mpfs-icicle-kit.dts b/patches/u-boot/beaglev-fire/microchip-mpfs-icicle-kit.dts deleted file mode 100644 index d6535df..0000000 --- a/patches/u-boot/beaglev-fire/microchip-mpfs-icicle-kit.dts +++ /dev/null @@ -1,215 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (C) 2021 Microchip Technology Inc. - * Padmarao Begari - */ - -/dts-v1/; - -#include "microchip-mpfs.dtsi" - -/* Clock frequency (in Hz) of the rtcclk */ -#define RTCCLK_FREQ 1000000 - -/ { - model = "Microchip PolarFire-SoC Icicle Kit"; - compatible = "microchip,mpfs-icicle-reference-rtlv2210", "microchip,mpfs-icicle-kit", - "microchip,mpfs"; - - aliases { - serial0 = &uart0; - ethernet0 = &mac1; - spi0 = &qspi; - }; - - chosen { - stdout-path = "serial0"; - }; - - cpus { - timebase-frequency = ; - }; - - kernel: memory@80000000 { - device_type = "memory"; - reg = <0x0 0x80000000 0x0 0x4000000>; - label = "kernel"; - }; - - ddr_cached_low: memory@8a000000 { - device_type = "memory"; - reg = <0x0 0x8a000000 0x0 0x8000000>; - label = "cached-low"; - }; - - ddr_non_cached_low: memory@c4000000 { - device_type = "memory"; - reg = <0x0 0xc4000000 0x0 0x6000000>; - label = "non-cached-low"; - }; - - ddr_cached_high: memory@1022000000 { - device_type = "memory"; - reg = <0x10 0x22000000 0x0 0x5e000000>; - label = "cached-high"; - }; - - ddr_non_cached_high: memory@1412000000 { - device_type = "memory"; - reg = <0x14 0x12000000 0x0 0x10000000>; - label = "non-cached-high"; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - hss: hss-buffer { - compatible = "shared-dma-pool"; - reg = <0x10 0x3fc00000 0x0 0x400000>; - no-map; - }; - - dma_non_cached_low: non-cached-low-buffer { - compatible = "shared-dma-pool"; - size = <0x0 0x4000000>; - no-map; - linux,dma-default; - alloc-ranges = <0x0 0xc4000000 0x0 0x4000000>; - dma-ranges = <0x0 0xc4000000 0x0 0xc4000000 0x0 0x4000000>; - }; - - dma_non_cached_high: non-cached-high-buffer { - compatible = "shared-dma-pool"; - size = <0x0 0x10000000>; - no-map; - linux,dma-default; - alloc-ranges = <0x14 0x12000000 0x0 0x10000000>; - dma-ranges = <0x14 0x12000000 0x14 0x12000000 0x0 0x10000000>; - }; - - fabricbuf0ddrc: buffer@88000000 { - compatible = "shared-dma-pool"; - reg = <0x0 0x88000000 0x0 0x2000000>; - no-map; - }; - - fabricbuf1ddrnc: buffer@c8000000 { - compatible = "shared-dma-pool"; - reg = <0x0 0xc8000000 0x0 0x2000000>; - no-map; - }; - - fabricbuf2ddrncwcb: buffer@d8000000 { - compatible = "shared-dma-pool"; - reg = <0x0 0xd8000000 0x0 0x2000000>; - no-map; - }; - }; - - udmabuf0 { - compatible = "ikwzm,u-dma-buf"; - device-name = "udmabuf-ddr-c0"; - minor-number = <0>; - size = <0x0 0x2000000>; - memory-region = <&fabricbuf0ddrc>; - sync-mode = <3>; - }; - - udmabuf1 { - compatible = "ikwzm,u-dma-buf"; - device-name = "udmabuf-ddr-nc0"; - minor-number = <1>; - size = <0x0 0x2000000>; - memory-region = <&fabricbuf1ddrnc>; - sync-mode = <3>; - }; - - udmabuf2 { - compatible = "ikwzm,u-dma-buf"; - device-name = "udmabuf-ddr-nc-wcb0"; - minor-number = <2>; - size = <0x0 0x2000000>; - memory-region = <&fabricbuf2ddrncwcb>; - sync-mode = <3>; - }; -}; - -&refclk { - clock-frequency = <125000000>; -}; - -&uart1 { - status = "okay"; -}; - -&mmc { - status = "okay"; - bus-width = <4>; - disable-wp; - cap-mmc-highspeed; - cap-sd-highspeed; - card-detect-delay = <200>; - mmc-ddr-1_8v; - mmc-hs200-1_8v; - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; -}; - -&i2c1 { - status = "okay"; - clock-frequency = <100000>; - - pac193x: pac193x@10 { - compatible = "microchip,pac1934"; - reg = <0x10>; - samp-rate = <64>; - status = "okay"; - ch1: channel0 { - uohms-shunt-res = <10000>; - rail-name = "VDDREG"; - channel_enabled; - }; - ch2: channel1 { - uohms-shunt-res = <10000>; - rail-name = "VDDA25"; - channel_enabled; - }; - ch3: channel2 { - uohms-shunt-res = <10000>; - rail-name = "VDD25"; - channel_enabled; - }; - ch4: channel3 { - uohms-shunt-res = <10000>; - rail-name = "VDDA_REG"; - channel_enabled; - }; - }; -}; - -&mac1 { - status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&phy1>; - phy1: ethernet-phy@9 { - reg = <9>; - }; -}; - -&qspi { - status = "okay"; - num-cs = <1>; - flash0: spi-nand@0 { - compatible = "spi-nand"; - reg = <0x0>; - spi-tx-bus-width = <4>; - spi-rx-bus-width = <4>; - spi-max-frequency = <20000000>; - spi-cpol; - spi-cpha; - }; -}; diff --git a/patches/u-boot/beaglev-fire/microchip_mpfs_icicle.h b/patches/u-boot/beaglev-fire/microchip_mpfs_icicle.h deleted file mode 100644 index 9ef5425..0000000 --- a/patches/u-boot/beaglev-fire/microchip_mpfs_icicle.h +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Microchip Technology Inc. - * Padmarao Begari - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CONFIG_SYS_SDRAM_BASE 0x80000000 -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_2M) - -#define CONFIG_SYS_BOOTM_LEN SZ_64M - -#define CONFIG_STANDALONE_LOAD_ADDR 0x80200000 - -/* Environment options */ - -#if defined(CONFIG_CMD_DHCP) -#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) -#else -#define BOOT_TARGET_DEVICES_DHCP(func) -#endif - -#if defined(CONFIG_CMD_MTD) -# define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, na) -#else -# define BOOT_TARGET_DEVICES_QSPI(func) -#endif - -#if defined(CONFIG_CMD_MMC) -#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) -#else -#define BOOT_TARGET_DEVICES_MMC(func) -#endif - -#define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \ - "bootcmd_qspi=echo Trying to boot from QSPI...; "\ - "setenv scriptname boot.scr.uimg; " \ - "if mtd list; then setenv mtd_present true; " \ - "mtd read env ${scriptaddr} 0; " \ - "source ${scriptaddr}; setenv mtd_present; " \ - "fi\0 " - -#define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \ - "qspi " - -#define BOOT_TARGET_DEVICES(func) \ - BOOT_TARGET_DEVICES_QSPI(func)\ - BOOT_TARGET_DEVICES_MMC(func)\ - BOOT_TARGET_DEVICES_DHCP(func) - -#define BOOTENV_DESIGN_OVERLAYS \ - "design_overlays=" \ - "if test -n ${no_of_overlays}; then " \ - "setenv inc 1; " \ - "setenv idx 0; " \ - "fdt resize ${dtbo_size}; " \ - "while test $idx -ne ${no_of_overlays}; do " \ - "setenv dtbo_name dtbo_image${idx}; " \ - "setenv fdt_cmd \"fdt apply $\"$dtbo_name; " \ - "run fdt_cmd; " \ - "setexpr idx $inc + $idx; " \ - "done; " \ - "fi;\0 " \ - -#include - -#define CONFIG_EXTRA_ENV_SETTINGS \ - "bootm_size=0x10000000\0" \ - "scriptaddr=0x8e000000\0" \ - BOOTENV_DESIGN_OVERLAYS \ - BOOTENV \ - -#endif /* __CONFIG_H */ diff --git a/patches/u-boot/beaglev-fire/microchip_mpfs_icicle_defconfig b/patches/u-boot/beaglev-fire/microchip_mpfs_icicle_defconfig deleted file mode 100644 index 0ef91c5..0000000 --- a/patches/u-boot/beaglev-fire/microchip_mpfs_icicle_defconfig +++ /dev/null @@ -1,21 +0,0 @@ -CONFIG_RISCV=y -CONFIG_SYS_MALLOC_LEN=0x800000 -CONFIG_SYS_MALLOC_F_LEN=0x2000 -CONFIG_ENV_SIZE=0x2000 -CONFIG_DEFAULT_DEVICE_TREE="microchip-mpfs-icicle-kit" -CONFIG_TARGET_MICROCHIP_ICICLE=y -CONFIG_ARCH_RV64I=y -CONFIG_RISCV_SMODE=y -CONFIG_DISTRO_DEFAULTS=y -CONFIG_SYS_LOAD_ADDR=0x80200000 -CONFIG_FIT=y -CONFIG_DISPLAY_CPUINFO=y -CONFIG_DISPLAY_BOARDINFO=y -CONFIG_SYS_PROMPT="RISC-V # " -CONFIG_CMD_MMC_SWRITE=y -CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-nand0:2m(payload),128k(env),119m(rootfs)" -CONFIG_CMD_UBI=y -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_BOOTP_SEND_HOSTNAME=y -CONFIG_DM_MTD=y -CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/patches/u-boot/original/microchip-mpfs-icicle-kit.dts b/patches/u-boot/original/microchip-mpfs-icicle-kit.dts deleted file mode 100644 index 09722a0..0000000 --- a/patches/u-boot/original/microchip-mpfs-icicle-kit.dts +++ /dev/null @@ -1,215 +0,0 @@ -// SPDX-License-Identifier: (GPL-2.0+ OR MIT) -/* - * Copyright (C) 2021 Microchip Technology Inc. - * Padmarao Begari - */ - -/dts-v1/; - -#include "microchip-mpfs.dtsi" - -/* Clock frequency (in Hz) of the rtcclk */ -#define RTCCLK_FREQ 1000000 - -/ { - model = "Microchip PolarFire-SoC Icicle Kit"; - compatible = "microchip,mpfs-icicle-reference-rtlv2210", "microchip,mpfs-icicle-kit", - "microchip,mpfs"; - - aliases { - serial1 = &uart1; - ethernet0 = &mac1; - spi0 = &qspi; - }; - - chosen { - stdout-path = "serial1"; - }; - - cpus { - timebase-frequency = ; - }; - - kernel: memory@80000000 { - device_type = "memory"; - reg = <0x0 0x80000000 0x0 0x4000000>; - label = "kernel"; - }; - - ddr_cached_low: memory@8a000000 { - device_type = "memory"; - reg = <0x0 0x8a000000 0x0 0x8000000>; - label = "cached-low"; - }; - - ddr_non_cached_low: memory@c4000000 { - device_type = "memory"; - reg = <0x0 0xc4000000 0x0 0x6000000>; - label = "non-cached-low"; - }; - - ddr_cached_high: memory@1022000000 { - device_type = "memory"; - reg = <0x10 0x22000000 0x0 0x5e000000>; - label = "cached-high"; - }; - - ddr_non_cached_high: memory@1412000000 { - device_type = "memory"; - reg = <0x14 0x12000000 0x0 0x10000000>; - label = "non-cached-high"; - }; - - reserved-memory { - #address-cells = <2>; - #size-cells = <2>; - ranges; - - hss: hss-buffer { - compatible = "shared-dma-pool"; - reg = <0x10 0x3fc00000 0x0 0x400000>; - no-map; - }; - - dma_non_cached_low: non-cached-low-buffer { - compatible = "shared-dma-pool"; - size = <0x0 0x4000000>; - no-map; - linux,dma-default; - alloc-ranges = <0x0 0xc4000000 0x0 0x4000000>; - dma-ranges = <0x0 0xc4000000 0x0 0xc4000000 0x0 0x4000000>; - }; - - dma_non_cached_high: non-cached-high-buffer { - compatible = "shared-dma-pool"; - size = <0x0 0x10000000>; - no-map; - linux,dma-default; - alloc-ranges = <0x14 0x12000000 0x0 0x10000000>; - dma-ranges = <0x14 0x12000000 0x14 0x12000000 0x0 0x10000000>; - }; - - fabricbuf0ddrc: buffer@88000000 { - compatible = "shared-dma-pool"; - reg = <0x0 0x88000000 0x0 0x2000000>; - no-map; - }; - - fabricbuf1ddrnc: buffer@c8000000 { - compatible = "shared-dma-pool"; - reg = <0x0 0xc8000000 0x0 0x2000000>; - no-map; - }; - - fabricbuf2ddrncwcb: buffer@d8000000 { - compatible = "shared-dma-pool"; - reg = <0x0 0xd8000000 0x0 0x2000000>; - no-map; - }; - }; - - udmabuf0 { - compatible = "ikwzm,u-dma-buf"; - device-name = "udmabuf-ddr-c0"; - minor-number = <0>; - size = <0x0 0x2000000>; - memory-region = <&fabricbuf0ddrc>; - sync-mode = <3>; - }; - - udmabuf1 { - compatible = "ikwzm,u-dma-buf"; - device-name = "udmabuf-ddr-nc0"; - minor-number = <1>; - size = <0x0 0x2000000>; - memory-region = <&fabricbuf1ddrnc>; - sync-mode = <3>; - }; - - udmabuf2 { - compatible = "ikwzm,u-dma-buf"; - device-name = "udmabuf-ddr-nc-wcb0"; - minor-number = <2>; - size = <0x0 0x2000000>; - memory-region = <&fabricbuf2ddrncwcb>; - sync-mode = <3>; - }; -}; - -&refclk { - clock-frequency = <125000000>; -}; - -&uart1 { - status = "okay"; -}; - -&mmc { - status = "okay"; - bus-width = <4>; - disable-wp; - cap-mmc-highspeed; - cap-sd-highspeed; - card-detect-delay = <200>; - mmc-ddr-1_8v; - mmc-hs200-1_8v; - sd-uhs-sdr12; - sd-uhs-sdr25; - sd-uhs-sdr50; - sd-uhs-sdr104; -}; - -&i2c1 { - status = "okay"; - clock-frequency = <100000>; - - pac193x: pac193x@10 { - compatible = "microchip,pac1934"; - reg = <0x10>; - samp-rate = <64>; - status = "okay"; - ch1: channel0 { - uohms-shunt-res = <10000>; - rail-name = "VDDREG"; - channel_enabled; - }; - ch2: channel1 { - uohms-shunt-res = <10000>; - rail-name = "VDDA25"; - channel_enabled; - }; - ch3: channel2 { - uohms-shunt-res = <10000>; - rail-name = "VDD25"; - channel_enabled; - }; - ch4: channel3 { - uohms-shunt-res = <10000>; - rail-name = "VDDA_REG"; - channel_enabled; - }; - }; -}; - -&mac1 { - status = "okay"; - phy-mode = "sgmii"; - phy-handle = <&phy1>; - phy1: ethernet-phy@9 { - reg = <9>; - }; -}; - -&qspi { - status = "okay"; - num-cs = <1>; - flash0: spi-nand@0 { - compatible = "spi-nand"; - reg = <0x0>; - spi-tx-bus-width = <4>; - spi-rx-bus-width = <4>; - spi-max-frequency = <20000000>; - spi-cpol; - spi-cpha; - }; -}; diff --git a/patches/u-boot/original/microchip_mpfs_icicle.h b/patches/u-boot/original/microchip_mpfs_icicle.h deleted file mode 100644 index 9ef5425..0000000 --- a/patches/u-boot/original/microchip_mpfs_icicle.h +++ /dev/null @@ -1,77 +0,0 @@ -/* SPDX-License-Identifier: GPL-2.0+ */ -/* - * Copyright (C) 2019 Microchip Technology Inc. - * Padmarao Begari - */ - -#ifndef __CONFIG_H -#define __CONFIG_H - -#include - -#define CONFIG_SYS_SDRAM_BASE 0x80000000 -#define CONFIG_SYS_INIT_SP_ADDR (CONFIG_SYS_SDRAM_BASE + SZ_2M) - -#define CONFIG_SYS_BOOTM_LEN SZ_64M - -#define CONFIG_STANDALONE_LOAD_ADDR 0x80200000 - -/* Environment options */ - -#if defined(CONFIG_CMD_DHCP) -#define BOOT_TARGET_DEVICES_DHCP(func) func(DHCP, dhcp, na) -#else -#define BOOT_TARGET_DEVICES_DHCP(func) -#endif - -#if defined(CONFIG_CMD_MTD) -# define BOOT_TARGET_DEVICES_QSPI(func) func(QSPI, qspi, na) -#else -# define BOOT_TARGET_DEVICES_QSPI(func) -#endif - -#if defined(CONFIG_CMD_MMC) -#define BOOT_TARGET_DEVICES_MMC(func) func(MMC, mmc, 0) -#else -#define BOOT_TARGET_DEVICES_MMC(func) -#endif - -#define BOOTENV_DEV_QSPI(devtypeu, devtypel, instance) \ - "bootcmd_qspi=echo Trying to boot from QSPI...; "\ - "setenv scriptname boot.scr.uimg; " \ - "if mtd list; then setenv mtd_present true; " \ - "mtd read env ${scriptaddr} 0; " \ - "source ${scriptaddr}; setenv mtd_present; " \ - "fi\0 " - -#define BOOTENV_DEV_NAME_QSPI(devtypeu, devtypel, instance) \ - "qspi " - -#define BOOT_TARGET_DEVICES(func) \ - BOOT_TARGET_DEVICES_QSPI(func)\ - BOOT_TARGET_DEVICES_MMC(func)\ - BOOT_TARGET_DEVICES_DHCP(func) - -#define BOOTENV_DESIGN_OVERLAYS \ - "design_overlays=" \ - "if test -n ${no_of_overlays}; then " \ - "setenv inc 1; " \ - "setenv idx 0; " \ - "fdt resize ${dtbo_size}; " \ - "while test $idx -ne ${no_of_overlays}; do " \ - "setenv dtbo_name dtbo_image${idx}; " \ - "setenv fdt_cmd \"fdt apply $\"$dtbo_name; " \ - "run fdt_cmd; " \ - "setexpr idx $inc + $idx; " \ - "done; " \ - "fi;\0 " \ - -#include - -#define CONFIG_EXTRA_ENV_SETTINGS \ - "bootm_size=0x10000000\0" \ - "scriptaddr=0x8e000000\0" \ - BOOTENV_DESIGN_OVERLAYS \ - BOOTENV \ - -#endif /* __CONFIG_H */ diff --git a/patches/u-boot/original/microchip_mpfs_icicle_defconfig b/patches/u-boot/original/microchip_mpfs_icicle_defconfig deleted file mode 100644 index 13725c5..0000000 --- a/patches/u-boot/original/microchip_mpfs_icicle_defconfig +++ /dev/null @@ -1,25 +0,0 @@ -CONFIG_RISCV=y -CONFIG_SYS_MALLOC_LEN=0x800000 -CONFIG_SYS_MALLOC_F_LEN=0x2000 -CONFIG_ENV_SIZE=0x2000 -CONFIG_DEFAULT_DEVICE_TREE="microchip-mpfs-icicle-kit" -CONFIG_TARGET_MICROCHIP_ICICLE=y -CONFIG_ARCH_RV64I=y -CONFIG_RISCV_SMODE=y -CONFIG_DISTRO_DEFAULTS=y -CONFIG_SYS_LOAD_ADDR=0x80200000 -CONFIG_FIT=y -CONFIG_DISPLAY_CPUINFO=y -CONFIG_DISPLAY_BOARDINFO=y -CONFIG_SYS_PROMPT="RISC-V # " -CONFIG_SYS_RELOC_GD_ENV_ADDR=y -CONFIG_BOOTP_SEND_HOSTNAME=y -CONFIG_DM_MTD=y -CONFIG_CMD_MTDPARTS=y -CONFIG_MTDPARTS_DEFAULT="mtdparts=spi-nand0:2m(payload),128k(env),119m(rootfs)" -CONFIG_CMD_UBI=y -CONFIG_CMD_UBIFS=y -CONFIG_MTD_UBI=y -CONFIG_MTD_UBI_WL_THRESHOLD=4096 -CONFIG_MTD_UBI_BEB_LIMIT=20 -CONFIG_OF_LIBFDT_OVERLAY=y diff --git a/patches/u-boot/uboot-env.txt b/patches/u-boot/uboot-env.txt deleted file mode 100644 index 06147b3..0000000 --- a/patches/u-boot/uboot-env.txt +++ /dev/null @@ -1,17 +0,0 @@ -# this assumes ${scriptaddr} is already set!! - -# Try to boot a fitImage from eMMC/SD - -setenv fdt_high 0xffffffffffffffff -setenv initrd_high 0xffffffffffffffff - -load mmc 0:${distro_bootpart} ${scriptaddr} beaglev_fire.itb; -bootm start ${scriptaddr}#kernel_dtb; -bootm loados ${scriptaddr}; -# Try to load a ramdisk if available inside fitImage -bootm ramdisk; -bootm prep; -fdt set /soc/ethernet@20112000 mac-address ${icicle_mac_addr0}; -fdt set /soc/ethernet@20110000 mac-address ${icicle_mac_addr1}; -run design_overlays; -bootm go;