11#! /bin/bash
22#
3- # by Tomas Hlavacek ([email protected] )4- #
5- # prerequisities - Debian packages:
6- # apt-get install debootstrap qemu-user qemu-user-static git devscripts u-boot-tools
7- #
8- # Linaro GCC 7.3 & toolchain int /opt
9- #
10- # $SUDO || root privileges
11- #
12-
13- # echo "Not testedi yet. Not supported at this time. Sorry!"
14- # exit -1
3+ # Copyright (C) 2016-2021 Tomas Hlavacek ([email protected] )154
165MIRROR=" http://debian.ignum.cz/debian/"
176DEBVER=" bullseye"
@@ -22,6 +11,7 @@ BUILDROOT=`pwd`
2211ROOTDIR=" /turrisroot"
2312
2413
14+
2515SUDO=' /usr/bin/sudo'
2616if [ " $( id -u) " == " 0" ]; then
2717 SUDO=' '
@@ -91,7 +81,7 @@ chown root:root $ROOTDIR/etc/kernel/postinst.d/z99-genbootscr
9181#mkdir -p $ROOTDIR /lib/firmware/mrvl
9282#cp files/sd8997_uapsta.bin $ROOTDIR /lib/firmware/mrvl
9383
94- echo "moxtet" >>/etc/modules
84+ echo "moxtet" >>$ROOTDIR /etc/modules
9585ENDSCRIPT
9686
9787if [[ $? != 0 ]]; then
10393$SUDO chroot $ROOTDIR /bin/bash << ENDSCRIPT
10494cd /
10595apt-get -y update
106- apt-get -y install u-boot-tools
96+ apt-get -y install u-boot-tools initramfs-tools xz-utils
97+
98+ # TODO: Install a package with genbootscr and script to do the following initramfs hack
99+ # change initrd compressions to XZ
100+ sed -r -i 's/^COMPRESS=.*/COMPRESS=xz/' /etc/initramfs-tools/initramfs.conf
101+
107102apt-get -y install linux-image-arm64
108103apt-get -y install ssh i2c-tools firmware-atheros crda bridge-utils
109104
110105sed -ir 's/^[#]*PermitRootLogin.*$/PermitRootLogin yes/' /etc/ssh/sshd_config
111-
112- ## temporary hack for buggy kernels
113- #if ! [ -d /etc/modprobe.d/ ]; then
114- # mkdir -p /etc/modprobe.d/
115- #fi
116- #cat >/etc/modprobe.d/xhci-blacklist.conf <<EOF
117- #blacklist xhci-hcd
118- #blacklist xhci-plat-hcd
119- #EOF
120106ENDSCRIPT
121107
122108# cleanup QEMU
0 commit comments