minor cleanups of build scripts and switch to go 1.16

pull/827/merge^2
Adrian Batzill 2021-03-05 15:58:42 +01:00
rodzic fbba379430
commit 5afc01184f
3 zmienionych plików z 11 dodań i 12 usunięć

Wyświetl plik

@ -19,6 +19,7 @@
export PATH=/root/go/bin:${PATH}
export GOROOT=/root/go
export GOPATH=/root/go_path
export GO111MODULE=off # enabled by default as of go 1.16 but Stratux code is not modules aware..
# This will allow users to keep an alias file after this file is added
if [ -f /root/.aliases ]; then

Wyświetl plik

@ -62,7 +62,7 @@ resize2fs -p ${lo}p2 || die "FS resize failed"
losetup -d $lo || die "Loop device setup failed"
sleep 3 # for whatever reason loop device is not immediately detached and takes a short time
# Mount image locally, clone our repo, install packages..
mkdir -p mnt
@ -70,25 +70,19 @@ mount -t ext4 -o offset=$partoffset $IMGNAME mnt/ || die "root-mount failed"
mount -t vfat -o offset=$bootoffset,sizelimit=$sizelimit $IMGNAME mnt/boot || die "boot-mount failed"
cp $(which qemu-arm-static) mnt/usr/bin || die "Failed to copy qemu-arm-static into image"
# Download and extract go in the chroot
cd mnt/root
wget https://dl.google.com/go/go1.12.4.linux-armv6l.tar.gz || die "Go download failed"
tar xzf go1.12.4.linux-armv6l.tar.gz
rm go1.12.4.linux-armv6l.tar.gz
cd mnt/root/
if [ "$1" == "dev" ]; then
rsync -av --progress --exclude=ogn/esp-idf $SRCDIR ./
cd stratux && git checkout $2 && cd ..
else
git clone --recursive -b $2 https://github.com/b3nn0/stratux.git
fi
cd ../..
cd ../../
# Now download a specific kernel to run raspbian images in qemu and boot it..
chroot mnt qemu-arm-static /bin/bash -c /root/stratux/image/mk_europe_edition_device_setup.sh
mkdir out
# Copy the selfupdate file out of there..
cp mnt/root/stratux/work/*.sh out
rm -r mnt/root/stratux/work

Wyświetl plik

@ -48,6 +48,12 @@ rm -r /root/fake
rm /etc/modprobe.d/blacklist-rtl8192cu.conf
echo "blacklist 8192cu" >> /etc/modprobe.d/blacklist-8192cu.conf
# Install golang
cd /root
wget https://golang.org/dl/go1.16.linux-armv6l.tar.gz
tar xzf go1.16.linux-armv6l.tar.gz
rm go1.16.linux-armv6l.tar.gz
# Prepare wiringpi for fancontrol and some more tools. Need latest version for pi4 support
#cd /root && git clone https://github.com/WiringPi/WiringPi.git && cd WiringPi/wiringPi && make && make install
@ -56,9 +62,6 @@ dpkg -i wiringpi-latest.deb
rm wiringpi-latest.deb
ldconfig
cd /root/stratux
cp image/bashrc.txt /root/.bashrc
source /root/.bashrc
@ -77,6 +80,7 @@ make install
cd /root/
rm -r rtl-sdr
ldconfig
# Debian seems to ship with an invalid pkgconfig for librtlsdr.. fix it:
#sed -i -e 's/prefix=/prefix=\/usr/g' /usr/lib/arm-linux-gnueabihf/pkgconfig/librtlsdr.pc