-
Notifications
You must be signed in to change notification settings - Fork 4
/
chroot_script_c1
executable file
·39 lines (30 loc) · 1.42 KB
/
chroot_script_c1
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
#!/bin/bash
export DEBIAN_FRONTEND=noninteractive
do_udev_update() {
mkdir -p $odir/etc/udev/rules.d > /dev/null 2>&1
echo "KERNEL==\"mali\",SUBSYSTEM==\"misc\",MODE=\"0777\",GROUP=\"video\"" > $odir/etc/udev/rules.d/10-odroid_mali.rules
echo "KERNEL==\"ump\",SUBSYSTEM==\"ump\",MODE=\"0777\",GROUP=\"video\"" >> $odir/etc/udev/rules.d/10-odroid_mali.rules
echo "KERNEL==\"ttySAC0\", SYMLINK+=\"ttyACM99\"" > $odir/etc/udev/rules.d/10-odroid-shield.rules
echo "KERNEL==\"fb1\", SYMLINK+=\"fb6\"" > $odir/etc/udev/rules.d/50-odroid-hdmi.rules
echo "KERNEL==\"CEC\", MODE=\"0777\"" > $odir/etc/udev/rules.d/60-odroid-cec.rules
echo "KERNEL==\"amstream*\",SUBSYSTEM==\"amstream-dev\",MODE=\"0666\",GROUP=\"video\"" > $odir/etc/udev/rules.d/10-odroid_am.rules
echo "KERNEL==\"amvideo*\",SUBSYSTEM==\"video\",MODE=\"0666\",GROUP=\"video\"" >> $odir/etc/udev/rules.d/10-odroid_am.rules
}
do_udev_update
# === install Hardkernel's packages ======
echo "Installing kernel..."
touch /boot/uImage
mkdir -p /tmp/btini
apt-get update
# install upstart-sysv
apt-get -y -q install upstart-sysv
apt-get -y -q download bootini
dpkg-deb -x *.deb /tmp/btini/
cp -r -v /tmp/btini/etc/* /etc
mv /etc/initramfs-tools/scripts/local-top/c1_init.sh /usr/local/bin/
rm -rf /tmp/btini
rm -rf *.deb
apt-get -y -q install linux-image-c1 mali-fbdev
apt-get clean
# =======================================
chmod +x /usr/sbin/hostapd_rtl