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

chore: bump base OS to 'bookworm' #281

Open
wants to merge 53 commits into
base: develop
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
53 commits
Select commit Hold shift + click to select a range
a877728
chore: bump base OS to 'bookworm'
KwadFan Jan 26, 2024
e8f4533
fix: fix no space left error
KwadFan Jan 26, 2024
75aacd5
Merge branch 'develop' into chore/bookworm
KwadFan Feb 11, 2024
11d8ec2
chore: solve merge conflicts
KwadFan Jun 8, 2024
ec559a7
fix: fix orangepi zero2 url
KwadFan Jun 8, 2024
4072981
fix(build): disable pkgupgrade
KwadFan Jun 12, 2024
431c6bb
chore(build): add bullseye control group
KwadFan Jun 12, 2024
32c5977
fix(build): fix shellcheck errors
KwadFan Jun 12, 2024
0603d38
fix: fix klipperscreen build
KwadFan Jun 12, 2024
3687a0e
fix: drop armbian_net module for bookworm images
KwadFan Jun 12, 2024
24219bc
fix: fix rpi64-ks
KwadFan Jun 12, 2024
51d4abc
fix: fix config paths for bookworm
KwadFan Jun 12, 2024
77a0190
fix: fix path in piconfig module
KwadFan Jun 12, 2024
b3d0b1c
chore: reenable pkgupgrade for debug purpose
KwadFan Jun 16, 2024
9cd7075
test: set boot partition
KwadFan Jun 16, 2024
40020e3
Revert "test: set boot partition"
KwadFan Jun 16, 2024
0b50f06
Revert "chore: reenable pkgupgrade for debug purpose"
KwadFan Jun 16, 2024
cd09929
Revert "fix: fix path in piconfig module"
KwadFan Jun 16, 2024
782961c
Revert "fix: fix config paths for bookworm"
KwadFan Jun 16, 2024
2b0bacd
feat: add modified pkgupgrade
KwadFan Jun 16, 2024
f7a7fea
test: debug pkgupgrade
KwadFan Jul 16, 2024
8fa90ba
fix: fix shellcheck errors
KwadFan Jul 16, 2024
c6105fd
Revert "test: debug pkgupgrade"
KwadFan Jul 16, 2024
7c3f869
chore: remove pkgupgrade module
KwadFan Jul 16, 2024
a8921f4
feat: add headless_mn module
KwadFan Jul 19, 2024
59c471c
fix: fix headless_nm module
KwadFan Jul 19, 2024
1532acd
fix: fix execustion permission
KwadFan Jul 20, 2024
7470002
fix: fix modules for bullseye images
KwadFan Jul 20, 2024
8490976
chore: refactor wifi readme
KwadFan Jul 20, 2024
235dd2a
chore: add pi5 to json supported sbcs
KwadFan Jul 20, 2024
d1d728e
fix: fix postrename script
KwadFan Jul 20, 2024
19622a4
chore: refactor wifi-readme.txt
KwadFan Jul 28, 2024
a3a82d9
chore: use headless_nm for armbian images
KwadFan Jul 28, 2024
027f4ba
chore: extend headless_nm for armbian based images
KwadFan Aug 4, 2024
97fa690
Merge branch 'develop' into chore/bookworm
KwadFan Aug 4, 2024
bc23b1b
test: Use altered DNS servers
KwadFan Aug 5, 2024
d86f9ad
test: renamed module
KwadFan Aug 5, 2024
d1cc8a2
Revert "test: renamed module"
KwadFan Aug 5, 2024
f3d3a10
Revert "test: Use altered DNS servers"
KwadFan Aug 5, 2024
70f2768
test: test PR repo
KwadFan Aug 5, 2024
c24708f
test: run with altered dns
KwadFan Aug 5, 2024
1386183
Revert "test: run with altered dns"
KwadFan Aug 5, 2024
6afb601
Revert "test: test PR repo"
KwadFan Aug 5, 2024
0309fea
test: test potential PR to custompios
KwadFan Aug 5, 2024
a0985b0
test: test run for fix/armbiandns pr
KwadFan Aug 6, 2024
09bcaf3
chore: revert to original custompios repo
KwadFan Aug 31, 2024
beecb24
chore: remove bullseye control builds
KwadFan Aug 31, 2024
b8409b6
fix: fix workflow_config.yml
KwadFan Aug 31, 2024
714283d
fix: fix missing newline
KwadFan Sep 3, 2024
012d6a0
chore: fix copyright date
KwadFan Sep 3, 2024
30548c4
chore: update wifi-readme.txt
KwadFan Sep 3, 2024
162cd86
chore: reenable pkgupgrade for ks version
KwadFan Sep 3, 2024
0b81ae4
chore: update headless_nm.txt.template
KwadFan Sep 3, 2024
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
4 changes: 2 additions & 2 deletions config/armbian/bananapim2zero
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@
# shellcheck enable=require-variable-braces

