Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
View | Details | Raw Unified | Return to bug 320059
Collapse All | Expand All

(-)genkernel.8 (-6 / +12 lines)
Lines 65-81 Link Here
65
.TP
65
.TP
66
\fB\-\-\fR[no\-]\fBmenuconfig\fR
66
\fB\-\-\fR[no\-]\fBmenuconfig\fR
67
Runs, or does not run "make menuconfig" after running "make oldconfig".
67
Runs, or does not run "make menuconfig" after running "make oldconfig".
68
Note that the --no-menuconfig also disables any command line or config file
69
selected --gconfig or --xconfig directive.
70
.TP
71
\fB\-\-gconfig\fR
72
Run "make gconfig" after running "make oldconfig".
73
.TP
74
\fB\-\-xconfig\fR
75
Run "make xconfig" after running "make oldconfig".
68
.TP
76
.TP
69
\fB\-\-\fR[no\-]\fBsave\-config\fR
77
\fB\-\-\fR[no\-]\fBsave\-config\fR
70
Saves, or does not save the kernel configuration to
78
Saves, or does not save the kernel configuration to
71
.I /etc/kernels
79
.I /etc/kernels
72
if the kernel is successfully compiled.
80
if the kernel is successfully compiled.
73
.TP
74
\fB\-\-gconfig\fR
75
Run "make gconfig" after "make oldconfig".
76
.TP
77
\fB\-\-xconfig\fR
78
Run "make xconfig" after "make oldconfig".
79
.PP
81
.PP
80
.BR Kernel \ Compilation
82
.BR Kernel \ Compilation
81
.TP
83
.TP
Lines 207-212 Link Here
207
\fB\-\-static\fR
209
\fB\-\-static\fR
208
This builds a monolithic kernel without any modules on any initial ramdisks.
210
This builds a monolithic kernel without any modules on any initial ramdisks.
209
.TP
211
.TP
212
\fB\-\-\fR[no\-]\fBgenzimage\fR
213
Builds, or does not build the zImage.initrd for the powerpc arch.  This option
214
is currently not supported for any arch other than powerpc.
215
.TP
210
\fB\-\-linuxrc=\fR<file>
216
\fB\-\-linuxrc=\fR<file>
211
Use <file> for the linuxrc instead of the genkernel linuxrc.
217
Use <file> for the linuxrc instead of the genkernel linuxrc.
212
.PP
218
.PP
(-)gen_compile.sh (-2 / +2 lines)
Lines 249-255 Link Here
249
	# ARGS='CC="ccache gcc"'
249
	# ARGS='CC="ccache gcc"'
250
	if [ "${argstype}" == 'runtask' ]
250
	if [ "${argstype}" == 'runtask' ]
251
	then
251
	then
252
		print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS/-j?/j1} ${ARGS} ${target} $*" 1 0 1
252
		print_info 2 "COMMAND: ${MAKE} ${MAKEOPTS/-j?/-j1} ${ARGS} ${target} $*" 1 0 1
253
		eval ${MAKE} -s ${MAKEOPTS/-j?/-j1} "${ARGS}" ${target} $*
253
		eval ${MAKE} -s ${MAKEOPTS/-j?/-j1} "${ARGS}" ${target} $*
254
		RET=$?
254
		RET=$?
255
	elif [ "${LOGLEVEL}" -gt "1" ]
255
	elif [ "${LOGLEVEL}" -gt "1" ]
Lines 307-313 Link Here
307
		gen_die "Cannot locate kernel binary"
307
		gen_die "Cannot locate kernel binary"
308
	fi
308
	fi
309
309
310
	if ! isTrue "${CMD_NOINSTALL}"
310
	if ! isTrue "${NOINSTALL}"
311
	then
311
	then
312
		copy_image_with_preserve "kernel" \
312
		copy_image_with_preserve "kernel" \
313
			"${tmp_kernel_binary}" \
313
			"${tmp_kernel_binary}" \
(-)gen_package.sh (-3 / +2 lines)
Lines 164-173 Link Here
164
	else
164
	else
165
		if [ -e "${KERNCACHE}" ] 
165
		if [ -e "${KERNCACHE}" ] 
166
		then
166
		then
167
			KERNEL_CONFIG="/${KERNEL_DIR}/.config"
167
			if [ -z "${KERNEL_CONFIG}" ]
168
			if [ "${CMD_KERNEL_CONFIG}" != '' ]
169
			then
168
			then
170
				KERNEL_CONFIG="${CMD_KERNEL_CONFIG}"
169
				KERNEL_CONFIG="/${KERNEL_DIR}/.config"
171
			fi
170
			fi
172
171
173
			/bin/tar -xj -f ${KERNCACHE} -C ${TEMP}
172
			/bin/tar -xj -f ${KERNCACHE} -C ${TEMP}
