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

nymea mods (Raspbian buster) #7

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
3 changes: 0 additions & 3 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
deploy/*
work/*
config
postrun.sh
SKIP
SKIP_IMAGES
.pc
*-pc
apt-cacher-ng/
5 changes: 5 additions & 0 deletions config
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
IMG_NAME=nymea-buster
FIRST_USER_NAME="nymea"
FIRST_USER_PASS="nymea"
ENABLE_SSH=1
STAGE_LIST="stage0 stage1 stage2 nymea nymea-kiosk"
11 changes: 11 additions & 0 deletions nymea-kiosk/00-nymea-kiosk/00-run-chroot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
# Rotate internal display by default
echo lcd_rotate=2 >> /boot/config.txt

# Enable fake KMS driver
echo dtoverlay=vc4-fkms-v3d >> /boot/config.txt

# Get away with the low voltage warning
echo avoid_warnings=1 >> /boot/config.txt

# Hide console log messages and blinking cursor and activate the splash
sed -i "s/console=tty1/console=tty3 quiet vt.global_cursor_default=0 splash/" "/boot/cmdline.txt"
2 changes: 2 additions & 0 deletions nymea-kiosk/00-nymea-kiosk/01-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
nymea-app-kiosk-wayland
nymea-splashscreen
4 changes: 4 additions & 0 deletions nymea-kiosk/EXPORT_IMAGE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
IMG_SUFFIX="-kiosk"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi
5 changes: 5 additions & 0 deletions nymea-kiosk/prerun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

if [ ! -d "${ROOTFS_DIR}" ]; then
copy_previous
fi
70 changes: 70 additions & 0 deletions nymea/00-nymea/00-run-chroot.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Add nymea repository
echo -e "\n## nymea repo\ndeb http://repository.nymea.io buster rpi\n#deb-src http://repository.nymea.io buster rpi" | tee /etc/apt/sources.list.d/nymea.list
wget -qO - http://repository.nymea.io/Repository.key | apt-key add -

# Set repository priority (prefer 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

cat <<EOM > /etc/motd

.
++,
|\`--\`+-.
\`\`--\`-++. .;;+.
\\\`\`--*++++;;;/@\\ _ __ _ _ _ __ ___ ___ __ _
\\\`*#;.++++\\;+|/ | '_ \| | | | '_ \` _ \\ / _ \\/ _\` |
\`-###+++++;\` | | | | |_| | | | | | | __/ (_| |
/###+++ |_| |_|\__, |_| |_| |_|\___|\__,_|
|+++#\` __/ |
\`###+. |___/
\`###+
\`#+
\`

EOM


cat <<EOM > /etc/machine-info
PRETTY_HOSTNAME=nymea
EOM

cat <<EOM > /etc/issue.net
nymea - nymea.io | Debian GNU/Linux 10
EOM

cat <<EOM > /etc/issue
nymea - nymea.io | Debian GNU/Linux 10 \n \l
EOM

# Change hostname to nymea
echo nymea > /etc/hostname
sed -i 's/localhost/localhost nymea/' /etc/hosts

# Enable i2c
echo dtparam=i2c_arm=on >> /boot/config.txt
echo i2c-dev >> /etc/modules

# Enable UART (for RaspBee and similar)
echo enable_uart=1 >> /boot/config.txt
sed -i 's/console=serial0,115200 //' /boot/cmdline.txt

# Drop packages conflicting with network-manager
apt-get purge --yes openresolv dhcpcd5

# Disable BlueZ plugins QtBluetooth can't deal with
mkdir /etc/systemd/system/bluetooth.service.d
cat <<EOM > /etc/systemd/system/bluetooth.service.d/01-disable-battery-plugin.conf
[Service]
ExecStart=
ExecStart=/usr/lib/bluetooth/bluetoothd --noplugin=battery,sap
EOM
4 changes: 4 additions & 0 deletions nymea/00-nymea/02-packages
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
nymea
nymea-plugins
nymea-plugins-zigbee
nymea-networkmanager
4 changes: 4 additions & 0 deletions nymea/EXPORT_IMAGE
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
IMG_SUFFIX="-core"
if [ "${USE_QEMU}" = "1" ]; then
export IMG_SUFFIX="${IMG_SUFFIX}-qemu"
fi
5 changes: 5 additions & 0 deletions nymea/prerun.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#!/bin/bash -e

if [ ! -d "${ROOTFS_DIR}" ]; then
copy_previous
fi
Empty file added stage2/SKIP_IMAGES
Empty file.
Empty file added stage3/SKIP
Empty file.
Empty file added stage3/SKIP_IMAGES
Empty file.
Empty file added stage4/SKIP
Empty file.
Empty file added stage4/SKIP_IMAGES
Empty file.
Empty file added stage5/SKIP
Empty file.
Empty file added stage5/SKIP_IMAGES
Empty file.