Enable APT cache / describe how to debootstrap

This commit is contained in:
Takumi Sueda 2020-10-27 20:14:29 +09:00
parent 442c86b48b
commit 196f9c8c68
3 changed files with 27 additions and 1 deletions

2
.gitignore vendored
View File

@ -1,2 +1,4 @@
env
debian
cache/*
!cache/.gitkeep

View File

@ -78,7 +78,13 @@ debian:
exit 1; \
fi
mkdir debian
sudo debootstrap --arch=armel --foreign buster debian/
sudo debootstrap --arch=armel --foreign buster debian/ http://localhost:65432/debian/
sudo cp /usr/bin/qemu-arm-static debian/usr/bin/
sudo cp ./tools/setup_debian.sh debian/
sudo chroot debian /setup_debian.sh
.PHONY:
aptcache:
./tools/aptcache_linux_amd64 \
-rule 'local=localhost:65432, remote=ftp.jaist.ac.jp' \
-rule 'local=localhost:65433, remote=security.debian.org'

View File

@ -75,6 +75,24 @@ Build Linux
1. Confirm that `linux-brain/arch/arm/boot/zImage` exists.
Bootstrap Debian Buster
-----------------------
1. Partition an SD card into two partitions
- 1st: FAT32 (vfat), about 100MB
- 2st: ext4, fill remaining capacity
1. Run APT cache in background: `make aptcache`
1. Run `make debian`
1. Copy all contents in `./debian` into the 2nd partition in the card.
- `sudo cp -ar ./debian/* /path/to/your/sd/2nd/partition/`
- Please make sure that all attributes are preserved with `-a` flag
Watch changes in submodules & auto-build
----------------------------------------