File: mips.sh

package info (click to toggle)
base-installer 1.227
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 3,288 kB
  • sloc: sh: 1,587; ansic: 704; makefile: 59; perl: 50
file content (31 lines) | stat: -rw-r--r-- 618 bytes parent folder | download | duplicates (4)
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
arch_get_kernel_flavour () {
	case "$SUBARCH" in
	    4kc-malta|5kc-malta|octeon)
		echo "$SUBARCH"
		return 0 ;;
	    *)
		warning "Unknown $ARCH subarchitecture '$SUBARCH'."
		return 1 ;;
	esac
}

arch_check_usable_kernel () {
	# Subarchitecture must match exactly
	if echo "$1" | grep -Eq -- "-$2(-.*)?$"; then return 0; fi
	# The 4kc-malta kernel will do for 5kc-malta as well
	if [ "$2" = 5kc-malta ] && \
	   echo "$1" | grep -Eq -- "-4kc-malta(-.*)?$"; then
		return 0
	fi
	return 1
}

arch_get_kernel () {
	case $1 in
	    5kc-malta)
		echo "linux-image-$1"
		set 4kc-malta
		;;
	esac
	echo "linux-image-$1"
}