blob: c3fc09145aaf4d8248f4510c07356e8d154903a7 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
|
#!/bin/bash
. ${clst_sharedir}/targets/support/functions.sh
. ${clst_sharedir}/targets/support/filesystem-functions.sh
case ${1} in
#### Couldnt busybox step be in packages ....
build_packages)
shift
clst_root_path="/" \
clst_packages="$*" \
exec_in_chroot \
${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
;;
busybox)
# Custom busybox config support
if [ -f "${clst_netboot_busybox_config}" ]
then
mkdir -p ${clst_chroot_path}/etc/busybox/${clst_CHOST}
cp -v ${clst_netboot_busybox_config} \
${clst_chroot_path}/etc/busybox/${clst_CHOST}/busybox.config
clst_use="savedconfig"
fi
# Main Busybox emerge
clst_root_path="/" \
clst_use="${clst_use} netboot make-busybox-symlinks" \
clst_myemergeopts="${clst_myemergeopts} -O" \
clst_packages="busybox" \
exec_in_chroot \
${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
;;
pre-kmerge)
# Sets up the build environment before any kernels are compiled
#exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
;;
post-kmerge)
# Cleans up the build environment after the kernels are compiled
#exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
;;
kernel)
shift
export clst_kname="$1"
export clst_root_path="/"
#exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
#exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
#exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
#extract_kernels kernels
;;
image)
#Creates the base initrd image for the netboot
shift
# Could this step be a parameter in case there is a different
# baselayout to add???
clst_myemergeopts="${clst_myemergeopts} --nodeps" \
clst_packages="netboot-base" \
exec_in_chroot \
${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
clst_files="${@}" \
exec_in_chroot \
${clst_sharedir}/targets/${clst_target}/${clst_target}-image.sh
;;
finish)
${clst_sharedir}/targets/${clst_target}/${clst_target}-combine.sh
;;
clean)
exit 0;;
*)
exit 1;;
esac
exit $?
|