chmod +x all sh scripts so they can run from the git checkout
[catalyst.git] / targets / embedded / embedded-controller.sh
1 #!/bin/bash
2
3 source ${clst_sharedir}/targets/support/functions.sh
4 source ${clst_sharedir}/targets/support/filesystem-functions.sh
5
6 case ${1} in
7         enter)
8         ;;
9
10         build_packages)
11                 shift
12                 export clst_packages="$*"
13                 exec_in_chroot \
14                         ${clst_sharedir}/targets/${clst_target}/${clst_target}-chroot.sh
15         ;;
16
17         preclean)
18         ;;
19
20 #       package)
21 #               export root_fs_path="${clst_chroot_path}/tmp/mergeroot"
22 #               install -d ${clst_image_path}
23
24 #               ${clst_sharedir}/targets/embedded/embedded-fs-runscript.sh \
25 #                       ${clst_embedded_fs_type} || exit 1
26 #               imagesize=`du -sk ${clst_image_path}/root.img | cut -f1`
27 #               echo "Created ${clst_embedded_fs_type} image at \
28 #                       ${clst_image_path}/root.img"
29 #               echo "Image size: ${imagesize}k"
30 #       ;;
31
32         pre-kmerge)
33                 # Sets up the build environment before any kernels are compiled
34                 exec_in_chroot ${clst_sharedir}/targets/support/pre-kmerge.sh
35         ;;
36
37         post-kmerge)
38                 # Cleans up the build environment after the kernels are compiled
39                 exec_in_chroot ${clst_sharedir}/targets/support/post-kmerge.sh
40         ;;
41
42         kernel)
43                 shift
44                 export clst_kname="${1}"
45                 # if we have our own linuxrc, copy it in
46                 if [ -n "${clst_linuxrc}" ]
47                 then
48                         cp -pPR ${clst_linuxrc} ${clst_chroot_path}/tmp/linuxrc
49                 fi
50                 exec_in_chroot ${clst_sharedir}/targets/support/kmerge.sh
51                 delete_from_chroot tmp/linuxrc
52         ;;
53
54         target_image_setup)
55                 shift
56                 ${clst_sharedir}/targets/support/target_image_setup.sh ${1}
57
58         ;;
59         livecd-update)
60                 # Now, finalize and tweak the livecd fs (inside of the chroot)
61                 exec_in_chroot  ${clst_sharedir}/targets/support/livecdfs-update.sh
62         ;;
63
64         bootloader)
65                 shift
66                 # Here is where we poke in our identifier
67                 touch ${1}/livecd
68
69                 ${clst_sharedir}/targets/support/bootloader-setup.sh ${1}
70         ;;
71
72         iso)
73                 shift
74                 ${clst_sharedir}/targets/support/create-iso.sh ${1}
75         ;;
76
77         clean)
78         ;;
79
80         *)
81         ;;
82
83 esac
84 exit $?