(-)gen_configkernel.sh (-21 / +7 lines)
Lines 2-11 Link Here
2
# $Id: 8c00f8d5e158ee319351226cb69dc25d851adedc $
2
# $Id: 8c00f8d5e158ee319351226cb69dc25d851adedc $
3
3
4
determine_config_file() {
4
determine_config_file() {
5
	if [ "${CMD_KERNEL_CONFIG}" != "" ]
5
	if [ -z "${KERNEL_CONFIG}" ]
6
	then
6
	then
7
		KERNEL_CONFIG="${CMD_KERNEL_CONFIG}"
7
		if [ -f "/etc/kernels/kernel-config-${ARCH}-${KV}" ]
8
	elif [ -f "/etc/kernels/kernel-config-${ARCH}-${KV}" ]
9
	then
8
	then
10
		KERNEL_CONFIG="/etc/kernels/kernel-config-${ARCH}-${KV}"
9
		KERNEL_CONFIG="/etc/kernels/kernel-config-${ARCH}-${KV}"
11
	elif [ -f "${GK_SHARE}/arch/${ARCH}/kernel-config-${KV}" ]
10
	elif [ -f "${GK_SHARE}/arch/${ARCH}/kernel-config-${KV}" ]
Lines 23-28 Link Here
23
	else
22
	else
24
		gen_die 'Error: No kernel .config specified, or file not found!'
23
		gen_die 'Error: No kernel .config specified, or file not found!'
25
	fi
24
	fi
25
	fi
26
}
26
}
27
27
28
config_kernel() {
28
config_kernel() {
Lines 58-82 Link Here
58
		print_info 1 "config: --no-clean is enabled; leaving the .config alone."
58
		print_info 1 "config: --no-clean is enabled; leaving the .config alone."
59
	fi
59
	fi
60
	
60
	
61
	if isTrue ${MENUCONFIG}
61
	if [ "${MENUCONFIG}" != 'no' ]
62
	then
63
		print_info 1 'config: >> Invoking menuconfig...'
64
		compile_generic menuconfig runtask
65
		[ "$?" ] || gen_die 'Error: menuconfig failed!'
66
	elif isTrue ${CMD_GCONFIG}
67
	then
68
		print_info 1 'config: >> Invoking gconfig...'
69
		compile_generic gconfig kernel
70
		[ "$?" ] || gen_die 'Error: gconfig failed!'
71
72
		CMD_XCONFIG=0
73
	fi
74
75
	if isTrue ${CMD_XCONFIG}
76
	then
62
	then
77
		print_info 1 'config: >> Invoking xconfig...'
63
		print_info 1 'config: >> Invoking ${MENUCONFIG}...'
78
		compile_generic xconfig kernel
64
		compile_generic ${MENUCONFIG} runtask
79
		[ "$?" ] || gen_die 'Error: xconfig failed!'
65
		[ "$?" ] || gen_die 'Error: ${MENUCONFIG} failed!'
80
	fi
66
	fi
81
67
82
	# Force this on if we are using --genzimage
68
	# Force this on if we are using --genzimage
(-)genkernel (-8 / +6 lines)
Lines 46-53 Link Here
46
source ${GK_SHARE}/gen_package.sh || gen_die "Could not read ${GK_SHARE}/gen_package.sh"
46
source ${GK_SHARE}/gen_package.sh || gen_die "Could not read ${GK_SHARE}/gen_package.sh"
47
source ${GK_SHARE}/gen_bootloader.sh || gen_die "Could not read ${GK_SHARE}/gen_bootloader.sh"
47
source ${GK_SHARE}/gen_bootloader.sh || gen_die "Could not read ${GK_SHARE}/gen_bootloader.sh"
48
48
49
TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
50
51
trap_cleanup(){
49
trap_cleanup(){
52
	# Call exit code of 1 for failure
50
	# Call exit code of 1 for failure
53
	cleanup
51
	cleanup
Lines 131-137 Link Here
131
NORMAL=${BOLD} print_info 1 "Linux Kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..."
129
NORMAL=${BOLD} print_info 1 "Linux Kernel ${BOLD}${KV}${NORMAL} for ${BOLD}${ARCH}${NORMAL}..."
132
130
133
# Check BOOTDIR is mounted
131
# Check BOOTDIR is mounted
134
if isTrue ${CMD_NOINSTALL}
132
if isTrue ${NOINSTALL}
135
then
133
then
136
	isTrue ${MOUNTBOOT} && print_info 2 'Skipping automatic mount of boot'
134
	isTrue ${MOUNTBOOT} && print_info 2 'Skipping automatic mount of boot'
137
else
135
else
Lines 230-236 Link Here
230
	fi
228
	fi
231
fi
229
fi
232
230
233
if ! isTrue "${CMD_NOINSTALL}"
231
if ! isTrue "${NOINSTALL}"
234
then
232
then
235
	if [ "${KERNCACHE}" != "" -a "${KERNCACHE_IS_VALID}" != "0" ] 
233
	if [ "${KERNCACHE}" != "" -a "${KERNCACHE_IS_VALID}" != "0" ] 
236
	then
234
	then
Lines 245-254 Link Here
245
fi
243
fi
246
244
247
# Run callback
245
# Run callback
248
if [ "${CMD_CALLBACK}" != "" ]
246
if [ "${CALLBACK}" != "" ]
249
then
247
then
250
	print_info 1 "" 1 0
248
	print_info 1 "" 1 0
251
	print_info 1 "Preparing to run callback: \"${CMD_CALLBACK}\"" 0
249
	print_info 1 "Preparing to run callback: \"${CALLBACK}\"" 0
252
250
253
	CALLBACK_ESCAPE=0
251
	CALLBACK_ESCAPE=0
254
	CALLBACK_COUNT=0
252
	CALLBACK_COUNT=0
Lines 264-270 Link Here
264
	then
262
	then
265
		echo
263
		echo
266
		echo
264
		echo
267
		eval ${CMD_CALLBACK} | tee -a ${LOGFILE}
265
		eval ${CALLBACK} | tee -a ${LOGFILE}
268
		CMD_STATUS="${PIPESTATUS[0]}"
266
		CMD_STATUS="${PIPESTATUS[0]}"
269
		echo
267
		echo
270
		print_info 1 "<<< Callback exit status: ${CMD_STATUS}"
268
		print_info 1 "<<< Callback exit status: ${CMD_STATUS}"
Lines 313-319 Link Here
313
311
314
if [ "${BUILD_KERNEL}" -eq '1' ]
312
if [ "${BUILD_KERNEL}" -eq '1' ]
315
then
313
then
316
	if ! isTrue "${CMD_NOINSTALL}"
314
	if ! isTrue "${NOINSTALL}"
317
	then
315
	then
318
		set_bootloader
316
		set_bootloader
319
	fi
317
	fi
(-)gen_cmdline.sh (-46 / +100 lines)
Lines 44-50 Link Here
44
  echo "	--all-ramdisk-modules	Copy all kernel modules to the ramdisk"
44
  echo "	--all-ramdisk-modules	Copy all kernel modules to the ramdisk"
45
  echo "	--callback=<...>	Run the specified arguments after the"
45
  echo "	--callback=<...>	Run the specified arguments after the"
46
  echo "				kernel and modules have been compiled"
46
  echo "				kernel and modules have been compiled"
47
  echo "	--static		Build a static (monolithic kernel)."
47
  echo "	--static		Build a static (monolithic kernel)"
48
  echo "    --genzimage		Build zImage.initrd for PowerPC arch"
49
  echo "    --no-genzimage		Do not build zImage.initrd"
48
  echo "  Kernel settings"
50
  echo "  Kernel settings"
49
  echo "	--kerneldir=<dir>	Location of the kernel sources"
51
  echo "	--kerneldir=<dir>	Location of the kernel sources"
50
  echo "	--kernel-config=<file>	Kernel configuration file to use for compilation"
52
  echo "	--kernel-config=<file>	Kernel configuration file to use for compilation"
Lines 92-97 Link Here
92
  echo "	--busybox-config=<file>	Specifies a user created busybox config"
94
  echo "	--busybox-config=<file>	Specifies a user created busybox config"
93
  echo "	--disklabel		Include disk label and uuid support in your"
95
  echo "	--disklabel		Include disk label and uuid support in your"
94
  echo "				ramdisk"
96
  echo "				ramdisk"
97
  echo "	--no-disklabel		Do not include disk label and uuid support"
95
  echo "	--luks			Include LUKS support"
98
  echo "	--luks			Include LUKS support"
96
  echo "				--> 'emerge cryptsetup-luks' with USE=-dynamic"
99
  echo "				--> 'emerge cryptsetup-luks' with USE=-dynamic"
97
  echo "	--no-busybox    Do not include busybox in the initramfs."
100
  echo "	--no-busybox    Do not include busybox in the initramfs."
Lines 151-156 Link Here
151
  echo '	genkernel --help'
154
  echo '	genkernel --help'
152
}
155
}
153
156
157
#
158
# Notes on adding command line options:
159
#
160
# To allow all command line options to (a) have a genkernel or architecture-specific
161
# default defined in a consistent location, (b) have a site default defined in
162
# "/etc/genkernel.conf", and (c) override these other two settings on the command
163
# line, please follow the following coding guidelines when adding command line
164
# options:
165
#
166
# Step 1:
167
#     For boolean command line options (for example --foo),
168
#         * Set up both a --foo and --no-foo case below.
169
#         * Set the CMD_FOO variable to 1 in the --foo case and 0 in the
170
#           --no-foo case.
171
#    
172
#     For parametric command line options (for example --foo=bar),
173
#         * Set up both a --foo and --no-foo case below.
174
#         * Just set the CMD_FOO variable appropriately.  In most cases,
175
#           use `parse_opt "$*"`.
176
#
177
#     Include a logging call to the print_info function.
178
#    
179
# Step 2:
180
#     Add a call to the set_config_with_override() function in the
181
#     determine_real_args() function in "gen_determineargs.sh".  It should look
182
#     something like this:
183
#
184
#         set_config_with_override <type> FOO CMD_FOO "<default>"
185
#
186
#     <type> should be 1 for boolean command line options and 2 for parametric
187
#     command line options.
188
#
189
#     "<default>" can either be blank (if there's no default), a constant (if
190
#     there's a fixed default), or a calculated architecture specific value.
191
#
192
# Step 3:
193
#     Later on in the determine_real_args() function, run any code that needs
194
#     to be run based on the value of your command line option or its default
195
#     value.  Putting it there makes sure that it's run against all sources
196
#     of the argument value.
197
#
198
# Step 4:
199
#     Document your new command in the longusage() function and in the man
200
#     page source.  It's probably also a good idea to include a commented out 
201
#     example of the site default in genkernel.conf.
202
#
203
# Note that these are just guidelines; you will see some well thought out
204
# exceptions coded below.
205
#
206
# - JRG
207
154
parse_cmdline() {
208
parse_cmdline() {
155
	case "$*" in
209
	case "$*" in
156
		--kernel-cc=*)
210
		--kernel-cc=*)
Lines 197-203 Link Here
197
			;;
251
			;;
198
		--utils-arch=*)
252
		--utils-arch=*)
