Skip to content

Commit

Permalink
23.10.26 (#85)
Browse files Browse the repository at this point in the history
# Changelog

##
[23.10.10a6](https://github.com/NeonGeckoCom/neon_debos/tree/23.10.10a6)
(2023-10-10)

[Full
Changelog](23.10.6a5...23.10.10a6)

**Closed issues:**

- Neon on Orange Pi
[\#80](#80)

**Merged pull requests:**

- OrangePi 5 Initial Support
[\#79](#79)
([NeonDaniel](https://github.com/NeonDaniel))

##
[23.10.6a5](https://github.com/NeonGeckoCom/neon_debos/tree/23.10.6a5)
(2023-10-06)

[Full
Changelog](23.10.5a4...23.10.6a5)

**Merged pull requests:**

- Refactor to support multiple platforms/devices
[\#84](#84)
([NeonDaniel](https://github.com/NeonDaniel))

##
[23.10.5a4](https://github.com/NeonGeckoCom/neon_debos/tree/23.10.5a4)
(2023-10-05)

[Full
Changelog](23.9.28a3...23.10.5a4)

**Merged pull requests:**

- Minor recipe cleanup
[\#83](#83)
([NeonDaniel](https://github.com/NeonDaniel))

##
[23.9.28a3](https://github.com/NeonGeckoCom/neon_debos/tree/23.9.28a3)
(2023-09-28)

[Full
Changelog](23.9.20a2...23.9.28a3)

**Merged pull requests:**

- Update kernel and add kernel update mechanism
[\#82](#82)
([NeonDaniel](https://github.com/NeonDaniel))

##
[23.9.20a2](https://github.com/NeonGeckoCom/neon_debos/tree/23.9.20a2)
(2023-09-20)

[Full
Changelog](23.9.11a1...23.9.20a2)

**Merged pull requests:**

- Refactor Qt Shell Build
[\#81](#81)
([NeonDaniel](https://github.com/NeonDaniel))

##
[23.9.11a1](https://github.com/NeonGeckoCom/neon_debos/tree/23.9.11a1)
(2023-09-11)

[Full
Changelog](23.9.7...23.9.11a1)

**Merged pull requests:**

- Add manual squashfs update script
[\#78](#78)
([NeonDaniel](https://github.com/NeonDaniel))



\* *This Changelog was automatically generated by
[github_changelog_generator](https://github.com/github-changelog-generator/github-changelog-generator)*
  • Loading branch information
NeonDaniel authored Oct 27, 2023
2 parents 4f61631 + ecffdfb commit 1c04574
Show file tree
Hide file tree
Showing 153 changed files with 10,329 additions and 585 deletions.
239 changes: 20 additions & 219 deletions CHANGELOG.md

Large diffs are not rendered by default.

9 changes: 9 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,15 @@ Within each directory, files are indexed roughly in the order they are indended
to be run in, so a recipe starting with `03` should run before `04`. Not all
recipes are used for all builds.

## Build Options
Several configuration options are available at build time; a brief summary of common
parameters is listed here.

- `platform` - The hardware platform to build for. Valid options include: `rpi4`.
- `device` - The specific device to build for. Valid options include: `mark_2`, `rpi4`. In
many cases, `device` will default to `platform` if not defined.
- `neon_core` - A branch or version spec for `neon_core` to build.

## Build instructions
To build a default image, use the included `run_docker_debos.sh` shell script.

Expand Down
40 changes: 11 additions & 29 deletions base-rootfs-rpi4.yml → base-rootfs.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,9 @@
{{- $architecture := or .architecture "arm64" -}}
{{- $firmware_version := or .firmware_version "master" -}}
{{- $kernel_version := or .kernel_version "5.15.92-gecko+" -}}
{{ $suite := or .suite "bookworm" }}
{{- $image := or .image "ostree-base-image-rpi4" -}}
{{- $build_cores := or .build_cores 4 -}}
{{ $platform := or .platform "rpi4" }}

architecture: {{ $architecture }}

Expand All @@ -13,51 +14,45 @@ actions:
architecture: {{ $architecture }}
firmware_version: {{ $firmware_version }}
suite: {{ $suite }}
image: {{ $image }}

- action: recipe
recipe: recipes/02-rpi4.yml
recipe: recipes/02-{{ $platform }}.yml
variables:
architecture: {{ $architecture }}
firmware_version: {{ $firmware_version }}
suite: {{ $suite }}
image: {{ $image }}
kernel_version: {{ $kernel_version }}

- action: recipe
recipe: recipes/03-base-packages.yml
variables:
architecture: {{ $architecture }}
firmware_version: {{ $firmware_version }}
suite: {{ $suite }}
image: {{ $image }}

{{ if eq $platform "rpi4" }}
- action: recipe
recipe: recipes/03-get-raspi-packages.yml

{{ end }}
- action: recipe
recipe: recipes/04-base-overlay.yml
variables:
architecture: {{ $architecture }}
firmware_version: {{ $firmware_version }}
suite: {{ $suite }}
image: {{ $image }}

- action: recipe
recipe: recipes/05-setup-networking.yml
variables:
architecture: {{ $architecture }}
firmware_version: {{ $firmware_version }}
suite: {{ $suite }}
image: {{ $image }}

{{ if eq $platform "rpi4" }}
- action: recipe
recipe: recipes/06-libcamera.yml
variables:
architecture: {{ $architecture }}
firmware_version: {{ $firmware_version }}
suite: {{ $suite }}
image: {{ $image }}

{{ end }}
- action: recipe
recipe: recipes/07-splash-screen.yml
variables:
Expand All @@ -69,7 +64,6 @@ actions:
architecture: {{ $architecture }}
firmware_version: {{ $firmware_version }}
suite: {{ $suite }}
image: {{ $image }}

- action: recipe
recipe: recipes/09-swap.yml
Expand All @@ -80,25 +74,13 @@ actions:
recipe: recipes/11-ovos-font.yml
variables:
architecture: {{ $architecture }}
firmware_version: {{ $firmware_version }}
suite: {{ $suite }}
image: {{ $image }}

- action: recipe
recipe: recipes/12-ovos-gui-dependencies.yml
variables:
architecture: {{ $architecture }}
firmware_version: {{ $firmware_version }}
suite: {{ $suite }}
image: {{ $image }}

- action: recipe
recipe: recipes/13-audio-devices.yml
variables:
architecture: {{ $architecture }}
firmware_version: {{ $firmware_version }}
suite: {{ $suite }}
image: {{ $image }}

- action: recipe
recipe: recipes/14-mount-firmware.yml
Expand All @@ -125,13 +107,13 @@ actions:
recipe: recipes/17-locale-config.yml
variables:
architecture: {{ $architecture }}

{{ if eq $platform "rpi4" }}
- action: recipe
recipe: recipes/20-sj201.yml
variables:
architecture: {{ $architecture }}
build_cores: {{ $build_cores }}

{{ end }}
- action: recipe
recipe: recipes/27-update-clock.yml
variables:
Expand All @@ -149,4 +131,4 @@ actions:
build_cores: {{ $build_cores }}

- action: pack
file: rpi4_base.tar.gz
file: {{ $platform }}_base.tar.gz
21 changes: 14 additions & 7 deletions build_base_image.sh
Original file line number Diff line number Diff line change
Expand Up @@ -28,20 +28,27 @@
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

source_dir="$( cd -P "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"

mem_limit=${MEM_LIMIT:-"16G"}
sudo chmod ugo+x "${source_dir}/scripts/"*
mem_limit=${MEM_LIMIT:-"24G"}
core_limit=${CORE_LIMIT:-4}
docker run --rm -d \

platform=${1:-rpi4}
[ "${platform}" == "rpi4" ] && kernel_version="5.15.92-gecko+"
[ "${platform}" == "opi5" ] && kernel_version="5.10.110-gecko+"

docker run --rm \
--device /dev/kvm \
--workdir /image_build \
--mount type=bind,source="${source_dir}",destination=/image_build \
--group-add=108 \
--security-opt label=disable \
--name neon_debos_base \
godebos/debos "base-rootfs-rpi4.yml" \
-m "${mem_limit}" \
--oom-kill-disable \
godebos/debos "base-rootfs.yml" \
-t architecture:arm64 \
-t build_cores:"${core_limit}" \
-t kernel_version:"${kernel_version}" \
-t platform:"${platform}" \
-m "${mem_limit}" \
-c "${core_limit}" && \
docker logs -f neon_debos_base
echo -e "\n"
-c "${core_limit}"
41 changes: 28 additions & 13 deletions scripts/02-pi_copy_kernel.sh → build_uboot/u-boot-build.sh
100755 → 100644
Original file line number Diff line number Diff line change
Expand Up @@ -27,16 +27,31 @@
# NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
# SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

# Set to exit on error
set -Ee

cd /boot

if [ $1 = "armhf" ]; then
cp /boot/vmlinuz-* /boot/firmware/kernel.img
elif [ -f /boot/kernel8.img ]; then
mv /boot/kernel8.img /boot/firmware/kernel8.img
else
mv /boot/vmlinuz-* /boot/firmware/kernel8.img.gz
gunzip /boot/firmware/kernel8.img.gz
fi
[ -d u-boot ] && rm -rf u-boot
[ -d rkbin ] && rm -rf rkbin

set -eE

git clone https://github.com/orangepi-xunlong/u-boot-orangepi -b v2017.09-rk3588 u-boot
git clone https://github.com/radxa/rkbin.git -b master

ROOT_PATH="$(pwd)"
TOOLPATH="${ROOT_PATH}/rkbin/tools"
PATH="$PATH:$TOOLPATH"

cd u-boot || exit 10

export ARCH=arm
export CROSS_COMPILE=aarch64-linux-gnu-

make distclean
make orangepi_5b_defconfig && echo "Configured for OrangePi 5B"
make BL31=../rkbin/bin/rk35/rk3588_bl31_v1.38.elf spl/u-boot-spl.bin u-boot.dtb u-boot.itb

./tools/mkimage -n rk3588 -T rksd -d ../rkbin/bin/rk35/rk3588_ddr_lp4_2112MHz_lp5_2736MHz_v1.11.bin:spl/u-boot-spl.bin idbloader.img
cp u-boot.itb "${ROOT_PATH}/../overlays/02-opi5/boot/"
cp idbloader.img "${ROOT_PATH}/../overlays/02-opi5/boot/"

cd .. || exit 10
rm -rf u-boot
rm -rf rkbin
4 changes: 3 additions & 1 deletion debian-base-image-rpi4.yml → debian-base-image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{{- $architecture := or .architecture "arm64" -}}
{{- $firmware_version := or .firmware_version "master" -}}
{{ $suite := or .suite "bookworm" }}
{{ $platform := or .platform "rpi4" }}
{{- $image := or .image "debian-base-image-rpi4" -}}
{{- $neon_debos := or .neon_debos "unknown" -}}
{{- $build_cores := or .build_cores 4 -}}
Expand All @@ -9,7 +10,7 @@ architecture: {{ $architecture }}

actions:
- action: unpack
file: rpi4_base.tar.gz
file: {{ $platform }}_base.tar.gz

- action: recipe
recipe: recipes/70-developer-extras.yml
Expand Down Expand Up @@ -46,3 +47,4 @@ actions:
architecture: {{ $architecture }}
image: {{ $image }}
build_cores: {{ $build_cores }}
platform: {{ $platform }}
10 changes: 9 additions & 1 deletion debian-neon-image-rpi4.yml → debian-neon-image.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
{{- $architecture := or .architecture "arm64" -}}
{{- $firmware_version := or .firmware_version "master" -}}
{{ $suite := or .suite "bookworm" }}
{{ $platform := or .platform "rpi4" }}
{{ $device := or .device $platform }}
{{- $image := or .image "debian-neon-image-rpi4" -}}
{{- $neon_core := or .neon_core "master" -}}
{{- $neon_debos := or .neon_debos "unknown" -}}
Expand All @@ -10,12 +12,13 @@ architecture: {{ $architecture }}

actions:
- action: unpack
file: rpi4_base.tar.gz
file: {{ $platform }}_base.tar.gz

- action: recipe
recipe: recipes/31-updater-service.yml
variables:
architecture: {{ $architecture }}
device: {{ $device }}

- action: recipe
recipe: recipes/33-homeassistant-shortcut.yml
Expand All @@ -41,6 +44,8 @@ actions:
suite: {{ $suite }}
image: {{ $image }}
neon_core: {{ $neon_core }}
platform: {{ $platform }}
device: {{ $device }}

- action: recipe
recipe: recipes/45-reset-service.yml
Expand Down Expand Up @@ -88,6 +93,8 @@ actions:
image: {{ $image }}
neon_core: {{ $neon_core }}
neon_debos: {{ $neon_debos }}
platform: {{ $platform }}
device: {{ $device }}

- action: recipe
recipe: recipes/98-backup-image.yml
Expand All @@ -103,3 +110,4 @@ actions:
architecture: {{ $architecture }}
image: {{ $image }}
build_cores: {{ $build_cores }}
platform: {{ $platform }}
16 changes: 12 additions & 4 deletions initramfs_build/build_initramfs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,15 @@ cd .. || exit 10
zstd -z initramfs.cpio
rm initramfs.cpio
rm -r initramfs_dir
output_path="../overlays/02-rpi4/boot/firmware/initramfs"
mv initramfs.cpio.zst "${output_path}" && echo "Generated initramfs"
md5=$(md5sum "${output_path}" | cut -d' ' -f1)
echo "${md5}" > "${output_path}.md5"

# Write OPi5 initrd
opi_path="../overlays/02-opi5/boot/uInitrd"
mkimage -A arm64 -T ramdisk -C none -n uInitrd -d initramfs.cpio.zst "${opi_path}" && echo "Generated uInitrd"
md5=$(md5sum "${opi_path}" | cut -d' ' -f1)
echo "${md5}" > "${opi_path}.md5"

# Write RPi4 initrd
rpi_path="../overlays/02-rpi4/boot/firmware/initramfs"
mv initramfs.cpio.zst "${rpi_path}" && echo "Generated initramfs"
md5=$(md5sum "${rpi_path}" | cut -d' ' -f1)
echo "${md5}" > "${rpi_path}.md5"
24 changes: 22 additions & 2 deletions initramfs_build/overlay/init
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,7 @@ export DEVICE=
export BOOT=
export BOOTIF=
export UBIMTD=
export KERNEL="kernel8.img"
export break=
export init=/sbin/init
export readonly=y
Expand Down Expand Up @@ -123,6 +124,9 @@ for x in $(cat /proc/cmdline); do
;;
root_backup=*)
ROOT_BUPATH="${x#root_backup=}"
;;
kernel=*)
KERNEL="${x#kernel=}"
;;
rootfstype=*)
ROOTFSTYPE="${x#rootfstype=}"
Expand Down Expand Up @@ -283,6 +287,10 @@ if read_fstab_entry /usr; then
log_end_msg
fi

# Check for instance installed to other media
scripts/check_install.sh && log "Not installing to internal storage"
# If this does install, then boot will fail and reboot to next boot device (internal emmc for OPi)

# Mount cleanup
mount_bottom || exit_error "mount_bottom"
nfs_bottom || exit_error "nfs_bottom"
Expand Down Expand Up @@ -330,23 +338,35 @@ if [ -n "${ROOT_ROPATH}" ]; then

scripts/check_reset.sh "/media/rw"
# Mount read-only FS
log_begin_msg "Mounting squashfs root"
mkdir -p /media/ro
mount -t "squashfs" -o noatime,nodiratime "${rootmnt}/${ROOT_ROPATH}" /media/ro
mount -o remount,ro /media/ro
# TODO: Recover here by restoring a backup squashfs
log_end_msg

if [ -f /media/rw/upperdir/opt/neon/squashfs_updated ]; then
user_backup_path="/media/rw/firmware_backup"
log "Checking for updated kernel/firmware"
scripts/check_firmware_update.sh "${user_backup_path}"
log "No firmware update to apply"
fi

# Optionally Create and mount swapfile
scripts/check_swapfile.sh "${rootmnt}/swapfile"
if [ -f "${rootmnt}/swapfile" ]; then
log "mounting swapfile"
[ "$quiet" != "y" ] && log_begin_msg "mounting swapfile"
touch /swapfile
mount --bind ${rootmnt}/swapfile /swapfile
[ "$quiet" != "y" ] && log_end_msg
fi
log "swapfile handled"
[ "$quiet" != "y" ] && log "swapfile handled"

# Define remaining paths and build overlayFS
mkdir -p /media/rw/work /media/rw/upperdir
[ "$quiet" != "y" ] && log_begin_msg "Mounting overlayFS"
mount -t overlay overlay -o lowerdir=/media/ro,upperdir=/media/rw/upperdir,workdir=/media/rw/work ${rootmnt}
[ "$quiet" != "y" ] && log_end_msg

[ "$quiet" != "y" ] && log_begin_msg "Running /scripts/init-bottom"
# We expect udev's init-bottom script to move /dev to ${rootmnt}/dev
Expand Down
Loading

0 comments on commit 1c04574

Please sign in to comment.