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

Orangepi5 2404 crs #1

Closed
wants to merge 45 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
02a32ca
Bump orangepi versions to 24.04
Juniormunk Jun 12, 2024
2d169ca
oops
Juniormunk Jun 12, 2024
250fcc0
double oops...
Juniormunk Jun 12, 2024
7fbe60d
Add libc6 and libstdc++6
Juniormunk Jun 12, 2024
60f3d38
Latest version from Joshua Riek
crschardt Jun 23, 2024
c8b272d
Comment out images that aren't needed for testing the OPi build
crschardt Jun 23, 2024
6f9cf77
Update action runners
crschardt Jun 23, 2024
6942e77
just run the install script
crschardt Jun 23, 2024
664cc27
Use NetManager on OPi
crschardt Jun 23, 2024
2006b9c
try 22.04
crschardt Jun 23, 2024
1a6f518
no release while testing
crschardt Jun 23, 2024
749a5d1
try running on ubuntu 24
crschardt Jun 23, 2024
46b1786
Try lastest 22.04
crschardt Jun 23, 2024
83fbd86
Try the 2.1.0 image
crschardt Jun 23, 2024
9177b76
2.2.0?
crschardt Jun 23, 2024
420b3e3
desktop -> server
crschardt Jun 23, 2024
7825ae2
specify boot and root partitions
crschardt Jun 23, 2024
44d3622
Trying 2.2.1 again
crschardt Jun 23, 2024
f7f4627
minimal changes to image
crschardt Jun 23, 2024
6399fde
these are just the defaults, are they doing anything?
crschardt Jun 23, 2024
f0e240a
what if we don't have a bootpartition?
crschardt Jun 23, 2024
b9315d3
re-enable the pi account
crschardt Jun 23, 2024
d478a56
don't make any other changes
crschardt Jun 23, 2024
c3ca89c
not needed
crschardt Jun 23, 2024
fefc7f4
simplified build yml
crschardt Jun 24, 2024
ded003d
save new image
crschardt Jun 24, 2024
e5e01e5
really minimal
crschardt Jun 24, 2024
d309653
block device diagnostics
crschardt Jun 25, 2024
c1a90a9
had to be a separate step
crschardt Jun 25, 2024
ed42b62
more testing
crschardt Jun 25, 2024
fedf76b
try creating a loopback for the image
crschardt Jun 25, 2024
ca3d795
try sudo
crschardt Jun 25, 2024
1ab4889
try it as a shell script
crschardt Jun 25, 2024
1b48783
no spaces around =
crschardt Jun 25, 2024
f1d32b2
adding partprobe
crschardt Jun 25, 2024
b90324c
try my fork
crschardt Jun 30, 2024
3e37396
use modified runner
crschardt Jun 30, 2024
68082d2
try to build all images with the new runner
crschardt Jun 30, 2024
321ca32
go back to installing photonvision
crschardt Jun 30, 2024
32accf4
focus on OPi image
crschardt Jun 30, 2024
2cc6b31
simpler install
crschardt Jun 30, 2024
e0af926
simpler install
crschardt Jun 30, 2024
1f4af04
just remove snapd
crschardt Jun 30, 2024
20b14fd
enable network manager
crschardt Jul 1, 2024
e365910
don't forget libatomic
crschardt Jul 1, 2024
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
137 changes: 90 additions & 47 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,52 @@ name: Build driver
on:
push:
branches: [ master ]
tags:
- 'v*'
pull_request:
branches: [ master ]
workflow_dispatch:

# jobs:
# build:
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v4
# - uses: crschardt/arm-runner-action@gpt-support
# id: install_deps
# with:
# # image_additional_mb: 1500
# # bind_mount_repository: true
# base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.2.1/ubuntu-24.04-preinstalled-server-arm64-orangepi-5.img.xz
# # commands: |
# # touch ./test

# - name: disk diagnostics
# shell: bash
# run: |
# mv ${{ steps.install_deps.outputs.image }} testimage.img
# parted --script testimage.img print free




# # - name: Compress built image
# # run: |
# # mv ${{ steps.install_deps.outputs.image }} testimage.img
# # sudo xz -T 0 -v testimage.img

# # - uses: actions/[email protected]
# # with:
# # name: testimage.img.xz
# # path: testimage.img.xz
# # if-no-files-found: error
# # retention-days: 1

# name: Build driver
# on:
# push:
# branches: [ master ]
# tags:
# - 'v*'
# pull_request:
# branches: [ master ]

jobs:
build:
Expand All @@ -15,38 +57,38 @@ jobs:
fail-fast: false
matrix:
include:
- name: limelight
script: ./install_limelight.sh
base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
- name: limelight3
script: ./install_limelight3.sh
base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
- name: raspi
script: ./install_pi.sh
base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
- name: snakeyes
script: ./install_snakeyes.sh
base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
# - name: limelight
# script: ./install_limelight.sh
# base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
# - name: limelight3
# script: ./install_limelight3.sh
# base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
# - name: raspi
# script: ./install_pi.sh
# base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
# - name: snakeyes
# script: ./install_snakeyes.sh
# base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2024-03-15/2024-03-15-raspios-bookworm-arm64-lite.img.xz
- name: opi5
script: ./install_opi5.sh
base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v1.33/ubuntu-22.04.3-preinstalled-server-arm64-orangepi-5.img.xz
- name: opi5plus
script: ./install_opi5.sh
base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v1.33/ubuntu-22.04.3-preinstalled-server-arm64-orangepi-5-plus.img.xz
base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.2.1/ubuntu-24.04-preinstalled-server-arm64-orangepi-5.img.xz
# - name: opi5plus
# script: ./install_opi5.sh
# base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v2.1.0/ubuntu-24.04-preinstalled-server-arm64-orangepi-5-plus.img.xz