199
			CMD_UTILS_ARCH=`parse_opt "$*"`
253
			CMD_UTILS_ARCH=`parse_opt "$*"`
200
			print_info 2 "CMD_UTILS_ARCH: ${CMD_ARCHOVERRIDE}"
254
			print_info 2 "CMD_UTILS_ARCH: ${CMD_UTILS_ARCH}"
201
			;;
255
			;;
202
		--makeopts=*)
256
		--makeopts=*)
203
			CMD_MAKEOPTS=`parse_opt "$*"`
257
			CMD_MAKEOPTS=`parse_opt "$*"`
Lines 298-329 Link Here
298
			;;
352
			;;
299
		--loglevel=*)
353
		--loglevel=*)
300
			CMD_LOGLEVEL=`parse_opt "$*"`
354
			CMD_LOGLEVEL=`parse_opt "$*"`
355
			# Exception:  Set the log file immediately so that it provides
356
			# the most comrehensive trace. - JRG
301
			LOGLEVEL="${CMD_LOGLEVEL}"
357
			LOGLEVEL="${CMD_LOGLEVEL}"
302
			print_info 2 "CMD_LOGLEVEL: ${CMD_LOGLEVEL}"
358
			print_info 2 "CMD_LOGLEVEL: ${CMD_LOGLEVEL}"
