Skip to content

Instantly share code, notes, and snippets.

@teknoraver
Last active February 5, 2026 16:01
Show Gist options
  • Select an option

  • Save teknoraver/de50894d520ee681d88044c4799ec5f1 to your computer and use it in GitHub Desktop.

Select an option

Save teknoraver/de50894d520ee681d88044c4799ec5f1 to your computer and use it in GitHub Desktop.
Megrez u-boot compilation
#!/bin/sh
mkdir -p sign/preload
git clone -b eic7x-dt-fix-megrez https://github.com/ganboing/u-boot-eic7x.git u-boot
cd u-boot
make eic7700_milkv_megrez_defconfig
make -j4
cd -
git clone https://github.com/riscv-software-src/opensbi.git
cd opensbi
make -j4 PLATFORM=generic FW_PAYLOAD=y FW_PAYLOAD_PATH=../u-boot/u-boot.bin FW_FDT_PATH=../u-boot/u-boot.dtb
cp -av ./build/platform/generic/firmware/fw_payload.bin ../sign/preload/
cd -
git clone -b dev https://github.com/eswincomputing/Esbd-77serial-nsign nsign
cd nsign
./build.sh
cp -av nsign ../sign/preload/
cd -
cd sign/preload
wget \
http://declera.com/~yaneti/eswin-nsign/megrez-nsign2.cfg \
https://github.com/eswincomputing/Esbd-77serial-firmware/raw/refs/heads/master/sys/sys_init.bin \
https://github.com/eswincomputing/Esbd-77serial-firmware/raw/refs/heads/master/ddr/ddr_fw.bin
./nsign megrez-nsign2.cfg
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment