Browse Source

Added basic busybox satellite

master
mid-kid 10 years ago
parent
commit
f893e75f48
  1. 22
      astronaut
  2. 1002
      tools/satellites/busybox.config
  3. 13
      tools/satellites/busybox.sat
  4. 2
      tools/version-check.sh

22
astronaut

@ -7,6 +7,7 @@ dir_build="$PWD/build"
dir_source="$PWD/source"
dir_install="$PWD/install"
# Some printing functions
show_help() {
echo "This astronaut will help you build some satellites.
Just describe what he's got to do in a satellite file.
@ -17,6 +18,15 @@ Usage: $0 [-s <dir>] [-b <dir>] [-i <dir>] <satellite>
-i Set install directory"
}
msg() {
echo "=> $@"
}
exiterr() {
echo "===> Houston, we've got a problem: $@" 1>&2
exit 1
}
# Gather info
while getopts "h?s:b:i:" opt; do
case "$opt" in
@ -46,11 +56,11 @@ fi
satellite="$(realpath "$1")"
# Tools for the astronaut
msg() {
echo "=> $@"
}
if [ ! -f "$satellite" ]; then
exiterr "Houston, we have a problem: Can't find satellite file"
fi
# Tools for the astronaut
mksum() {
echo $(md5sum "$@" 2> /dev/null | cut -d' ' -f1)
}
@ -72,9 +82,8 @@ download() {
fi
checksum="$(mksum "$path")"
if [ "$2" -a "$checksum" != "$2" ]; then
msg "Houston, we have a problem: Checksum failed."
msg "Checksum: $checksum"
exit 1
exiterr "Houston, we have a problem: Checksum failed."
fi
fi
}
@ -98,6 +107,7 @@ extrafile() {
cp "$(dirname "$satellite")/$1" "$dir_build/$1"
}
# Create the satellite
rm -rf "$dir_build"
mkdir -p "$dir_source"

1002
tools/satellites/busybox.config

File diff suppressed because it is too large

13
tools/satellites/busybox.sat

@ -0,0 +1,13 @@
name=busybox
version=1.22.1
dlextract "http://www.busybox.net/downloads/$name-$version.tar.bz2" \
""
extrafile "busybox.config"
mv busybox.config "$name-$version/.config"
cd "$name-$version"
make
install -D busybox "$dir_install/tools/bin/busybox"
"$dir_install/tools/bin/busybox" --install "$dir_install/tools/bin"

2
tools/version-check.sh

@ -3,7 +3,7 @@
# Copied from LFS 7.6
export LC_ALL=C
bash --version | head -n1 | cut -d" " -f2-4
bash --version | head -n1 | cut -d" " -f2-4 #TODO: check if it's necessary for building the temporary tools.
echo "/bin/sh -> `readlink -f /bin/sh`"
echo -n "Binutils: "; ld --version | head -n1 | cut -d" " -f3-
bison --version | head -n1

Loading…
Cancel
Save