# Image source
DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/armbian-bananapi_m2_zero_bullseye.img.xz.sha256"
DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/armbian-bananapi_m2_zero_bullseye.img.xz"
DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/armbian-bananapi_m2_zero_bookworm.img.xz.sha256"
DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/armbian-bananapi_m2_zero_bookworm.img.xz"

# export Variables
export BASE_ARCH
Expand Down
4 changes: 2 additions & 2 deletions config/armbian/default
Original file line number Diff line number Diff line change
Expand Up @@ -18,12 +18,12 @@ BASE_IMAGE_RASPBIAN="no"

# partition resizing
BASE_ROOT_PARTITION="2"
BASE_IMAGE_ENLARGEROOT=2500
BASE_IMAGE_ENLARGEROOT=3500
BASE_IMAGE_RESIZEROOT=600
# Compress not needed due compression done in workflow
BASE_RELEASE_COMPRESS=no
# Modules are valid for 32bit and 64bit images
MODULES="base(pkgupgrade,udev_fix,armbian(armbian_net,mainsailos,klipper,is_req_preinstall,moonraker,mainsail,timelapse,crowsnest,sonar))"
MODULES="base(pkgupgrade,udev_fix,armbian(headless_nm,mainsailos,klipper,is_req_preinstall,moonraker,mainsail,timelapse,crowsnest,sonar))"

# export Variables
export DOWNLOAD_BASE_URL
Expand Down
4 changes: 2 additions & 2 deletions config/armbian/orangepi3lts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
BASE_ARCH="arm64"

# Image source
DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/armbian-orangepi3_lts_bullseye.img.xz.sha256"
DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/armbian-orangepi3_lts_bullseye.img.xz"
DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/armbian-orangepi3_lts_bookworm.img.xz.sha256"
DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/armbian-orangepi3_lts_bookworm.img.xz"

# export Variables
export BASE_ARCH
Expand Down
4 changes: 2 additions & 2 deletions config/armbian/orangepi4lts
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
BASE_ARCH="arm64"

# Image source
DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/armbian-orangepi4_lts_bullseye.img.xz.sha256"
DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/armbian-orangepi4_lts_bullseye.img.xz"
DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/armbian-orangepi4_lts_bookworm.img.xz.sha256"
DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/armbian-orangepi4_lts_bookworm.img.xz"

# export Variables
export BASE_ARCH
Expand Down
4 changes: 2 additions & 2 deletions config/armbian/orangepi_zero2
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
BASE_ARCH="arm64"

# Image source
DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/armbian-orangepi_zero2_bullseye.img.xz.sha256"
DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/armbian-orangepi_zero2_bullseye.img.xz"
DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}/armbian-orangepi_zero2_bookworm.img.xz.sha256"
DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}/armbian-orangepi_zero2_bookworm.img.xz"

# export Variables
export BASE_ARCH
Expand Down
2 changes: 1 addition & 1 deletion config/orangepi/default
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ BASE_IMAGE_RASPBIAN="no"

# partition resizing
BASE_ROOT_PARTITION="2"
BASE_IMAGE_ENLARGEROOT=2500
BASE_IMAGE_ENLARGEROOT=3500
BASE_IMAGE_RESIZEROOT=600
# Compress not needed due compression done in workflow
BASE_RELEASE_COMPRESS=no
Expand Down
12 changes: 5 additions & 7 deletions config/raspberry/default
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,15 @@
# Declare Variables before exporting.
# See https://www.shellcheck.net/wiki/SC2155