303
			;;
359
			;;
304
		--menuconfig)
360
		--menuconfig)
305
			TERM_LINES=`stty -a | head -n 1 | cut -d\  -f5 | cut -d\; -f1`
361
			CMD_MENUCONFIG="menuconfig"
306
			TERM_COLUMNS=`stty -a | head -n 1 | cut -d\  -f7 | cut -d\; -f1`
362
			print_info 2 "CMD_KERNEL_CONFIG: ${CMD_KERNEL_CONFIG}"
307
			if [[ TERM_LINES -lt 19 || TERM_COLUMNS -lt 80 ]]
308
			then
309
				echo "Error: You need a terminal with at least 80 columns"
310
				echo "		 and 19 lines for --menuconfig; try --nomenuconfig..."
311
				exit 1
312
			fi
313
			CMD_MENUCONFIG=1
314
			print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}"
315
			;;
363
			;;
316
		--no-menuconfig)
364
		--no-menuconfig)
317
			CMD_MENUCONFIG=0
365
			CMD_MENUCONFIG="no"
318
			print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}"
366
			print_info 2 "CMD_KERNEL_CONFIG: ${CMD_KERNEL_CONFIG}"
319
			;;
367
			;;
320
		--gconfig)
368
		--gconfig)
321
			CMD_GCONFIG=1
369
			CMD_MENUCONFIG="gconfig"
322
			print_info 2 "CMD_GCONFIG: ${CMD_GCONFIG}"
370
			print_info 2 "CMD_KERNEL_CONFIG: ${CMD_KERNEL_CONFIG}"
323
			;;
371
			;;
324
		--xconfig)
372
		--xconfig)
325
			CMD_XCONFIG=1
373
			CMD_MENUCONFIG="xconfig"
326
			print_info 2 "CMD_XCONFIG: ${CMD_XCONFIG}"
374
			print_info 2 "CMD_KERNEL_CONFIG: ${CMD_KERNEL_CONFIG}"
327
			;;
375
			;;
328
		--save-config)
376
		--save-config)
329
			CMD_SAVE_CONFIG=1
377
			CMD_SAVE_CONFIG=1
Lines 357-384 Link Here
357
			;;
405
			;;
358
		--gensplash=*)
406
		--gensplash=*)
359
			CMD_SPLASH=1
407
			CMD_SPLASH=1
360
			SPLASH_THEME=`parse_opt "$*"`
408
			CMD_SPLASH_THEME=`parse_opt "$*"`
361
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
409
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
362
			print_info 2 "SPLASH_THEME: ${SPLASH_THEME}"
410
			print_info 2 "CMD_SPLASH_THEME: ${CMD_SPLASH_THEME}"
363
			echo
411
			echo
364
			print_warning 1 "Please use --splash, as --gensplash is deprecated."
412
			print_warning 1 "Please use --splash, as --gensplash is deprecated."
365
			;;
413
			;;
366
		--gensplash)
414
		--gensplash)
367
			CMD_SPLASH=1
415
			CMD_SPLASH=1
368
			SPLASH_THEME='default'
416
			CMD_SPLASH_THEME='default'
369
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
417
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
370
			echo
418
			echo
371
			print_warning 1 "Please use --splash, as --gensplash is deprecated."
419
			print_warning 1 "Please use --splash, as --gensplash is deprecated."
372
			;;
420
			;;
