blob: 418d70bc5224d872afd863ef2bad155782649cc7 (
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
|
#!/bin/bash
source ${clst_sharedir}/targets/support/functions.sh
source ${clst_sharedir}/targets/support/filesystem-functions.sh
extract_kernels ${clst_target_path}boot
# Move kernel binaries to ${clst_target_path}kernels, and
# move everything else to ${clst_target_path}kernels/misc
mkdir ${clst_target_path}kernels
mkdir ${clst_target_path}kernels/misc
for x in ${clst_boot_kernel}; do
mv ${clst_target_path}boot/${x} ${clst_target_path}kernels
mv ${clst_target_path}boot/${x}.igz ${clst_target_path}kernels/misc
mv ${clst_target_path}boot/System-${x}.map ${clst_target_path}kernels/misc
done
rmdir ${clst_target_path}boot
# Any post-processing necessary for each architecture can be done here. This
# may include things like sparc's elftoaout, x86's PXE boot, etc.
case ${clst_hostarch} in
alpha)
sleep 0
;;
arm)
sleep 0
;;
hppa)
# Only one kernel should be there
kname=${clst_boot_kernel[0]}
rm -f ${clst_target_path}/${kname}-hppa.lif
palo \
-k ${clst_target_path}/kernels/${kname} \
-r ${clst_target_path}/kernels/misc/${kname}.igz \
-s ${clst_target_path}/${kname}-hppa.lif \
-f /dev/null \
-b /usr/share/palo/iplboot \
-c "0/vmlinux initrd=0/ramdisk root=/dev/ram0" \
|| exit 1
;;
sparc*)
if [ "${clst_subarch}" == "sparc" ]; then
piggyback=piggyback
else
piggyback=piggyback64
fi
for x in ${clst_boot_kernel}; do
elftoaout ${clst_target_path}/kernels/${x} -o ${clst_target_path}${x}-a.out
${piggyback} ${clst_target_path}/${x}-a.out ${clst_target_path}kernels/misc/System-${x}.map ${clst_target_path}kernels/misc/${x}.igz
done
;;
ia64)
sleep 0
;;
x86|amd64)
sleep 0
;;
esac
exit $?
|