Skip to content

Commit d0dea5c

Browse files
committed
Create arm64 image
1 parent 43db178 commit d0dea5c

File tree

2 files changed

+26
-5
lines changed

2 files changed

+26
-5
lines changed

.github/workflows/build.yml

+25-4
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,39 @@ jobs:
1818
- name: Build
1919
run: |
2020
sudo apt-get update
21-
sudo apt-get install libdrm-dev libcairo-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev libunwind-dev
21+
sudo apt-get install -y qemu-user-static
22+
system=radxa-zero3_ubuntu_jammy_cli_b6.img
23+
wget -nv https://github.com/radxa-build/radxa-zero3/releases/download/b6/${system}.xz
24+
unxz -T4 ${system}.xz
25+
26+
output=output
27+
mkdir $output
28+
device=$(sudo losetup -P --show -f ${system})
29+
sudo mount ${device}p3 $output
30+
31+
cat > build.sh << EOL
32+
#!/bin/bash
33+
apt-get update
34+
apt-get install -y cmake g++ git pkg-config libcairo-dev libdrm-dev libgstreamer1.0-dev libgstreamer-plugins-base1.0-dev
35+
cd /home
2236
git clone https://github.com/rockchip-linux/mpp --depth 1
2337
cd mpp
2438
cmake -B build
25-
sudo cmake --build build --target install
39+
cmake --build build --target install -j4
2640
cd ..
2741
cmake -B build
28-
cmake --build build
42+
cmake --build build -j4
43+
EOL
44+
45+
chmod 755 build.sh
46+
sudo cp -r build.sh CMakeLists.txt src $output/home
47+
echo nameserver 8.8.8.8 | sudo tee -a $output/etc/resolv.conf
48+
sudo chroot $output /home/build.sh
49+
sudo cp $output/home/build/pixelpilot .
2950
3051
- name: Upload
3152
if: github.event_name != 'pull_request'
3253
uses: softprops/action-gh-release@v2
3354
with:
3455
tag_name: latest
35-
files: build/pixelpilot
56+
files: pixelpilot

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
cmake_minimum_required(VERSION 3.1)
22

3-
project(pixelpilot VERSION 0.12)
3+
project(pixelpilot)
44

55
set(CMAKE_CXX_STANDARD 17)
66

0 commit comments

Comments
 (0)