os: use arm64 image

This commit is contained in:
Cyrille Nofficial 2022-01-02 17:26:47 +01:00
parent f74c801a64
commit 7dd4c118c8
7 changed files with 22 additions and 11 deletions

View File

@ -0,0 +1 @@
ansible_python_interpreter: auto

View File

@ -0,0 +1 @@
arch: arm64

View File

@ -33,7 +33,7 @@
- git
- python3
- python3-pip
- python-apt
- python3-apt
state: present
update_cache: yes

View File

@ -61,12 +61,13 @@ dtparam=audio=on
[pi4]
# Enable DRM VC4 V3D driver on top of the dispmanx display stack
dtoverlay=vc4-fkms-v3d
dtoverlay=vc4-kms-v3d
arm_64bit=1
max_framebuffers=2
dtoverlay=uart2
dtoverlay=uart3
[all]
#dtoverlay=vc4-fkms-v3d
#dtoverlay=vc4-kms-v3d
# Disable bluetooth in order to enable serial TTL
dtoverlay=pi3-disable-bt
@ -74,3 +75,5 @@ dtoverlay=pi3-disable-bt
# Enable camera
start_x=1
gpu_mem=256
dtoverlay=w1-gpio

View File

@ -14,7 +14,7 @@
- name: Install docker-ce
apt:
name:
- python-pip
- python3-pip
- docker-ce
- xfsprogs
state: present

View File

@ -1,13 +1,16 @@
---
- name: Install ansible dependencies
apt:
name: "python-requests"
name: "python3-requests"
state: present
- name: Install rabbitmq package
apt:
name: rabbitmq-server
state: present
with_items:
- rabbitmq-server
- python3-requests
- name: Enables rabbitmq plugins
rabbitmq_plugin:

View File

@ -13,12 +13,14 @@ WIFI_SECRET_FILE=".secret"
# For debug
ADD_TTL_SUPPORT_FOR_DEBUG=1
IMAGE_BASE=https://downloads.raspberrypi.org/raspios_lite_arm64_latest
########### End Configuration ############
mkdir -p build
if [ ! -f build/raspbian.zip ]
then
wget -O build/raspbian.zip https://downloads.raspberrypi.org/raspbian_lite_latest
wget -O build/raspbian.zip ${IMAGE_BASE}
cd build
unzip raspbian.zip
cd ..
@ -46,6 +48,11 @@ then
echo "dtoverlay=pi3-disable-bt" | sudo tee -a build/mnt/config.txt > /dev/null
fi
echo "Copy wifi configuration"
source ${WIFI_SECRET_FILE}
eval "echo \"$(cat wpa_supplicant.conf)\"" | sudo tee build/mnt/wpa_supplicant.conf > /dev/null
sudo chmod 600 build/mnt/wpa_supplicant.conf
echo "Umount boot partition"
sudo umount build/mnt
@ -66,10 +73,6 @@ sudo cp ../ansible/roles/base/files/authorized_keys build/mnt/home/pi/.ssh/
sudo chmod 600 build/mnt/home/pi/.ssh/authorized_keys
sudo chown -R 1000:1000 build/mnt/home/pi
echo "Copy wifi configuration"
source ${WIFI_SECRET_FILE}
eval "echo \"$(cat wpa_supplicant.conf)\"" | sudo tee build/mnt/etc/wpa_supplicant/wpa_supplicant.conf > /dev/null
sudo chmod 600 build/mnt/etc/wpa_supplicant/wpa_supplicant.conf
echo "Umount sdcard"