pull/1/head
Christopher Young 2015-08-07 22:47:47 -04:00
rodzic fb10dbba66
commit 0df0324006
1 zmienionych plików z 102 dodań i 0 usunięć

Wyświetl plik

@ -109,6 +109,7 @@ install_packages() {
ssh_in_to_qemu chroot /mnt sh -l -ex - <<\EOF
apt-get update
# install some utils
apt-get install -y dialog
apt-get install -y ssh locales less fbset sudo psmisc strace module-init-tools ifplugd ed ncdu
apt-get install -y console-setup keyboard-configuration debconf-utils parted unzip
apt-get install -y build-essential manpages-dev python bash-completion gdb pkg-config
@ -117,6 +118,7 @@ apt-get install -y lua5.1
[ "$(dpkg --print-architecture)" = armhf ] && apt-get install -y luajit
apt-get install -y hardlink ca-certificates curl
apt-get install -y fake-hwclock ntp nfs-common usbutils
apt-get install -y --no-install-recommends cifs-utils
echo "deb http://archive.raspberrypi.org/debian/ wheezy main untested" > /etc/apt/sources.list.d/raspi.list
apt-get update
@ -415,6 +417,105 @@ EOF1
EOF
}
setup_stratux() {
#HERE
echo "**** STRATUX SETUP *****"
#general
ssh_in_to_qemu chroot /mnt sh -l -ex - <<\EOF
#general
apt-get install -y screen
#wifi
apt-get install -y hostapd isc-dhcp-server
#wifi startup
update-rc.d hostapd enable
update-rc.d isc-dhcp-server enable
EOF
scp_in_to_qemu /root/spindle/hostapd-edimax /tmp/hostapd.in
scp_in_to_qemu /root/spindle/root /tmp/root.in
scp_in_to_qemu /root/spindle/interfaces /tmp/interfaces.in
scp_in_to_qemu /root/spindle/dhcpd.conf /tmp/dhcpd.conf.in
scp_in_to_qemu /root/spindle/hostapd.conf /tmp/hostapd.conf.in
scp_in_to_qemu /root/spindle/isc-dhcp-server /tmp/isc-dhcp-server.in
scp_in_to_qemu /root/spindle/sshd_config /tmp/sshd_config.in
ssh_in_to_qemu chroot /mnt sh -l -ex - <<\EOF
mv -f /tmp/hostapd.in /usr/sbin/hostapd
chown root.root /usr/sbin/hostapd
chmod 755 /usr/sbin/hostapd
mkdir -p /etc/ssh/authorized_keys
mv -f /tmp/root.in /etc/ssh/authorized_keys/root
chown root.root /etc/ssh/authorized_keys/root
chmod 644 /etc/ssh/authorized_keys/root
mv -f /tmp/interfaces.in /etc/network/interfaces
mv -f /tmp/dhcpd.conf.in /etc/dhcp/dhcpd.conf
mv -f /tmp/hostapd.conf.in /etc/hostapd/hostapd.conf
mv -f /tmp/isc-dhcp-server.in /etc/default/isc-dhcp-server
mv -f /tmp/sshd_config.in /etc/ssh/sshd_config
rm -f /usr/share/dbus-1/system-services/fi.epitest.hostap.WPASupplicant.service
echo "DAEMON_CONF=\"/etc/hostapd/hostapd.conf\"" >/etc/default/hostapd
echo blacklist dvb_usb_rtl28xxu >>/etc/modprobe.d/rtl-sdr-blacklist.conf
echo blacklist e4000 >>/etc/modprobe.d/rtl-sdr-blacklist.conf
echo blacklist rtl2832 >>/etc/modprobe.d/rtl-sdr-blacklist.conf
EOF
echo "*** STRATUX COMPILE/PACKAGE INSTALL ***"
echo " - RTL-SDR tools"
ssh_in_to_qemu chroot /mnt sh -l -ex - <<\EOF
apt-get install -y git cmake libusb-1.0-0.dev build-essential
cd /root
git clone git://git.osmocom.org/rtl-sdr.git
cd rtl-sdr
mkdir build
cd build
cmake ../
make
make install
ldconfig
EOF
echo " - dump1090"
ssh_in_to_qemu chroot /mnt sh -l -ex - <<\EOF
cd /root
git clone https://github.com/antirez/dump1090
cd dump1090
make
cp dump1090 /usr/bin/
EOF
echo " - Stratux"
ssh_in_to_qemu chroot /mnt sh -l -ex - <<\EOF
apt-get install -y golang-go
cd /root
git clone https://github.com/cyoung/stratux
cd stratux
cd dump978
make
cp dump978 /usr/bin/
cd ..
go build gen_gdl90.go
cp gen_gdl90 /usr/bin/
cp start_uat.sh /usr/bin/start_uat
cp init.d-stratux /etc/init.d/stratux
chmod 755 /etc/init.d/stratux
ln -s /etc/init.d/stratux /etc/rc2.d/S01stratux
ln -s /etc/init.d/stratux /etc/rc6.d/K01stratux
update-rc.d stratux enable
EOF
echo "**** END STRATUX SETUP *****"
#DONE HERE
}
cd $WORKDIR
dotask branch_image ../$OUTDIR/stage2.$IMGFORMAT $CURIMG
dotask run_qemu $CURIMG
@ -441,6 +542,7 @@ dotask save_space_using_hardlink
dotask adjust_sysctl
dotask allow_starting_services
dotask remove_ssh_host_keys
dotask setup_stratux
dotask apply_noobs_os_config
dotask set_default_kernel_modules
# Latest firmware does not need mmap emulation, so skip asound.conf creation