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

Bookworm #68

Draft
wants to merge 18 commits into
base: master
Choose a base branch
from
Draft
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
4 changes: 2 additions & 2 deletions .env
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
RASPIOS_BUILD_DATE="2022-09-22"
RASPIOS_RELEASE_DATE="2022-09-26"
RASPIOS_BUILD_DATE="2024-03-15"
RASPIOS_RELEASE_DATE="2024-03-15"
15 changes: 10 additions & 5 deletions .github/workflows/experimental.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ on:


env:
DISTRO_NAME: "bullseye"
DISTRO_NAME: "bookworm"
REPO_NAME: "experimental"

jobs:
Expand All @@ -37,7 +37,7 @@ jobs:
uses: FranzDiebold/[email protected]

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -120,14 +120,19 @@ jobs:
id: date
run: echo "DATE_STAMP=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Cleanup (to avoid CI space issues)
run: |
ls -l playbooks/artifacts
sudo rm -f playbooks/artifacts/*.img
ls -l playbooks/artifacts

- name: Upload OS zip contents
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pi-topOS_${{ env.DISTRO_NAME }}_${{ env.REPO_NAME }}_${{ env.BUILD_TYPE }}_${{ env.DATE_STAMP }}_B${{ github.run_number || github.run_id }}
if-no-files-found: error
path: |
playbooks/artifacts/*
!**/*.zip
playbooks/artifacts/*.zip

- name: Print metadata
run: cat playbooks/artifacts/metadata.txt
26 changes: 19 additions & 7 deletions .github/workflows/pt-os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,11 @@ on:
distro_name:
description: 'OS distribution'
required: true
default: 'bullseye'
type: string
default: 'bookworm'
type: choice
options:
- bullseye
- bookworm

jobs:
build:
Expand All @@ -32,7 +35,7 @@ jobs:
uses: FranzDiebold/[email protected]

- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
with:
fetch-depth: 0

Expand Down Expand Up @@ -110,26 +113,35 @@ jobs:
${ANSIBLE} --extra-vars "build_number=${{ github.run_number || github.run_id }}" \
playbooks/analyse_build.yml

- name: Cleanup (to avoid CI space issues)
run: |
ls -l playbooks/artifacts
sudo rm -f playbooks/artifacts/*.img
ls -l playbooks/artifacts

- name: Get current date
id: date
run: echo "DATE_STAMP=$(date +'%Y-%m-%d')" >> $GITHUB_ENV

- name: Upload OS zip contents
uses: actions/upload-artifact@v3
uses: actions/upload-artifact@v4
with:
name: pi-topOS_${{ inputs.distro_name }}_${{ inputs.repo_name }}_${{ env.BUILD_TYPE }}_${{ env.DATE_STAMP }}_B${{ github.run_number || github.run_id }}
if-no-files-found: error
path: |
playbooks/artifacts/*
!**/*.zip

- name: Print metadata
run: cat playbooks/artifacts/metadata.txt

- name: Authenticate with GCP
uses: "google-github-actions/[email protected]"
with:
credentials_json: ${{ secrets.WEB_GCR_UPLOAD_KEY }}

- name: Upload OS zip to GCS
uses: google-github-actions/upload-cloud-storage@v0.4.0
uses: google-github-actions/upload-cloud-storage@v1.0.3
with:
credentials: ${{ secrets.GOOGLE_CLOUD_UPLOAD_JSON_CREDENTIALS }}
path: 'playbooks/artifacts'
glob: '**/*.zip'
parent: false
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ This repository provides the build pipeline used for official pi-topOS images.
## Build Types
### Nightly Builds

