Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 42926 | Differences between
and this patch

Collapse All | Expand All

(-)gen_configkernel.sh.orig (+52 lines)
Lines 1-9 Link Here
1
#!/bin/bash
1
#!/bin/bash
2
2
3
determine_config_file() {
3
determine_config_file() {
4
	GENCFGXONLY="no"
4
	if [ "${CMD_KERNEL_CONFIG}" != "" ]
5
	if [ "${CMD_KERNEL_CONFIG}" != "" ]
5
	then
6
	then
6
		KERNEL_CONFIG="${CMD_KERNEL_CONFIG}"
7
		KERNEL_CONFIG="${CMD_KERNEL_CONFIG}"
8
		GENCFGXONLY="yes"
9
		NOCFGX="yes"
7
	elif [ -f "/etc/kernels/kernel-config-${ARCH}-${KV}" ]
10
	elif [ -f "/etc/kernels/kernel-config-${ARCH}-${KV}" ]
8
	then
11
	then
9
		KERNEL_CONFIG="/etc/kernels/kernel-config-${ARCH}-${KV}"
12
		KERNEL_CONFIG="/etc/kernels/kernel-config-${ARCH}-${KV}"
Lines 13-18 determine_config_file() { Link Here
13
	elif [ "${DEFAULT_KERNEL_CONFIG}" != "" -a -f "${DEFAULT_KERNEL_CONFIG}" ]
16
	elif [ "${DEFAULT_KERNEL_CONFIG}" != "" -a -f "${DEFAULT_KERNEL_CONFIG}" ]
14
	then
17
	then
15
		KERNEL_CONFIG="${DEFAULT_KERNEL_CONFIG}"
18
		KERNEL_CONFIG="${DEFAULT_KERNEL_CONFIG}"
19
		GENCFGXONLY="yes"
16
	elif [ -f "${GK_SHARE}/${ARCH}/kernel-config-${VER}.${PAT}" ]
20
	elif [ -f "${GK_SHARE}/${ARCH}/kernel-config-${VER}.${PAT}" ]
17
	then
21
	then
18
		KERNEL_CONFIG="${GK_SHARE}/${ARCH}/kernel-config-${VER}.${PAT}"
22
		KERNEL_CONFIG="${GK_SHARE}/${ARCH}/kernel-config-${VER}.${PAT}"
Lines 24-29 determine_config_file() { Link Here
24
	fi
28
	fi
25
}
29
}
26
30
31
determine_config_extension() {
32
	# Dropdown:
33
	# GENONLY && x-config, x-config-arch-kv, x-config-arch-x.y,
34
	# x-config-arch, x-config
35
	if isTrue ${NOCFGEX}
36
	then
37
		print_info 1 "Not applying configuration for:  $1"
38
	elif isTrue ${GENCFGXONLY}
39
	then
40
		if [ -f "${GK_SHARE}/extens/$1-config" ]
41
		then
42
			KERNEL_CONFIG_EXTEN="${GK_SHARE}/extens/$1-config"
43
		fi
44
	elif [ -f "${GK_SHARE}/extens/$1-config-${ARCH}-${KV}" ]
45
	then
46
		KERNEL_CONFIG_EXTEN="${GK_SHARE}/extens/$1-config-${ARCH}-${KV}"
47
	elif [ -f "${GK_SHARE}/extens/$1-config-${ARCH}-${VER}.${PAT}" ]
48
	then
49
		KERNEL_CONFIG_EXTEN="${GK_SHARE}/extens/$1-config-${ARCH}-${VER}.${PAT}"
50
	elif [ -f "${GK_SHARE}/extens/$1-config-${ARCH}" ]
51
	then
52
		KERNEL_CONFIG_EXTEN="${GK_SHARE}/extens/$1-config-${ARCH}"
53
	elif [ -f "${GK_SHARE}/extens/$1-config-${KV}" ]
54
	then
55
		KERNEL_CONFIG_EXTEN="${GK_SHARE}/extens/$1-config-${KV}"
56
	elif [ -f "${GK_SHARE}/extens/$1-config-${VER}.${PAT}" ]
57
	then
58
		KERNEL_CONFIG_EXTEN="${GK_SHARE}/extens/$1-config-${VER}.${PAT}"
59
	elif [ -f "${GK_SHARE}/extens/$1-config" ]
60
	then
61
		KERNEL_CONFIG_EXTEN="${GK_SHARE}/extens/$1-config"
62
	else
63
		print_info 1 "no kernel config for $1 found, skipping"
64
		KERNEL_CONFIG_EXTEN=""
65
	fi
66
}
67
27
config_kernel() {
68
config_kernel() {
28
	print_info 1 "kernel: configuring source"
69
	print_info 1 "kernel: configuring source"
29
70
Lines 45-50 config_kernel() { Link Here
45
		cp "${KERNEL_DIR}/.config" "${KERNEL_DIR}/.config.bak" > /dev/null 2>&1
86
		cp "${KERNEL_DIR}/.config" "${KERNEL_DIR}/.config.bak" > /dev/null 2>&1
46
		cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die "could not copy config file"
87
		cp "${KERNEL_CONFIG}" "${KERNEL_DIR}/.config" || gen_die "could not copy config file"
47
88
89
		# need a way to use a for loop here :(
90
		print_info 1 "Adding extended configurations..."
91
		for i in ${EXTENS}
92
		do determine_config_extension $i
93
			if [ "${KERNEL_CONFIG_EXTEN}" != "" ]
94
			then
95
				print_info 1 "Merging $i config..."
96
				cat ${KERNEL_CONFIG_EXTEN} >> ${KERNEL_DIR}/.config || gen_die "could not merge pax config"
97
			fi
98
		done
99
48
		print_info 1 "kernel: running oldconfig"
100
		print_info 1 "kernel: running oldconfig"
49
		yes "" | compile_generic "oldconfig" kernel
101
		yes "" | compile_generic "oldconfig" kernel
50
102

Return to bug 42926