#!/bin/sh

# script to boot barebox over tftp

path="/mnt/tftp"

global.bootm.image="${path}/${global.user}-barebox-${global.hostname}"
if [ ! -f "${global.bootm.image}" ]; then
      fitimage="${path}/${global.user}-barebox-${global.arch}"
      echo "Image  ${global.bootm.image} not found"
      echo "Trying ${fitimage} as fallback"
      global.bootm.image="${fitimage}"
fi