Go [here](https://github.com/pi-top/pi-topOS-ansible-playbook/actions/workflows/bullseye-experimental.yml?query=event%3Aschedule) for nightly builds.
Go [here](https://github.com/pi-top/pi-topOS-ansible-playbook/actions/workflows/experimental.yml?query=event%3Aschedule) for nightly builds.

These act as bleeding edge previews of pi-topOS. Packages are installed from PackageCloud's experimental repo, which is populated with the latest master packages of all pi-topOS software.

GitHub Actions' artifacts are kept for 90 days.

### Preview Builds

Go [here](https://github.com/pi-top/pi-topOS-Build/actions/workflows/bullseye-unstable.yml) for preview builds. These act as early release previews for pi-topOS. Packages are installed from PackageCloud's unstable repo, which is populated with packages that have had a GitHub Release.
Go [here](https://github.com/pi-top/pi-topOS-Build/actions/workflows/pt-os.yml) for preview builds. These act as early release previews for pi-topOS. Packages are installed from PackageCloud's unstable repo, which is populated with packages that have had a GitHub Release.

### Official Releases

Expand Down
2 changes: 1 addition & 1 deletion pi-top_os_version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
3.0
4.0
54 changes: 35 additions & 19 deletions playbooks/configure_pi_top_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@
- name: Copy issue file template
copy:
src: files/pt-issue.txt
dest: /boot/pt-issue.txt
dest: /boot/firmware/pt-issue.txt

#######################################################
# See 'docs/BUILD_ID_SCHEMA.txt' for more information #
Expand All @@ -53,9 +53,9 @@
set_fact:
build_id: "S{{ build_id_schema_version }}_B{{ build_repo_name }}_D{{ ansible_date_time.date }}_P{{ orig_pt_os_ver['content'] | b64decode | trim }}_#{{ build_repo_commit_short }}_R{{ build_number }}"

- name: Replace build info placeholders in /boot/pt-issue.txt
- name: Replace build info placeholders in /boot/firmware/pt-issue.txt
replace:
path: /boot/pt-issue.txt
path: /boot/firmware/pt-issue.txt
regexp: "{{ item.placeholder }}"
replace: "{{ item.replace }}"
with_items:
Expand All @@ -70,13 +70,18 @@
- name: Copy boot config.txt
copy:
src: files/config.txt
dest: /boot/config.txt
dest: /boot/firmware/config.txt
mode: '0755'

- name: Enable 64 bit mode
when: build_type == "arm64" or build_type == "arm64-lite"
shell: |
echo "# Run in 64-bit mode\narm_64bit=1" | tee -a /boot/firmware/config.txt

- name: Copy boot config.txt backup
copy:
src: files/config.txt
dest: /boot/config.txt.orig
dest: /boot/firmware/config.txt.orig
mode: '0755'

########
Expand Down Expand Up @@ -108,7 +113,7 @@
- empty-etc-motd
- hostname
- hosts
- static-ip-on-usb-interface
# - static-ip-on-usb-interface
- us-keyboard
- us-locale

Expand All @@ -123,14 +128,14 @@
- dpms-timeout-5mins
- disable-openbox-session-right-click-menu

- name: Apply full-install 32-bit only patches
when: build_type == "armhf"
patch:
src: "patches/{{ item }}.diff"
basedir: /
strip: 1
loop:
- openbox-xdg-autostart-shebang
# - name: Apply full-install 32-bit only patches
# when: build_type == "armhf"
# patch:
# src: "patches/{{ item }}.diff"
# basedir: /
# strip: 1
# loop:
# - openbox-xdg-autostart-shebang

- name: Create larger static swapfile (to speed up first boot)
shell: |
Expand Down Expand Up @@ -161,6 +166,17 @@
when: full_install
shell: update-alternatives --install /usr/bin/x-session-manager x-session-manager /usr/bin/openbox-session 99

- name: Make sure lightdm service folder for drop-ins exists
file:
path: /lib/systemd/system/lightdm.service.d/
state: directory

- name: Configure openbox-session
copy:
src: files/99-openbox-for-onboarding.conf
dest: /lib/systemd/system/lightdm.service.d/99-openbox-for-onboarding.conf
mode: '0644'

- name: Disable Further Link for onboarding (using symlink)
when: full_install
file:
Expand All @@ -185,7 +201,7 @@

- name: Set up virtual Ethernet driver for pi-top [4] display port
replace:
path: /boot/cmdline.txt
path: /boot/firmware/cmdline.txt
regexp: "{{ item.original }}"
replace: "{{ item.replace }}"
with_items:
Expand All @@ -194,11 +210,11 @@

- name: Clean boot configuration - Disable Raspberry Pi logo on boot screen
shell: |
echo "$(cat /boot/cmdline.txt) logo.nologo" > /boot/cmdline.txt
echo "$(cat /boot/firmware/cmdline.txt) logo.nologo" > /boot/firmware/cmdline.txt

- name: Clean boot configuration - Remove blinking cursor
shell: |
echo "$(cat /boot/cmdline.txt) vt.global_cursor_default=0" > /boot/cmdline.txt
echo "$(cat /boot/firmware/cmdline.txt) vt.global_cursor_default=0" > /boot/firmware/cmdline.txt

- name: Clean boot configuration - Disable boot kernel warnings/errors
# Usually harmless, always scary
Expand All @@ -210,7 +226,7 @@
# [ 3.992474 ] usb 1-1.4.2: device not accepting address 8, error -71
# [ 5.713155 ] usb 1-1.4-port2: unable to enumerate USB device
shell: |
echo "$(cat /boot/cmdline.txt) loglevel=0" > /boot/cmdline.txt
echo "$(cat /boot/firmware/cmdline.txt) loglevel=0" > /boot/firmware/cmdline.txt

###############################################################
# Set user/password/wifi country initial configuration #
Expand All @@ -222,7 +238,7 @@

- name: Set user & password
shell: |
echo "pi:"'{{ password }}' > /boot/userconf
echo "pi:"'{{ password }}' > /boot/firmware/userconf

#########################
# General system config #
Expand Down
6 changes: 3 additions & 3 deletions playbooks/create_pi_top_os_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@
- name: Recreate empty pi-top image using script
become: true
# recovery = 128MB
# boot = 256MB
# rootfs = 13GB (prevents space issues during upgrade)
shell: scripts/create_empty_pi-top_image.sh 128 256 13
# boot = 512MB
# rootfs = 11GB (prevents space issues during upgrade)
shell: scripts/create_empty_pi-top_image.sh 128 512 11
when: recreate_pi_top_os_image or new_image_file.stat.exists == false

- name: Create metadata file
Expand Down
6 changes: 6 additions & 0 deletions playbooks/files/99-openbox-for-onboarding.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[Service]
# Use X11 instead of wayland/wayfire
ExecStartPre=bash -c "command -v raspi-config >/dev/null && raspi-config nonint do_wayland W1"
# Use openbox session for onboarding
ExecStartPre=bash -c "file /etc/lightdm/lightdm.conf && sed /etc/lightdm/lightdm.conf -i -e \"s|LXDE-pi-x|openbox|\""
ExecStartPre=bash -c "file /etc/lightdm/lightdm.conf && sed /etc/lightdm/lightdm.conf -i -e \"s|LXDE-pt-x|openbox|\""
1 change: 1 addition & 0 deletions playbooks/files/autoboot.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
[all]
boot_partition=5
65 changes: 27 additions & 38 deletions playbooks/files/config.txt
Original file line number Diff line number Diff line change
@@ -1,39 +1,44 @@
#//////////////////////////////////////////////////////////////////////////
#
# Some settings in this file are managed by pi-topOS programs and services.
# Details can be found in the OS documentation:
# File: /usr/share/pt-docs/os-configtxt
# Website: https://pi-top.com/pt-docs/os-configtxt
#
#//////////////////////////////////////////////////////////////////////////
# For more options and information on how settings in this file work, see
# Raspberry Pi Foundation's documentation:
# http://rpf.io/configtxt
# http://rptl.io/configtxt
#
# Some settings may impact device functionality. See link above for details
# Additional overlays and parameters are documented /boot/overlays/README
#//////////////////////////////////////////////////////////////////////////
# DO NOT EDIT 'ptconfig' SETTINGS
# USED BY THE OS TO SUPPORT BUGFIXES AND LATEST FUNCTIONALITY
#
# pt_config_txt_orig_version=2020.12.14-1_all
# pt_config_txt_mods_applied=
#//////////////////////////////////////////////////////////////////////////

#//////////////////////////////
# Display stack configuration /
#//////////////////////////////
# Enable audio (loads snd_bcm2835)
dtparam=audio=on

# Default case: 1 display maximum
max_framebuffers=1
# Automatically load overlays for detected cameras
camera_auto_detect=1

# Default case: legacy driver
# Compatible with all non-Pi 4 models
#dtoverlay=vc4-fkms-v3d
# Automatically load overlays for detected DSI displays
display_auto_detect=1

[pi4]
# RPi 4: 2 displays maximum
# Automatically load initramfs files, if found
auto_initramfs=1

# Enable DRM VC4 V3D driver
dtoverlay=vc4-kms-v3d
max_framebuffers=2

# RPi 4: DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
# Don't have the firmware create an initial video= setting in cmdline.txt.
# Use the kernel's default instead.
disable_fw_kms_setup=1

# Disable compoensation for displays with overscan
# Prevent black border of unused pixels
disable_overscan=1

# Run as fast as firmware / board allows
arm_boost=1

[pi4]

#//////////////////////////////////////
# Additional networking configuration /
Expand All @@ -43,17 +48,7 @@ dtoverlay=vc4-fkms-v3d
# Required by pt-networking (not pt-display-port)
dtoverlay=dwc2

#/////////////////////
# HDMI configuration /
#/////////////////////
# Force HDMI out
# - allow hotplugging a display
# - allow VNC without a display attached
hdmi_force_hotplug:1=1

[all]
# Prevent black border of unused pixels
disable_overscan=1

# Enable sound over HDMI
hdmi_drive=2
Expand Down Expand Up @@ -86,9 +81,3 @@ start_x=1
#///////////////////////
# GPU memory allocation - default 128MB
gpu_mem=128

# Audio - default on
dtparam=audio=on

# Rainbow splash screen - default on
disable_splash=0
4 changes: 2 additions & 2 deletions playbooks/finalise_pi_top_image.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
pt_image_device: "{{ rootfs_lo_device.stdout[:-2] }}"

- name: Get the original device identifier (PARTUUID) from cmdline.txt
shell: "cat /tmp/pi-top-os/boot/cmdline.txt| tr ' ' '\n' | grep 'root=PARTUUID=' | awk -F'[= -]' '{print $3}'"
shell: "cat /tmp/pi-top-os/boot/firmware/cmdline.txt| tr ' ' '\n' | grep 'root=PARTUUID=' | awk -F'[= -]' '{print $3}'"
register: device_identifier

- name: Unmount
Expand All @@ -57,7 +57,7 @@
- /dev
- /proc
- /sys
- /boot
- /boot/firmware
- /recovery
- # Not a typo - needed to unmount the root
ignore_errors: true
Expand Down
Loading
Loading