# New locations after Bullseye turned into 'oldstable'
DOWNLOAD_BASE_URL="https://downloads.raspberrypi.org/raspios_oldstable_lite_arm64/images/raspios_oldstable_lite_arm64-2023-12-06/2023-12-05-raspios-bullseye-arm64-lite.img.xz"
DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}.sha256"
DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}.torrent"

BASE_IMAGE_ENLARGEROOT=4500
BASE_IMAGE_ENLARGEROOT=5500
BASE_IMAGE_RESIZEROOT=600
# Compress not needed due compression done in workflow
BASE_RELEASE_COMPRESS=no
# Modules are valid for 32bit and 64bit images
MODULES="base(pkgupgrade,udev_fix,mainsailos(net,piconfig,klipper,is_req_preinstall,moonraker,timelapse,mainsail,crowsnest,sonar,password-for-sudo),postrename)"
MODULES="base(pkgupgrade,udev_fix,mainsailos(headless_nm,piconfig,klipper,is_req_preinstall,moonraker,timelapse,mainsail,crowsnest,sonar,password-for-sudo),postrename)"

DOWNLOAD_URL_CHECKSUM="https://downloads.raspberrypi.org/raspios_lite_arm64_latest.sha256"
DOWNLOAD_URL_IMAGE="https://downloads.raspberrypi.org/raspios_lite_arm64_latest.torrent"

# export Variables
export DOWNLOAD_BASE_URL
Expand Down
6 changes: 2 additions & 4 deletions config/raspberry/rpi32
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,8 @@
# Declare Variables before exporting.
# See https://www.shellcheck.net/wiki/SC2155

# New locations after Bullseye turned into 'oldstable'
DOWNLOAD_BASE_URL="https://downloads.raspberrypi.org/raspios_oldstable_lite_armhf/images/raspios_oldstable_lite_armhf-2023-12-06/2023-12-05-raspios-bullseye-armhf-lite.img.xz"
DOWNLOAD_URL_CHECKSUM="${DOWNLOAD_BASE_URL}.sha256"
DOWNLOAD_URL_IMAGE="${DOWNLOAD_BASE_URL}.torrent"
DOWNLOAD_URL_CHECKSUM="https://downloads.raspberrypi.org/raspios_lite_armhf_latest.sha256"
DOWNLOAD_URL_IMAGE="https://downloads.raspberrypi.org/raspios_lite_armhf_latest.torrent"

export DOWNLOAD_BASE_URL
export DOWNLOAD_URL_CHECKSUM
Expand Down
2 changes: 1 addition & 1 deletion config/raspberry/rpi64
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ export BASE_ARCH
### JSON sniplet Setup
### NOTE: Please see all config files for setup variables!!!
# shellcheck disable=SC2034
JSON_SUPPORTED_SBC="pi3-64bit pi4-64bit"
JSON_SUPPORTED_SBC="pi3-64bit pi4-64bit pi5-64bit"
5 changes: 4 additions & 1 deletion config/raspberry/rpi64-ks
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,15 @@

BASE_ARCH="arm64"

BASE_IMAGE_ENLARGEROOT=6500

# Changed modules
MODULES="base,pkgupgrade,udev_fix,mainsailos(net,piconfig,klipper,is_req_preinstall,moonraker,timelapse,mainsail,klipperscreen,crowsnest,sonar,password-for-sudo),postrename"
MODULES="base(pkgupgrade,udev_fix,mainsailos(net,piconfig,klipper,is_req_preinstall,moonraker,timelapse,mainsail,klipperscreen,crowsnest,sonar,password-for-sudo),postrename)"

# export variables
export BASE_ARCH
export MODULES
export BASE_IMAGE_ENLARGEROOT

### JSON sniplet Setup
### NOTE: Please see all config files for setup variables!!!
Expand Down
23 changes: 23 additions & 0 deletions src/modules/headless_nm/config
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#!/usr/bin/env bash
#Shebang for better file detection
#### headless_nm install module
####
#### Written by Stephan Wendel aka KwadFan <[email protected]>
#### Copyright 2024 - till today
#### https://github.com/mainsail-crew/MainsailOS
####
#### This File is distributed under GPLv3
####

