Skip to content

Commit

Permalink
Add ramdisk, make new full ubuntu image
Browse files Browse the repository at this point in the history
  • Loading branch information
raphaelscholle authored Feb 22, 2025
1 parent 889d978 commit ab49be4
Show file tree
Hide file tree
Showing 8 changed files with 80 additions and 26 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/build_beast.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
name: Build_OpenHD_Beast_Module

on: [push]

jobs:
download-file:
runs-on: ubuntu-20.04

steps:
- name: Maximize build space
uses: easimon/maximize-build-space@master
with:
root-reserve-mb: 100
swap-size-mb: 200
remove-dotnet: 'true'
remove-android: 'true'
remove-haskell: 'true'
remove-codeql: 'true'
remove-docker-images: 'true'
overprovision-lvm: 'true'
- name: remove even more
run: |
sudo apt-get purge -y \
'^llvm-.*' \
'php.*' \
'^mongodb-.*' \
'^mysql-.*' \
azure-cli \
google-chrome-stable \
firefox \
powershell \
microsoft-edge-stable \
mono-devel
sudo apt-get autoremove -y
sudo apt-get clean
- name: Download file from Sciebo
env:
SCIEBO_USERNAME: ${{ secrets.SCIEBO_USERNAME }}
SCIEBO_PASSWORD: ${{ secrets.SCIEBO_PASSWORD }}
SCIEBO_URL: ${{ secrets.SCIEBO_URL }}
run: |
echo "Downloading file from Sciebo..."
curl -u "$SCIEBO_USERNAME:$SCIEBO_PASSWORD" -O "$SCIEBO_URL/remote.php/webdav/openhd/openhd/rk3566_SDK/prebuild_buildroot.tar.gz"
echo "Download complete."
sudo tar -xzpf prebuild_buildroot.tar.gz -C .
echo "Extraction complete."
sudo chown -R runner:runner opt
cd opt
sudo apt update
sudo apt install liblz4-tool python2 git rsync gcc g++ make device-tree-compiler bc flex bison lz4 libssl-dev libgmp-dev libmpc-dev expect expect-dev file unzip bzip2 fakeroot bsdmainutils
./build.sh cleanall
./build.sh all
12 changes: 8 additions & 4 deletions .github/workflows/eventbuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ jobs:
strategy:
fail-fast: false # Don't fail all if any of the jobs is failing
matrix:
TARGET: [pi-bullseye, x86-minimal, x86-lunar, radxa-cm3, x20, radxa-zero3w, rock5b, rock5a, qcs405] # <-- Add targets here!
TARGET: [pi-bullseye, x86-minimal, x86-noble, radxa-cm3, x20, radxa-zero3w, rock5b, rock5a] # <-- Add targets here!
#TARGET: [qrb5165] # <-- Add targets here!
steps:
- name: Maximize build space
Expand All @@ -34,10 +34,13 @@ jobs:
echo "DT=$(date -d '+1 hour' +'%m-%d-%Y-%H-%M-%S')" >> $GITHUB_ENV
echo "BRANCH=${GITHUB_REF##*/}" >> $GITHUB_ENV
echo "$GITHUB_ENV"

### ONLY THIS RELEVANT FOR BUILDING ###
- uses: actions/checkout@v4
- name: check for dev-release
if: ${{ env.BRANCH == 'dev-release' || env.BRANCH == 'add-ramdisk' }}
run: |
touch additionalFiles/dev-build
- name: update
run: sudo apt-get update
- name: remove even more
Expand All @@ -58,7 +61,7 @@ jobs:
- name: dep
run: sudo apt-get install -y unzip curl git qemu qemu-user-static binfmt-support
- name: update e2fsprogs
if: matrix.TARGET == 'x86-lunar'
if: matrix.TARGET == 'x86-noble'
run: |
git clone https://github.com/tytso/e2fsprogs
cd e2fsprogs
Expand All @@ -70,6 +73,7 @@ jobs:
- name: Build Image
run: |
touch additionalFiles/issue-new.txt
echo "OpenHD-image-${{ matrix.TARGET }}-${{ matrix.DISTRO }}-${GITHUB_REF##*/}-${{ env.DT }}" > additionalFiles/issue-new.txt
sudo ./build.sh ${{ matrix.TARGET }}
# - name: debug
Expand Down
2 changes: 1 addition & 1 deletion README.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@ valid targets are:

