Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

BerryLan Mods (Raspbian stretch) #2

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 6 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,12 @@
# pi-gen

_Tool used to create the raspberrypi.org Raspbian images_
_Tool used to create the berrylan.app Raspbian images_

This tool is based on the pi-gen tool of the raspberrypi.org Raspbian images.
It only adds http://repository.nymea.io to the repositories and preinstalls
nymea-networkmanager in the image to allow WiFi configuration via BerryLan.

nymea-networkmanager can be found at https://github.com/guh/nymea-networkmanager

## Dependencies

Expand Down
16 changes: 16 additions & 0 deletions stage2/00-packages/00-run-chroot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# Add nymea repository
echo -e "\n## nymea repo\ndeb http://repository.nymea.io stretch main raspbian\n#deb-src http://repository.nymea.io stretch main raspbian" | tee /etc/apt/sources.list.d/nymea.list
wget -qO - http://repository.nymea.io/repository-pubkey.gpg | apt-key add -

# Set repository priority (prefere packages from raspbian section
cat <<EOM >/etc/apt/preferences.d/nymea
Package: *
Pin: release c=raspbian
Pin-Priority: 700

Package: *
Pin: origin repository.nymea.io c=main
Pin-Priority: 500
EOM

apt-get update
1 change: 1 addition & 0 deletions stage2/00-packages/01-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
nymea-networkmanager
2 changes: 1 addition & 1 deletion stage2/02-net-tweaks/00-packages
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
wpasupplicant wireless-tools firmware-atheros firmware-brcm80211 firmware-libertas firmware-misc-nonfree firmware-realtek
raspberrypi-net-mods
dhcpcd5
net-tools
network-manager
4 changes: 4 additions & 0 deletions stage2/02-net-tweaks/01-run-chroot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/bin/bash -e

systemctl enable ssh
systemctl disable dhcpcd5
4 changes: 1 addition & 3 deletions stage2/02-net-tweaks/01-run.sh
Original file line number Diff line number Diff line change
@@ -1,8 +1,6 @@
#!/bin/bash -e

install -v -d "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d"
install -v -m 644 files/wait.conf "${ROOTFS_DIR}/etc/systemd/system/dhcpcd.service.d/"

install -v -d "${ROOTFS_DIR}/etc/wpa_supplicant"
install -v -m 600 files/wpa_supplicant.conf "${ROOTFS_DIR}/etc/wpa_supplicant/"

sed -i 's/-a nymea -p nymea-box/-a "Raspberry Pi" -p "Raspberry Pi"/' ${ROOTFS_DIR}/lib/systemd/system/nymea-networkmanager.service