373
		--splash=*)
421
		--splash=*)
374
			CMD_SPLASH=1
422
			CMD_SPLASH=1
375
			SPLASH_THEME=`parse_opt "$*"`
423
			CMD_SPLASH_THEME=`parse_opt "$*"`
376
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
424
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
377
			print_info 2 "SPLASH_THEME: ${SPLASH_THEME}"
425
			print_info 2 "CMD_SPLASH_THEME: ${CMD_SPLASH_THEME}"
378
			;;
426
			;;
379
		--splash)
427
		--splash)
380
			CMD_SPLASH=1
428
			CMD_SPLASH=1
381
			SPLASH_THEME='default'
429
			CMD_SPLASH_THEME='default'
382
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
430
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
383
			;;
431
			;;
384
		--no-splash)
432
		--no-splash)
Lines 386-399 Link Here
386
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
434
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
387
			;;
435
			;;
388
		--gensplash-res=*)
436
		--gensplash-res=*)
389
			SPLASH_RES=`parse_opt "$*"`
437
			CMD_SPLASH_RES=`parse_opt "$*"`
390
			print_info 2 "SPLASH_RES: ${SPLASH_RES}"
438
			print_info 2 "CMD_SPLASH_RES: ${CMD_SPLASH_RES}"
391
			echo
439
			echo
392
			print_warning 1 "Please use --splash-res, as --gensplash-res is deprecated."
440
			print_warning 1 "Please use --splash-res, as --gensplash-res is deprecated."
393
			;;
441
			;;
394
		--splash-res=*)
442
		--splash-res=*)
395
			SPLASH_RES=`parse_opt "$*"`
443
			CMD_SPLASH_RES=`parse_opt "$*"`
396
			print_info 2 "SPLASH_RES: ${SPLASH_RES}"
444
			print_info 2 "CMD_SPLASH_RES: ${CMD_SPLASH_RES}"
397
			;;
445
			;;
398
		--install)
446
		--install)
399
			CMD_NOINSTALL=0
447
			CMD_NOINSTALL=0
Lines 413-453 Link Here
413
			;;
461
			;;
414
		--callback=*)
462
		--callback=*)
415
			CMD_CALLBACK=`parse_opt "$*"`
463
			CMD_CALLBACK=`parse_opt "$*"`
416
			print_info 2 "CMD_CALLBACK: ${CMD_CALLBACK}/$*"
464
			print_info 2 "CMD_CALLBACK: ${CMD_CALLBACK}"
417
			;;
465
			;;
418
		--static)
466
		--static)
419
			CMD_STATIC=1
467
			CMD_STATIC=1
420
			print_info 2 "CMD_STATIC: ${CMD_STATIC}"
468
			print_info 2 "CMD_STATIC: ${CMD_STATIC}"
421
			;;
469
			;;
422
		--tempdir=*)
470
		--tempdir=*)
423
			TMPDIR=`parse_opt "$*"`
471
			CMD_TMPDIR=`parse_opt "$*"`
424
			TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
472
			print_info 2 "CMD_TMPDIR: ${CMD_TMPDIR}"
425
			print_info 2 "TMPDIR: ${TMPDIR}"
426
			print_info 2 "TEMP: ${TEMP}"
427
			;; 
473
			;; 
428
		--postclear)
474
		--postclear)
429
			CMD_POSTCLEAR=1
475
			CMD_POSTCLEAR=1
430
			print_info 2 "CMD_POSTCLEAR: ${CMD_POSTCLEAR}"
476
			print_info 2 "CMD_POSTCLEAR: ${CMD_POSTCLEAR}"
431
			;; 
477
			;; 
432
		--arch-override=*)
478
		--arch-override=*)
433
			CMD_ARCHOVERRIDE=`parse_opt "$*"`
479
			CMD_ARCH_OVERRIDE=`parse_opt "$*"`
434
			print_info 2 "CMD_ARCHOVERRIDE: ${CMD_ARCHOVERRIDE}"
480
			print_info 2 "CMD_ARCH_OVERRIDE: ${CMD_ARCH_OVERRIDE}"
435
			;;
481
			;;
436
		--color)
482
		--color)
437
			USECOLOR=1
483
			CMD_USECOLOR=1
438
			print_info 2 "USECOLOR: ${USECOLOR}"
484
			print_info 2 "CMD_USECOLOR: ${CMD_USECOLOR}"
485
			USECOLOR="${CMD_USECOLOR}"
439
			setColorVars
486
			setColorVars
440
			;;
487
			;;
441
		--no-color)
488
		--no-color)
442
			USECOLOR=0
489
			CMD_USECOLOR=0
443
			print_info 2 "USECOLOR: ${USECOLOR}"
490
			print_info 2 "CMD_USECOLOR: ${CMD_USECOLOR}"
491
			USECOLOR="${CMD_USECOLOR}"
444
			setColorVars
492
			setColorVars
445
			;;
493
			;;
446
		--logfile=*)
494
		--logfile=*)
447
			CMD_LOGFILE=`parse_opt "$*"`
495
			CMD_LOGFILE=`parse_opt "$*"`
448
			LOGFILE=`parse_opt "$*"`
496
			# Exception:  Set the log file immediately so that it provides
