Missing / before 'iso'
[catalyst.git] / targets / netboot2 / netboot2-controller.sh
1 #!/bin/bash
2
3 . ${clst_sharedir}/targets/support/functions.sh
4 . ${clst_sharedir}/targets/support/filesystem-functions.sh
5
6 case ${1} in
7         build_packages)
8                 echo ">>> Building packages ..."
9                 shift
10                 clst_root_path="/" \
11                 clst_packages="$*" \
12                 exec_in_chroot \
13                 ${clst_sharedir}/targets/${clst_target}/${clst_target}-pkg.sh
14         ;;
15         pre-kmerge)
16                 # Sets up the build environment before any kernels are compiled
17 #               if [ -n "${clst_netboot2_busybox_config}" ]; then
18 #                       cp ${clst_netboot2_busybox_config} ${clst_chroot_path}/tmp/busy-config
19 #               fi
20                 exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
21         ;;
22         post-kmerge)
23                 # Cleans up the build environment after the kernels are compiled
24                 exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
25         ;;
26         kernel)
27                 shift
28                 export clst_kname="$1"
29
30                 # if we have our own linuxrc, copy it in
31                 if [ -n "${clst_linuxrc}" ]
32                 then
33                         cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
34                 fi
35                 exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
36                 delete_from_chroot tmp/linuxrc
37
38                 extract_modules ${clst_chroot_path} ${clst_kname}
39                 #16:12 <@solar> kernel_name=foo
40                 #16:13 <@solar> eval clst_boot_kernel_${kernel_name}_config=bar
41                 #16:13 <@solar> eval echo \$clst_boot_kernel_${kernel_name}_config
42         ;;
43         image)
44                 # Creates the base initramfs image for the netboot
45                 echo -e ">>> Preparing Image ..."
46                 shift
47
48                 # Copy remaining files over to the initramfs target
49                 clst_files="${@}" \
50                 exec_in_chroot \
51                 ${clst_sharedir}/targets/${clst_target}/${clst_target}-copyfile.sh
52         ;;
53         final)
54                 # For each arch, fetch the kernel images and put them in builds/
55                 echo -e ">>> Copying completed kernels to ${clst_target_path} ..."
56                 ${clst_sharedir}/targets/support/netboot2-final.sh
57         ;;
58         clean)
59                 exit 0;;
60         *)
61                 exit 1;;
62 esac
63
64 exit $?