Compare commits

..

No commits in common. "1339481e56ba7f3511eb75c2e582001891fa5e2d" and "192f4ecb6bc69c066e81629ab43fc1c92ce6e270" have entirely different histories.

3 changed files with 10 additions and 33 deletions

View File

@ -41,23 +41,6 @@ RUN echo "deb https://ppa.l9o.dev/raspbian ./" | sudo tee /etc/apt/sources.list.
RUN apt-get update RUN apt-get update
RUN apt-get install -y mariner3d RUN apt-get install -y mariner3d
# Quality of Life in the terminal
RUN apt-get install -y tmux
# Convert keymap to us
RUN sed -i 's/gb/us/' /etc/default/keyboard
# Set up wifi by getting raspberry pi os to do the shim work
# @see https://core-electronics.com.au/tutorials/raspberry-pi-zerow-headless-wifi-setup.html
RUN if [ -n "$RPI_WIFI_NETWORK" ] ; then \
cp /etc/wpasupplicant/wpa_supplicant.conf /boot/ ; \
wpa_passphrase "$RPI_WIFI_NETWORK" "$RPI_WIFI_PASSPHRASE" > /boot/wpa_supplicant.conf ; \
touch /boot/ssh ; \
fi
# Change pi user's password
RUN if [ -n "$RPI_PASSWORD" ] ; then echo "pi:${RPI_PASSWORD}" | chpasswd ; fi
# Clean-up # Clean-up
RUN apt-get clean RUN apt-get clean

View File

@ -14,19 +14,12 @@ This particular image is principally aimed at the Raspberry Pi (512M original Re
``` ```
# Creates root.tar.gz and boot.tar.gz # Creates root.tar.gz and boot.tar.gz
sudo ./scripts/extract_root.sh sudo ./scripts/extract_root.sh
# Export any settings (optional)
export RPI_WIFI_NETWORK=mywifi
export RPI_WIFI_PASSPHRASE=mywifi
export RPI_PASSWORD=raspberry
# Run the build # Run the build
podman build --rm=false --platform linux/armv/v7 -t localhost/pileogoo . podman build --rm=false --platform linux/armv/v7 -t localhost/pileogoo .
CONTAINERID=$(podman create localhost/pileogoo /bin/bash) CONTAINERID=$(podman create localhost/pileogoo /bin/bash)
podman export -o build/all.tar "${CONTAINERID}" podman export -o build/root.tar.gz "${CONTAINERID}"
# Creates a new image from the exported copy # Creates a new image from the exported copy
sudo ./scripts/extract_build.sh sudo ./scripts/extra_build.sh
rm ./build/all.tar rm ./build/all.tar
``` ```
@ -51,3 +44,4 @@ raspi1ap Raspberry Pi A+ (revision 1.1)
raspi2 Raspberry Pi 2B (revision 1.1) (alias of raspi2b) raspi2 Raspberry Pi 2B (revision 1.1) (alias of raspi2b)
raspi2b Raspberry Pi 2B (revision 1.1) raspi2b Raspberry Pi 2B (revision 1.1)
``` ```

View File

@ -2,17 +2,17 @@
dd if=/dev/zero of=build/rpi.img bs=1M count=4096 dd if=/dev/zero of=build/rpi.img bs=1M count=4096
# Copy the first 8k from the original rpi.img, which seems to have # Copy the first 8k from the original rpi.img, which seems to have
# non-zeroed content. Without this, the Pi doesn't seem to boot. # non-zeroed content
# It could be that there is the binary boot blob for the GPU #dd if=rpi.img of=build/rpi.img bs=8192 count=1 conv=notrunc
# in that section?
dd if=rpi.img of=build/rpi.img bs=8192 count=1 conv=notrunc
sudo losetup -Pf build/rpi.img sudo losetup -Pf build/rpi.img
# Partition: # Partition:
# start: 8192, size 256M typ W95 FAT32 # start: 8192, size 256M typ W95 FAT32
DEVICE=$(losetup -j build/rpi.img | cut -d ':' -f 1) DEVICE=$(losetup -j build/rpi.img | cut -d ':' -f 1)
parted --script "${DEVICE}" \ mkfs.msdos "${DEVICE}"
rm 2 \ sfdisk "${DEVICE}" <<EOF
mkpart primary ext4 272629760B 4022337536B 8192,256M,c
,3.5G,83
EOF
mkfs.vfat "${DEVICE}p1" mkfs.vfat "${DEVICE}p1"
mkfs.ext4 "${DEVICE}p2" mkfs.ext4 "${DEVICE}p2"
TMP=$(mktemp -d) TMP=$(mktemp -d)