497
			# the most comrehensive trace. - JRG
498
			LOGFILE="${CMD_LOGFILE}"
449
			print_info 2 "CMD_LOGFILE: ${CMD_LOGFILE}"
499
			print_info 2 "CMD_LOGFILE: ${CMD_LOGFILE}"
450
			print_info 2 "LOGFILE: ${CMD_LOGFILE}"
451
			;;
500
			;;
452
		--kerneldir=*)
501
		--kerneldir=*)
453
			CMD_KERNEL_DIR=`parse_opt "$*"`
502
			CMD_KERNEL_DIR=`parse_opt "$*"`
Lines 506-521 Link Here
506
			print_info 2 "CMD_BUSYBOX_CONFIG: ${CMD_BUSYBOX_CONFIG}"
555
			print_info 2 "CMD_BUSYBOX_CONFIG: ${CMD_BUSYBOX_CONFIG}"
507
			;;
556
			;;
508
		--genzimage)
557
		--genzimage)
509
			KERNEL_MAKE_DIRECTIVE_2='zImage.initrd'
558
			CMD_GENZIMAGE=1
510
			KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd'
559
			print_info 2 "CMD_GENZIMAGE: ${CMD_GENZIMAGE}"
511
			CMD_GENZIMAGE="yes"
560
			;;
512
#			ENABLE_PEGASOS_HACKS="yes"
561
		--no-genzimage)
513
#			print_info 2 "ENABLE_PEGASOS_HACKS: ${ENABLE_PEGASOS_HACKS}"
562
			CMD_GENZIMAGE=0
563
			print_info 2 "CMD_GENZIMAGE: ${CMD_GENZIMAGE}"
514
			;;
564
			;;
515
		--disklabel)
565
		--disklabel)
516
			CMD_DISKLABEL=1
566
			CMD_DISKLABEL=1
517
			print_info 2 "CMD_DISKLABEL: ${CMD_DISKLABEL}"
567
			print_info 2 "CMD_DISKLABEL: ${CMD_DISKLABEL}"
518
			;;
568
			;;
569
		--no-disklabel)
570
			CMD_DISKLABEL=0
571
			print_info 2 "CMD_DISKLABEL: ${CMD_DISKLABEL}"
572
			;;
519
		--luks)
573
		--luks)
520
			CMD_LUKS=1
574
			CMD_LUKS=1
521
			print_info 2 "CMD_LUKS: ${CMD_LUKS}"
575
			print_info 2 "CMD_LUKS: ${CMD_LUKS}"
