From 9a82b0e0baab52e8824e754fa3e3879cb126c101 Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 28 Aug 2023 21:29:29 +0600 Subject: [PATCH 01/10] update workflow to upload release file --- .github/workflows/build.sh | 17 ++++++++++++++--- .github/workflows/build.yml | 11 ++++++++--- .github/workflows/setup-dependencies.sh | 6 +++++- 3 files changed, 27 insertions(+), 7 deletions(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index d37e8c4..1bdff34 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -7,8 +7,19 @@ sudo chown -R $(id -u):$(id -g) out echo "Before compression:" ls -lh out/ -cd out + +for img in out/*.img; do + echo " Shrimping $img" + sudo pishrink $img +done + +echo "After PiShrink:" +ls -lh out/ + +for img in out/*.img; do + echo " Compressing $img" + xz -9 $img +done echo "After compression:" -pigz *.img -ls -lh . +ls -lh out/ diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 14c488f..5d4d65a 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -10,7 +10,7 @@ jobs: check-changes: ${{ steps.filter.outputs.check-changes }} steps: # For pull requests it's not necessary to checkout the code - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - uses: dorny/paths-filter@v2 id: filter with: @@ -29,7 +29,7 @@ jobs: runs-on: ubuntu-latest if: ${{ needs.changes.outputs.check-changes == 'true' }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup build dependencies run: .github/workflows/setup-dependencies.sh @@ -42,7 +42,7 @@ jobs: runs-on: ubuntu-latest if: ${{ needs.changes.outputs.check-changes == 'true' }} steps: - - uses: actions/checkout@v2 + - uses: actions/checkout@v3 - name: Setup build dependencies run: .github/workflows/setup-dependencies.sh @@ -50,4 +50,9 @@ jobs: - name: Build image run: .github/workflows/build.sh jammy-rt-ros2 + - uses: actions/upload-artifact@v3 + with: + name: img-file-jammy + path: out/*.img + # TODO: release image diff --git a/.github/workflows/setup-dependencies.sh b/.github/workflows/setup-dependencies.sh index 4f33566..e67e5d9 100755 --- a/.github/workflows/setup-dependencies.sh +++ b/.github/workflows/setup-dependencies.sh @@ -4,4 +4,8 @@ set -xe export DEBIAN_FRONTEND=noninteractive sudo apt-get update -sudo apt-get install -y parted pv rsync wget systemd-container qemu-user-static make zip xz-utils \ No newline at end of file +sudo apt-get install -y parted pv rsync wget systemd-container qemu-user-static make zip xz-utils + +wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh +chmod +x pishrink.sh +sudo mv pishrink.sh /usr/local/bin \ No newline at end of file From 03e26a10f0f6f331348ac50459d37af8cb5232a9 Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 28 Aug 2023 22:08:32 +0600 Subject: [PATCH 02/10] change path of pishrink --- .github/workflows/setup-dependencies.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/setup-dependencies.sh b/.github/workflows/setup-dependencies.sh index e67e5d9..4075572 100755 --- a/.github/workflows/setup-dependencies.sh +++ b/.github/workflows/setup-dependencies.sh @@ -8,4 +8,4 @@ sudo apt-get install -y parted pv rsync wget systemd-container qemu-user-static wget https://raw.githubusercontent.com/Drewsif/PiShrink/master/pishrink.sh chmod +x pishrink.sh -sudo mv pishrink.sh /usr/local/bin \ No newline at end of file +sudo mv pishrink.sh /usr/local/bin/pishrink \ No newline at end of file From 772f80dfc630c26b103d36881babbdeaad34650c Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 28 Aug 2023 23:36:06 +0600 Subject: [PATCH 03/10] revert to old kernel --- image_builder/data/jammy-rt/config.ini | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/image_builder/data/jammy-rt/config.ini b/image_builder/data/jammy-rt/config.ini index f4ce3c3..70c1928 100644 --- a/image_builder/data/jammy-rt/config.ini +++ b/image_builder/data/jammy-rt/config.ini @@ -28,7 +28,7 @@ qemu_user_static_path = /usr/bin/qemu-aarch64-static # In fact, the build scripts from this profile will only have access to # environment variables declared for this profile. [env] -LINUX_RT_VERSION = 5.15.98-rt62 +LINUX_RT_VERSION = 5.15.39-rt42 STOCK_LINUX_VERSION = 5.15.0-1034 PINNED_CPU_FREQUENCY = 1500000 From 24ae6d0afa668d47dc31791572cb3c4211e4bfa0 Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 28 Aug 2023 23:41:08 +0600 Subject: [PATCH 04/10] update artifact extension --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 5d4d65a..8cd8b0b 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -53,6 +53,6 @@ jobs: - uses: actions/upload-artifact@v3 with: name: img-file-jammy - path: out/*.img + path: out/*.img.xz # TODO: release image From 0c0425a850dfd7a4c6852c0ec82c33b9ccf079f8 Mon Sep 17 00:00:00 2001 From: Florent Date: Mon, 28 Aug 2023 23:42:05 +0600 Subject: [PATCH 05/10] remove build of focal EOL --- .github/workflows/build.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 8cd8b0b..2e68b82 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -24,19 +24,6 @@ jobs: - '.github/workflows/setup-dependencies.sh' - '.github/workflows/build.yml' - build-focal: - needs: changes - runs-on: ubuntu-latest - if: ${{ needs.changes.outputs.check-changes == 'true' }} - steps: - - uses: actions/checkout@v3 - - - name: Setup build dependencies - run: .github/workflows/setup-dependencies.sh - - - name: Build image - run: .github/workflows/build.sh focal-rt-ros2 - build-jammy: needs: changes runs-on: ubuntu-latest From c0a4df7d42e63f0aa42bfc019895e33661515e31 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 30 Aug 2023 10:51:38 +0600 Subject: [PATCH 06/10] upload artifact generated --- .github/workflows/build.sh | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.sh b/.github/workflows/build.sh index 1bdff34..74ec4f9 100755 --- a/.github/workflows/build.sh +++ b/.github/workflows/build.sh @@ -18,7 +18,8 @@ ls -lh out/ for img in out/*.img; do echo " Compressing $img" - xz -9 $img +# xz -9 $img + xz --extreme --threads=0 -9 $img done echo "After compression:" From 5b767042a0cf3a6b69ecf9ff3d5fa984de0819d3 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 30 Aug 2023 10:54:29 +0600 Subject: [PATCH 07/10] update the compression rate --- scripts/e2e_generate_iso.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/scripts/e2e_generate_iso.sh b/scripts/e2e_generate_iso.sh index d65ae04..daf421b 100755 --- a/scripts/e2e_generate_iso.sh +++ b/scripts/e2e_generate_iso.sh @@ -96,7 +96,7 @@ done echo 'Compress ISO file with xz' for iso in out/*.img; do echo " Compressing $iso" - xz -9 $iso + xz --extreme --threads=0 -9 $iso done result=0 From 4040c117e0c3a12fbd86d58491b74475d90434ac Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 30 Aug 2023 10:55:50 +0600 Subject: [PATCH 08/10] add both kernel just comment and uncomment as you wish --- image_builder/data/jammy-rt-rolling-ruediger/config.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/image_builder/data/jammy-rt-rolling-ruediger/config.ini b/image_builder/data/jammy-rt-rolling-ruediger/config.ini index 3b16ecb..da06b15 100644 --- a/image_builder/data/jammy-rt-rolling-ruediger/config.ini +++ b/image_builder/data/jammy-rt-rolling-ruediger/config.ini @@ -2,8 +2,10 @@ # comprehensive example. [build] # The image url to download and customize. -image_url = https://github.com/ros-realtime/ros-realtime-rpi4-image/releases/download/22.04.3_v5.15.98-rt62-raspi_ros2_rolling/ubuntu-22.04.3-rt-ros2-arm64+raspi.img.xz -; image_url = https://github.com/flochre/ros-realtime-rpi4-image/releases/download/ruediger-offline-v1.0-rc3/ubuntu-22.04.1-rt-ruediger2-offline-v1.0-rc3-arm64+raspi.img.xz +; image_url = https://github.com/ros-realtime/ros-realtime-rpi4-image/releases/download/22.04.1_v5.15.39-rt42-raspi_ros2_humble/ubuntu-22.04.1-rt-ros2-arm64+raspi.img.xz +; image_url = https://github.com/ros-realtime/ros-realtime-rpi4-image/releases/download/22.04.1_v5.15.39-rt42-raspi_ros2_humble/ubuntu-22.04.3-rt-ros2-arm64+raspi.img.xz +; image_url = https://github.com/ros-realtime/ros-realtime-rpi4-image/releases/download/22.04.3_v5.15.39-rt42-raspi_ros2_humble/ubuntu-22.04.3-v5.15.39-rt42-arm64+raspi.img.xz +image_url = https://github.com/ros-realtime/ros-realtime-rpi4-image/releases/download/22.04.3_v5.15.98-rt62-raspi_ros2_humble/ubuntu-22.04.3-v5.15.98-rt62-arm64+raspi.img.xz # Mount location for the partitions in the image file downloaded. image_mounts = /boot/firmware,/ From 949670bb18fcb6ccce667ad32556aa0b6a1a3b07 Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 30 Aug 2023 10:57:06 +0600 Subject: [PATCH 09/10] remove flag --no-install-recommends causing the wifi access point to not work --- .../data/jammy-rt-rolling-ruediger/scripts/phase1-target | 2 +- .../data/jammy-rt-rolling-stanley/scripts/phase1-target | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/image_builder/data/jammy-rt-rolling-ruediger/scripts/phase1-target b/image_builder/data/jammy-rt-rolling-ruediger/scripts/phase1-target index e25f4be..e99eea8 100755 --- a/image_builder/data/jammy-rt-rolling-ruediger/scripts/phase1-target +++ b/image_builder/data/jammy-rt-rolling-ruediger/scripts/phase1-target @@ -6,7 +6,7 @@ addgroup realtime # update the apt database and install needed packages apt-get update \ && apt-get upgrade -y --with-new-pkgs \ -&& apt-get install -y --no-install-recommends \ +&& apt-get install -y \ network-manager \ ros-$ROS_DISTRO-joy ros-$ROS_DISTRO-teleop-twist-joy \ ros-$ROS_DISTRO-teleop-twist-keyboard \ diff --git a/image_builder/data/jammy-rt-rolling-stanley/scripts/phase1-target b/image_builder/data/jammy-rt-rolling-stanley/scripts/phase1-target index 3c73276..e6fdfba 100755 --- a/image_builder/data/jammy-rt-rolling-stanley/scripts/phase1-target +++ b/image_builder/data/jammy-rt-rolling-stanley/scripts/phase1-target @@ -6,7 +6,7 @@ addgroup realtime # update the apt database and install needed packages apt-get update \ && apt-get upgrade -y --with-new-pkgs \ -&& apt-get install -y --no-install-recommends \ +&& apt-get install -y \ network-manager \ ros-$ROS_DISTRO-joy ros-$ROS_DISTRO-teleop-twist-joy \ ros-$ROS_DISTRO-teleop-twist-keyboard \ From 28c5f7e07f822559878b0d568906ad6d3d8d3c6f Mon Sep 17 00:00:00 2001 From: Florent Date: Wed, 30 Aug 2023 10:58:18 +0600 Subject: [PATCH 10/10] add both kernel to choose with comments --- image_builder/data/jammy-rt/config.ini | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/image_builder/data/jammy-rt/config.ini b/image_builder/data/jammy-rt/config.ini index 70c1928..7e6f1c5 100644 --- a/image_builder/data/jammy-rt/config.ini +++ b/image_builder/data/jammy-rt/config.ini @@ -12,7 +12,8 @@ image_mounts = /boot/firmware,/ image_size = 4G # The filename of the output image -output_filename = ubuntu-22.04.3-rt-arm64+raspi.img +; output_filename = ubuntu-22.04.3-v5.15.39-rt42-arm64+raspi.img +output_filename = ubuntu-22.04.3-v5.15.98-rt62-arm64+raspi.img # TODO: this shouldn't really be a part of the build configuration, because it # is more like a host-level configuration. Instead of putting it here, it should @@ -28,7 +29,8 @@ qemu_user_static_path = /usr/bin/qemu-aarch64-static # In fact, the build scripts from this profile will only have access to # environment variables declared for this profile. [env] -LINUX_RT_VERSION = 5.15.39-rt42 +; LINUX_RT_VERSION = 5.15.39-rt42 +LINUX_RT_VERSION = 5.15.98-rt62 STOCK_LINUX_VERSION = 5.15.0-1034 PINNED_CPU_FREQUENCY = 1500000