Skip to content

Commit

Permalink
Drop service for resizing rootfs, update asound.state, enable bluetooth
Browse files Browse the repository at this point in the history
  • Loading branch information
anarsoul committed Nov 4, 2018
1 parent 0bab47a commit 7ec03fb
Show file tree
Hide file tree
Showing 6 changed files with 342 additions and 41 deletions.
5 changes: 5 additions & 0 deletions make_empty_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,11 @@ if [ -z "$IMAGE_NAME" ]; then
exit 1
fi

if [ "$(id -u)" -ne "0" ]; then
echo "This script requires root (not really - but make_image.sh will fail later without root)"
exit 1
fi

fallocate -l $IMAGE_SIZE $IMAGE_NAME

cat << EOF | fdisk $IMAGE_NAME
Expand Down
10 changes: 6 additions & 4 deletions make_rootfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -100,16 +100,19 @@ killall -KILL gpg-agent
pacman -Sy --noconfirm
pacman -Rsn --noconfirm linux-aarch64
pacman -S --noconfirm --needed dosfstools curl xz iw rfkill netctl dialog wpa_supplicant alsa-utils \
pv linux-pine64 linux-pine64-headers networkmanager dkms-rtl8723cs uboot-pine64-git
pv linux-pine64 linux-pine64-headers networkmanager dkms-rtl8723cs uboot-pine64-git \
rtl8723bt-firmware
# Install XFCE
pacman -S --noconfirm xfce4 xorg-server xf86-input-libinput lxdm ttf-dejavu ttf-liberation firefox \
pulseaudio nm-connection-editor network-manager-applet \
xfce4-pulseaudio-plugin \
blueman pulseaudio-bluetooth \
pulseaudio-alsa pavucontrol
systemctl enable lxdm
systemctl enable NetworkManager
usermod -a -G network,video,audio,optical,storage,input,scanner,games,lp alarm
systemctl enable bluetooth
usermod -a -G network,video,audio,optical,storage,input,scanner,games,lp,rfkill alarm
sed -i 's|^#en_US.UTF-8|en_US.UTF-8|' /etc/locale.gen
cd /usr/share/i18n/charmaps
Expand All @@ -130,11 +133,10 @@ rm "$DEST/usr/bin/qemu-arm-static"
mv "$DEST/etc/resolv.conf.dist" "$DEST/etc/resolv.conf"

cp $OTHERDIR/asound.state $DEST/var/lib/alsa
cp $OTHERDIR/pine64_first_boot.sh $DEST/usr/local/sbin/
cp $OTHERDIR/resize_rootfs.sh $DEST/usr/local/sbin/
cp $OTHERDIR/pine64-first-boot.service $DEST/etc/systemd/system/
cp $OTHERDIR/modesetting.conf $DEST/etc/X11/xorg.conf.d/
cp $OTHERDIR/sysrq.conf $DEST/etc/sysctl.d/
cp $OTHERDIR/81-blueman.rules $DEST/etc/polkit-1/rules.d/

echo "Installed rootfs to $DEST"

Expand Down
8 changes: 8 additions & 0 deletions otherfiles/81-blueman.rules
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
polkit.addRule(function(action, subject) {
if (action.id == "org.blueman.rfkill.setstate" && subject.local && subject.active && subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
if (action.id == "org.blueman.network.setup" && subject.local && subject.active && subject.isInGroup("wheel")) {
return polkit.Result.YES;
}
});
Loading

0 comments on commit 7ec03fb

Please sign in to comment.