Sign inSign up

peelsky/arm-sdcard-builder

By peelsky

•Updated over 10 years ago

Installing Linux from tar archives is cumbersome. An automated way to avoid doing so.

Image
0

870

peelsky/arm-sdcard-builder repository overview

  • ARM Linux Tar SD Card Generator ** Why Installing Linux from tar archives is cumbersome. Then also OSX does not support EXT filesystems. For that on OSX to flash an SD card for ArchLinuxARM, Alpine etc. a VM has to be started. To make things easier the Docker image does exactly that. Makes it easy, fast and reproducible to generate and flash image to sd card on Mac and Linux. ** How *** Mac OSX From a repository clone: #+BEGIN_SRC make [DISTRO_TAR_URL=http://...] [PLATFORM=(rpi-2|rpi-3|odroid-c1|odroid-c2)] -e [download] mac [tar] #+END_SRC

=[PLATFORM]= - sets image destitantion platform (default: rpi-3) =[DISTRO_TAR_URL]= - (NOT NEEDED WHEN USING ARCHlINUXARM) a fully qualified URL to your distro's tar.gz (ie. http://archlinuxarm.org/os/ArchLinuxARM-odroid-c2-latest.tar.gz⁠) =(copy|tar)= - whether an img or tar.gz copy shall be created; mandatory when using =PLATFORM= parameter

Or without cloning: #+BEGIN_SRC docker run --privileged -e PLATFORM=${PLATFORM} -v $(pwd):/backup -it peelsky/arm-sdcard-builder -e download copy #+END_SRC

**** Raspberry Pi 3 RPi-3 is the default platform of choice, thus you can simply run: #+BEGIN_SRC docker run --privileged -v $(pwd):/backup -it peelsky/arm-sdcard-builder -e download copy #+END_SRC

**** Problem solving If docker says something's wrong with /dev/loopX, most likely it's due to device mounting, execute: #+BEGIN_SRC docker-machine ssh default -- "losetup -a | cut -c1-10 | xargs -i losetup -d {}" || true docker-machine ssh default -- "losetup -f" || true #+END_SRC

*** Linux #+BEGIN_SRC make [PLATFORM=(...)][DISTRO_TAR_URL=http://.../Archive.tar.gz⁠] linux (tar) #+END_SRC

**** Examples: To get an .img for flashing on an SD card execute: =make PLATFORM=rp3 linux=

To get an .tgz archive as a backup: =make PLATFORM=oc2 TARGET=$(pwd) linux tar= ** Flashing #+BEGIN_SRC diskutil unmountDisk /dev/diskX sudo dd bs=1m if=sdcard.img of=/dev/rdiskX #+END_SRC

Tag summary

Content type

Image

Digest

Size

144.7 MB

Last updated

over 10 years ago

docker pull peelsky/arm-sdcard-builder