From 196f9c8c68661ded8698b6d19d10e1c72e027d48 Mon Sep 17 00:00:00 2001 From: Takumi Sueda Date: Tue, 27 Oct 2020 20:14:29 +0900 Subject: [PATCH] Enable APT cache / describe how to debootstrap --- .gitignore | 2 ++ Makefile | 8 +++++++- README.md | 18 ++++++++++++++++++ 3 files changed, 27 insertions(+), 1 deletion(-) diff --git a/.gitignore b/.gitignore index e928dc6..9592128 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,4 @@ env debian +cache/* +!cache/.gitkeep diff --git a/Makefile b/Makefile index 84a0fd3..1e5e401 100644 --- a/Makefile +++ b/Makefile @@ -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' diff --git a/README.md b/README.md index 4b45708..e530a0e 100644 --- a/README.md +++ b/README.md @@ -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 ----------------------------------------