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

Support for RaspberryPi 1 #7

Open
milkpirate opened this issue Sep 20, 2021 · 2 comments
Open

Support for RaspberryPi 1 #7

milkpirate opened this issue Sep 20, 2021 · 2 comments

Comments

@milkpirate
Copy link
Contributor

I have an old RaspberryPi 1 laying around and would like to use it for a project and it would really benefit from a slim Alpine image. Could you add a armv7 build as well?

@milkpirate
Copy link
Contributor Author

Ok, added support by myself: #8

@unixfox
Copy link
Contributor

unixfox commented Nov 27, 2021

Raspberry pi 1 doesn't support ARMv7 but ARMhf.

Apply this patch:

diff --git a/bootstrap/00-kernel b/bootstrap/00-kernel
index 9a060f7..95471f0 100755
--- a/bootstrap/00-kernel
+++ b/bootstrap/00-kernel
@@ -2,24 +2,28 @@
 
 set -xe
 
-apk add linux-rpi linux-rpi4 raspberrypi-bootloader zram-init
+apk add linux-rpi raspberrypi-bootloader zram-init
 rc-update add zram-init boot
 
 echo "modules=loop,squashfs,sd-mod,usb-storage root=/dev/mmcblk0p2 rootfstype=ext4 elevator=deadline fsck.repair=yes console=tty1 rootwait quiet" > /boot/cmdline.txt
 
 cat <<EOF > /boot/config.txt
+[pi]
+kernel=vmlinuz-rpi
+initramfs initramfs-rpi
+[pi1]
+kernel=vmlinuz-rpi
+initramfs initramfs-rpi
+[pi2]
+kernel=vmlinuz-rpi
+initramfs initramfs-rpi
 [pi3]
 kernel=vmlinuz-rpi
 initramfs initramfs-rpi
 [pi3+]
 kernel=vmlinuz-rpi
 initramfs initramfs-rpi
-[pi4]
-enable_gic=1
-kernel=vmlinuz-rpi4
-initramfs initramfs-rpi4
 [all]
-arm_64bit=1
 include usercfg.txt
 EOF

Then this command: docker run --privileged --rm -v /dev:/dev:ro -v "$PWD"/dist:/dist -v "$PWD":/runner -w /runner -e ALPINE_BRANCH=latest-stable -e ALPINE_MIRROR="http://dl-cdn.alpinelinux.org/alpine" -e ARCH=armhf runner ./make-image

EDIT: If needed my own fork of this repo: https://bitbucket.org/unixfox/alpine-raspberry-pi

milkpirate added a commit to milkpirate/alpine-raspberry-pi that referenced this issue Jan 27, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants