Public | Automated Build

Last pushed: 2 years ago
Short Description
Installing Linux from tar archives is cumbersome. An automated way to avoid doing so.
Full Description
  • ARM Linux Tar SD Card Generator
    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.
    *** Mac OSX
    From a repository clone:
    make [DISTRO_TAR_URL=http://...] [PLATFORM=(rpi-2|rpi-3|odroid-c1|odroid-c2)] -e [download] mac [tar]

=[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.
=(copy|tar)= - whether an img or tar.gz copy shall be created; mandatory when using =PLATFORM= parameter

Or without cloning:

docker run --privileged -e PLATFORM=${PLATFORM} -v $(pwd):/backup -it peelsky/arm-sdcard-builder -e download copy


** Raspberry Pi 3
RPi-3 is the default platform of choice, thus you can simply run:

docker run --privileged -v $(pwd):/backup -it peelsky/arm-sdcard-builder -e download copy


** Problem solving
If docker says something's wrong with /dev/loopX, most likely it's due to device mounting, execute:

docker-machine ssh default -- "losetup -a | cut -c1-10 | xargs -i losetup -d {}" || true
docker-machine ssh default -- "losetup -f" || true


*** Linux

make [PLATFORM=(...)][DISTRO_TAR_URL=http://.../Archive.tar.gz] linux (tar)


** 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

diskutil unmountDisk /dev/diskX
sudo dd bs=1m if=sdcard.img of=/dev/rdiskX


Docker Pull Command
Source Repository