Line | |
---|
1 | #!/bin/sh |
---|
2 | |
---|
3 | if [ "$1" == "" ] |
---|
4 | then |
---|
5 | arch="" |
---|
6 | elif [ "$1" == "powerpc" ] |
---|
7 | then |
---|
8 | arch="BR_ARCH=powerpc" |
---|
9 | else |
---|
10 | echo "Invalid architecture specified." >&2 |
---|
11 | exit 1 |
---|
12 | fi |
---|
13 | |
---|
14 | set -eu |
---|
15 | |
---|
16 | tempdir=$(mktemp -d) |
---|
17 | |
---|
18 | dir=$(dirname "$0") |
---|
19 | |
---|
20 | cd $(dirname "$dir") |
---|
21 | |
---|
22 | ./autogen |
---|
23 | ./configure |
---|
24 | |
---|
25 | cd "$dir" |
---|
26 | |
---|
27 | rm -Rf buildroot |
---|
28 | make $arch initrd.img |
---|
29 | |
---|
30 | initrd=$(readlink "initrd.img") |
---|
31 | prefix=$(basename "$initrd" ".img") |
---|
32 | arch=$(echo "$prefix" | sed -e 's/.*-//') |
---|
33 | |
---|
34 | cp "$initrd" "$tempdir" |
---|
35 | |
---|
36 | cp "buildroot/.config" "$tempdir/$prefix-buildroot-config" |
---|
37 | cp "buildroot/package/busybox/busybox.config" "$tempdir/$prefix-busybox-config" |
---|
38 | cp "buildroot/toolchain/uClibc/uClibc.config" "$tempdir/$prefix-uClibc-config" |
---|
39 | |
---|
40 | mv "buildroot" "$tempdir/buildroot-$arch" |
---|
41 | cd $tempdir |
---|
42 | rm -Rf "buildroot-$arch"/toolchain_build* |
---|
43 | rm -Rf "buildroot-$arch"/build_* |
---|
44 | tar cjf "$prefix-buildroot.tar.bz2" "buildroot-$arch" |
---|
45 | rm -Rf "buildroot-$arch" |
---|
46 | |
---|
47 | echo -e "\n\nYour release is in $tempdir." |
---|
Note: See
TracBrowser
for help on using the repository browser.