voron

experimental ARM OS
git clone git://git.2f30.org/voron
Log | Files | Refs | README | LICENSE

panda_usbboot.sh (847B)


      1 #!/bin/sh
      2 
      3 if [ $# -gt 0 ]; then
      4     BIN=$(realpath "$1")
      5 fi
      6 
      7 [ $(basename ${PWD}) = "scripts" ] && cd ..
      8 
      9 if [ -z "$BIN" ]; then
     10     BIN="${PWD}/kernel.bin"
     11 fi
     12 
     13 if [ ! -f "$BIN" ]; then
     14     echo "run \`make' first."
     15     exit 1
     16 fi
     17 
     18 if [ -z "$OMAP4BOOT_PATH" ]; then
     19     if [ ! -d "boot/omap4boot" ]; then
     20 	cd boot
     21 	git clone git://github.com/swetland/omap4boot.git
     22 	cd omap4boot
     23 	patch -p1 -i ../omap4boot_remove_signature_check.patch
     24 	cd ../..
     25     fi
     26 
     27     OMAP4BOOT_PATH="${PWD}/boot/omap4boot/out/panda"
     28 
     29     if [ ! -f "${OMAP4BOOT_PATH}/usbboot" -o ! -f "${OMAP4BOOT_PATH}/aboot.bin" ]; then
     30         cd boot/omap4boot
     31         if [ -z "$TOOLCHAIN" ]; then
     32             make TOOLCHAIN=arm-none-eabi-
     33         else
     34             make TOOLCHAIN="$TOOLCHAIN"
     35         fi
     36     fi
     37 fi
     38 
     39 sudo "${OMAP4BOOT_PATH}/usbboot" "${OMAP4BOOT_PATH}/aboot.bin" "${BIN}"