1 |
Signed-off-by: Matt Turner <mattst88@g.o> |
2 |
--- |
3 |
targets/support/pre-kmerge.sh | 43 ++++++++++++++--------------------- |
4 |
1 file changed, 17 insertions(+), 26 deletions(-) |
5 |
|
6 |
diff --git a/targets/support/pre-kmerge.sh b/targets/support/pre-kmerge.sh |
7 |
index dd51ae9a..165dfd51 100755 |
8 |
--- a/targets/support/pre-kmerge.sh |
9 |
+++ b/targets/support/pre-kmerge.sh |
10 |
@@ -2,32 +2,23 @@ |
11 |
|
12 |
source /tmp/chroot-functions.sh |
13 |
|
14 |
-case ${clst_hostarch} in |
15 |
- hppa) |
16 |
- got_32=0 |
17 |
- got_64=0 |
18 |
- for i in ${clst_boot_kernel} |
19 |
- do |
20 |
- if [ "${i: -2}" == "32" ] |
21 |
- then |
22 |
- if [ $got_32 -eq 1 ] |
23 |
- then |
24 |
- die "Only one 32 bit kernel can be configured" |
25 |
- fi |
26 |
- got_32=1 |
27 |
- elif [ "${i: -2}" == "64" ] |
28 |
- then |
29 |
- if [ $got_64 -eq 1 ] |
30 |
- then |
31 |
- die "Only one 64 bit kernel can be configured" |
32 |
- fi |
33 |
- got_64=1 |
34 |
- else |
35 |
- die "Kernel names must end by either 32 or 64" |
36 |
- fi |
37 |
- done |
38 |
- ;; |
39 |
-esac |
40 |
+if [[ ${clst_hostarch} == hppa ]]; then |
41 |
+ for i in ${clst_boot_kernel}; do |
42 |
+ case ${i} in |
43 |
+ *32) |
44 |
+ let num32++ |
45 |
+ ;; |
46 |
+ *64) |
47 |
+ let num64++ |
48 |
+ ;; |
49 |
+ *) |
50 |
+ die "Kernel names must end with either \"32\" or \"64\"" |
51 |
+ ;; |
52 |
+ esac |
53 |
+ done |
54 |
+ [[ $num32 > 1 ]] && die "Only one 32-bit kernel can be configured" |
55 |
+ [[ $num64 > 1 ]] && die "Only one 64-bit kernel can be configured" |
56 |
+fi |
57 |
|
58 |
run_merge --oneshot genkernel |
59 |
install -d /tmp/kerncache |
60 |
-- |
61 |
2.26.2 |