makeuboot 1.06 KB
Newer Older
1
#!/bin/bash
2 3 4 5 6 7 8 9

if [ ! $1 ]; then
  echo "  Usage:  
      ./makeuboot <target> 
  Supported targets:
      ./makeuboot zynq_microzed_config
      ./makeuboot zynq_zc706_config
      ./makeuboot elphel393_config
10
      ./makeuboot zynq_zed_config
11 12 13 14
  "
  exit -1
fi

15
. ./initenv
16
make clean
17
make $1
18
make include/autoconf.mk
19 20
echo "Running ezynqcfg.py for the first time - u-boot length is not known yet, generating arch/arm/mach-zynq/ezynq.c"
ezynq/ezynqcfg.py -c include/autoconf.mk --html u-boot.html -o boot_head.bin --html-mask 0x3ff --lowlevel arch/arm/mach-zynq/ezynq.c
21

22
make
23 24

echo "Running ezynqcfg.py for the second time - u-boot length is known and will be used in the RBL header"
25
echo "Other files are already created, repeating it here just to remind their paths"
26

27
if [ $(cat .config | grep "CONFIG_SPL=y") ]; then
28 29 30 31 32
  UBOOT_FILE="spl/u-boot-spl.bin"
else
  UBOOT_FILE="u-boot.bin"
fi

33
ezynq/ezynqcfg.py -c include/autoconf.mk -o boot_head.bin --uboot $UBOOT_FILE --html u-boot.html --html-mask 0x3ff --lowlevel arch/arm/mach-zynq/ezynq.c
34
cat boot_head.bin $UBOOT_FILE > boot.bin