# shellcheck disable=all

# Use disable power save for wifi module
[ -n "$HEADLESS_NM_DISABLE_PWRSAVE" ] || HEADLESS_NM_DISABLE_PWRSAVE=yes

# Type of power save rclocal/service/udev
# rclocal - backwards compatibility, runs via rc.local
# service - will add an systemd.service to enable or disable behavior
# on reboots
# udev - creates a udev rules that should affect all wifi devices.

[ -n "$HEADLESS_NM_PWRSAVE_TYPE" ] || HEADLESS_NM_PWRSAVE_TYPE=udev
59 changes: 59 additions & 0 deletions src/modules/headless_nm/filesystem/boot/WiFi-README.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
Wifi-README.txt

################################################################################
#### IMPORTANT WARNING ####
################################################################################
#### ####
#### First, make sure you have a decent text editor of your choice. ####
#### Notepad++, VSCode, SublimeText or similar are recommended. ####
#### ####
#### Do not use Wordpad to edit this file, it will corrupt it and your ####
#### configuration will not work. ####
#### ####
#### If you use Textedit to edit this file, ####
#### be sure to use "plain text format" and "disable smart quotes" ####
#### in "Textedit > Preferences", otherwise Textedit will use ####
#### incompatible characters and your network configuration won't work! ####
#### ####
################################################################################

How do I setup a new network on my OS_NAME ?
--------------------------------------------

1.) Copy and paste the 'headless_nm.txt.template'.
Rename this file to 'headless_nm.txt'

2.) Now open the file with your favourite text editor.
Windows and MacOS users please read the note above!

This file is pretty self explaining, just the 'REGDOMAIN'
needs some explaination:

Valid country codes are:

GB (United Kingdom)
FR (France)
DE (Germany)
US (United States)
SE (Sweden)

For a complete list, please visit https://en.wikipedia.org/wiki/ISO_3166-1_alpha-2

3.) Remove the SD card afterwards.

4.) Almost done... Please put the SD card back into your SBC and wait for it to connect.

NOTE:

Plug in a monitor and watch the console output to get its IP address or
consult your router's setup page to get this information.

You could also try to reach it by its hostname.

http://<yourpisname>.local

If you did not change the hostname during the initial flash, you could use

http://OS_NAME.local

5.) Enjoy OS_NAME :)
14 changes: 14 additions & 0 deletions src/modules/headless_nm/filesystem/boot/headless_nm.txt.template
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
#### Headless Wifi configuration

# Your Wifis SSID
SSID="<mySSID>"

# Your WiFis password
PASSWORD="<mySecretPasword>"

# Is your SSID in hidden state? [true/false]
HIDDEN="false"

# Wifi Country code
# See Wifi-README.txt for details!
REGDOMAIN="US"
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#### Disable wifi power_save
####
#### Written by Stephan Wendel aka KwadFan <[email protected]>
#### Copyright 2022
#### https://github.com/mainsail-crew/MainsailOS
####
#### This File is distributed under GPLv3
####
#### Note: This is based on:
#### https://www.intel.com/content/www/us/en/support/articles/000006168/boards-and-kits.html

[Unit]
Description=Disable power management for wlan0
After=network.target

[Service]
Type=oneshot
StandardOutput=tty
ExecStart=/usr/local/bin/pwrsave off

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#### headless_nm service
####
#### Written by Stephan Wendel aka KwadFan <[email protected]>
#### Copyright 2024
#### https://github.com/mainsail-crew/MainsailOS
####
#### This File is distributed under GPLv3
####

[Unit]
Description=Setup Wifi on headless machines using NetworkManager
Before=network.target NetworkManager.service

[Service]
Type=oneshot
StandardOutput=tty
ExecStart=/usr/local/bin/headless_nm

[Install]
WantedBy=multi-user.target
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
ACTION=="add", \
SUBSYSTEM=="net", \
KERNEL=="wlan*" \
RUN+="/usr/sbin/iw %k set power_save off"
Loading
Loading