(-)gen_arch.sh (-16 / +1 lines)
Lines 2-14 Link Here
2
# $Id: 079edb21862dc209449422bfa43d9105a1a2b646 $
2
# $Id: 079edb21862dc209449422bfa43d9105a1a2b646 $
3
3
4
get_official_arch() {
4
get_official_arch() {
5
	if [ "${CMD_ARCHOVERRIDE}" != '' ]
6
	then
7
		ARCH=${CMD_ARCHOVERRIDE}
8
	else
9
		if [ "${ARCH_OVERRIDE}" != '' ]
5
		if [ "${ARCH_OVERRIDE}" != '' ]
10
		then
6
		then
11
			ARCH=${ARCH_OVERRIDE}
7
		ARCH="${ARCH_OVERRIDE}"
12
		else
8
		else
13
			ARCH=`uname -m`
9
			ARCH=`uname -m`
14
			case "${ARCH}" in
10
			case "${ARCH}" in
Lines 25-41 Link Here
25
					;;
21
					;;
26
			esac
22
			esac
27
		fi
23
		fi
28
	fi
29
30
	if [ "${CMD_UTILS_ARCH}" != '' ]
31
	then
32
		UTILS_ARCH=${CMD_UTILS_ARCH}
33
	else
34
		if [ "${UTILS_ARCH}" != '' ]
35
		then
36
			UTILS_ARCH=${UTILS_ARCH}
37
		fi
38
	fi
39
24
40
	# sparc64 klibc is b0rked, so we force to 32
25
	# sparc64 klibc is b0rked, so we force to 32
41
	if [ "${ARCH}" = 'sparc64' ]
26
	if [ "${ARCH}" = 'sparc64' ]
(-)gen_determineargs.sh (-2 / +61 lines)
Lines 63-69 Link Here
63
63
64
	#                          Config File          Command Line             Arch Default
64
	#                          Config File          Command Line             Arch Default
65
	#                          -----------          ------------             ------------
65
	#                          -----------          ------------             ------------
66
	set_config_with_override 2 DEBUGFILE            CMD_DEBUGFILE
66
	set_config_with_override 2 LOGFILE              CMD_LOGFILE
67
	set_config_with_override 2 LOGLEVEL             CMD_LOGLEVEL             "1"
67
	set_config_with_override 2 KERNEL_DIR           CMD_KERNEL_DIR           "${DEFAULT_KERNEL_SOURCE}"
68
	set_config_with_override 2 KERNEL_DIR           CMD_KERNEL_DIR           "${DEFAULT_KERNEL_SOURCE}"
68
	set_config_with_override 1 NO_KERNEL_SOURCES    CMD_NO_KERNEL_SOURCES
69
	set_config_with_override 1 NO_KERNEL_SOURCES    CMD_NO_KERNEL_SOURCES
69
	set_config_with_override 2 KNAME                CMD_KERNNAME             "genkernel"
70
	set_config_with_override 2 KNAME                CMD_KERNNAME             "genkernel"
Lines 83-91 Link Here
83
	set_config_with_override 2 BOOTDIR              CMD_BOOTDIR              "/boot"
84
	set_config_with_override 2 BOOTDIR              CMD_BOOTDIR              "/boot"
84
85
85
	set_config_with_override 1 SPLASH               CMD_SPLASH
86
	set_config_with_override 1 SPLASH               CMD_SPLASH
87
	set_config_with_override 2 SPLASH_THEME         CMD_SPLASH_THEME         "default"
88
	set_config_with_override 2 SPLASH_RES           CMD_SPLASH_RES           "1024x768"
86
	set_config_with_override 1 POSTCLEAR            CMD_POSTCLEAR
89
	set_config_with_override 1 POSTCLEAR            CMD_POSTCLEAR
87
	set_config_with_override 1 MRPROPER             CMD_MRPROPER
90
	set_config_with_override 1 MRPROPER             CMD_MRPROPER
88
	set_config_with_override 1 MENUCONFIG           CMD_MENUCONFIG
91
	set_config_with_override 2 MENUCONFIG           CMD_MENUCONFIG           "no"
89
	set_config_with_override 1 CLEAN                CMD_CLEAN
92
	set_config_with_override 1 CLEAN                CMD_CLEAN
90
93
91
	set_config_with_override 2 MINKERNPACKAGE       CMD_MINKERNPACKAGE
94
	set_config_with_override 2 MINKERNPACKAGE       CMD_MINKERNPACKAGE
Lines 121-126 Link Here
121
	set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
124
	set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
122
	set_config_with_override 2 BUSYBOX_CONFIG       CMD_BUSYBOX_CONFIG
125
	set_config_with_override 2 BUSYBOX_CONFIG       CMD_BUSYBOX_CONFIG
123
126
127
	set_config_with_override 2 ARCH_OVERRIDE        CMD_ARCH_OVERRIDE
128
	set_config_with_override 2 CALLBACK             CMD_CALLBACK
129
	set_config_with_override 1 USECOLOR             CMD_USECOLOR             "yes"
130
	set_config_with_override 2 KERNEL_CONFIG        CMD_KERNEL_CONFIG
131
	set_config_with_override 2 LINUXRC              CMD_LINUXRC
132
	set_config_with_override 1 NOINSTALL            CMD_MOINSTALL
133
	set_config_with_override 1 SLOWUSB              CMD_SLOWUSB
134
	set_config_with_override 2 UTILS_ARCH           CMD_UTILS_ARCH
135
	set_config_with_override 2 TMPDIR               CMD_TMPDIR               "/var/tmp/genkernel"
136
124
	BOOTDIR=`arch_replace "${BOOTDIR}"`
137
	BOOTDIR=`arch_replace "${BOOTDIR}"`
125
	BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
138
	BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
126
139
Lines 145-150 Link Here
145
	FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"`
158
	FUSE_BINCACHE=`arch_replace "${FUSE_BINCACHE}"`
146
	UNIONFS_FUSE_BINCACHE=`arch_replace "${UNIONFS_FUSE_BINCACHE}"`
159
	UNIONFS_FUSE_BINCACHE=`arch_replace "${UNIONFS_FUSE_BINCACHE}"`
147
160
161
	TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
162
148
	if [ -n "${CMD_BOOTLOADER}" ]
163
	if [ -n "${CMD_BOOTLOADER}" ]
149
	then
164
	then
150
		BOOTLOADER="${CMD_BOOTLOADER}"
165
		BOOTLOADER="${CMD_BOOTLOADER}"
Lines 210-214 Link Here
210
		INTEGRATED_INITRAMFS=0
225
		INTEGRATED_INITRAMFS=0
211
	fi
226
	fi
212
	
227
	
228
	if isTrue "$USECOLOR"
229
	then
230
		print_info 5 "  USECOLOR was on.  Setting color variables."
231
		setColorVars
232
	fi
233
234
	# Default old true value to "menuconfig".
235
	if isTrue "${MENUCONFIG}"
236
	then
237
		MENUCONFIG="menuconfig"
238
	fi
239
240
	case "${MENUCONFIG}" in
241
		menuconfig)
242
			TERM_LINES=`stty -a | head -n 1 | cut -d\  -f5 | cut -d\; -f1`
243
			TERM_COLUMNS=`stty -a | head -n 1 | cut -d\  -f7 | cut -d\; -f1`
244
			if [[ TERM_LINES -lt 19 || TERM_COLUMNS -lt 80 ]]
245
			then
246
				echo "Error: You need a terminal with at least 80 columns"
247
				echo "		 and 19 lines for --menuconfig; try --nomenuconfig..."
248
				exit 1
249
			fi
250
			;;
251
		[gx]config)
252
			;;
253
254
		[Ff][Aa][Ll][Ss][Ee]|[Ff]|[Nn][Oo]|0)
255
			MENUCONFIG="no"