name: "Build for ${{ matrix.name }}"

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4.1.7
with:
fetch-depth: 0
- name: Fetch tags
run: git fetch --tags --force

- uses: pguyot/arm-runner-action@HEAD
- uses: crschardt/arm-runner-action@HEAD
id: install_deps
with:
image_additional_mb: 1500
image_additional_mb: 2048
bind_mount_repository: true
base_image: ${{ matrix.base_image }}
commands: |
Expand All @@ -56,36 +98,37 @@ jobs:
- name: Compress built image
run: |
mv ${{ steps.install_deps.outputs.image }} photonvision_${{ matrix.name }}.img
parted --script photonvision_${{ matrix.name }}.img print free
sudo xz -T 0 -v photonvision_${{ matrix.name }}.img

- uses: actions/upload-artifact@master
- uses: actions/upload-artifact@v4.3.3
with:
name: photonvision_${{ matrix.name }}.img.xz
path: photonvision_${{ matrix.name }}.img.xz
if-no-files-found: error
retention-days: 1

release:
needs: [build]
runs-on: ubuntu-22.04
steps:
# Download literally every single artifact
- uses: actions/download-artifact@v4
- run: find
# Push to dev release
- uses: pyTooling/Actions/releaser@r0
with:
token: ${{ secrets.GITHUB_TOKEN }}
tag: 'Dev'
rm: true
files: |
**/*.xz
if: github.event_name == 'push'
# Upload all xz archives to GH tag if tagged
- uses: softprops/action-gh-release@v1
with:
files: |
**/*.xz
if: startsWith(github.ref, 'refs/tags/v')
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# release:
# needs: [build]
# runs-on: ubuntu-22.04
# steps:
# # Download literally every single artifact
# - uses: actions/download-artifact@v4.1.7
# - run: find
# # Push to dev release
# - uses: pyTooling/Actions/releaser@v1.0.5
# with:
# token: ${{ secrets.GITHUB_TOKEN }}
# tag: 'Dev'
# rm: true
# files: |
# **/*.xz
# if: github.event_name == 'push'
# # Upload all xz archives to GH tag if tagged
# - uses: softprops/action-gh-release@v2.0.6
# with:
# files: |
# **/*.xz
# if: startsWith(github.ref, 'refs/tags/v')
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
49 changes: 34 additions & 15 deletions install_opi5.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@ if id "$1" >/dev/null 2>&1; then
echo 'user found'
else
echo "creating pi user"
useradd pi -b /home
useradd pi -m -b /home -s /bin/bash
usermod -a -G sudo pi
mkdir /home/pi
chown -R pi /home/pi
# mkdir /home/pi
# chown -R pi /home/pi
fi
echo "pi:raspberry" | chpasswd

Expand All @@ -17,27 +17,46 @@ chmod +x install.sh

sed -i 's/# AllowedCPUs=4-7/AllowedCPUs=4-7/g' install.sh

./install.sh
./install.sh -m -q
rm install.sh

apt-get autoremove -y

# Installing addtional things
# apt-get install -y network-manager net-tools libatomic1
# mrcal stuff
apt-get install -y libatomic1
apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
apt-get install -y libc6 libstdc++6

# cat > /etc/netplan/00-default-nm-renderer.yaml <<EOF
# network:
# renderer: NetworkManager
# EOF

# Remove extra packages
echo "Purging extra things"
apt-get remove -y gdb gcc g++ linux-headers* libgcc*-dev
apt-get remove -y snapd
# apt-get remove -y gdb gcc g++ linux-headers* libgcc*-dev

# snap remove --purge lxd
# snap remove --purge core22
apt-get purge -y snapd
apt-get purge -y lxd-installer

apt-get autoremove -y


echo "Installing additional things"
sudo apt-get update
apt-get install -y network-manager net-tools libatomic1
# mrcal stuff
apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
# echo "Installing additional things"
# sudo apt-get update
# apt-get install -y network-manager net-tools libatomic1
# # mrcal stuff
# apt-get install -y libcholmod3 liblapack3 libsuitesparseconfig5
# apt-get install -y libc6 libstdc++6

cat > /etc/netplan/00-default-nm-renderer.yaml <<EOF
network:
renderer: NetworkManager
EOF
# cat > /etc/netplan/00-default-nm-renderer.yaml <<EOF
# network:
# renderer: NetworkManager
# EOF

rm -rf /var/lib/apt/lists/*
apt-get clean
Expand Down
10 changes: 10 additions & 0 deletions make_bootable.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#!/bin/bash
image=$1
loopdev=$(losetup --find --show --partscan ${image})
echo "Created loopback device ${loopdev}"
echo "*** lsblk ***"
lsblk
echo "*** parted ***"
partprobe -s "${loopdev}"
parted "${loopdev}" print
losetup --detach "${loopdev}"