Skip to content

Instantly share code, notes, and snippets.

@tarnacious
Forked from anonymous/stdin
Last active November 16, 2015 15:34
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save tarnacious/cf626e2a380146a2abdd to your computer and use it in GitHub Desktop.
Save tarnacious/cf626e2a380146a2abdd to your computer and use it in GitHub Desktop.
stdin
docker compose build
docker compose up
rm -rf /build
mkdir build
cd build
git clone https://anonscm.debian.org/cgit/showme/box.git
cd box && make images/stretch/d-i/xfce/A20-OLinuXino-Lime2.img.gz
cp images/stretch/d-i/xfce/A20-OLinuXino-Lime2.img.gz /data
demo:
build: .
volumes:
- ./data:/data
privileged: true
# Dockerfile
FROM debian:stretch
ENV DEBIAN_FRONTEND noninteractive
RUN apt-get update && apt-get install -y \
build-essential \
make \
curl \
boxer \
cpio \
u-boot-tools \
fusefat \
git \
lsb-release
ADD build.sh build.sh
VOLUME ["/data"]
CMD sh ./build.sh
Attaching to 0b06e6ed6da26a821949_demo_1
demo_1 | Cloning into 'box'...
demo_1 | mkdir -p vendor/stretch-20150911/
demo_1 | curl -fsSRo 'vendor/stretch-20150911/firmware.A20-OLinuXino-Lime2.img.gz' 'http://ftp.de.debian.org/debian/dists/stretch/main/installer-armhf/20150911/images/netboot/SD-card-images/firmware.A20-OLinuXino-Lime2.img.gz'
demo_1 | mkdir -p vendor/stretch-20150911/
demo_1 | curl -fsSRo 'vendor/stretch-20150911/partition.img.gz' 'http://ftp.de.debian.org/debian/dists/stretch/main/installer-armhf/20150911/images/netboot/SD-card-images/partition.img.gz'
demo_1 | mkdir -p imageparts/stretch/plain/
demo_1 | cp -f vendor/stretch-20150911/partition.img.gz imageparts/stretch/plain/partition.img.gz
demo_1 | gunzip -f imageparts/stretch/plain/partition.img.gz
demo_1 | mkdir -p imageparts/stretch/plain//ramdisk
demo_1 | fusefat -o rw+ imageparts/stretch/plain/partition.img imageparts/stretch/plain//ramdisk
demo_1 | volume mounted in rw mode
demo_1 | fat type: FAT32. Fsi at 1
demo_1 | Fsioff: 512, size: 512
demo_1 | --- nxtfree --- :48873
demo_1 | --- freecnt --- :27848
demo_1 | dataclusters :76720
demo_1 | first data byte : 630784
demo_1 | 1st fat off : 16384
demo_1 | 2nd fat off : 323584
demo_1 | fat_eoc_value: 268435448
demo_1 | fat_eoc_value is eoc?: 1
demo_1 | perl -0777 -pe 's/^[^#]*//s' imageparts/stretch/plain//ramdisk/boot.scr > imageparts/stretch/plain//boot.cmd
demo_1 | sed -i '2asetenv console tty1\nsetenv bootargs partman-auto/method?=regular mirror/country=manual mirror/http/hostname=snapshot.debian.org mirror/http/directory=/archive/debian/20151002T213032Z apt-setup/services-select=updates preseed/early_command=\\"date -s 2015-10-03\\" clock-setup/ntp=false fb=false' imageparts/stretch/plain//boot.cmd
demo_1 | mkimage -C gzip -A arm -T script -d imageparts/stretch/plain//boot.cmd imageparts/stretch/plain//boot.scr
demo_1 | Image Name:
demo_1 | Created: Mon Nov 16 15:31:49 2015
demo_1 | Image Type: ARM Linux Script (gzip compressed)
demo_1 | Data Size: 1680 Bytes = 1.64 kB = 0.00 MB
demo_1 | Load Address: 00000000
demo_1 | Entry Point: 00000000
demo_1 | Contents:
demo_1 |  Image 0: 1672 Bytes = 1.63 kB = 0.00 MB
demo_1 | rm -f imageparts/stretch/plain//ramdisk/BOOT.SCR
demo_1 | cp imageparts/stretch/plain//boot.scr imageparts/stretch/plain//ramdisk/BOOT.SCR
demo_1 | fusermount -u imageparts/stretch/plain//ramdisk
demo_1 | gzip -f imageparts/stretch/plain/partition.img
demo_1 | mkdir -p content/xfce-stretch/
demo_1 | cd content/xfce-stretch/ \
demo_1 |  && boxer compose \
demo_1 |  --nodedir /build/box/nodes \
demo_1 |  --skeldir /build/box/skel \
demo_1 |  --suite stretch \
demo_1 |  xfce
demo_1 | mkdir -p imageparts/stretch/xfce/
demo_1 | cp -f imageparts/stretch/plain/partition.img.gz imageparts/stretch/xfce/partition.img.gz
demo_1 | gunzip -f imageparts/stretch/xfce/partition.img.gz
demo_1 | mkdir -p imageparts/stretch/xfce//ramdisk
demo_1 | fusefat -o rw+ imageparts/stretch/xfce/partition.img imageparts/stretch/xfce//ramdisk
demo_1 | volume mounted in rw mode
demo_1 | fat type: FAT32. Fsi at 1
demo_1 | Fsioff: 512, size: 512
demo_1 | --- nxtfree --- :48877
demo_1 | --- freecnt --- :27847
demo_1 | dataclusters :76720
demo_1 | first data byte : 630784
demo_1 | 1st fat off : 16384
demo_1 | 2nd fat off : 323584
demo_1 | fat_eoc_value: 268435448
demo_1 | fat_eoc_value is eoc?: 1
demo_1 | cp -f imageparts/stretch/xfce//ramdisk/initrd.gz imageparts/stretch/xfce/
demo_1 | gunzip -f imageparts/stretch/xfce//initrd.gz
demo_1 | cp -f content/xfce-stretch/preseed.cfg imageparts/stretch/xfce/
demo_1 | cd imageparts/stretch/xfce/ && echo preseed.cfg | cpio --format=newc -oAO initrd
demo_1 | 15 blocks
demo_1 | gzip -f imageparts/stretch/xfce//initrd
demo_1 | rm -f imageparts/stretch/xfce//ramdisk/INITRD.GZ
demo_1 | cp imageparts/stretch/xfce//initrd.gz imageparts/stretch/xfce//ramdisk/INITRD.GZ
demo_1 | fusermount -u imageparts/stretch/xfce//ramdisk
demo_1 | gzip -f imageparts/stretch/xfce/partition.img
demo_1 | mkdir -p images/stretch/d-i/xfce/
demo_1 | zcat vendor/stretch-20150911/firmware.A20-OLinuXino-Lime2.img.gz imageparts/stretch/xfce/partition.img.gz | gzip > images/stretch/d-i/xfce/A20-OLinuXino-Lime2.img.gz~
demo_1 | mv -f images/stretch/d-i/xfce/A20-OLinuXino-Lime2.img.gz~ images/stretch/d-i/xfce/A20-OLinuXino-Lime2.img.gz
demo_1 | 
demo_1 | WARNING: Install uses snapshot archive (bug#803769).
demo_1 |  !!! Time will be set back during install (bug#771699).
demo_1 |  !!! At first boot of new system, edit /etc/apt/sources.list e.g. to this:
demo_1 |  deb http://httpredir.debian.org/debian/ stretch main
demo_1 |  deb http://httpredir.debian.org/debian/ stretch-updates main
demo_1 |  deb http://security.debian.org/ stretch main
0b06e6ed6da26a821949_demo_1 exited with code 0
Gracefully stopping... (press Ctrl+C again to force)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment