1
arch_get_kernel_flavour () {
2
VENDOR=`grep '^vendor_id' "$CPUINFO" | head -n1 | cut -d: -f2`
3
FAMILY=`grep '^cpu family' "$CPUINFO" | head -n1 | cut -d: -f2`
4
MODEL=`grep '^model[[:space:]]*:' "$CPUINFO" | head -n1 | cut -d: -f2`
6
# Only offer bigmem if the system supports PAE and the
7
# installer itself is already using a bigmem kernel.
8
if grep '^flags' "$CPUINFO" | grep -q pae ; then
9
case "$KERNEL_FLAVOUR" in
10
686-bigmem*|generic-pae|xen) BIGMEM="-bigmem" ;;
11
*) BIGMEM="-may-bigmem" ;;
15
# On systems with 3GB or more of RAM, PAE is needed to access it all.
16
if [ "x$BIGMEM" = "x-may-bigmem" ] && \
17
[ "$MEMTOTAL" ] && [ "$MEMTOTAL" -gt 3145728 ]; then
24
" 15"|" 16"|" 17") # k8
29
" 0"|" 1"|" 2"|" 3"|" 4"|" 5")
30
# May not have SSE support
43
" 6"|" 15") echo 686$BIGMEM ;;
50
" 5"|" 6"|" 15") echo 586 ;;
58
" 9"|" 10") echo 686$BIGMEM ;;
72
# Note: the -k7 flavor has been dropped with linux-2.6 (2.6.23-1)
74
arch_check_usable_kernel () {
75
if echo "$1" | grep -Eq -- "-386(-.*)?$"; then return 0; fi
76
if [ "$2" = 486 ]; then return 1; fi
77
if echo "$1" | grep -Eq -- "-(generic|virtual|rt)(-.*)?$" && ! echo "$1" | grep -Eq -- "-generic-pae(-.*)?$"; then return 0; fi
78
if [ "$2" = 586 ] || [ "$2" = 686 ]; then return 1; fi
79
if echo "$1" | grep -Eq -- "-(generic-pae|xen)(-.*)?$"; then return 0; fi
80
if [ "$2" = 686-may-bigmem ] || [ "$2" = 686-bigmem ]; then return 1; fi
82
# default to usable in case of strangeness
83
warning "Unknown kernel usability: $1 / $2"
90
# See older versions of script for more flexible code structure
91
# that allows multiple levels of fallbacks
92
if [ "$1" = 686-bigmem ]; then
93
echo "linux-generic-pae"
94
echo "linux-image-generic-pae"
96
echo "linux-image-xen"
98
if [ "$1" = 686-bigmem ] || [ "$1" = 686-may-bigmem ] || [ "$1" = 686 ] || [ "$1" = 586 ]; then
100
echo "linux-image-generic"
102
echo "linux-image-virtual"
104
echo "linux-image-rt"
106
if [ "$1" = 686-may-bigmem ]; then
107
echo "linux-generic-pae"
108
echo "linux-image-generic-pae"
110
echo "linux-image-xen"
113
echo "linux-image-386"