Use $CONFIG_DIR were appropriate
[qi-bootmenu-system/guyou.git] / build.sh
blob6f66e22f36af7d14e8afc3151dd045f6eeaa7f90
1 #!/bin/bash
3 # Get lots of predefined environment variables and shell functions.
5 source sources/include.sh || exit 1
7 ./download.sh || exit 1
9 if [ -z "$CC" ]; then
10 if [ -z "$CROSS" ]; then
11 export CC="gcc"
12 else
13 export CC="${CROSS}gcc"
17 [ -z $(which "$CC") ] && echo "Compiler '$CC' not found in \$PATH." && exit 1
19 echo "=== Building"
21 blank_tempdir "$WORK"
23 if [ $# -eq 0 ]
24 then
25 rm -f "$TOP/initramfs-files"
26 blank_tempdir "$STAGING_DIR"
27 ln -s "usr/lib" "$STAGING_DIR/lib"
28 blank_tempdir "$ROOT_DIR"
31 if [[ ! -d "$ROOT_DIR" || ! -d "$ROOT_DIR/usr" ]]
32 then
33 mkdir -p "$ROOT_DIR"/{tmp,proc,sys,dev,home/root} || dienow
34 for i in bin sbin lib etc
36 mkdir -p "$ROOT_DIR/usr/$i" || dienow
37 ln -s "usr/$i" "$ROOT_DIR/$i" || dienow
38 done
41 if [ $# -ne 0 ]
42 then
43 for arg in "$@"
45 build_section "$arg"
46 done
47 exit
50 build_section linux-headers
51 build_section uClibc
52 build_section busybox
53 build_section kexec-tools
54 build_section zlib
55 build_section libjpeg
56 build_section tslib
57 build_section freetype
58 build_section eina
59 build_section eet
60 build_section evas
61 build_section ecore
62 build_section embryo
63 build_section lua
64 build_section edje
65 build_section elementary
66 build_section dropbear
67 build_section dialog-elementary
69 echo "Build complete now run ./initramfs.sh"