3 # Get lots of predefined environment variables and shell functions.
5 source sources
/include.sh ||
exit 1
7 .
/download.sh ||
exit 1
9 [ -z $
(which "$CC") ] && echo "Compiler '$CC' not found in \$PATH." && exit 1
17 rm -f "$TOP/initramfs-files"
18 blank_tempdir
"$STAGING_DIR"
19 ln -s "usr/lib" "$STAGING_DIR/lib"
20 blank_tempdir
"$ROOT_DIR"
23 if [[ ! -d "$ROOT_DIR" ||
! -d "$ROOT_DIR/usr" ]]
25 mkdir
-p "$ROOT_DIR"/{tmp
,proc
,sys
,dev
,mnt
,home
/root
} || dienow
26 for i
in bin sbin lib etc
28 mkdir
-p "$ROOT_DIR/usr/$i" || dienow
29 ln -s "usr/$i" "$ROOT_DIR/$i" || dienow
42 # build initramfs content
44 build_package linux-headers
47 build_package kexec-tools
51 build_package freetype
55 build_package qi-bootmenu
56 build_package dropbear
58 # copy the the root-overlay drectory over the initramfs and generate
59 # a file called 'initramfs-files' which can be specified as
60 # CONFIG_INITRAMFS_SOURCE during the kernel build
62 cd "$TOP" && .
/initramfs.sh
64 # build kernel which embedds the previously built initramfs content