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
|
|
|
|
;;
|
2019-02-26 14:22:10 -06:00
|
|
|
riscv)
|
|
|
|
echo export CROSS_COMPILE=riscv64-linux-gnu-
|
2019-04-03 16:01:46 -05:00
|
|
|
echo make sifive_fu540_fsbl_defconfig
|
2019-02-26 14:22:10 -06:00
|
|
|
echo make
|
2019-04-03 16:01:46 -05:00
|
|
|
echo ./scripts/dtc/dtc ./arch/riscv/dts/fu540.dts -o ./arch/riscv/dts/fu540.dtb
|
2019-02-26 14:22:10 -06:00
|
|
|
;;
|
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-21 00:18:41 -06:00
|
|
|
echo builds normally under arch:
|
|
|
|
echo '[root@alarm ~]# gcc -v'
|
|
|
|
echo 'Using built-in specs.'
|
|
|
|
echo 'COLLECT_GCC=gcc'
|
|
|
|
echo 'COLLECT_LTO_WRAPPER=/usr/lib/gcc/aarch64-unknown-linux-gnu/8.2.0/lto-wrapper'
|
|
|
|
echo 'Target: aarch64-unknown-linux-gnu'
|
|
|
|
echo 'Configured with: /build/gcc/src/gcc/configure --prefix=/usr --libdir=/usr/lib --libexecdir=/usr/lib --mandir=/usr/share/man --infodir=/usr/share/info --with-bugurl=https://github.com/archlinuxarm/PKGBUILDs/issues --enable-languages=c,c++,fortran,go,lto,objc,obj-c++ --enable-shared --enable-threads=posix --with-system-zlib --with-isl --enable-__cxa_atexit --disable-libunwind-exceptions --enable-clocale=gnu --disable-libstdcxx-pch --disable-libssp --enable-gnu-unique-object --enable-linker-build-id --enable-lto --enable-plugin --enable-install-libiberty --with-linker-hash-style=gnu --enable-gnu-indirect-function --disable-multilib --disable-werror --enable-checking=release --enable-default-pie --enable-default-ssp --host=aarch64-unknown-linux-gnu --build=aarch64-unknown-linux-gnu --with-arch=armv8-a --enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419'
|
|
|
|
echo 'Thread model: posix'
|
|
|
|
echo 'gcc version 8.2.0 (GCC)'
|
2019-01-20 03:13:32 -06:00
|
|
|
;;
|
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-25 00:38:00 -06:00
|
|
|
fetch)
|
|
|
|
git fetch --all
|
|
|
|
;;
|
2019-04-03 16:01:46 -05:00
|
|
|
push)
|
|
|
|
git pull
|
|
|
|
git add --all
|
|
|
|
git commit -a -s
|
|
|
|
git push
|
|
|
|
;;
|
2019-01-25 00:38:00 -06:00
|
|
|
flatten)
|
|
|
|
git fetch --all
|
|
|
|
git checkout work
|
|
|
|
git merge trini/master
|
|
|
|
git push
|
|
|
|
git diff trini/master...work >/tmp/flatten.diff
|
|
|
|
;;
|
2019-01-20 09:16:42 -06:00
|
|
|
remotes)
|
2019-02-26 14:22:10 -06:00
|
|
|
echo
|
|
|
|
echo git remote add jamez https://git.wit.com/jamez/u-boot.git
|
|
|
|
echo git fetch jamez
|
|
|
|
echo
|
2019-04-03 16:01:46 -05:00
|
|
|
echo git checkout -b sifive-sandbox --track sifive/sandbox
|
|
|
|
echo
|
|
|
|
echo git push --set-upstream jcarr jcarr-fu540
|
|
|
|
echo
|
2019-01-20 09:16:42 -06:00
|
|
|
git remote -v
|
|
|
|
;;
|
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
|
2019-01-25 00:38:00 -06:00
|
|
|
echo 'general git stuff:'
|
|
|
|
echo 'uboot remotes -- shows the different git remotes'
|
2019-01-19 17:17:04 -06:00
|
|
|
echo 'uboot branches -- shows the git repos and branches'
|
2019-01-25 00:38:00 -06:00
|
|
|
echo 'uboot fetch -- update all the remote brances'
|
|
|
|
echo 'uboot flatten -- flattens jcarr/work against trini/master into jcarr/flatten'
|
|
|
|
echo ''
|
|
|
|
echo 'uboot stuff:'
|
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-02-26 14:22:10 -06:00
|
|
|
echo ''
|
2019-04-03 16:01:46 -05:00
|
|
|
echo 'uboot push -- default git pull and push'
|
2019-02-26 14:22:10 -06:00
|
|
|
echo 'uboot riscv -- build for qemu and riscv'
|
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:
|