Commit 05005439 authored by Vladimir Bashkirtsev's avatar Vladimir Bashkirtsev

Added support for Nile board with Orinoco Mini

parent c1f1bbe7
......@@ -569,7 +569,7 @@ iwaveg35m-mender: iwaveg35m-boot-cmd-mender iwaveg35m-fw_env.config-mender iwave
@echo "# CONFIG_WDT_ASPEED is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_AST2600 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_CDNS=y" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_CORTINA is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_ORION is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_SBSA is not set" >> u-boot-2021.04/.config
......@@ -598,10 +598,10 @@ iwaveg35m-mender: iwaveg35m-boot-cmd-mender iwaveg35m-fw_env.config-mender iwave
iwaveg35m-boot-cmd-mender:
define BOOTCMD_IWAVEG35M_MENDER
run mender_setup
load $${mender_uboot_root} $${kernel_addr_r} boot/zImage
load $${mender_uboot_root} $${kernel_addr_r} boot/Image
load $${mender_uboot_root} $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=ttyPS0,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}
booti $${kernel_addr_r} - $${fdt_addr_r}
run mender_try_to_recover
endef
export BOOTCMD_IWAVEG35M_MENDER
......@@ -613,6 +613,141 @@ define FW_ENV_IWAVEG35M_MENDER
endef
export FW_ENV_IWAVEG35M_MENDER
nileorinocomini: nileorinocomini-boot-cmd nileorinocomini-fw_env.config nileorinocomini-boot.bif
tar xf xilinx-bootgen-2022.2.tar.gz
$(MAKE) -C xilinx-bootgen-2022.2
$(MAKE) -C ../embeddedsw-xilinx nileorinocomini
tar xf arm-trusted-firmware.tar.xz
$(MAKE) -C arm-trusted-firmware PLAT=zynqmp RESET_TO_BL31=1 bl31
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-nileorinocomini.patch
cp xilinx-bootgen-2022.2/bootgen u-boot-2021.04
cp ../embeddedsw-xilinx/fsbl.elf u-boot-2021.04
cp ../embeddedsw-xilinx/pmufw.elf u-boot-2021.04/pmufw.elf
cp arm-trusted-firmware/build/zynqmp/release/bl31/bl31.elf u-boot-2021.04
$(MAKE) -C u-boot-2021.04 zynqmp_nileorinocomini_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
@echo "$$BOOTBIF_NILEORINOCOMINI" > u-boot-2021.04/boot.bif
cd u-boot-2021.04 && ./bootgen -arch zynqmp -image boot.bif -o /uboot/BOOT.bin -w on
@echo "$$BOOTCMD_NILEORINOCOMINI" > 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_NILEORINOCOMINI" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(BOOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2021.04
rm -rf arm-trusted-firmware
rm -rf xilinx-bootgen_2022.2
nileorinocomini-boot-cmd:
define BOOTCMD_NILEORINOCOMINI
load mmc 0:2 $${kernel_addr_r} boot/Image
load mmc 0:2 $${fdt_addr_r} boot/machine.dtb
setenv bootargs console=ttyPS0,115200 root=/dev/$(BOOT_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_NILEORINOCOMINI
nileorinocomini-fw_env.config:
define FW_ENV_NILEORINOCOMINI
/dev/$(BOOT_DEVICE) 0x88000 0x20000
endef
export FW_ENV_NILEORINOCOMINI
nileorinocomini-boot.bif:
define BOOTBIF_NILEORINOCOMINI
the_ROM_image:
{
[bootloader, destination_cpu=a53-0] fsbl.elf
[pmufw_image] pmufw.elf
[destination_cpu=a53-0, exception_level=el-3, trustzone] bl31.elf
[destination_cpu=a53-0, load=0x00100000] u-boot.dtb
[destination_cpu=a53-0, exception_level=el-2] u-boot.elf
}
endef
export BOOTBIF_NILEORINOCOMINI
nileorinocomini-mender: nileorinocomini-boot-cmd-mender nileorinocomini-fw_env.config-mender nileorinocomini-boot.bif
tar xf xilinx-bootgen-2022.2.tar.gz
$(MAKE) -C xilinx-bootgen-2022.2
$(MAKE) -C ../embeddedsw-xilinx nileorinocomini
tar xf arm-trusted-firmware.tar.xz
$(MAKE) -C arm-trusted-firmware PLAT=zynqmp RESET_TO_BL31=1 bl31
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-nileorinocomini.patch
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-mender.patch
cp xilinx-bootgen-2022.2/bootgen u-boot-2021.04
cp ../embeddedsw-xilinx/fsbl.elf u-boot-2021.04
cp ../embeddedsw-xilinx/pmufw.elf u-boot-2021.04/pmufw.elf
cp arm-trusted-firmware/build/zynqmp/release/bl31/bl31.elf u-boot-2021.04
$(MAKE) -C u-boot-2021.04 zynqmp_nileorinocomini_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_ASPEED is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_AST2600 is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_AT91 is not set" >> u-boot-2021.04/.config
@echo "CONFIG_WDT_CDNS=y" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_CORTINA is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_ORION is not set" >> u-boot-2021.04/.config
@echo "# CONFIG_WDT_SBSA is not set" >> 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
@echo "$$BOOTBIF_NILEORINOCOMINI" > u-boot-2021.04/boot.bif
cd u-boot-2021.04 && ./bootgen -arch zynqmp -image boot.bif -o /uboot/BOOT.bin -w on
@echo "$$BOOTCMD_NILEORINOCOMINI_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_NILEORINOCOMINI_MENDER" > /etc/fw_env.config
/sbin/fw_setenv reset
if [ -n "$(ENV_DEVICE)" ]; then sed -i 's/$(BOOT_DEVICE)/$(ENV_DEVICE)/' /etc/fw_env.config; fi
umount /dev/$(DISK)1
rm -rf u-boot-2021.04
rm -rf arm-trusted-firmware
rm -rf xilinx-bootgen_2022.2
nileorinocomini-boot-cmd-mender:
define BOOTCMD_NILEORINOCOMINI_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=ttyPS0,115200 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
export BOOTCMD_NILEORINOCOMINI_MENDER
nileorinocomini-fw_env.config-mender:
define FW_ENV_NILEORINOCOMINI_MENDER
/dev/$(BOOT_DEVICE) 0x400000 0x20000
/dev/$(BOOT_DEVICE) 0x800000 0x20000
endef
export FW_ENV_NILEORINOCOMINI_MENDER
rpi3b: rpi3b-boot-cmd rpi3b-fw_env.config rpi3b-config
tar xf u-boot-2021.04.tar.gz
patch -Np1 -d u-boot-2021.04 < u-boot-2021.04-serial-number-fix.patch
......
This diff is collapsed.
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