256
			;;
257
		*)
258
			gen_die "Illegal MENUCONFIG value \"${MENUCONFIG}\", probably in genkernel.conf."
259
			;;
260
	esac
261
262
	if isTrue ${GENZIMAGE}
263
	then
264
		if [ "${ARCH}" != 'powerpc' ]
265
		then
266
			gen_die "Error: --genzimage option only supported on powerpc arch!"
267
		fi
268
		KERNEL_MAKE_DIRECTIVE_2='zImage.initrd'
269
		KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd'
270
	fi
271
213
	get_KV
272
	get_KV
214
}
273
}
(-)genkernel.conf (-1 / +29 lines)
Lines 11-17 Link Here
11
# Run 'make oldconfig' before compiling this kernel?
11
# Run 'make oldconfig' before compiling this kernel?
12
OLDCONFIG="yes"
12
OLDCONFIG="yes"
13
13
14
# Run 'make menuconfig' before compiling this kernel?
14
# Run 'make menuconfig/gconfig/xconfig' before compiling this kernel?
15
# Use menuconfig, gconfig, xconfig, or no.  For backwards compatibility, 
16
# the true values are equivalent to "menuconfig" and the false values are all
17
# equivalent to "no".
15
MENUCONFIG="no"
18
MENUCONFIG="no"
16
19
17
# Run 'make clean' before compilation?
20
# Run 'make clean' before compilation?
Lines 39-44 Link Here
39
# Use Color output in Genkernel?
42
# Use Color output in Genkernel?
40
USECOLOR="yes"
43
USECOLOR="yes"
41
44
45
# Install framebuffer splash support into initramfs?
46
# SPLASH="no"
47
48
# Set framebuffer splash theme.
49
# SPLASH_THEME="default"
50
51
# Select splash theme resolutions to install.
52
# SPLASH_RES="1024x768"
53
42
# Clear build cache dir
54
# Clear build cache dir
43
# CLEAR_CACHE_DIR="yes"
55
# CLEAR_CACHE_DIR="yes"
44
56
Lines 86-91 Link Here
86
# Add new kernel to grub?
98
# Add new kernel to grub?
87
# BOOTLOADER="grub"
99
# BOOTLOADER="grub"
88
100
101
# Run the specified callback command after the kernel and modules have been
102
# compiled.
103
# CALLBACK=""
104
105
# Kernel configuration file to use for compilation.
106
# KERNEL_CONFIG=""
107
108
# Specifies a user created linuxrc
109
# LINUXRC=""
110
111
# Enables extra pauses for slow USB CD boots
112
# SLOWUSB="no"
113
114
# Force to arch for utils only instead of autodetect.
115
# UTILS_ARCH=""
116
89
# =========Low Level Compile Settings=========
117
# =========Low Level Compile Settings=========
90
#
118
#
91
# GNU Make to use for kernel.  See also the --kernel-make command line option.
119
# GNU Make to use for kernel.  See also the --kernel-make command line option.
(-)gen_initramfs.sh (-4 / +4 lines)
Lines 504-513 Link Here
504
	fi
504
	fi
505
	mkdir -p "${TEMP}/initramfs-aux-temp/etc"	
505
	mkdir -p "${TEMP}/initramfs-aux-temp/etc"	
506
	mkdir -p "${TEMP}/initramfs-aux-temp/sbin"	
506
	mkdir -p "${TEMP}/initramfs-aux-temp/sbin"	
507
	if [ -f "${CMD_LINUXRC}" ]
507
	if [ -f "${LINUXRC}" ]
508
	then
508
	then
509
		cp "${CMD_LINUXRC}" "${TEMP}/initramfs-aux-temp/init"
509
		cp "${LINUXRC}" "${TEMP}/initramfs-aux-temp/init"
510
		print_info 2 "        >> Copying user specified linuxrc: ${CMD_LINUXRC} to init"
510
		print_info 2 "        >> Copying user specified linuxrc: ${LINUXRC} to init"
511
	else	
511
	else	
512
		if isTrue ${NETBOOT}
512
		if isTrue ${NETBOOT}
513
		then
513
		then
Lines 572-578 Link Here
572
		mkdir -p "${TEMP}/initramfs-aux-temp/lib/keymaps"
572
		mkdir -p "${TEMP}/initramfs-aux-temp/lib/keymaps"
573
		/bin/tar -C "${TEMP}/initramfs-aux-temp/lib/keymaps" -zxf "${GK_SHARE}/defaults/keymaps.tar.gz"
573
		/bin/tar -C "${TEMP}/initramfs-aux-temp/lib/keymaps" -zxf "${GK_SHARE}/defaults/keymaps.tar.gz"
574
	fi
574
	fi
575
	if isTrue $CMD_SLOWUSB
575
	if isTrue $SLOWUSB
576
	then
576
	then
577
		echo 'MY_HWOPTS="${MY_HWOPTS} slowusb"' >> ${TEMP}/initramfs-aux-temp/etc/initrd.defaults
577
		echo 'MY_HWOPTS="${MY_HWOPTS} slowusb"' >> ${TEMP}/initramfs-aux-temp/etc/initrd.defaults
578
	fi
578
	fi

Return to bug 320059