Mercurial > hg > aboriginal
comparison sources/native-builds/gentoo-bootstrap/make-control-image.sh @ 1252:ba951c11fb48
Refactor the gentoo bootstrap build some more. Add "build" and "files" subdirectories, split each package build into a separate file, break out reusable shell functions into functions.sh. Flow control now init chrooting into run-build-stages.sh calling the individual package scripts.
author | Rob Landley <rob@landley.net> |
---|---|
date | Sat, 25 Sep 2010 13:40:04 -0500 |
parents | 204238871b7c |
children | 3ffcb56847e3 |
comparison
equal
deleted
inserted
replaced
1251:204238871b7c | 1252:ba951c11fb48 |
---|---|
1 #!/bin/bash | 1 #!/bin/bash |
2 | 2 |
3 # Script to extend minimal native build environment into a Gentoo stage 1. | 3 # Extend minimal native build environment into a seed for Gentoo Catalyst. |
4 | 4 |
5 # We take some liberties with this stage 1: use busybox instead of gnu tools, | 5 # This doesn't quite create an official Gentoo Stage 1. We use busybox instead |
6 # uClibc-based instead of glibc-based, and using our existing toolchain | 6 # of gnu tools, we're uClibc-based instead of glibc-based, and we use our |
7 # (with distcc acceleration). | 7 # existing toolchain (with distcc acceleration) instead of asking portage |
8 # to build one. That said, this should be enough to run Catalyst and produce | |
9 # official Stage 1, Stage 2, and Stage 3 images. | |
8 | 10 |
9 # GFS used: | 11 # GFS used: |
10 # setup-base-packages.sh | 12 # setup-base-packages.sh |
11 # strace, Python, ncurses, bash, tar, patch, findutils, file, pax-utils, | 13 # strace, Python, ncurses, bash, tar, patch, findutils, file, pax-utils, |
12 # shadow | 14 # shadow |
75 | 77 |
76 echo === Got all source. | 78 echo === Got all source. |
77 | 79 |
78 cleanup_oldfiles | 80 cleanup_oldfiles |
79 | 81 |
80 cp -a "$MYDIR/files/." "$WORK" || exit 1 | 82 cp -a "$MYDIR/build/." "$WORK" && |
83 cp -a "$MYDIR/files" "$WORK" || exit 1 | |
81 | 84 |
82 if [ "$1" != "/dev/null" ] | 85 if [ "$1" != "/dev/null" ] |
83 then | 86 then |
84 cd "$TOP" && | 87 cd "$TOP" && |
85 mksquashfs "$WORK" "$1" -noappend -all-root || dienow | 88 mksquashfs "$WORK" "$1" -noappend -all-root || dienow |