Skip to content

Commit

Permalink
Merge pull request #3 from PhotonVision/enable-opi5
Browse files Browse the repository at this point in the history
Username is pi/raspberry
  • Loading branch information
mcm001 authored Dec 29, 2023
2 parents 3bebd74 + e3eb3dd commit cafb13b
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 11 deletions.
7 changes: 3 additions & 4 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,9 @@ jobs:
- name: raspi
script: ./install_pi.sh
base_image: https://downloads.raspberrypi.com/raspios_lite_arm64/images/raspios_lite_arm64-2023-12-11/2023-12-11-raspios-bookworm-arm64-lite.img.xz
# Orange pi default user seems bjork? also I can't find the where this file ends up in the image? https://github.com/Joshua-Riek/ubuntu-rockchip/blob/0710bd81f5619c25ccddb4e9d69ddbe73827f850/overlay/boot/firmware/user-data#L4
# - name: opi5
# script: ./install_opi5.sh
# base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v1.30/ubuntu-22.04.3-preinstalled-server-arm64-orangepi-5.img.xz
- name: opi5
script: ./install_opi5.sh
base_image: https://github.com/Joshua-Riek/ubuntu-rockchip/releases/download/v1.30/ubuntu-22.04.3-preinstalled-server-arm64-orangepi-5.img.xz

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

Expand Down
31 changes: 24 additions & 7 deletions install_opi5.sh
Original file line number Diff line number Diff line change
@@ -1,21 +1,38 @@
find /

find / -name user-data
# Create pi/raspberry login
if id "$1" >/dev/null 2>&1; then
echo 'user found'
else
echo "creating pi user"
useradd pi -b /home
usermod -a -G sudo pi
mkdir /home/pi
chown -R pi /home/pi
fi
echo "pi:raspberry" | chpasswd

apt-get update
apt-get upgrade -y

cd /tmp
wget https://git.io/JJrEP -O install.sh
chmod +x install.sh

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

./install.sh
rm install.sh

sudo apt-get update
apt-get install -y network-manager net-tools libatomic1
apt-mark manual netplan.io
apt-mark manual libatomic1

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

# Remove extra packages too
# Remove extra packages

apt-get purge -y python3 gdb gcc g++ linux-headers* libgcc*-dev *qt*
apt-get remove -y gdb gcc g++ linux-headers* libgcc*-dev
apt-get autoremove -y

rm -rf /var/lib/apt/lists/*
Expand Down

0 comments on commit cafb13b

Please sign in to comment.