```sh
pi-bullseye
x86-lunar
x86-noble
rock5b
rock5a
radxa-cm3
Expand Down
10 changes: 0 additions & 10 deletions images/x86-lunar

This file was deleted.

9 changes: 9 additions & 0 deletions images/x86-noble
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
BASE_IMAGE_URL="https://openhd-images.fra1.cdn.digitaloceanspaces.com/BaseImages"
BASE_IMAGE="x86-19012025.img.xz"
BASE_IMAGE_SHA256="fd9114148269e17d2d0d83c33150c67f273c3eea95e3dd7a07a4189926de828e"
OS="ubuntu-x86"
DISTRO="noble"
HAVE_BOOT_PART=false
HAVE_CONF_PART=false
ROOT_PART=3
BIT="64"
1 change: 0 additions & 1 deletion scripts/common.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ mount_image () {
IMG_FILE="${STAGE_WORK_DIR}/IMAGE.img"

log "Mounting image file: ${IMG_FILE}"

PARTED_OUT=$(parted -s "${IMG_FILE}" unit b print)

if [[ "${HAVE_BOOT_PART}" == "true" ]]; then
Expand Down
17 changes: 8 additions & 9 deletions stages/02-Packages/00-run-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ set -e

CLEANCLEAN=true


# X20 specific code
function install_x20_packages {
#sudo apt install -y firmware-realtek NEEDS FIXING
Expand Down Expand Up @@ -58,14 +57,14 @@ function install_packages-core3566 {
}
# Ubuntu-x86-specific code
function install_ubuntu_x86_packages {
CLEAN=false
CLEAN=false
if [[ "${DISTRO}" == "jammy" ]]; then
PLATFORM_PACKAGES_HOLD="dkms initramfs-tools grub-pc linux-image-5.15.0-57-generic grub-efi-amd64-signed linux-generic linux-headers-generic linux-image-generic linux-generic-hwe-22.04 linux-image-generic-hwe-22.04 linux-headers-generic-hwe-22.04"
else
PLATFORM_PACKAGES_HOLD="grub-efi-amd64-bin grub-efi-amd64-signed linux-generic linux-headers-generic linux-image-generic linux-libc-dev"
fi
BASE_PACKAGES="openhd-sys-utils openhd apt-transport-https apt-utils open-hd-web-ui"
PLATFORM_PACKAGES="net-tools rtl8852bu-x86 rtl88x2bu-x86 rtl8812au-x86 rtl88x2eu-x86 gnome-disk-utility openssh-server gnome-terminal qopenhd python3-pip htop libavcodec-dev libavformat-dev libelf-dev libboost-filesystem-dev libspdlog-dev build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libpng-dev libjpeg-dev libglib2.0-dev libgles2-mesa-dev libgbm-dev libdrm-dev libwayland-dev pulseaudio libpulse-dev flex bison gperf libre2-dev libnss3-dev libdrm-dev libxml2-dev libxslt1-dev libminizip-dev libjsoncpp-dev liblcms2-dev libevent-dev libprotobuf-dev protobuf-compiler libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-x11-dev libgtk2.0-dev libgtk-3-dev libfuse2 mono-complete mono-runtime libmono-system-windows-forms4.0-cil libmono-system-core4.0-cil libmono-system-management4.0-cil libmono-system-xml-linq4.0-cil libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad libgstreamer-plugins-bad1.0-dev gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-qt5 openhdimagewriter"
BASE_PACKAGES="openhd-sys-utils openhd apt-transport-https apt-utils"
PLATFORM_PACKAGES="net-tools gnome-disk-utility openssh-server gnome-terminal qopenhd python3-pip htop libavcodec-dev libavformat-dev libelf-dev libboost-filesystem-dev libspdlog-dev build-essential libfontconfig1-dev libdbus-1-dev libfreetype6-dev libicu-dev libinput-dev libxkbcommon-dev libsqlite3-dev libssl-dev libpng-dev libjpeg-dev libglib2.0-dev libgles2-mesa-dev libgbm-dev libdrm-dev libwayland-dev pulseaudio libpulse-dev flex bison gperf libre2-dev libnss3-dev libdrm-dev libxml2-dev libxslt1-dev libminizip-dev libjsoncpp-dev liblcms2-dev libevent-dev libprotobuf-dev protobuf-compiler libx11-xcb-dev libglu1-mesa-dev libxrender-dev libxi-dev libxkbcommon-x11-dev libgtk2.0-dev libgtk-3-dev libfuse2 mono-complete mono-runtime libmono-system-windows-forms4.0-cil libmono-system-core4.0-cil libmono-system-management4.0-cil libmono-system-xml-linq4.0-cil libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev gstreamer1.0-plugins-base gstreamer1.0-plugins-good gstreamer1.0-plugins-ugly gstreamer1.0-plugins-bad libgstreamer-plugins-bad1.0-dev gstreamer1.0-pulseaudio gstreamer1.0-tools gstreamer1.0-alsa gstreamer1.0-qt5 openhdimagewriter"
PLATFORM_PACKAGES_REMOVE=""
}
function install_ubuntu_x86_minimal_packages {
Expand All @@ -82,7 +81,7 @@ function clone_github_repos {
chmod -R 777 /opt
}
function install_openhd {
apt update && apt install libpoco-dev -y
# apt update && apt install libpoco-dev -y
if [[ "${OS}" == "debian-X20" ]]; then
rm -Rf /etc/apt/sources.list.d/armbian.list
apt update
Expand All @@ -105,10 +104,8 @@ function install_openhd {
apt update
install_packages-core3566
elif [[ "${OS}" == "ubuntu-x86-minimal" ]] ; then
apt update
install_ubuntu_x86_minimal_packages
elif [[ "${OS}" == "ubuntu-x86" ]] ; then
apt update
install_ubuntu_x86_packages
elif [[ "${OS}" == "ubuntu" ]] ; then
fix_jetson_apt
Expand All @@ -119,8 +116,10 @@ function install_openhd {
# Add OpenHD Repository platform-specific packages
apt install -y curl
curl -1sLf 'https://dl.cloudsmith.io/public/openhd/release/setup.deb.sh'| sudo -E bash
curl -1sLf 'https://dl.cloudsmith.io/public/openhd/dev-release/setup.deb.sh'| sudo -E bash
apt update
if [ -e "/opt/additionalFiles/dev-build" ]; then
curl -1sLf 'https://dl.cloudsmith.io/public/openhd/dev-release/setup.deb.sh'| sudo -E bash
fi
#apt update

# Remove platform-specific packages
echo "Removing platform-specific packages..."
Expand Down
3 changes: 2 additions & 1 deletion stages/03-Preconfiguration/02-run-chroot.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@

rm -Rf /opt/additionalFiles
echo "alias led='led_sys.sh'" | sudo tee -a /etc/bash.bashrc >/dev/null

#create ramdisk
sudo mkdir -p /ramdisk && echo "tmpfs /ramdisk tmpfs defaults,size=100M 0 0" | sudo tee -a /etc/fstab && sudo mount /ramdisk

if [[ "${OS}" == "radxa-debian-rock5a" ]]; then
mkdir -p /usr/local/share/openhd_platform/rock/rock5a
Expand Down

0 comments on commit ab49be4

Please sign in to comment.