Commit 0b099335 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Upgraded u-boot to 2021.04

parent 918df1a6
opiplus2e: opiplus2e-boot-cmd opiplus2e-fw_env.config
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-serial-number-fix.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-sunxi_env_in_mmc0.patch
$(MAKE) -C u-boot-2020.04 orangepi_plus2e_defconfig
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2020.04/.config
@echo "# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_OFFSET=0x88000" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-sunxi_env_in_mmc0.patch
$(MAKE) -C u-boot-2021.04 orangepi_plus2e_defconfig
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_OFFSET=0x88000" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mkdir /uboot
mkfs -t vfat -n UBOOT /dev/$(DISK)1
sed -i '/\/dev\/root/a \/dev\/disk\/by-label\/UBOOT \/uboot vfat defaults,sync,auto 0 0' /etc/fstab
mount /dev/$(DISK)1 /uboot
dd if=u-boot-2020.04/u-boot-sunxi-with-spl.bin of=/dev/$(ROOT_DEVICE) bs=1024 seek=8
@echo "$$BOOTCMD_OPIPLUS2E" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
dd if=u-boot-2021.04/u-boot-sunxi-with-spl.bin of=/dev/$(ROOT_DEVICE) bs=1024 seek=8
@echo "$$BOOTCMD_OPIPLUS2E" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_OPIPLUS2E" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
opiplus2e-boot-cmd:
define BOOTCMD_OPIPLUS2E
load mmc 0:2 $${kernel_addr_r} boot/zImage
load mmc 0:2 $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait elevator=noop quiet loglevel=3 systemd.show_status=1
setenv bootargs console=tty1 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait quiet loglevel=3 systemd.show_status=1
bootz $${kernel_addr_r} - $${fdt_addr_r}
endef
export BOOTCMD_OPIPLUS2E
......@@ -42,47 +42,47 @@ endef
export FW_ENV_OPIPLUS2E
opiplus2e-mender: opiplus2e-boot-cmd-mender opiplus2e-fw_env.config-mender
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-serial-number-fix.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-mender.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-sunxi_wdt.patch
$(MAKE) -C u-boot-2020.04 orangepi_plus2e_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2020.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2020.04/.config
@echo "CONFIG_WDT=y" >> u-boot-2020.04/.config
@echo "# CONFIG_CMD_WDT is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_AT91 is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_CDNS is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_CORTINA is not set" >> u-boot-2020.04/.config
@echo "CONFIG_WDT_SUNXI=y" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_SP805 is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_STM32MP is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_XILINX_TB_WATCHDOG is not set" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-mender.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-sunxi_wdt.patch
$(MAKE) -C u-boot-2021.04 orangepi_plus2e_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2021.04/.config
@echo "CONFIG_WDT=y" >> u-boot-2021.04/.config
@echo "# CONFIG_CMD_WDT is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_AT91 is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_CDNS is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_CORTINA is not set" >> u-boot-2021.04/.config
@echo "CONFIG_WDT_SUNXI=y" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_SP805 is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_STM32MP is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_XILINX_TB_WATCHDOG is not set" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mount /dev/$(DISK)1 /uboot
dd if=/dev/zero of=/dev/$(ROOT_DEVICE) bs=512 seek=1 count=49151
dd if=u-boot-2020.04/u-boot-sunxi-with-spl.bin of=/dev/$(ROOT_DEVICE) bs=1024 seek=8
@echo "$$BOOTCMD_OPIPLUS2E_MENDER" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
dd if=u-boot-2021.04/u-boot-sunxi-with-spl.bin of=/dev/$(ROOT_DEVICE) bs=1024 seek=8
@echo "$$BOOTCMD_OPIPLUS2E_MENDER" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_OPIPLUS2E_MENDER" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
opiplus2e-boot-cmd-mender:
define BOOTCMD_OPIPLUS2E_MENDER
run mender_setup
load $${mender_uboot_root} $${kernel_addr_r} boot/zImage
load $${mender_uboot_root} $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait elevator=noop sunxi-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait sunxi-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
bootz $${kernel_addr_r} - $${fdt_addr_r}
run mender_try_to_recover
endef
......@@ -96,38 +96,38 @@ endef
export FW_ENV_OPIPLUS2E_MENDER
opipcplus: opipcplus-boot-cmd opipcplus-fw_env.config
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-serial-number-fix.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-sunxi_env_in_mmc0.patch
$(MAKE) -C u-boot-2020.04 orangepi_pc_plus_defconfig
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2020.04/.config
@echo "# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_OFFSET=0x88000" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-sunxi_env_in_mmc0.patch
$(MAKE) -C u-boot-2021.04 orangepi_pc_plus_defconfig
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_OFFSET=0x88000" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mkdir /uboot
mkfs -t vfat -n UBOOT /dev/$(DISK)1
sed -i '/\/dev\/root/a \/dev\/disk\/by-label\/UBOOT \/uboot vfat defaults,sync,auto 0 0' /etc/fstab
mount /dev/$(DISK)1 /uboot
dd if=u-boot-2020.04/u-boot-sunxi-with-spl.bin of=/dev/$(ROOT_DEVICE) bs=1024 seek=8
@echo "$$BOOTCMD_OPIPCPLUS" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
dd if=u-boot-2021.04/u-boot-sunxi-with-spl.bin of=/dev/$(ROOT_DEVICE) bs=1024 seek=8
@echo "$$BOOTCMD_OPIPCPLUS" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_OPIPCPLUS" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
opipcplus-boot-cmd:
define BOOTCMD_OPIPCPLUS
load mmc 0:2 $${kernel_addr_r} boot/zImage
load mmc 0:2 $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait elevator=noop quiet loglevel=3 systemd.show_status=1
setenv bootargs console=tty1 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait quiet loglevel=3 systemd.show_status=1
bootz $${kernel_addr_r} - $${fdt_addr_r}
endef
export BOOTCMD_OPIPCPLUS
......@@ -139,47 +139,47 @@ endef
export FW_ENV_OPIPCPLUS
opipcplus-mender: opipcplus-boot-cmd-mender opipcplus-fw_env.config-mender
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-serial-number-fix.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-mender.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-sunxi_wdt.patch
$(MAKE) -C u-boot-2020.04 orangepi_pc_plus_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2020.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2020.04/.config
@echo "CONFIG_WDT=y" >> u-boot-2020.04/.config
@echo "# CONFIG_CMD_WDT is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_AT91 is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_CDNS is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_CORTINA is not set" >> u-boot-2020.04/.config
@echo "CONFIG_WDT_SUNXI=y" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_SP805 is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_STM32MP is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_XILINX_TB_WATCHDOG is not set" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-mender.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-sunxi_wdt.patch
$(MAKE) -C u-boot-2021.04 orangepi_pc_plus_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2021.04/.config
@echo "CONFIG_WDT=y" >> u-boot-2021.04/.config
@echo "# CONFIG_CMD_WDT is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_AT91 is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_CDNS is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_CORTINA is not set" >> u-boot-2021.04/.config
@echo "CONFIG_WDT_SUNXI=y" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_SP805 is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_STM32MP is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_XILINX_TB_WATCHDOG is not set" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mount /dev/$(DISK)1 /uboot
dd if=/dev/zero of=/dev/$(ROOT_DEVICE) bs=512 seek=1 count=49151
dd if=u-boot-2020.04/u-boot-sunxi-with-spl.bin of=/dev/$(ROOT_DEVICE) bs=1024 seek=8
@echo "$$BOOTCMD_OPIPCPLUS_MENDER" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
dd if=u-boot-2021.04/u-boot-sunxi-with-spl.bin of=/dev/$(ROOT_DEVICE) bs=1024 seek=8
@echo "$$BOOTCMD_OPIPCPLUS_MENDER" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_OPIPCPLUS_MENDER" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
opipcplus-boot-cmd-mender:
define BOOTCMD_OPIPCPLUS_MENDER
run mender_setup
load $${mender_uboot_root} $${kernel_addr_r} boot/zImage
load $${mender_uboot_root} $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait elevator=noop sunxi-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait sunxi-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
bootz $${kernel_addr_r} - $${fdt_addr_r}
run mender_try_to_recover
endef
......@@ -192,42 +192,141 @@ define FW_ENV_OPIPCPLUS_MENDER
endef
export FW_ENV_OPIPCPLUS_MENDER
opi3lts: opi3lts-boot-cmd opi3lts-fw_env.config
tar xf arm-trusted-firmware.tar.xz
$(MAKE) -C arm-trusted-firmware PLAT=sun50i_h6 DEBUG=0 SUNXI_SETUP_REGULATORS=0 bl31
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-orangepi-3-lts.patch
cp arm-trusted-firmware/build/sun50i_h6/release/bl31.bin u-boot-2021.04
$(MAKE) -C u-boot-2021.04 orangepi_3_lts_defconfig
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_OFFSET=0x88000" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mkdir /uboot
mkfs -t vfat -n UBOOT /dev/$(DISK)1
sed -i '/\/dev\/root/a \/dev\/disk\/by-label\/UBOOT \/uboot vfat defaults,sync,auto 0 0' /etc/fstab
mount /dev/$(DISK)1 /uboot
dd if=u-boot-2021.04/u-boot-sunxi-with-spl.bin of=/dev/$(ROOT_DEVICE) bs=1024 seek=8
@echo "$$BOOTCMD_OPI3LTS" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_OPI3LTS" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2021.04
rm -rf arm-trusted-firmware
opi3lts-boot-cmd:
define BOOTCMD_OPI3LTS
load mmc 0:2 $${kernel_addr_r} boot/Image
load mmc 0:2 $${fdt_addr_r} boot/machine.dtb
setenv bootargs root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait quiet loglevel=3 systemd.show_status=1
booti $${kernel_addr_r} - $${fdt_addr_r}
endef
export BOOTCMD_OPI3LTS
opi3lts-fw_env.config:
define FW_ENV_OPI3LTS
/dev/$(ROOT_DEVICE) 0x88000 0x20000
endef
export FW_ENV_OPI3LTS
opi3lts-mender: opi3lts-boot-cmd-mender opi3lts-fw_env.config-mender
tar xf arm-trusted-firmware.tar.xz
$(MAKE) -C arm-trusted-firmware PLAT=sun50i_h6 DEBUG=0 SUNXI_SETUP_REGULATORS=0 bl31
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-orangepi-3-lts.patch
cp arm-trusted-firmware/build/sun50i_h6/release/bl31.bin u-boot-2021.04
$(MAKE) -C u-boot-2021.04 orangepi_3_lts_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2021.04/.config
@echo "CONFIG_WDT=y" >> u-boot-2021.04/.config
@echo "# CONFIG_CMD_WDT is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_AT91 is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_CDNS is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_CORTINA is not set" >> u-boot-2021.04/.config
@echo "CONFIG_WDT_SUNXI=y" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_SP805 is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_STM32MP is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_XILINX_TB_WATCHDOG is not set" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mount /dev/$(DISK)1 /uboot
dd if=/dev/zero of=/dev/$(ROOT_DEVICE) bs=512 seek=1 count=49151
dd if=u-boot-2021.04/u-boot-sunxi-with-spl.bin of=/dev/$(ROOT_DEVICE) bs=1024 seek=8
@echo "$$BOOTCMD_OPI3LTS_MENDER" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_OPI3LTS_MENDER" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2021.04
opi3lts-boot-cmd-mender:
define BOOTCMD_OPI3LTS_MENDER
run mender_setup
load $${mender_uboot_root} $${kernel_addr_r} boot/Image
load $${mender_uboot_root} $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait sunxi-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
booti $${kernel_addr_r} - $${fdt_addr_r}
run mender_try_to_recover
endef
export BOOTCMD_OPI3LTS_MENDER
opi3lts-fw_env.config-mender:
define FW_ENV_OPI3LTS_MENDER
/dev/$(ROOT_DEVICE) 0x400000 0x20000
/dev/$(ROOT_DEVICE) 0x800000 0x20000
endef
export FW_ENV_OPI3LTS_MENDER
odroidhc2: odroidhc2-boot-cmd odroidhc2-fw_env.config
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-serial-number-fix.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-odroid_board_detection_fix.patch
$(MAKE) -C u-boot-2020.04 odroid-xu3_defconfig
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2020.04/.config
@echo "# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_OFFSET=0x140000" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-odroid_board_detection_fix.patch
$(MAKE) -C u-boot-2021.04 odroid-xu3_defconfig
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "# CONFIG_SYS_REDUNDAND_ENVIRONMENT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_OFFSET=0x140000" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mkdir /uboot
mkfs -t vfat -n UBOOT /dev/$(DISK)1
sed -i '/\/dev\/root/a \/dev\/disk\/by-label\/UBOOT \/uboot vfat defaults,sync,auto 0 0' /etc/fstab
mount /dev/$(DISK)1 /uboot
tar xf xu4-firmware.tar.xz -C u-boot-2020.04
dd if=u-boot-2020.04/bl1.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=1
dd if=u-boot-2020.04/bl2.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=31
dd if=u-boot-2020.04/u-boot-dtb.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=63
dd if=u-boot-2020.04/tzsw.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=1503
@echo "$$BOOTCMD_ODROIDHC2" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
tar xf xu4-firmware.tar.xz -C u-boot-2021.04
dd if=u-boot-2021.04/bl1.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=1
dd if=u-boot-2021.04/bl2.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=31
dd if=u-boot-2021.04/u-boot-dtb.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=63
dd if=u-boot-2021.04/tzsw.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=1503
@echo "$$BOOTCMD_ODROIDHC2" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_ODROIDHC2" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
odroidhc2-boot-cmd:
define BOOTCMD_ODROIDHC2
load mmc 0:2 $${kernel_addr_r} boot/zImage
load mmc 0:2 $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=ttySAC2,115200n8 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait elevator=noop quiet loglevel=3 systemd.show_status=1
setenv bootargs console=ttySAC2,115200n8 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait quiet loglevel=3 systemd.show_status=1
bootz $${kernel_addr_r} - $${fdt_addr_r}
endef
export BOOTCMD_ODROIDHC2
......@@ -239,54 +338,54 @@ endef
export FW_ENV_ODROIDHC2
odroidhc2-mender: odroidhc2-boot-cmd-mender odroidhc2-fw_env.config-mender
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-serial-number-fix.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-mender.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-odroid_board_detection_fix.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-exynos_wdt.patch
$(MAKE) -C u-boot-2020.04 odroid-xu3_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2020.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2020.04/.config
@echo "# CONFIG_ENV_OFFSET is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_ENV_OFFSET_REDUND is not set" >> u-boot-2020.04/.config
@echo "CONFIG_WDT=y" >> u-boot-2020.04/.config
@echo "# CONFIG_CMD_WDT is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_AT91 is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_CDNS is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_CORTINA is not set" >> u-boot-2020.04/.config
@echo "CONFIG_WDT_EXYNOS=y" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_SP805 is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_WDT_STM32MP is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_XILINX_TB_WATCHDOG is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_HBMC_AM654 is not set" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-mender.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-odroid_board_detection_fix.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-exynos_wdt.patch
$(MAKE) -C u-boot-2021.04 odroid-xu3_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_OFFSET is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_OFFSET_REDUND is not set" >> u-boot-2021.04/.config
@echo "CONFIG_WDT=y" >> u-boot-2021.04/.config
@echo "# CONFIG_CMD_WDT is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_AT91 is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_CDNS is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_CORTINA is not set" >> u-boot-2021.04/.config
@echo "CONFIG_WDT_EXYNOS=y" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_SP805 is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_STM32MP is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_XILINX_TB_WATCHDOG is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_HBMC_AM654 is not set" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mount /dev/$(DISK)1 /uboot
dd if=/dev/zero of=/dev/$(ROOT_DEVICE) bs=512 seek=1 count=49151
tar xf xu4-firmware.tar.xz -C u-boot-2020.04
dd if=u-boot-2020.04/bl1.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=1
dd if=u-boot-2020.04/bl2.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=31
dd if=u-boot-2020.04/u-boot-dtb.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=63
dd if=u-boot-2020.04/tzsw.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=1503
@echo "$$BOOTCMD_ODROIDHC2_MENDER" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
tar xf xu4-firmware.tar.xz -C u-boot-2021.04
dd if=u-boot-2021.04/bl1.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=1
dd if=u-boot-2021.04/bl2.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=31
dd if=u-boot-2021.04/u-boot-dtb.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=63
dd if=u-boot-2021.04/tzsw.bin of=/dev/$(ROOT_DEVICE) bs=512 seek=1503
@echo "$$BOOTCMD_ODROIDHC2_MENDER" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_ODROIDHC2_MENDER" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
odroidhc2-boot-cmd-mender:
define BOOTCMD_ODROIDHC2_MENDER
run mender_setup
load $${mender_uboot_root} $${kernel_addr_r} boot/zImage
load $${mender_uboot_root} $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=ttySAC2,115200n8 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait elevator=noop s3c2410-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
setenv bootargs console=ttySAC2,115200n8 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait s3c2410-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
bootz $${kernel_addr_r} - $${fdt_addr_r}
run mender_try_to_recover
endef
......@@ -300,27 +399,27 @@ endef
export FW_ENV_ODROIDHC2_MENDER
terasicde10standard: terasicde10standard-boot-cmd terasicde10standard-fw_env.config
tar xf u-boot-2020.04.tar.bz2
$(MAKE) -C u-boot-2020.04 socfpga_de10_nano_defconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
$(MAKE) -C u-boot-2021.04 socfpga_de10_nano_defconfig
$(MAKE) -C u-boot-2021.04
mkdir /uboot
sfdisk --part-type /dev/$(ROOT_DEVICE) 1 a2
dd if=u-boot-2020.04/u-boot-with-spl.sfp of=/dev/$(DISK)1
@echo "$$BOOTCMD_TERASICDE10STANDARD" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
dd if=u-boot-2021.04/u-boot-with-spl.sfp of=/dev/$(DISK)1
@echo "$$BOOTCMD_TERASICDE10STANDARD" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_TERASICDE10STANDARD" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
terasicde10standard-boot-cmd:
define BOOTCMD_TERASICDE10STANDARD
load mmc 0:2 $${kernel_addr_r} boot/zImage
load mmc 0:2 $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=ttyS0,115200 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait elevator=noop quiet loglevel=3 systemd.show_status=1
setenv bootargs console=ttyS0,115200 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait quiet loglevel=3 systemd.show_status=1
bootz $${kernel_addr_r} - $${fdt_addr_r}
endef
export BOOTCMD_TERASICDE10STANDARD
......@@ -332,33 +431,33 @@ endef
export FW_ENV_TERASICDE10STANDARD
terasicde10standard-mender: terasicde10standard-boot-cmd-mender terasicde10standard-fw_env.config-mender
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-mender.patch
$(MAKE) -C u-boot-2020.04 socfpga_de10_nano_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2020.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-mender.patch
$(MAKE) -C u-boot-2021.04 socfpga_de10_nano_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
dd if=/dev/zero of=/dev/$(ROOT_DEVICE) bs=512 seek=1 count=49151
dd if=u-boot-2020.04/u-boot-with-spl.sfp of=/dev/$(DISK)1
@echo "$$BOOTCMD_TERASICDE10STANDARD_MENDER" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
dd if=u-boot-2021.04/u-boot-with-spl.sfp of=/dev/$(DISK)1
@echo "$$BOOTCMD_TERASICDE10STANDARD_MENDER" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_TERASICDE10STANDARD_MENDER" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
terasicde10standard-boot-cmd-mender:
define BOOTCMD_TERASICDE10STANDARD_MENDER
run mender_setup
load $${mender_uboot_root} $${kernel_addr_r} boot/zImage
load $${mender_uboot_root} $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=ttyS0,115200 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait elevator=noop quiet loglevel=3 systemd.show_status=1
setenv bootargs console=ttyS0,115200 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait quiet loglevel=3 systemd.show_status=1
bootz $${kernel_addr_r} - $${fdt_addr_r}
run mender_try_to_recover
endef
......@@ -372,34 +471,34 @@ endef
export FW_ENV_TERASICDE10STANDARD_MENDER
rpi3b: rpi3b-boot-cmd rpi3b-fw_env.config rpi3b-config
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-serial-number-fix.patch
$(MAKE) -C u-boot-2020.04 rpi_3_defconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
$(MAKE) -C u-boot-2021.04 rpi_3_defconfig
$(MAKE) -C u-boot-2021.04
mkdir /uboot
mkfs -t vfat -n UBOOT /dev/$(DISK)1
sed -i '/\/dev\/root/a \/dev\/disk\/by-label\/UBOOT \/uboot vfat defaults,sync,auto 0 0' /etc/fstab
mount /dev/$(DISK)1 /uboot
cp u-boot-2020.04/u-boot.bin /uboot/u-boot.bin
@echo "$$BOOTCMD_RPI3" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
cp u-boot-2021.04/u-boot.bin /uboot/u-boot.bin
@echo "$$BOOTCMD_RPI3" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
@echo "$$RPI3CONFIG" > /uboot/config.txt
tar xf rpi3-firmware.tar.xz -C /uboot --no-same-owner
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_RPI3" > /etc/fw_env.config
dd if=/dev/zero of=/uboot/uboot.env bs=1024 count=16
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
rpi3b-boot-cmd:
define BOOTCMD_RPI3
load mmc 0:2 $${kernel_addr_r} boot/Image
load mmc 0:2 $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait elevator=noop quiet loglevel=3 systemd.show_status=1
setenv bootargs console=tty1 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait quiet loglevel=3 systemd.show_status=1
booti $${kernel_addr_r} - $${fdt_addr_r}
endef
export BOOTCMD_RPI3
......@@ -424,39 +523,39 @@ endef
export RPI3CONFIG
rpi3b-mender: rpi3b-boot-cmd-mender rpi3b-fw_env.config-mender rpi3b-config-mender
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-serial-number-fix.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-mender.patch
$(MAKE) -C u-boot-2020.04 rpi_3_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2020.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2020.04/.config
@echo "CONFIG_BCM2835_WDT=y" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-mender.patch
$(MAKE) -C u-boot-2021.04 rpi_3_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2021.04/.config
@echo "CONFIG_BCM2835_WDT=y" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mount /dev/$(DISK)1 /uboot
dd if=/dev/zero of=/dev/$(ROOT_DEVICE) bs=512 seek=1 count=49151
cp u-boot-2020.04/u-boot.bin /uboot/u-boot.bin
@echo "$$BOOTCMD_RPI3_MENDER" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
cp u-boot-2021.04/u-boot.bin /uboot/u-boot.bin
@echo "$$BOOTCMD_RPI3_MENDER" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
@echo "$$RPI3CONFIG_MENDER" > /uboot/config.txt
tar xf rpi3-firmware.tar.xz --no-same-owner -C /uboot
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -svf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_RPI3_MENDER" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
rpi3b-boot-cmd-mender:
define BOOTCMD_RPI3_MENDER
run mender_setup
load $${mender_uboot_root} $${kernel_addr_r} boot/Image
load $${mender_uboot_root} $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait elevator=noop bcm2835-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait bcm2835-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
booti $${kernel_addr_r} - $${fdt_addr_r}
run mender_try_to_recover
endef
......@@ -483,38 +582,38 @@ endef
export RPI3CONFIG_MENDER
rpi4b: rpi4b-boot-cmd rpi4b-fw_env.config rpi4b-config
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-serial-number-fix.patch
$(MAKE) -C u-boot-2020.04 rpi_4_defconfig
@echo "CONFIG_ARCH_FIXUP_FDT_MEMORY=y" >> u-boot-2020.04/.config
@echo "CONFIG_NR_DRAM_BANKS=4" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
$(MAKE) -C u-boot-2021.04 rpi_4_defconfig
@echo "CONFIG_ARCH_FIXUP_FDT_MEMORY=y" >> u-boot-2021.04/.config
@echo "CONFIG_NR_DRAM_BANKS=4" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mkdir /uboot
mkfs -t vfat -n UBOOT /dev/$(DISK)1
sed -i '/\/dev\/root/a \/dev\/disk\/by-label\/UBOOT \/uboot vfat defaults,sync,auto 0 0' /etc/fstab
mount /dev/$(DISK)1 /uboot
cp u-boot-2020.04/u-boot.bin /uboot/u-boot.bin
@echo "$$BOOTCMD_RPI4" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
cp u-boot-2021.04/u-boot.bin /uboot/u-boot.bin
@echo "$$BOOTCMD_RPI4" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
@echo "$$RPI4CONFIG" > /uboot/config.txt
tar xf rpi4-firmware.tar.xz -C /uboot --no-same-owner
cp /boot/dtbs/5.4.51/broadcom/bcm2711-rpi-4-b.dtb /uboot/bcm2711-rpi-4-b.dtb
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_RPI4" > /etc/fw_env.config
dd if=/dev/zero of=/uboot/uboot.env bs=1024 count=16
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
rpi4b-boot-cmd:
define BOOTCMD_RPI4
load mmc 0:2 $${kernel_addr_r} boot/Image
load mmc 0:2 $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait elevator=noop quiet loglevel=3 systemd.show_status=1
setenv bootargs console=tty1 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait quiet loglevel=3 systemd.show_status=1
booti $${kernel_addr_r} - $${fdt_addr_r}
endef
export BOOTCMD_RPI4
......@@ -544,43 +643,43 @@ endef
export RPI4CONFIG
rpi4b-mender: rpi4b-boot-cmd-mender rpi4b-fw_env.config-mender rpi4b-config-mender
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-serial-number-fix.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-mender.patch
$(MAKE) -C u-boot-2020.04 rpi_4_defconfig
@echo "CONFIG_ARCH_FIXUP_FDT_MEMORY=y" >> u-boot-2020.04/.config
@echo "CONFIG_NR_DRAM_BANKS=4" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_SIZE=0x20000" >> u-boot-2020.04/.config
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2020.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2020.04/.config
@echo "CONFIG_BCM2835_WDT=y" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-mender.patch
$(MAKE) -C u-boot-2021.04 rpi_4_defconfig
@echo "CONFIG_ARCH_FIXUP_FDT_MEMORY=y" >> u-boot-2021.04/.config
@echo "CONFIG_NR_DRAM_BANKS=4" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_SIZE=0x20000" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2021.04/.config
@echo "CONFIG_BCM2835_WDT=y" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
mount /dev/$(DISK)1 /uboot
dd if=/dev/zero of=/dev/$(ROOT_DEVICE) bs=512 seek=1 count=49151
cp u-boot-2020.04/u-boot.bin /uboot/u-boot.bin
@echo "$$BOOTCMD_RPI4_MENDER" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
cp u-boot-2021.04/u-boot.bin /uboot/u-boot.bin
@echo "$$BOOTCMD_RPI4_MENDER" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
@echo "$$RPI4CONFIG_MENDER" > /uboot/config.txt
tar xf rpi4-firmware.tar.xz -C /uboot --no-same-owner
cp /boot/dtbs/5.4.51/broadcom/bcm2711-rpi-4-b.dtb /uboot/bcm2711-rpi-4-b.dtb
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -svf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_RPI4_MENDER" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
rpi4b-boot-cmd-mender:
define BOOTCMD_RPI4_MENDER
run mender_setup
load $${mender_uboot_root} $${kernel_addr_r} boot/Image
load $${mender_uboot_root} $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait elevator=noop bcm2835-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait bcm2835-wdt.nowayout=1 quiet loglevel=3 systemd.show_status=1
booti $${kernel_addr_r} - $${fdt_addr_r}
run mender_try_to_recover
endef
......@@ -612,42 +711,42 @@ endef
export RPI4CONFIG_MENDER
amlogics905x: amlogics905x-boot-cmd amlogics905x-fw_env.config
tar xf u-boot-2020.04.tar.bz2
$(MAKE) -C u-boot-2020.04 p212_defconfig
$(MAKE) -C u-boot-2020.04
tar xf amlogics905x-firmware.tar.xz -C u-boot-2020.04
cp u-boot-2020.04/u-boot.bin u-boot-2020.04/fip/bl33.bin
cd u-boot-2020.04 && ./blx_fix.sh fip/bl30.bin fip/zero_tmp fip/bl30_zero.bin fip/bl301.bin fip/bl301_zero.bin fip/bl30_new.bin bl30
cd u-boot-2020.04 && ./acs_tool.py fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
cd u-boot-2020.04 && ./blx_fix.sh fip/bl2_acs.bin fip/zero_tmp fip/bl2_zero.bin fip/bl21.bin fip/bl21_zero.bin fip/bl2_new.bin bl2
$(MAKE) -C u-boot-2020.04/gxlimg
cd u-boot-2020.04 && gxlimg/gxlimg -t bl2 -s fip/bl2_new.bin fip/bl2.bin.enc
cd u-boot-2020.04 && gxlimg/gxlimg -t bl3x -c fip/bl30_new.bin fip/bl30_new.bin.enc
cd u-boot-2020.04 && gxlimg/gxlimg -t bl3x -c fip/bl31.img fip/bl31.img.enc
cd u-boot-2020.04 && gxlimg/gxlimg -t bl3x -c fip/bl33.bin fip/bl33.bin.enc
cd u-boot-2020.04 && gxlimg/gxlimg -t fip --bl2 fip/bl2.bin.enc --bl30 fip/bl30_new.bin.enc --bl31 fip/bl31.img.enc --bl33 fip/bl33.bin.enc fip/u-boot.bin
tar xf u-boot-2021.04.tar.gz
$(MAKE) -C u-boot-2021.04 p212_defconfig
$(MAKE) -C u-boot-2021.04
tar xf amlogics905x-firmware.tar.xz -C u-boot-2021.04
cp u-boot-2021.04/u-boot.bin u-boot-2021.04/fip/bl33.bin
cd u-boot-2021.04 && ./blx_fix.sh fip/bl30.bin fip/zero_tmp fip/bl30_zero.bin fip/bl301.bin fip/bl301_zero.bin fip/bl30_new.bin bl30
cd u-boot-2021.04 && ./acs_tool.py fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
cd u-boot-2021.04 && ./blx_fix.sh fip/bl2_acs.bin fip/zero_tmp fip/bl2_zero.bin fip/bl21.bin fip/bl21_zero.bin fip/bl2_new.bin bl2
$(MAKE) -C u-boot-2021.04/gxlimg
cd u-boot-2021.04 && gxlimg/gxlimg -t bl2 -s fip/bl2_new.bin fip/bl2.bin.enc
cd u-boot-2021.04 && gxlimg/gxlimg -t bl3x -c fip/bl30_new.bin fip/bl30_new.bin.enc
cd u-boot-2021.04 && gxlimg/gxlimg -t bl3x -c fip/bl31.img fip/bl31.img.enc
cd u-boot-2021.04 && gxlimg/gxlimg -t bl3x -c fip/bl33.bin fip/bl33.bin.enc
cd u-boot-2021.04 && gxlimg/gxlimg -t fip --bl2 fip/bl2.bin.enc --bl30 fip/bl30_new.bin.enc --bl31 fip/bl31.img.enc --bl33 fip/bl33.bin.enc fip/u-boot.bin
mkdir /uboot
mkfs -t vfat -n UBOOT /dev/$(DISK)1
sed -i '/\/dev\/root/a \/dev\/disk\/by-label\/UBOOT \/uboot vfat defaults,sync,auto 0 0' /etc/fstab
mount /dev/$(DISK)1 /uboot
dd if=u-boot-2020.04/fip/u-boot.bin of=/dev/$(ROOT_DEVICE) conv=fsync,notrunc bs=512 seek=1
@echo "$$BOOTCMD_AMLOGICS905X" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
dd if=u-boot-2021.04/fip/u-boot.bin of=/dev/$(ROOT_DEVICE) conv=fsync,notrunc bs=512 seek=1
@echo "$$BOOTCMD_AMLOGICS905X" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -sf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_AMLOGICS905X" > /etc/fw_env.config
dd if=/dev/zero of=/uboot/uboot.env bs=1024 count=16
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
amlogics905x-boot-cmd:
define BOOTCMD_AMLOGICS905X
load mmc 1:2 $${kernel_addr_r} boot/Image
load mmc 1:2 $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait elevator=noop quiet loglevel=3 systemd.show_status=1
setenv bootargs console=tty1 root=/dev/$(DISK)2 rootfstype=ext4 rootflags=discard rw rootwait quiet loglevel=3 systemd.show_status=1
booti $${kernel_addr_r} - $${fdt_addr_r}
endef
export BOOTCMD_AMLOGICS905X
......@@ -659,47 +758,47 @@ endef
export FW_ENV_AMLOGICS905X
amlogics905x-mender: amlogics905x-boot-cmd-mender amlogics905x-fw_env.config-mender
tar xf u-boot-2020.04.tar.bz2
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-mender.patch
patch -Np1 -d u-boot-2020.04 < u-boot-2020.04-boot_from_mmc1.patch
$(MAKE) -C u-boot-2020.04 p212_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2020.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2020.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2020.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2020.04/.config
$(MAKE) -C u-boot-2020.04 oldconfig
$(MAKE) -C u-boot-2020.04
tar xf amlogics905x-firmware.tar.xz -C u-boot-2020.04
cp u-boot-2020.04/u-boot.bin u-boot-2020.04/fip/bl33.bin
cd u-boot-2020.04 && ./blx_fix.sh fip/bl30.bin fip/zero_tmp fip/bl30_zero.bin fip/bl301.bin fip/bl301_zero.bin fip/bl30_new.bin bl30
cd u-boot-2020.04 && ./acs_tool.py fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
cd u-boot-2020.04 && ./blx_fix.sh fip/bl2_acs.bin fip/zero_tmp fip/bl2_zero.bin fip/bl21.bin fip/bl21_zero.bin fip/bl2_new.bin bl2
$(MAKE) -C u-boot-2020.04/gxlimg
cd u-boot-2020.04 && gxlimg/gxlimg -t bl2 -s fip/bl2_new.bin fip/bl2.bin.enc
cd u-boot-2020.04 && gxlimg/gxlimg -t bl3x -c fip/bl30_new.bin fip/bl30_new.bin.enc
cd u-boot-2020.04 && gxlimg/gxlimg -t bl3x -c fip/bl31.img fip/bl31.img.enc
cd u-boot-2020.04 && gxlimg/gxlimg -t bl3x -c fip/bl33.bin fip/bl33.bin.enc
cd u-boot-2020.04 && gxlimg/gxlimg -t fip --bl2 fip/bl2.bin.enc --bl30 fip/bl30_new.bin.enc --bl31 fip/bl31.img.enc --bl33 fip/bl33.bin.enc fip/u-boot.bin
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-mender.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-boot_from_mmc1.patch
$(MAKE) -C u-boot-2021.04 p212_defconfig
@echo "# CONFIG_ENV_IS_NOWHERE is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_ENV_IS_IN_FAT is not set" >> u-boot-2021.04/.config
@echo "CONFIG_ENV_IS_IN_MMC=y" >> u-boot-2021.04/.config
@echo "CONFIG_SYS_REDUNDAND_ENVIRONMENT=y" >> u-boot-2021.04/.config
$(MAKE) -C u-boot-2021.04 oldconfig
$(MAKE) -C u-boot-2021.04
tar xf amlogics905x-firmware.tar.xz -C u-boot-2021.04
cp u-boot-2021.04/u-boot.bin u-boot-2021.04/fip/bl33.bin
cd u-boot-2021.04 && ./blx_fix.sh fip/bl30.bin fip/zero_tmp fip/bl30_zero.bin fip/bl301.bin fip/bl301_zero.bin fip/bl30_new.bin bl30
cd u-boot-2021.04 && ./acs_tool.py fip/bl2.bin fip/bl2_acs.bin fip/acs.bin 0
cd u-boot-2021.04 && ./blx_fix.sh fip/bl2_acs.bin fip/zero_tmp fip/bl2_zero.bin fip/bl21.bin fip/bl21_zero.bin fip/bl2_new.bin bl2
$(MAKE) -C u-boot-2021.04/gxlimg
cd u-boot-2021.04 && gxlimg/gxlimg -t bl2 -s fip/bl2_new.bin fip/bl2.bin.enc
cd u-boot-2021.04 && gxlimg/gxlimg -t bl3x -c fip/bl30_new.bin fip/bl30_new.bin.enc
cd u-boot-2021.04 && gxlimg/gxlimg -t bl3x -c fip/bl31.img fip/bl31.img.enc
cd u-boot-2021.04 && gxlimg/gxlimg -t bl3x -c fip/bl33.bin fip/bl33.bin.enc
cd u-boot-2021.04 && gxlimg/gxlimg -t fip --bl2 fip/bl2.bin.enc --bl30 fip/bl30_new.bin.enc --bl31 fip/bl31.img.enc --bl33 fip/bl33.bin.enc fip/u-boot.bin
mount /dev/$(DISK)1 /uboot
dd if=/dev/zero of=/dev/$(ROOT_DEVICE) bs=512 seek=1 count=49151
dd if=u-boot-2020.04/fip/u-boot.bin of=/dev/$(ROOT_DEVICE) conv=fsync,notrunc bs=512 seek=1
@echo "$$BOOTCMD_AMLOGICS905X_MENDER" > u-boot-2020.04/boot.cmd
u-boot-2020.04/tools/mkimage -C none -A arm -T script -d u-boot-2020.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2020.04 envtools
cp u-boot-2020.04/tools/env/fw_printenv /sbin/fw_printenv
dd if=u-boot-2021.04/fip/u-boot.bin of=/dev/$(ROOT_DEVICE) conv=fsync,notrunc bs=512 seek=1
@echo "$$BOOTCMD_AMLOGICS905X_MENDER" > u-boot-2021.04/boot.cmd
u-boot-2021.04/tools/mkimage -C none -A arm -T script -d u-boot-2021.04/boot.cmd /uboot/boot.scr
$(MAKE) -C u-boot-2021.04 envtools
cp u-boot-2021.04/tools/env/fw_printenv /sbin/fw_printenv
ln -svf /sbin/fw_printenv /sbin/fw_setenv
@echo "$$FW_ENV_AMLOGICS905X_MENDER" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(ROOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2020.04
rm -rf u-boot-2021.04
amlogics905x-boot-cmd-mender:
define BOOTCMD_AMLOGICS905X_MENDER
run mender_setup
load $${mender_uboot_root} $${kernel_addr_r} boot/Image
load $${mender_uboot_root} $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait elevator=noop quiet loglevel=3 systemd.show_status=1
setenv bootargs console=tty1 panic=10 panic_on_oops=1 root=$${mender_kernel_root} rootfstype=ext4 ro rootwait quiet loglevel=3 systemd.show_status=1
booti $${kernel_addr_r} - $${fdt_addr_r}
run mender_try_to_recover
endef
......
diff -uNr u-boot-2020.04/include/configs/sunxi-common.h u-boot-2020.04-sunxi_env_in_mmc0/include/configs/sunxi-common.h
--- u-boot-2020.04/include/configs/sunxi-common.h 2020-04-14 00:32:18.000000000 +0930
+++ u-boot-2020.04-sunxi_env_in_mmc0/include/configs/sunxi-common.h 2020-05-30 20:01:25.717364330 +0930
@@ -134,13 +134,7 @@
#define CONFIG_BOARD_SIZE_LIMIT 0x7e000
#endif
-#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
-/* If we have two devices (most likely eMMC + MMC), favour the eMMC */
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#else
-/* Otherwise, use the only device we have */
#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
#define CONFIG_SYS_MMC_MAX_DEVICE 4
#endif
diff -uNr u-boot-2020.04/include/config_mender_defines.h u-boot-2020.04-boot_from_mmc1/include/config_mender_defines.h
--- u-boot-2020.04/include/config_mender_defines.h 2020-05-30 20:14:13.527252484 +0930
+++ u-boot-2020.04-boot_from_mmc1/include/config_mender_defines.h 2020-05-30 20:40:22.384134573 +0930
diff -uNr u-boot-2021.04/include/config_mender_defines.h u-boot-2021.04-boot_from_mmc1/include/config_mender_defines.h
--- u-boot-2021.04/include/config_mender_defines.h 2023-04-13 11:03:08.366781741 +0930
+++ u-boot-2021.04-boot_from_mmc1/include/config_mender_defines.h 2023-04-13 11:02:30.588673331 +0930
@@ -3,7 +3,7 @@
#define MENDER_ROOTFS_PART_A_NUMBER 2
#define MENDER_ROOTFS_PART_B_NUMBER 3
......
diff -uNr u-boot-2020.04/arch/arm/dts/exynos5250.dtsi u-boot-2020.04-exynos_wdt/arch/arm/dts/exynos5250.dtsi
--- u-boot-2020.04/arch/arm/dts/exynos5250.dtsi 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-exynos_wdt/arch/arm/dts/exynos5250.dtsi 2022-01-02 06:03:27.582648707 +0000
diff -uNr u-boot-2021.04/arch/arm/dts/exynos5250.dtsi u-boot-2021.04-exynos_wdt/arch/arm/dts/exynos5250.dtsi
--- u-boot-2021.04/arch/arm/dts/exynos5250.dtsi 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-exynos_wdt/arch/arm/dts/exynos5250.dtsi 2023-04-13 10:58:58.408061884 +0930
@@ -120,6 +120,17 @@
};
};
......@@ -19,9 +19,9 @@ diff -uNr u-boot-2020.04/arch/arm/dts/exynos5250.dtsi u-boot-2020.04-exynos_wdt/
pwm: pwm@12dd0000 {
compatible = "samsung,exynos4210-pwm";
reg = <0x12dd0000 0x100>;
diff -uNr u-boot-2020.04/arch/arm/dts/exynos54xx.dtsi u-boot-2020.04-exynos_wdt/arch/arm/dts/exynos54xx.dtsi
--- u-boot-2020.04/arch/arm/dts/exynos54xx.dtsi 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-exynos_wdt/arch/arm/dts/exynos54xx.dtsi 2022-01-02 03:55:22.324186023 +0000
diff -uNr u-boot-2021.04/arch/arm/dts/exynos54xx.dtsi u-boot-2021.04-exynos_wdt/arch/arm/dts/exynos54xx.dtsi
--- u-boot-2021.04/arch/arm/dts/exynos54xx.dtsi 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-exynos_wdt/arch/arm/dts/exynos54xx.dtsi 2023-04-13 10:58:58.409061886 +0930
@@ -210,6 +210,17 @@
mem-type = "ddr3";
};
......@@ -40,9 +40,9 @@ diff -uNr u-boot-2020.04/arch/arm/dts/exynos54xx.dtsi u-boot-2020.04-exynos_wdt/
pwm: pwm@12dd0000 {
compatible = "samsung,exynos4210-pwm";
reg = <0x12dd0000 0x100>;
diff -uNr u-boot-2020.04/arch/arm/dts/exynos7420.dtsi u-boot-2020.04-exynos_wdt/arch/arm/dts/exynos7420.dtsi
--- u-boot-2020.04/arch/arm/dts/exynos7420.dtsi 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-exynos_wdt/arch/arm/dts/exynos7420.dtsi 2022-01-02 06:09:27.195643087 +0000
diff -uNr u-boot-2021.04/arch/arm/dts/exynos7420.dtsi u-boot-2021.04-exynos_wdt/arch/arm/dts/exynos7420.dtsi
--- u-boot-2021.04/arch/arm/dts/exynos7420.dtsi 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-exynos_wdt/arch/arm/dts/exynos7420.dtsi 2023-04-13 10:58:58.409061886 +0930
@@ -79,4 +79,15 @@
pinctrl-names = "default";
pinctrl-0 = <&serial2_bus>;
......@@ -59,10 +59,10 @@ diff -uNr u-boot-2020.04/arch/arm/dts/exynos7420.dtsi u-boot-2020.04-exynos_wdt/
+ reg = <0x105c0000 0x5000>;
+ };
};
diff -uNr u-boot-2020.04/board/samsung/common/board.c u-boot-2020.04-exynos_wdt/board/samsung/common/board.c
--- u-boot-2020.04/board/samsung/common/board.c 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-exynos_wdt/board/samsung/common/board.c 2022-01-02 06:12:20.839955900 +0000
@@ -32,6 +32,8 @@
diff -uNr u-boot-2021.04/board/samsung/common/board.c u-boot-2021.04-exynos_wdt/board/samsung/common/board.c
--- u-boot-2021.04/board/samsung/common/board.c 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-exynos_wdt/board/samsung/common/board.c 2023-04-13 10:58:58.409061886 +0930
@@ -37,6 +37,8 @@
#include <samsung/misc.h>
#include <dm/pinctrl.h>
#include <dm.h>
......@@ -71,7 +71,7 @@ diff -uNr u-boot-2020.04/board/samsung/common/board.c u-boot-2020.04-exynos_wdt/
DECLARE_GLOBAL_DATA_PTR;
@@ -113,6 +115,20 @@
@@ -118,6 +120,20 @@
return exynos_init();
}
......@@ -92,9 +92,9 @@ diff -uNr u-boot-2020.04/board/samsung/common/board.c u-boot-2020.04-exynos_wdt/
int dram_init(void)
{
unsigned int i;
diff -uNr u-boot-2020.04/drivers/watchdog/exynos_wdt.c u-boot-2020.04-exynos_wdt/drivers/watchdog/exynos_wdt.c
--- u-boot-2020.04/drivers/watchdog/exynos_wdt.c 1970-01-01 00:00:00.000000000 +0000
+++ u-boot-2020.04-exynos_wdt/drivers/watchdog/exynos_wdt.c 2022-01-02 05:32:27.856245283 +0000
diff -uNr u-boot-2021.04/drivers/watchdog/exynos_wdt.c u-boot-2021.04-exynos_wdt/drivers/watchdog/exynos_wdt.c
--- u-boot-2021.04/drivers/watchdog/exynos_wdt.c 1970-01-01 09:30:00.000000000 +0930
+++ u-boot-2021.04-exynos_wdt/drivers/watchdog/exynos_wdt.c 2023-04-13 10:58:58.409061886 +0930
@@ -0,0 +1,344 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+/*
......@@ -440,9 +440,9 @@ diff -uNr u-boot-2020.04/drivers/watchdog/exynos_wdt.c u-boot-2020.04-exynos_wdt
+ .priv_auto_alloc_size = sizeof(struct exynos_wdt_priv),
+ .ofdata_to_platdata = exynos_wdt_ofdata_to_platdata,
+};
diff -uNr u-boot-2020.04/drivers/watchdog/Kconfig u-boot-2020.04-exynos_wdt/drivers/watchdog/Kconfig
--- u-boot-2020.04/drivers/watchdog/Kconfig 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-exynos_wdt/drivers/watchdog/Kconfig 2022-01-02 05:32:57.601020588 +0000
diff -uNr u-boot-2021.04/drivers/watchdog/Kconfig u-boot-2021.04-exynos_wdt/drivers/watchdog/Kconfig
--- u-boot-2021.04/drivers/watchdog/Kconfig 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-exynos_wdt/drivers/watchdog/Kconfig 2023-04-13 11:00:12.647277514 +0930
@@ -14,6 +14,7 @@
default 128000 if ARCH_MX25 || ARCH_MX31 || ARCH_MX5 || ARCH_MX6
default 128000 if ARCH_MX7 || ARCH_VF610
......@@ -451,7 +451,7 @@ diff -uNr u-boot-2020.04/drivers/watchdog/Kconfig u-boot-2020.04-exynos_wdt/driv
default 60000
help
Watchdog timeout in msec
@@ -75,7 +76,7 @@
@@ -77,7 +78,7 @@
config WDT_ASPEED
bool "Aspeed ast2400/ast2500 watchdog timer support"
......@@ -460,7 +460,7 @@ diff -uNr u-boot-2020.04/drivers/watchdog/Kconfig u-boot-2020.04-exynos_wdt/driv
default y if ARCH_ASPEED
help
Select this to enable watchdog timer for Aspeed ast2500/ast2400 devices.
@@ -148,12 +149,24 @@
@@ -176,12 +177,24 @@
config WDT_ORION
bool "Orion watchdog timer support"
......@@ -483,12 +483,12 @@ diff -uNr u-boot-2020.04/drivers/watchdog/Kconfig u-boot-2020.04-exynos_wdt/driv
+ This provides basic infrastructure to support Samsung Exynos
+ watchdog.
+
config WDT_SANDBOX
bool "Enable Watchdog Timer support for Sandbox"
depends on SANDBOX && WDT
diff -uNr u-boot-2020.04/drivers/watchdog/Makefile u-boot-2020.04-exynos_wdt/drivers/watchdog/Makefile
--- u-boot-2020.04/drivers/watchdog/Makefile 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-exynos_wdt/drivers/watchdog/Makefile 2022-01-02 05:34:50.219933632 +0000
config WDT_K3_RTI
bool "Texas Instruments K3 RTI watchdog"
depends on WDT && ARCH_K3
diff -uNr u-boot-2021.04/drivers/watchdog/Makefile u-boot-2021.04-exynos_wdt/drivers/watchdog/Makefile
--- u-boot-2021.04/drivers/watchdog/Makefile 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-exynos_wdt/drivers/watchdog/Makefile 2023-04-13 10:58:58.409061886 +0930
@@ -10,7 +10,6 @@
else
obj-$(CONFIG_IMX_WATCHDOG) += imx_watchdog.o
......@@ -497,11 +497,11 @@ diff -uNr u-boot-2020.04/drivers/watchdog/Makefile u-boot-2020.04-exynos_wdt/dri
obj-$(CONFIG_XILINX_TB_WATCHDOG) += xilinx_tb_wdt.o
obj-$(CONFIG_OMAP_WATCHDOG) += omap_wdt.o
obj-$(CONFIG_DESIGNWARE_WATCHDOG) += designware_wdt.o
@@ -22,6 +21,7 @@
@@ -23,6 +22,7 @@
obj-$(CONFIG_WDT_BCM6345) += bcm6345_wdt.o
obj-$(CONFIG_WDT_CORTINA) += cortina_wdt.o
obj-$(CONFIG_WDT_ORION) += orion_wdt.o
+obj-$(CONFIG_WDT_EXYNOS) += exynos_wdt.o
obj-$(CONFIG_WDT_CDNS) += cdns_wdt.o
obj-$(CONFIG_WDT_MPC8xx) += mpc8xx_wdt.o
obj-$(CONFIG_WDT_MT7621) += mt7621_wdt.o
obj-$(CONFIG_WDT_MT7620) += mt7620_wdt.o
diff -uNr u-boot-2020.04/configs/odroid-xu3_defconfig u-boot-2020.04-mender/configs/odroid-xu3_defconfig
--- u-boot-2020.04/configs/odroid-xu3_defconfig 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/configs/odroid-xu3_defconfig 2021-09-15 13:41:54.571365816 +0000
@@ -3,8 +3,7 @@
CONFIG_ARCH_EXYNOS=y
diff -uNr u-boot-2021.04/configs/odroid-xu3_defconfig u-boot-2021.04-mender/configs/odroid-xu3_defconfig
--- u-boot-2021.04/configs/odroid-xu3_defconfig 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-mender/configs/odroid-xu3_defconfig 2023-04-13 10:55:29.170445098 +0930
@@ -4,8 +4,7 @@
CONFIG_SYS_TEXT_BASE=0x43E00000
CONFIG_ARCH_EXYNOS5=y
CONFIG_NR_DRAM_BANKS=8
-CONFIG_ENV_SIZE=0x4000
-CONFIG_ENV_OFFSET=0x310000
+CONFIG_ENV_SIZE=0x20000
CONFIG_NR_DRAM_BANKS=8
CONFIG_IDENT_STRING=" for ODROID-XU3/XU4/HC1/HC2"
CONFIG_DEFAULT_DEVICE_TREE="exynos5422-odroidxu3"
CONFIG_DISTRO_DEFAULTS=y
diff -uNr u-boot-2020.04/configs/p212_defconfig u-boot-2020.04-mender/configs/p212_defconfig
--- u-boot-2020.04/configs/p212_defconfig 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/configs/p212_defconfig 2021-09-15 13:31:30.197336190 +0000
@@ -1,7 +1,7 @@
CONFIG_ARM=y
diff -uNr u-boot-2021.04/configs/p212_defconfig u-boot-2021.04-mender/configs/p212_defconfig
--- u-boot-2021.04/configs/p212_defconfig 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-mender/configs/p212_defconfig 2023-04-13 10:56:39.852653453 +0930
@@ -2,7 +2,7 @@
CONFIG_ARCH_MESON=y
CONFIG_SYS_TEXT_BASE=0x01000000
CONFIG_NR_DRAM_BANKS=1
-CONFIG_ENV_SIZE=0x2000
+CONFIG_ENV_SIZE=0x20000
CONFIG_DM_GPIO=y
CONFIG_MESON_GXL=y
CONFIG_NR_DRAM_BANKS=1
diff -uNr u-boot-2020.04/configs/rpi_3_defconfig u-boot-2020.04-mender/configs/rpi_3_defconfig
--- u-boot-2020.04/configs/rpi_3_defconfig 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/configs/rpi_3_defconfig 2021-09-15 13:31:30.197336190 +0000
@@ -4,7 +4,7 @@
CONFIG_SYS_TEXT_BASE=0x00080000
CONFIG_DEBUG_UART_BASE=0xc81004c0
diff -uNr u-boot-2021.04/configs/rpi_3_defconfig u-boot-2021.04-mender/configs/rpi_3_defconfig
--- u-boot-2021.04/configs/rpi_3_defconfig 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-mender/configs/rpi_3_defconfig 2023-04-13 10:56:05.526552267 +0930
@@ -5,7 +5,7 @@
CONFIG_TARGET_RPI_3=y
CONFIG_SYS_MALLOC_F_LEN=0x2000
CONFIG_NR_DRAM_BANKS=1
-CONFIG_ENV_SIZE=0x4000
+CONFIG_ENV_SIZE=0x20000
CONFIG_NR_DRAM_BANKS=1
CONFIG_DEFAULT_DEVICE_TREE="bcm2837-rpi-3-b"
CONFIG_DISTRO_DEFAULTS=y
CONFIG_OF_BOARD_SETUP=y
diff -uNr u-boot-2020.04/env/Kconfig u-boot-2020.04-mender/env/Kconfig
--- u-boot-2020.04/env/Kconfig 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/env/Kconfig 2021-09-15 13:33:58.461645828 +0000
@@ -488,25 +488,14 @@
diff -uNr u-boot-2021.04/env/Kconfig u-boot-2021.04-mender/env/Kconfig
--- u-boot-2021.04/env/Kconfig 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-mender/env/Kconfig 2023-04-13 10:52:53.188985292 +0930
@@ -514,26 +514,14 @@
environment location.
config ENV_OFFSET
......@@ -54,6 +54,7 @@ diff -uNr u-boot-2020.04/env/Kconfig u-boot-2020.04-mender/env/Kconfig
- default 0 if ARC
- default 0x140000 if ARCH_AT91
- default 0x260000 if ARCH_OMAP2PLUS
- default 0x1080000 if MICROBLAZE && ENV_IS_IN_SPI_FLASH
+ hex "Environment Offset will be set by mender patch"
+ depends on !ARCH_SUNXI && !ARCH_MESON && !ARCH_BCM283X && !ARCH_EXYNOS
help
......@@ -68,9 +69,9 @@ diff -uNr u-boot-2020.04/env/Kconfig u-boot-2020.04-mender/env/Kconfig
help
Offset from the start of the device (or partition) of the redundant
environment location.
diff -uNr u-boot-2020.04/include/config_mender_defines.h u-boot-2020.04-mender/include/config_mender_defines.h
--- u-boot-2020.04/include/config_mender_defines.h 1970-01-01 00:00:00.000000000 +0000
+++ u-boot-2020.04-mender/include/config_mender_defines.h 2021-09-15 13:31:30.202335998 +0000
diff -uNr u-boot-2021.04/include/config_mender_defines.h u-boot-2021.04-mender/include/config_mender_defines.h
--- u-boot-2021.04/include/config_mender_defines.h 1970-01-01 09:30:00.000000000 +0930
+++ u-boot-2021.04-mender/include/config_mender_defines.h 2023-04-13 10:49:28.861382983 +0930
@@ -0,0 +1,17 @@
+/* Shell variables */
+#define MENDER_BOOT_PART_NUMBER 1
......@@ -89,9 +90,9 @@ diff -uNr u-boot-2020.04/include/config_mender_defines.h u-boot-2020.04-mender/i
+
+/* For sanity checks. */
+#define MENDER_BOOTENV_SIZE 0x20000
diff -uNr u-boot-2020.04/include/config_mender.h u-boot-2020.04-mender/include/config_mender.h
--- u-boot-2020.04/include/config_mender.h 1970-01-01 00:00:00.000000000 +0000
+++ u-boot-2020.04-mender/include/config_mender.h 2021-09-15 13:31:30.202335998 +0000
diff -uNr u-boot-2021.04/include/config_mender.h u-boot-2021.04-mender/include/config_mender.h
--- u-boot-2021.04/include/config_mender.h 1970-01-01 09:30:00.000000000 +0930
+++ u-boot-2021.04-mender/include/config_mender.h 2023-04-13 10:49:28.861382983 +0930
@@ -0,0 +1,83 @@
+/*
+ Copyright 2017 Northern.tech AS
......@@ -176,22 +177,10 @@ diff -uNr u-boot-2020.04/include/config_mender.h u-boot-2020.04-mender/include/c
+#endif /* !MENDER_AUTO_PROBING */
+
+#endif /* HEADER_CONFIG_MENDER_H */
diff -uNr u-boot-2020.04/include/configs/exynos5-common.h u-boot-2020.04-mender/include/configs/exynos5-common.h
--- u-boot-2020.04/include/configs/exynos5-common.h 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/include/configs/exynos5-common.h 2021-09-15 14:01:50.212321166 +0000
@@ -74,8 +74,6 @@
#define CONFIG_SYS_MONITOR_BASE 0x00000000
-#define CONFIG_SYS_MMC_ENV_DEV 0
-
#define CONFIG_SECURE_BL1_ONLY
/* Secure FW size configuration */
diff -uNr u-boot-2020.04/include/configs/meson64.h u-boot-2020.04-mender/include/configs/meson64.h
--- u-boot-2020.04/include/configs/meson64.h 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/include/configs/meson64.h 2021-09-15 13:31:30.207335806 +0000
@@ -37,6 +37,8 @@
diff -uNr u-boot-2021.04/include/configs/meson64.h u-boot-2021.04-mender/include/configs/meson64.h
--- u-boot-2021.04/include/configs/meson64.h 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-mender/include/configs/meson64.h 2023-04-13 10:49:28.861382983 +0930
@@ -31,6 +31,8 @@
#define CONFIG_CPU_ARMV8
#define CONFIG_REMAKE_ELF
......@@ -200,9 +189,9 @@ diff -uNr u-boot-2020.04/include/configs/meson64.h u-boot-2020.04-mender/include
#define CONFIG_SYS_MAXARGS 32
#define CONFIG_SYS_MALLOC_LEN (32 << 20)
#define CONFIG_SYS_CBSIZE 1024
diff -uNr u-boot-2020.04/include/configs/odroid_xu3.h u-boot-2020.04-mender/include/configs/odroid_xu3.h
--- u-boot-2020.04/include/configs/odroid_xu3.h 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/include/configs/odroid_xu3.h 2021-09-15 13:44:30.861966387 +0000
diff -uNr u-boot-2021.04/include/configs/odroid_xu3.h u-boot-2021.04-mender/include/configs/odroid_xu3.h
--- u-boot-2021.04/include/configs/odroid_xu3.h 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-mender/include/configs/odroid_xu3.h 2023-04-13 10:49:28.861382983 +0930
@@ -10,6 +10,9 @@
#include <configs/exynos5420-common.h>
#include <configs/exynos5-common.h>
......@@ -213,10 +202,10 @@ diff -uNr u-boot-2020.04/include/configs/odroid_xu3.h u-boot-2020.04-mender/incl
#define CONFIG_BOARD_COMMON
#define CONFIG_SYS_SDRAM_BASE 0x40000000
diff -uNr u-boot-2020.04/include/configs/rpi.h u-boot-2020.04-mender/include/configs/rpi.h
--- u-boot-2020.04/include/configs/rpi.h 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/include/configs/rpi.h 2021-09-15 13:31:30.207335806 +0000
@@ -97,6 +97,8 @@
diff -uNr u-boot-2021.04/include/configs/rpi.h u-boot-2021.04-mender/include/configs/rpi.h
--- u-boot-2021.04/include/configs/rpi.h 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-mender/include/configs/rpi.h 2023-04-13 10:49:28.862382986 +0930
@@ -95,6 +95,8 @@
#define CONFIG_SYS_CBSIZE 1024
/* Environment */
......@@ -225,9 +214,9 @@ diff -uNr u-boot-2020.04/include/configs/rpi.h u-boot-2020.04-mender/include/con
#define CONFIG_SYS_LOAD_ADDR 0x1000000
/* Shell */
diff -uNr u-boot-2020.04/include/configs/sun8i.h u-boot-2020.04-mender/include/configs/sun8i.h
--- u-boot-2020.04/include/configs/sun8i.h 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/include/configs/sun8i.h 2021-09-15 13:31:30.207335806 +0000
diff -uNr u-boot-2021.04/include/configs/sun8i.h u-boot-2021.04-mender/include/configs/sun8i.h
--- u-boot-2021.04/include/configs/sun8i.h 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-mender/include/configs/sun8i.h 2023-04-13 10:49:28.862382986 +0930
@@ -17,4 +17,7 @@
*/
#include <configs/sunxi-common.h>
......@@ -236,36 +225,19 @@ diff -uNr u-boot-2020.04/include/configs/sun8i.h u-boot-2020.04-mender/include/c
+#define CONFIG_BOOTCOUNT_ENV
+
#endif /* __CONFIG_H */
diff -uNr u-boot-2020.04/include/configs/sunxi-common.h u-boot-2020.04-mender/include/configs/sunxi-common.h
--- u-boot-2020.04/include/configs/sunxi-common.h 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/include/configs/sunxi-common.h 2021-09-15 13:31:30.212335614 +0000
@@ -134,13 +134,6 @@
#define CONFIG_BOARD_SIZE_LIMIT 0x7e000
#endif
-#if CONFIG_MMC_SUNXI_SLOT_EXTRA != -1
-/* If we have two devices (most likely eMMC + MMC), favour the eMMC */
-#define CONFIG_SYS_MMC_ENV_DEV 1
-#else
-/* Otherwise, use the only device we have */
-#define CONFIG_SYS_MMC_ENV_DEV 0
-#endif
#define CONFIG_SYS_MMC_MAX_DEVICE 4
#endif
diff -uNr u-boot-2020.04/include/env_default.h u-boot-2020.04-mender/include/env_default.h
--- u-boot-2020.04/include/env_default.h 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/include/env_default.h 2021-09-15 13:31:30.217335422 +0000
@@ -9,6 +9,8 @@
diff -uNr u-boot-2021.04/include/env_default.h u-boot-2021.04-mender/include/env_default.h
--- u-boot-2021.04/include/env_default.h 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-mender/include/env_default.h 2023-04-13 10:49:28.862382986 +0930
@@ -10,6 +10,8 @@
#include <env_callback.h>
#include <linux/stringify.h>
+#include <env_mender.h>
+
#ifdef DEFAULT_ENV_INSTANCE_EMBEDDED
env_t embedded_environment __UBOOT_ENV_SECTION__(environment) = {
ENV_CRC, /* CRC Sum */
@@ -21,6 +23,7 @@
@@ -24,6 +26,7 @@
#else
const uchar default_environment[] = {
#endif
......@@ -273,7 +245,7 @@ diff -uNr u-boot-2020.04/include/env_default.h u-boot-2020.04-mender/include/env
#ifndef CONFIG_USE_DEFAULT_ENV_FILE
#ifdef CONFIG_ENV_CALLBACK_LIST_DEFAULT
ENV_CALLBACK_VAR "=" CONFIG_ENV_CALLBACK_LIST_DEFAULT "\0"
@@ -32,7 +35,7 @@
@@ -35,7 +38,7 @@
"bootargs=" CONFIG_BOOTARGS "\0"
#endif
#ifdef CONFIG_BOOTCOMMAND
......@@ -282,9 +254,9 @@ diff -uNr u-boot-2020.04/include/env_default.h u-boot-2020.04-mender/include/env
#endif
#ifdef CONFIG_RAMBOOTCOMMAND
"ramboot=" CONFIG_RAMBOOTCOMMAND "\0"
diff -uNr u-boot-2020.04/include/env_mender.h u-boot-2020.04-mender/include/env_mender.h
--- u-boot-2020.04/include/env_mender.h 1970-01-01 00:00:00.000000000 +0000
+++ u-boot-2020.04-mender/include/env_mender.h 2021-09-15 13:31:30.217335422 +0000
diff -uNr u-boot-2021.04/include/env_mender.h u-boot-2021.04-mender/include/env_mender.h
--- u-boot-2021.04/include/env_mender.h 1970-01-01 09:30:00.000000000 +0930
+++ u-boot-2021.04-mender/include/env_mender.h 2023-04-13 10:49:28.862382986 +0930
@@ -0,0 +1,86 @@
+/*
+ Copyright 2017 Northern.tech AS
......@@ -372,10 +344,10 @@ diff -uNr u-boot-2020.04/include/env_mender.h u-boot-2020.04-mender/include/env_
+#endif /* !MENDER_AUTO_PROBING */
+
+#endif /* HEADER_ENV_MENDER_H */
diff -uNr u-boot-2020.04/scripts/Makefile.autoconf u-boot-2020.04-mender/scripts/Makefile.autoconf
--- u-boot-2020.04/scripts/Makefile.autoconf 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-mender/scripts/Makefile.autoconf 2021-09-15 13:31:30.217335422 +0000
@@ -109,7 +109,8 @@
diff -uNr u-boot-2021.04/scripts/Makefile.autoconf u-boot-2021.04-mender/scripts/Makefile.autoconf
--- u-boot-2021.04/scripts/Makefile.autoconf 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-mender/scripts/Makefile.autoconf 2023-04-13 10:49:28.863382989 +0930
@@ -108,7 +108,8 @@
echo \#include \<configs/$(CONFIG_SYS_CONFIG_NAME).h\>; \
echo \#include \<asm/config.h\>; \
echo \#include \<linux/kconfig.h\>; \
......
diff -uNr u-boot-2020.04/board/samsung/common/exynos5-dt-types.c u-boot-2020.04-odroid_board_detection_fix/board/samsung/common/exynos5-dt-types.c
--- u-boot-2020.04/board/samsung/common/exynos5-dt-types.c 2020-04-13 15:02:18.000000000 +0000
+++ u-boot-2020.04-odroid_board_detection_fix/board/samsung/common/exynos5-dt-types.c 2021-12-30 08:51:44.151701989 +0000
@@ -41,7 +41,7 @@
diff -uNr u-boot-2021.04/board/samsung/common/exynos5-dt-types.c u-boot-2021.04-odroid_board_detection_fix/board/samsung/common/exynos5-dt-types.c
--- u-boot-2021.04/board/samsung/common/exynos5-dt-types.c 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-odroid_board_detection_fix/board/samsung/common/exynos5-dt-types.c 2023-04-13 10:47:53.888103021 +0930
@@ -43,7 +43,7 @@
{ EXYNOS5_BOARD_ODROID_XU3_REV02, 2, 375, "xu3" },
{ EXYNOS5_BOARD_ODROID_XU4_REV01, 1, 1293, "xu4" },
{ EXYNOS5_BOARD_ODROID_HC1_REV01, 1, 1322, "hc1" },
......
diff -uNr u-boot-2021.04/arch/arm/dts/Makefile u-boot-2021.04-orangepi-3-lts/arch/arm/dts/Makefile
--- u-boot-2021.04/arch/arm/dts/Makefile 2021-04-05 15:03:29.000000000 +0000
+++ u-boot-2021.04-orangepi-3-lts/arch/arm/dts/Makefile 2022-11-19 05:29:39.041585689 +0000
@@ -613,6 +613,7 @@
dtb-$(CONFIG_MACH_SUN50I_H6) += \
sun50i-h6-beelink-gs1.dtb \
sun50i-h6-orangepi-3.dtb \
+ sun50i-h6-orangepi-3-lts.dtb \
sun50i-h6-orangepi-lite2.dtb \
sun50i-h6-orangepi-one-plus.dtb \
sun50i-h6-pine-h64.dtb \
diff -uNr u-boot-2021.04/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts u-boot-2021.04-orangepi-3-lts/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts
--- u-boot-2021.04/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts 1970-01-01 00:00:00.000000000 +0000
+++ u-boot-2021.04-orangepi-3-lts/arch/arm/dts/sun50i-h6-orangepi-3-lts.dts 2022-11-19 05:29:39.049585841 +0000
@@ -0,0 +1,180 @@
+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
+/*
+ * Copyright (C) 2018 Amarula Solutions
+ * Author: Jagan Teki <jagan@amarulasolutions.com>
+ */
+
+/dts-v1/;
+
+#include "sun50i-h6.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+
+/ {
+ model = "OrangePi 3 LTS";
+ compatible = "xunlong,orangepi-3-lts", "allwinner,sun50i-h6";
+
+ aliases {
+ serial0 = &uart0;
+ ethernet0 = &emac;
+ };
+
+ chosen {
+ stdout-path = "serial0:115200n8";
+ };
+};
+
+&emac {
+ pinctrl-names = "default";
+ pinctrl-0 = <&ext_rgmii_pins>;
+ phy-mode = "rgmii";
+ phy-handle = <&ext_rgmii_phy>;
+ phy-supply = <&reg_aldo2>;
+ allwinner,rx-delay-ps = <200>;
+ allwinner,tx-delay-ps = <200>;
+ status = "okay";
+};
+
+&mdio {
+ ext_rgmii_phy: ethernet-phy@1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ };
+};
+
+&mmc0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc0_pins>;
+ vmmc-supply = <&reg_cldo1>;
+ cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;
+ bus-width = <4>;
+ status = "okay";
+};
+
+&mmc2 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&mmc2_pins>;
+ vmmc-supply = <&reg_cldo1>;
+ non-removable;
+ cap-mmc-hw-reset;
+ bus-width = <8>;
+ status = "okay";
+};
+
+&r_i2c {
+ status = "okay";
+
+ axp805: pmic@36 {
+ compatible = "x-powers,axp805", "x-powers,axp806";
+ reg = <0x36>;
+ interrupt-parent = <&r_intc>;
+ interrupts = <0 IRQ_TYPE_LEVEL_LOW>;
+ interrupt-controller;
+ #interrupt-cells = <1>;
+ x-powers,self-working-mode;
+
+ regulators {
+ reg_aldo1: aldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-pl";
+ };
+
+ reg_aldo2: aldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-ac200";
+ };
+
+ reg_aldo3: aldo3 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc25-dram";
+ };
+
+ reg_bldo1: bldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-bias-pll";
+ };
+
+ reg_bldo2: bldo2 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-efuse-pcie-hdmi-io";
+ };
+
+ reg_bldo3: bldo3 {
+ regulator-always-on;
+ regulator-min-microvolt = <1800000>;
+ regulator-max-microvolt = <1800000>;
+ regulator-name = "vcc-dcxoio";
+ };
+
+ bldo4 {
+ /* unused */
+ };
+
+ reg_cldo1: cldo1 {
+ regulator-always-on;
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-3v3";
+ };
+
+ reg_cldo2: cldo2 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-wifi-1";
+ };
+
+ reg_cldo3: cldo3 {
+ regulator-min-microvolt = <3300000>;
+ regulator-max-microvolt = <3300000>;
+ regulator-name = "vcc-wifi-2";
+ };
+
+ reg_dcdca: dcdca {
+ regulator-always-on;
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <1080000>;
+ regulator-name = "vdd-cpu";
+ };
+
+ reg_dcdcc: dcdcc {
+ regulator-min-microvolt = <810000>;
+ regulator-max-microvolt = <1080000>;
+ regulator-name = "vdd-gpu";
+ };
+
+ reg_dcdcd: dcdcd {
+ regulator-always-on;
+ regulator-min-microvolt = <980000>;
+ regulator-max-microvolt = <980000>;
+ regulator-name = "vdd-sys";
+ };
+
+ reg_dcdce: dcdce {
+ regulator-always-on;
+ regulator-min-microvolt = <1200000>;
+ regulator-max-microvolt = <1200000>;
+ regulator-name = "vcc-dram";
+ };
+
+ sw {
+ /* unused */
+ };
+ };
+ };
+};
+
+&uart0 {
+ pinctrl-names = "default";
+ pinctrl-0 = <&uart0_ph_pins>;
+ status = "okay";
+};
diff -uNr u-boot-2021.04/configs/orangepi_3_lts_defconfig u-boot-2021.04-orangepi-3-lts/configs/orangepi_3_lts_defconfig
--- u-boot-2021.04/configs/orangepi_3_lts_defconfig 1970-01-01 00:00:00.000000000 +0000
+++ u-boot-2021.04-orangepi-3-lts/configs/orangepi_3_lts_defconfig 2022-11-19 05:54:09.445660184 +0000
@@ -0,0 +1,32 @@
+CONFIG_ARM=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_MACH_SUN50I_H6=y
+CONFIG_SUNXI_DRAM_H6_LPDDR3=y
+CONFIG_SUNXI_DRAM_DDR3=n
+CONFIG_DRAM_ODT_EN=y
+CONFIG_MMC0_CD_PIN="PF6"
+CONFIG_MMC_SUNXI_SLOT_EXTRA=2
+CONFIG_HDMI_DDC_EN="PH2"
+# CONFIG_PSCI_RESET is not set
+CONFIG_DEFAULT_DEVICE_TREE="sun50i-h6-orangepi-3-lts"
+# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
+CONFIG_SPL=y
+CONFIG_SPL_I2C=y
+CONFIG_R_I2C_ENABLE=y
+# CONFIG_CMD_FLASH is not set
+# CONFIG_CMD_FPGA is not set
+# CONFIG_SPL_DOS_PARTITION is not set
+# CONFIG_SPL_ISO_PARTITION is not set
+# CONFIG_SPL_EFI_PARTITION is not set
+# CONFIG_BOOTM_EFI is not set
+# CONFIG_BOOTM_NETBSD is not set
+# CONFIG_BOOTM_OPENRTOS is not set
+# CONFIG_BOOTM_OSE is not set
+# CONFIG_BOOTM_PLAN9 is not set
+# CONFIG_BOOTM_RTEMS is not set
+# CONFIG_BOOTM_VXWORKS is not set
+# CONFIG_CMD_NFS is not set
+# CONFIG_CMD_UNZIP is not set
+# CONFIG_CMD_BOOTEFI is not set
+# CONFIG_CMD_BOOTEFI_HELLO_COMPILE is not set
+# CONFIG_EFI_LOADER is not set
diff -uNr u-boot-2020.04/board/raspberrypi/rpi/rpi.c u-boot-2020.04-serial-number-fix/board/raspberrypi/rpi/rpi.c
--- u-boot-2020.04/board/raspberrypi/rpi/rpi.c 2020-04-14 00:32:18.000000000 +0930
+++ u-boot-2020.04-serial-number-fix/board/raspberrypi/rpi/rpi.c 2020-05-30 19:51:58.277978268 +0930
@@ -371,9 +371,6 @@
diff -uNr u-boot-2021.04/board/raspberrypi/rpi/rpi.c u-boot-2021.04-serial-number-fix/board/raspberrypi/rpi/rpi.c
--- u-boot-2021.04/board/raspberrypi/rpi/rpi.c 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-serial-number-fix/board/raspberrypi/rpi/rpi.c 2023-04-13 10:43:10.147266609 +0930
@@ -388,9 +388,6 @@
int ret;
char serial_string[17] = { 0 };
......@@ -11,29 +11,26 @@ diff -uNr u-boot-2020.04/board/raspberrypi/rpi/rpi.c u-boot-2020.04-serial-numbe
BCM2835_MBOX_INIT_HDR(msg);
BCM2835_MBOX_INIT_TAG_NO_REQ(&msg->get_board_serial, GET_BOARD_SERIAL);
diff -uNr u-boot-2020.04/board/sunxi/board.c u-boot-2020.04-serial-number-fix/board/sunxi/board.c
--- u-boot-2020.04/board/sunxi/board.c 2020-04-14 00:32:18.000000000 +0930
+++ u-boot-2020.04-serial-number-fix/board/sunxi/board.c 2020-05-30 19:51:58.277978268 +0930
@@ -781,6 +781,7 @@
diff -uNr u-boot-2021.04/board/sunxi/board.c u-boot-2021.04-serial-number-fix/board/sunxi/board.c
--- u-boot-2021.04/board/sunxi/board.c 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-serial-number-fix/board/sunxi/board.c 2023-04-13 10:46:21.979832095 +0930
@@ -852,6 +852,7 @@
uint8_t mac_addr[6];
char ethaddr[16];
int i, ret;
int i;
+ const char *env_serial;
ret = sunxi_get_sid(sid);
if (ret == 0 && sid[0] != 0) {
@@ -829,10 +830,10 @@
if (!get_unique_sid(sid))
return;
@@ -880,9 +881,10 @@
eth_env_set_enetaddr(ethaddr, mac_addr);
}
- if (!env_get("serial#")) {
- snprintf(serial_string, sizeof(serial_string),
- "%08x%08x", sid[0], sid[3]);
-
+ env_serial = env_get("serial#");
+ snprintf(serial_string, sizeof(serial_string),
+ "%08x%08x", sid[0], sid[3]);
snprintf(serial_string, sizeof(serial_string),
"%08x%08x", sid[0], sid[3]);
+ if (!env_serial || (env_serial && !strcmp(serial_string, env_serial))) {
env_set("serial#", serial_string);
}
}
diff -uNr u-boot-2020.04/arch/arm/mach-sunxi/clock_sun6i.c u-boot-2020.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers/arch/arm/mach-sunxi/clock_sun6i.c
--- u-boot-2020.04/arch/arm/mach-sunxi/clock_sun6i.c 2020-04-14 00:32:18.000000000 +0930
+++ u-boot-2020.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers/arch/arm/mach-sunxi/clock_sun6i.c 2021-05-10 23:26:33.607420988 +0930
@@ -115,11 +115,10 @@
diff -uNr u-boot-2021.04/arch/arm/mach-sunxi/clock_sun6i.c u-boot-2021.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers/arch/arm/mach-sunxi/clock_sun6i.c
--- u-boot-2021.04/arch/arm/mach-sunxi/clock_sun6i.c 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-sunxi-h3-Fix-PLL1-setup-to-never-use-dividers/arch/arm/mach-sunxi/clock_sun6i.c 2023-04-13 10:41:33.653982168 +0930
@@ -117,11 +117,10 @@
int k = 1;
int m = 1;
......
diff -uNr u-boot-2021.04/include/configs/sunxi-common.h u-boot-2021.04-sunxi_env_in_mmc0/include/configs/sunxi-common.h
--- u-boot-2021.04/include/configs/sunxi-common.h 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-sunxi_env_in_mmc0/include/configs/sunxi-common.h 2023-04-13 10:40:05.032720933 +0930
@@ -134,6 +134,7 @@
#define CONFIG_BOARD_SIZE_LIMIT 0x7e000
#endif
+#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_SYS_MMC_MAX_DEVICE 4
#endif
diff -uNr u-boot-2020.04/board/sunxi/board.c u-boot-2020.04-sunxi_wdt/board/sunxi/board.c
--- u-boot-2020.04/board/sunxi/board.c 2020-04-14 00:32:18.000000000 +0930
+++ u-boot-2020.04-sunxi_wdt/board/sunxi/board.c 2020-05-30 20:04:51.966871529 +0930
@@ -40,6 +40,7 @@
diff -uNr u-boot-2021.04/board/sunxi/board.c u-boot-2021.04-sunxi_wdt/board/sunxi/board.c
--- u-boot-2021.04/board/sunxi/board.c 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-sunxi_wdt/board/sunxi/board.c 2023-04-13 10:31:39.312230182 +0930
@@ -46,6 +46,7 @@
#include <spl.h>
#include <sy8106a.h>
#include <asm/setup.h>
......@@ -9,8 +9,8 @@ diff -uNr u-boot-2020.04/board/sunxi/board.c u-boot-2020.04-sunxi_wdt/board/sunx
#if defined CONFIG_VIDEO_LCD_PANEL_I2C && !(defined CONFIG_SPL_BUILD)
/* So that we can use pin names in Kconfig and sunxi_name_to_gpio() */
@@ -316,6 +317,20 @@
return spl;
@@ -351,6 +352,20 @@
return NULL;
}
+#if !defined(CONFIG_SPL_BUILD) && defined(CONFIG_WDT_SUNXI)
......@@ -30,10 +30,10 @@ diff -uNr u-boot-2020.04/board/sunxi/board.c u-boot-2020.04-sunxi_wdt/board/sunx
int dram_init(void)
{
struct boot_file_head *spl = get_spl_header(SPL_DRAM_HEADER_VERSION);
diff -uNr u-boot-2020.04/drivers/watchdog/Kconfig u-boot-2020.04-sunxi_wdt/drivers/watchdog/Kconfig
--- u-boot-2020.04/drivers/watchdog/Kconfig 2020-04-14 00:32:18.000000000 +0930
+++ u-boot-2020.04-sunxi_wdt/drivers/watchdog/Kconfig 2020-05-30 20:11:06.916793584 +0930
@@ -75,7 +75,7 @@
diff -uNr u-boot-2021.04/drivers/watchdog/Kconfig u-boot-2021.04-sunxi_wdt/drivers/watchdog/Kconfig
--- u-boot-2021.04/drivers/watchdog/Kconfig 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-sunxi_wdt/drivers/watchdog/Kconfig 2023-04-13 10:33:54.814629614 +0930
@@ -77,7 +77,7 @@
config WDT_ASPEED
bool "Aspeed ast2400/ast2500 watchdog timer support"
......@@ -42,7 +42,7 @@ diff -uNr u-boot-2020.04/drivers/watchdog/Kconfig u-boot-2020.04-sunxi_wdt/drive
default y if ARCH_ASPEED
help
Select this to enable watchdog timer for Aspeed ast2500/ast2400 devices.
@@ -148,12 +148,22 @@
@@ -176,12 +176,22 @@
config WDT_ORION
bool "Orion watchdog timer support"
......@@ -63,23 +63,23 @@ diff -uNr u-boot-2020.04/drivers/watchdog/Kconfig u-boot-2020.04-sunxi_wdt/drive
+ This provides basic infrastructure to support Sunxi watchdog
+ hardware, with a max timeout of ~16secs.
+
config WDT_SANDBOX
bool "Enable Watchdog Timer support for Sandbox"
depends on SANDBOX && WDT
diff -uNr u-boot-2020.04/drivers/watchdog/Makefile u-boot-2020.04-sunxi_wdt/drivers/watchdog/Makefile
--- u-boot-2020.04/drivers/watchdog/Makefile 2020-04-14 00:32:18.000000000 +0930
+++ u-boot-2020.04-sunxi_wdt/drivers/watchdog/Makefile 2020-05-30 20:04:51.967871531 +0930
@@ -22,6 +22,7 @@
config WDT_K3_RTI
bool "Texas Instruments K3 RTI watchdog"
depends on WDT && ARCH_K3
diff -uNr u-boot-2021.04/drivers/watchdog/Makefile u-boot-2021.04-sunxi_wdt/drivers/watchdog/Makefile
--- u-boot-2021.04/drivers/watchdog/Makefile 2021-04-06 00:33:29.000000000 +0930
+++ u-boot-2021.04-sunxi_wdt/drivers/watchdog/Makefile 2023-04-13 10:31:39.312230182 +0930
@@ -23,6 +23,7 @@
obj-$(CONFIG_WDT_BCM6345) += bcm6345_wdt.o
obj-$(CONFIG_WDT_CORTINA) += cortina_wdt.o
obj-$(CONFIG_WDT_ORION) += orion_wdt.o
+obj-$(CONFIG_WDT_SUNXI) += sunxi_wdt.o
obj-$(CONFIG_WDT_CDNS) += cdns_wdt.o
obj-$(CONFIG_WDT_MPC8xx) += mpc8xx_wdt.o
obj-$(CONFIG_WDT_MT7621) += mt7621_wdt.o
diff -uNr u-boot-2020.04/drivers/watchdog/sunxi_wdt.c u-boot-2020.04-sunxi_wdt/drivers/watchdog/sunxi_wdt.c
--- u-boot-2020.04/drivers/watchdog/sunxi_wdt.c 1970-01-01 09:30:00.000000000 +0930
+++ u-boot-2020.04-sunxi_wdt/drivers/watchdog/sunxi_wdt.c 2020-05-30 20:04:51.967871531 +0930
obj-$(CONFIG_WDT_MT7620) += mt7620_wdt.o
diff -uNr u-boot-2021.04/drivers/watchdog/sunxi_wdt.c u-boot-2021.04-sunxi_wdt/drivers/watchdog/sunxi_wdt.c
--- u-boot-2021.04/drivers/watchdog/sunxi_wdt.c 1970-01-01 09:30:00.000000000 +0930
+++ u-boot-2021.04-sunxi_wdt/drivers/watchdog/sunxi_wdt.c 2023-04-13 10:31:39.312230182 +0930
@@ -0,0 +1,274 @@
+/*
+ * sunxi Watchdog Driver
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment