2019-01-18 21:35:17 -06:00
|
|
|
#!/bin/bash
|
|
|
|
|
|
|
|
echo Starting uboot \'$1\'
|
|
|
|
|
|
|
|
case "$1" in
|
|
|
|
clean)
|
|
|
|
echo fucking clean
|
|
|
|
echo fucking clean
|
|
|
|
echo fucking clean
|
|
|
|
make distclean
|
|
|
|
rm -rf [A-Za-z]*
|
|
|
|
git reset --hard
|
|
|
|
echo fucking clean
|
|
|
|
echo fucking clean
|
|
|
|
echo fucking clean
|
|
|
|
;;
|
2021-10-23 19:05:42 -05:00
|
|
|
fetch)
|
|
|
|
git remote add jcarr git@git.wit.com:jcarr/u-boot.git
|
|
|
|
git fetch jcarr
|
|
|
|
git fetch trini
|
|
|
|
git fetch origin
|
|
|
|
;;
|
2019-01-20 03:13:32 -06:00
|
|
|
deps)
|
|
|
|
apt install -f libpython-dev
|
|
|
|
if [ ! -f /usr/bin/bison ]; then
|
|
|
|
apt install -f bison
|
|
|
|
fi
|
|
|
|
if [ ! -f /usr/bin/flex ]; then
|
|
|
|
apt install -f flex
|
|
|
|
fi
|
|
|
|
if [ ! -f /usr/bin/swig ]; then
|
|
|
|
apt install -f swig
|
|
|
|
fi
|
|
|
|
if [ ! -f /usr/bin/dtc ]; then
|
|
|
|
apt install -f device-tree-compiler
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
cross)
|
|
|
|
echo export CROSS_COMPILE=/home/pinebook/cross-compilers/gcc-linaro/bin/aarch64-linux-gnu-
|
|
|
|
;;
|
2019-01-18 21:35:17 -06:00
|
|
|
build)
|
|
|
|
make pinebook_defconfig
|
|
|
|
cp ../jcarr-pinebook/u-boot/bl31.bin .
|
|
|
|
make all -j6
|
|
|
|
;;
|
|
|
|
flash)
|
|
|
|
if [ -f u-boot-sunxi-with-spl.bin ]; then
|
|
|
|
scp u-boot-sunxi-with-spl.bin witserial:/boot/
|
|
|
|
scp examples/standalone/hello_world witserial:/boot/
|
|
|
|
scp examples/standalone/hello_world.bin witserial:/boot/
|
|
|
|
scp examples/standalone/hello_world.srec witserial:/boot/
|
|
|
|
|
|
|
|
ssh witserial /root/pinebook/reflash-uboot.sh
|
|
|
|
ssh witserial reboot
|
|
|
|
else
|
|
|
|
echo uboot did not successfully compile
|
|
|
|
fi
|
|
|
|
;;
|
2019-01-19 17:17:04 -06:00
|
|
|
branches|status)
|
|
|
|
git remote -v
|
|
|
|
git branch -r
|
2019-01-18 21:35:17 -06:00
|
|
|
;;
|
|
|
|
start)
|
|
|
|
echo try start
|
|
|
|
if [ -f /lib/lsb/init-functions ]; then
|
|
|
|
echo init-functions exists
|
|
|
|
else
|
|
|
|
log_action_begin_msg () {
|
|
|
|
echo -n "$@... "
|
|
|
|
}
|
|
|
|
fi
|
|
|
|
;;
|
|
|
|
|
|
|
|
*)
|
2019-01-19 17:17:04 -06:00
|
|
|
echo
|
|
|
|
echo 'uboot branches -- shows the git repos and branches'
|
2019-01-20 03:13:32 -06:00
|
|
|
echo 'uboot deps -- install all the build dependancies'
|
|
|
|
echo 'uboot cross -- set up the x86 cross compiler needed env. lame.'
|
2019-01-19 17:17:04 -06:00
|
|
|
echo 'uboot clean -- purges more or less absolutely everything except .*'
|
|
|
|
echo 'uboot build -- builds uboot for the pinebook'
|
|
|
|
echo 'uboot flash -- flashes uboot onto the host "witserial"'
|
2019-01-18 21:35:17 -06:00
|
|
|
;;
|
|
|
|
esac
|
|
|
|
|
|
|
|
exit
|
|
|
|
|
|
|
|
if [ -f /bin/setupcon ]; then
|
|
|
|
echo setupcon exists
|
|
|
|
fi
|
|
|
|
exit
|
|
|
|
|
|
|
|
jcarr-fucking-clean:
|
|
|
|
make distclean
|
|
|
|
rm -rf [A-Za-z]*
|
|
|
|
git reset --hard
|
|
|
|
|
|
|
|
jcarr-push:
|
|
|
|
git add --all
|
|
|
|
-git commit -a
|
|
|
|
@echo
|
|
|
|
@echo do not push this test branch
|
|
|
|
@echo
|
|
|
|
|
|
|
|
jcarr-build-prep:
|
|
|
|
make pinebook_defconfig
|
|
|
|
cp ../jcarr-pinebook/u-boot/bl31.bin .
|
|
|
|
|
|
|
|
jcarr-build:
|
|
|
|
make all -j6
|
|
|
|
ping -c 3 witserial
|
|
|
|
|
|
|
|
jcarr-build-debug:
|
|
|
|
make all V=1
|
|
|
|
|
|
|
|
jcarr-reflash-uboot:
|