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

Collapse All | Expand All

(-)a/gen_cmdline.sh (-86 / +180 lines)
Lines 14-19 longusage() { Link Here
14
  echo
14
  echo
15
  echo "Available Options: "
15
  echo "Available Options: "
16
  echo "  Configuration settings"
16
  echo "  Configuration settings"
17
  echo "	--local			Local mode; source modules from current directory"
17
  echo "	--config=<file>	genkernel configuration file to use"
18
  echo "	--config=<file>	genkernel configuration file to use"
18
  echo "  Debug settings"
19
  echo "  Debug settings"
19
  echo "	--loglevel=<0-5>	Debug Verbosity Level"
20
  echo "	--loglevel=<0-5>	Debug Verbosity Level"
Lines 41-47 longusage() { Link Here
41
  echo "	--symlink		Manage symlinks in /boot for installed images"
42
  echo "	--symlink		Manage symlinks in /boot for installed images"
42
  echo "	--no-symlink		Do not manage symlinks"
43
  echo "	--no-symlink		Do not manage symlinks"
43
  echo "	--no-ramdisk-modules	Don't copy any modules to the ramdisk"
44
  echo "	--no-ramdisk-modules	Don't copy any 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)."
Lines 65-103 longusage() { Link Here
65
  echo "				autodetect."
65
  echo "				autodetect."
66
  echo "	--makeopts=<makeopts>	Make options such as -j2, etc..."
66
  echo "	--makeopts=<makeopts>	Make options such as -j2, etc..."
67
  echo "	--mountboot		Mount BOOTDIR automatically if mountable"
67
  echo "	--mountboot		Mount BOOTDIR automatically if mountable"
68
  echo "	--no-mountboot		Don't mount BOOTDIR automatically"  
68
  echo "	--no-mountboot		Don't mount BOOTDIR automatically"
69
  echo "	--bootdir=<dir>		Set the location of the boot-directory, default is /boot"
69
  echo "	--bootdir=<dir>		Set the location of the boot-directory, default is /boot"
70
  echo "  Initialization"
70
  echo "  Initialization"
71
  echo "	--gensplash=<theme>	Enable framebuffer splash using <theme>"
71
  echo "	--bootloader=grub	Add new kernel to GRUB configuration"
72
  echo "	--gensplash-res=<res>	Select splash theme resolutions to install"
72
  echo "	--dmraid		Include DMRAID support"
73
  echo "	--splash=<theme>	Enable framebuffer splash using <theme>"
73
  echo "	--iscsi			Include iSCSI support"
74
  echo "	--splash-res=<res>	Select splash theme resolutions to install"
74
  echo "	--luks			Include LUKS support"
75
  echo "				--> 'emerge cryptsetup-luks' with USE=-dynamic"
76
  echo "	--lvm			Include LVM support"
77
  echo "	--mdadm			Copy /etc/mdadm.conf to initramfs"
78
  echo "				(obsolete with Dracut; use --mdraid)"
79
  echo "	--multipath		Include Multipath support"
80
  echo "	--splash		Enable framebuffer splash (splashutils);"
81
  echo "				set up in /etc/conf.d/splash"
82
  echo "  Internal engine"
83
  echo "	--all-ramdisk-modules	Copy all kernel modules to the ramdisk"
75
  echo "	--do-keymap-auto	Forces keymap selection at boot"
84
  echo "	--do-keymap-auto	Forces keymap selection at boot"
76
  echo "	--no-keymap		Disables keymap selection support"
85
  echo "	--no-keymap		Disables keymap selection support"
86
  echo "	--splash=<theme>	Enable framebuffer splash using <theme>"
87
  echo "	--splash-res=<res>	Select splash theme resolutions to install"
77
  echo "	--evms			Include EVMS support"
88
  echo "	--evms			Include EVMS support"
78
  echo "				--> 'emerge evms' in the host operating system"
89
  echo "				--> 'emerge evms' in the host operating system"
79
  echo "				first"
90
  echo "				first"
80
  echo "	--evms2			Include EVMS support"
81
  echo "				--> 'emerge evms' in the host operating system"
82
  echo "				first"
83
  echo "	--lvm			Include LVM support"
84
  echo "	--lvm2			Include LVM support"
85
  echo "	--mdadm			Copy /etc/mdadm.conf to initramfs"
86
  echo "	--dmraid		Include DMRAID support"
87
  echo "	--multipath		Include Multipath support"
88
  echo "	--iscsi			Include iSCSI support"
89
  echo "	--slowusb		Enables extra pauses for slow USB CD boots"
91
  echo "	--slowusb		Enables extra pauses for slow USB CD boots"
90
  echo "	--bootloader=grub	Add new kernel to GRUB configuration"
92
  echo "	--no-busybox		Do not include busybox in the initramfs."
93
  echo "	--unionfs		Include EXPERIMENTAL support for unionfs"
94
  echo "	--netboot		Create a self-contained env in the initramfs"
95
  echo "	--real-root=<foo>	Specify a default for real_root="
91
  echo "	--linuxrc=<file>	Specifies a user created linuxrc"
96
  echo "	--linuxrc=<file>	Specifies a user created linuxrc"
92
  echo "	--busybox-config=<file>	Specifies a user created busybox config"
97
  echo "	--busybox-config=<file>	Specifies a user created busybox config"
93
  echo "	--disklabel		Include disk label and uuid support in your"
98
  echo "	--disklabel		Include disk label and uuid support in your"
94
  echo "				ramdisk"
99
  echo "				ramdisk"
95
  echo "	--luks			Include LUKS support"
100
  echo "  Dracut engine"
96
  echo "				--> 'emerge cryptsetup-luks' with USE=-dynamic"
101
  echo "	--no-dracut		Build system using old internal engine"
97
  echo "	--no-busybox    Do not include busybox in the initramfs."
102
  echo "				(will be removed in the future)"
98
  echo "	--unionfs       Include support for unionfs"
103
  echo "	--dracut-dir=<dir>	Directory of Dracut sources; if given Dracut"
99
  echo "	--netboot       Create a self-contained env in the initramfs"
104
  echo "				is run in local mode (see description of '-l'"
100
  echo "	--real-root=<foo> Specify a default for real_root="
105
  echo "				in 'man 8 dracut'); script changes current"
106
  echo "				directory to <dir>, so don't use relative"
107
  echo "				paths then"
108
  echo "	--auto			Rely on Dracut system check instead of"
109
  echo "				specifying modules by hand"
110
  echo "	--generic		Build generic initramfs instead of"
111
  echo "				default hostonly.  Notice that generic => huge"
112
  echo "	--mdraid		Include RAID support via mdadm"
113
  echo "	--plymouth		Enable EXPERIMENTAL Plymouth splash; set up"
114
  echo "				configuration in /etc/plymouth/plymouthd.conf"
115
  echo "				requires >=plymouth-0.8.3 to be installed"
116
  echo "	--gen2splash		Use old good Gentoo Splash (splashutils);"
117
  echo "				set up in /etc/conf.d/splash"
118
  echo "	--extra-modules=<modules list>"
119
  echo "				Additional Dracut modules;"
120
  echo "				see /usr/share/dracut/modules.d for possible"
121
  echo "				values; separate modules by space, e.g.:"
122
  echo "				--extra-modules=\"lvm crypt nfs\""
123
  echo "	--extra-options=<options>"
124
  echo "				Pass extra options to dracut;"
125
  echo "				see 'man 8 dracut'"
101
  echo "  Internals"
126
  echo "  Internals"
102
  echo "	--arch-override=<arch>	Force to arch instead of autodetect"
127
  echo "	--arch-override=<arch>	Force to arch instead of autodetect"
103
  echo "	--cachedir=<dir>	Override the default cache location"
128
  echo "	--cachedir=<dir>	Override the default cache location"
Lines 215-239 parse_cmdline() { Link Here
215
			CMD_BOOTDIR=`parse_opt "$*"`
240
			CMD_BOOTDIR=`parse_opt "$*"`
216
			print_info 2 "CMD_BOOTDIR: ${CMD_BOOTDIR}"
241
			print_info 2 "CMD_BOOTDIR: ${CMD_BOOTDIR}"
217
			;;
242
			;;
218
		--do-keymap-auto)
219
			CMD_DOKEYMAPAUTO=1
220
			CMD_KEYMAP=1
221
			print_info 2 "CMD_DOKEYMAPAUTO: ${CMD_DOKEYMAPAUTO}"
222
			;;
223
		--no-keymap)
224
			CMD_KEYMAP=0
225
			print_info 2 "CMD_KEYMAP: ${CMD_KEYMAP}"
226
			;;
227
		--evms)
228
			CMD_EVMS=1
229
			print_info 2 "CMD_EVMS: ${CMD_EVMS}"
230
			;;
231
		--evms2)
232
			CMD_EVMS=1
233
			print_info 2 "CMD_EVMS: ${CMD_EVMS}"
234
			echo
235
			print_warning 1 "Please use --evms, as --evms2 is deprecated."
236
			;;
237
		--lvm)
243
		--lvm)
238
			CMD_LVM=1
244
			CMD_LVM=1
239
			print_info 2 "CMD_LVM: ${CMD_LVM}"
245
			print_info 2 "CMD_LVM: ${CMD_LVM}"
Lines 245-272 parse_cmdline() { Link Here
245
			print_warning 1 "Please use --lvm, as --lvm2 is deprecated."
251
			print_warning 1 "Please use --lvm, as --lvm2 is deprecated."
246
			;;
252
			;;
247
		--mdadm)
253
		--mdadm)
248
			CMD_MDADM=1
254
			if ! [[ "${CMD_DRACUT}" = '0' ]] && ! [[ $* =~ --no-dracut ]]; then
249
			print_info 2 "CMD_MDADM: $CMD_MDADM"
255
				CMD_MDRAID=1
250
			;;
256
				print_info 2 "CMD_MDRAID: $CMD_MDRAID"
251
		--no-busybox)
257
				echo
252
			CMD_BUSYBOX=0
258
				print_warning 1 "Please use --mdraid, as --mdadm is obsolete."
253
			print_info 2 "CMD_BUSYBOX: ${CMD_BUSYBOX}"
259
			else
254
			;;
260
				CMD_MDADM=1
255
		--unionfs)
261
				print_info 2 "CMD_MDADM: $CMD_MDADM"
256
			CMD_UNIONFS=1
262
			fi
257
			print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}"
258
			;;
259
		--netboot)
260
			CMD_NETBOOT=1
261
			print_info 2 "CMD_NETBOOT: ${CMD_NETBOOT}"
262
			;;
263
		--real-root=*)
264
			CMD_REAL_ROOT=`parse_opt "$*"`
265
			print_info 2 "CMD_REAL_ROOT: ${CMD_REAL_ROOT}"
266
			;;
267
		--slowusb)
268
			CMD_SLOWUSB=1
269
			print_info 2 "CMD_SLOWUSB: ${CMD_SLOWUSB}"
270
			;;
263
			;;
271
		--dmraid)
264
		--dmraid)
272
			if [ ! -e /usr/include/libdevmapper.h ]
265
			if [ ! -e /usr/include/libdevmapper.h ]
Lines 377-385 parse_cmdline() { Link Here
377
			print_info 2 "SPLASH_THEME: ${SPLASH_THEME}"
370
			print_info 2 "SPLASH_THEME: ${SPLASH_THEME}"
378
			;;
371
			;;
379
		--splash)
372
		--splash)
380
			CMD_SPLASH=1
373
			if ! [[ "${CMD_DRACUT}" = '0' ]] && ! [[ $* =~ --no-dracut ]]; then
381
			SPLASH_THEME='default'
374
				CMD_GEN2SPLASH=1
382
			print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
375
				print_info 2 "CMD_GEN2SPLASH: ${CMD_GEN2SPLASH}"
376
				echo
377
				print_warning 1 "Please use --gen2splash, as --splash is obsolete."
378
				print_warning 1 "Set up splash in /etc/conf.d/splash"
379
			else
380
				CMD_SPLASH=1
381
				SPLASH_THEME='default'
382
				print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
383
			fi
383
			;;
384
			;;
384
		--no-splash)
385
		--no-splash)
385
			CMD_SPLASH=0
386
			CMD_SPLASH=0
Lines 407-416 parse_cmdline() { Link Here
407
			CMD_NORAMDISKMODULES=1
408
			CMD_NORAMDISKMODULES=1
408
			print_info 2 "CMD_NORAMDISKMODULES: ${CMD_NORAMDISKMODULES}"
409
			print_info 2 "CMD_NORAMDISKMODULES: ${CMD_NORAMDISKMODULES}"
409
			;;
410
			;;
410
		--all-ramdisk-modules)
411
			CMD_ALLRAMDISKMODULES=1
412
			print_info 2 "CMD_ALLRAMDISKMODULES: ${CMD_ALLRAMDISKMODULES}"
413
			;;
414
		--callback=*)
411
		--callback=*)
415
			CMD_CALLBACK=`parse_opt "$*"`
412
			CMD_CALLBACK=`parse_opt "$*"`
416
			print_info 2 "CMD_CALLBACK: ${CMD_CALLBACK}/$*"
413
			print_info 2 "CMD_CALLBACK: ${CMD_CALLBACK}/$*"
Lines 424-434 parse_cmdline() { Link Here
424
			TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
421
			TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
425
			print_info 2 "TMPDIR: ${TMPDIR}"
422
			print_info 2 "TMPDIR: ${TMPDIR}"
426
			print_info 2 "TEMP: ${TEMP}"
423
			print_info 2 "TEMP: ${TEMP}"
427
			;; 
424
			;;
428
		--postclear)
425
		--postclear)
429
			CMD_POSTCLEAR=1
426
			CMD_POSTCLEAR=1
430
			print_info 2 "CMD_POSTCLEAR: ${CMD_POSTCLEAR}"
427
			print_info 2 "CMD_POSTCLEAR: ${CMD_POSTCLEAR}"
431
			;; 
428
			;;
432
		--arch-override=*)
429
		--arch-override=*)
433
			CMD_ARCHOVERRIDE=`parse_opt "$*"`
430
			CMD_ARCHOVERRIDE=`parse_opt "$*"`
434
			print_info 2 "CMD_ARCHOVERRIDE: ${CMD_ARCHOVERRIDE}"
431
			print_info 2 "CMD_ARCHOVERRIDE: ${CMD_ARCHOVERRIDE}"
Lines 497-510 parse_cmdline() { Link Here
497
			CMD_INITRAMFS_OVERLAY=`parse_opt "$*"`
494
			CMD_INITRAMFS_OVERLAY=`parse_opt "$*"`
498
			print_info 2 "CMD_INITRAMFS_OVERLAY: ${CMD_INITRAMFS_OVERLAY}"
495
			print_info 2 "CMD_INITRAMFS_OVERLAY: ${CMD_INITRAMFS_OVERLAY}"
499
			;;
496
			;;
500
		--linuxrc=*)
501
			CMD_LINUXRC=`parse_opt "$*"`
502
			print_info 2 "CMD_LINUXRC: ${CMD_LINUXRC}"
503
			;;
504
		--busybox-config=*)
505
			CMD_BUSYBOX_CONFIG=`parse_opt "$*"`
506
			print_info 2 "CMD_BUSYBOX_CONFIG: ${CMD_BUSYBOX_CONFIG}"
507
			;;
508
		--genzimage)
497
		--genzimage)
509
			KERNEL_MAKE_DIRECTIVE_2='zImage.initrd'
498
			KERNEL_MAKE_DIRECTIVE_2='zImage.initrd'
510
			KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd'
499
			KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd'
Lines 512-524 parse_cmdline() { Link Here
512
#			ENABLE_PEGASOS_HACKS="yes"
501
#			ENABLE_PEGASOS_HACKS="yes"
513
#			print_info 2 "ENABLE_PEGASOS_HACKS: ${ENABLE_PEGASOS_HACKS}"
502
#			print_info 2 "ENABLE_PEGASOS_HACKS: ${ENABLE_PEGASOS_HACKS}"
514
			;;
503
			;;
515
		--disklabel)
516
			CMD_DISKLABEL=1
517
			print_info 2 "CMD_DISKLABEL: ${CMD_DISKLABEL}"
518
			;;
519
		--luks)
504
		--luks)
520
			CMD_LUKS=1
505
			if ! [[ "${CMD_DRACUT}" = '0' ]] && ! [[ $* =~ --no-dracut ]]; then
521
			print_info 2 "CMD_LUKS: ${CMD_LUKS}"
506
				CMD_CRYPT=1
507
				print_info 2 "CMD_CRYPT: ${CMD_CRYPT}"
508
				echo
509
				print_warning 1 "Please use --crypt, as --luks is obsolete."
510
			else
511
				CMD_LUKS=1
512
				print_info 2 "CMD_LUKS: ${CMD_LUKS}"
513
			fi
522
			;;
514
			;;
523
		--firmware)
515
		--firmware)
524
			CMD_FIRMWARE=1
516
			CMD_FIRMWARE=1
Lines 541-546 parse_cmdline() { Link Here
541
		--config=*)
533
		--config=*)
542
			print_info 2 "CMD_GK_CONFIG: `parse_opt "$*"`"
534
			print_info 2 "CMD_GK_CONFIG: `parse_opt "$*"`"
543
			;;
535
			;;
536
		--local)
537
		;;
538
539
		# Internal engine
540
		--no-busybox)
541
			CMD_BUSYBOX=0
542
			print_info 2 "CMD_BUSYBOX: ${CMD_BUSYBOX}"
543
			;;
544
		--unionfs)
545
			CMD_UNIONFS=1
546
			print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}"
547
			;;
548
		--netboot)
549
			CMD_NETBOOT=1
550
			print_info 2 "CMD_NETBOOT: ${CMD_NETBOOT}"
551
			;;
552
		--real-root=*)
553
			CMD_REAL_ROOT=`parse_opt "$*"`
554
			print_info 2 "CMD_REAL_ROOT: ${CMD_REAL_ROOT}"
555
			;;
556
		--slowusb)
557
			CMD_SLOWUSB=1
558
			print_info 2 "CMD_SLOWUSB: ${CMD_SLOWUSB}"
559
			;;
560
		--do-keymap-auto)
561
			CMD_DOKEYMAPAUTO=1
562
			CMD_KEYMAP=1
563
			print_info 2 "CMD_DOKEYMAPAUTO: ${CMD_DOKEYMAPAUTO}"
564
			;;
565
		--no-keymap)
566
			CMD_KEYMAP=0
567
			print_info 2 "CMD_KEYMAP: ${CMD_KEYMAP}"
568
			;;
569
		--evms)
570
			CMD_EVMS=1
571
			print_info 2 "CMD_EVMS: ${CMD_EVMS}"
572
			;;
573
		--evms2)
574
			CMD_EVMS=1
575
			print_info 2 "CMD_EVMS: ${CMD_EVMS}"
576
			echo
577
			print_warning 1 "Please use --evms, as --evms2 is deprecated."
578
			;;
579
		--disklabel)
580
			CMD_DISKLABEL=1
581
			print_info 2 "CMD_DISKLABEL: ${CMD_DISKLABEL}"
582
			;;
583
		--all-ramdisk-modules)
584
			CMD_ALLRAMDISKMODULES=1
585
			print_info 2 "CMD_ALLRAMDISKMODULES: ${CMD_ALLRAMDISKMODULES}"
586
			;;
587
		--linuxrc=*)
588
			CMD_LINUXRC=`parse_opt "$*"`
589
			print_info 2 "CMD_LINUXRC: ${CMD_LINUXRC}"
590
			;;
591
		--busybox-config=*)
592
			CMD_BUSYBOX_CONFIG=`parse_opt "$*"`
593
			print_info 2 "CMD_BUSYBOX_CONFIG: ${CMD_BUSYBOX_CONFIG}"
594
			;;
595
596
	   	# Dracut engine
597
		--no-dracut)
598
			CMD_DRACUT=0
599
			print_info 2 "CMD_DRACUT: ${CMD_DRACUT}"
600
			;;
601
		--dracut-dir=*)
602
			CMD_DRACUT_DIR=`parse_opt "$*"`
603
			print_info 2 "CMD_DRACUT_DIR: ${CMD_DRACUT_DIR}"
604
			;;
605
		--auto)
606
			CMD_AUTO=1
607
			print_info 2 "CMD_AUTO: ${CMD_AUTO}"
608
			;;
609
		--generic)
610
			CMD_GENERIC=1
611
			print_info 2 "CMD_GENERIC: ${CMD_GENERIC}"
612
			;;
613
		--mdraid)
614
			CMD_MDRAID=1
615
			print_info 2 "CMD_MDRAID: ${CMD_MDRAID}"
616
			;;
617
		--crypt)
618
			CMD_CRYPT=1
619
			print_info 2 "CMD_CRYPT: ${CMD_CRYPT}"
620
			;;
621
		--plymouth)
622
			CMD_PLYMOUTH=1
623
			print_info 2 "CMD_PLYMOUTH: ${CMD_PLYMOUTH}"
624
			;;
625
		--gen2splash)
626
			CMD_GEN2SPLASH=1
627
			print_info 2 "CMD_GEN2SPLASH: ${CMD_GEN2SPLASH}"
628
			;;
629
		--extra-modules=*)
630
			CMD_EXTRA_MODULES=`parse_opt "$*"`
631
			print_info 2 "CMD_EXTRA_MODULES: ${CMD_EXTRA_MODULES}"
632
			;;
633
		--extra-options=*)
634
			CMD_EXTRA_OPTIONS=`parse_opt "$*"`
635
			print_info 2 "CMD_EXTRA_OPTIONS: ${CMD_EXTRA_OPTIONS}"
636
			;;
637
544
		all)
638
		all)
545
			BUILD_KERNEL=1
639
			BUILD_KERNEL=1
546
			BUILD_MODULES=1
640
			BUILD_MODULES=1
(-)a/gen_determineargs.sh (-2 / +12 lines)
Lines 97-103 determine_real_args() { Link Here
97
	set_config_with_override 1 MOUNTBOOT            CMD_MOUNTBOOT
97
	set_config_with_override 1 MOUNTBOOT            CMD_MOUNTBOOT
98
	set_config_with_override 1 BUILD_STATIC         CMD_STATIC
98
	set_config_with_override 1 BUILD_STATIC         CMD_STATIC
99
	set_config_with_override 1 SAVE_CONFIG          CMD_SAVE_CONFIG
99
	set_config_with_override 1 SAVE_CONFIG          CMD_SAVE_CONFIG
100
 	set_config_with_override 1 SYMLINK              CMD_SYMLINK
100
	set_config_with_override 1 SYMLINK              CMD_SYMLINK
101
	set_config_with_override 2 INSTALL_MOD_PATH     CMD_INSTALL_MOD_PATH
101
	set_config_with_override 2 INSTALL_MOD_PATH     CMD_INSTALL_MOD_PATH
102
	set_config_with_override 1 OLDCONFIG            CMD_OLDCONFIG
102
	set_config_with_override 1 OLDCONFIG            CMD_OLDCONFIG
103
	set_config_with_override 1 LVM                  CMD_LVM
103
	set_config_with_override 1 LVM                  CMD_LVM
Lines 120-125 determine_real_args() { Link Here
120
	set_config_with_override 1 KEYMAP               CMD_KEYMAP               "yes"
120
	set_config_with_override 1 KEYMAP               CMD_KEYMAP               "yes"
121
	set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
121
	set_config_with_override 1 DOKEYMAPAUTO         CMD_DOKEYMAPAUTO
122
	set_config_with_override 2 BUSYBOX_CONFIG       CMD_BUSYBOX_CONFIG
122
	set_config_with_override 2 BUSYBOX_CONFIG       CMD_BUSYBOX_CONFIG
123
	set_config_with_override 1 AUTO                 CMD_AUTO
124
	set_config_with_override 1 GENERIC              CMD_GENERIC
125
	set_config_with_override 1 DRACUT               CMD_DRACUT               "yes"
126
	set_config_with_override 2 DRACUT_DIR           CMD_DRACUT_DIR
127
	set_config_with_override 1 MDRAID               CMD_MDRAID
128
	set_config_with_override 1 CRYPT                CMD_CRYPT
129
	set_config_with_override 1 PLYMOUTH             CMD_PLYMOUTH
130
	set_config_with_override 1 GEN2SPLASH           CMD_GEN2SPLASH
131
	set_config_with_override 2 EXTRA_MODULES        CMD_EXTRA_MODULES
132
	set_config_with_override 2 EXTRA_OPTIONS        CMD_EXTRA_OPTIONS
123
133
124
	BOOTDIR=`arch_replace "${BOOTDIR}"`
134
	BOOTDIR=`arch_replace "${BOOTDIR}"`
125
	BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
135
	BOOTDIR=${BOOTDIR%/}    # Remove any trailing slash
Lines 133-139 determine_real_args() { Link Here
133
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
143
	BLKID_BINCACHE=`cache_replace "${BLKID_BINCACHE}"`
134
	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
144
	FUSE_BINCACHE=`cache_replace "${FUSE_BINCACHE}"`
135
	UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"`
145
	UNIONFS_FUSE_BINCACHE=`cache_replace "${UNIONFS_FUSE_BINCACHE}"`
136
  
146
137
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
147
	DEFAULT_KERNEL_CONFIG=`arch_replace "${DEFAULT_KERNEL_CONFIG}"`
138
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
148
	BUSYBOX_CONFIG=`arch_replace "${BUSYBOX_CONFIG}"`
139
	BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"`
149
	BUSYBOX_BINCACHE=`arch_replace "${BUSYBOX_BINCACHE}"`
(-)a/gen_dracut.sh (+87 lines)
Line 0 Link Here
1
#!/bin/bash
2
# $Id$
3
4
BASIC_MODULES=dash\ i18n\ kernel-modules\ resume\ rootfs-block\ terminfo
5
BASIC_MODULES+=\ udev-rules\ uswsusp\ base
6
MODULES=lvm\ dmraid\ iscsi\ mdraid\ crypt\ multipath\ plymouth\ gen2splash
7
8
dracut_modules() {
9
	local a=()
10
11
	isTrue "${PLYMOUTH}" && isTrue "${GEN2SPLASH}" && gen_die 'Gentoo Splash and Plymouth selected!  You cannot choose both splash engines.'
12
	isTrue "${EVMS}" && gen_die 'EVMS is no longer supported.  If you *really* need it, file a bug report and we bring it back to life.'
13
	isTrue "${UNIONFS}" && gen_die 'UnionFS not yet supported.'
14
15
	for var in ${MODULES}
16
	do
17
		var="${var^^}"
18
		isTrue "${!var}" && a+=(${var,,})
19
	done
20
21
	a+=(${EXTRA_MODULES})
22
23
	if ! isTrue "${AUTO}"
24
	then
25
		local basic
26
		isTrue "${NORAMDISKMODULES}" &&
27
				basic="${BASIC_MODULES/ kernel-modules / }" \
28
				|| basic="${BASIC_MODULES}"
29
		echo -n "-m '${basic}'"
30
	fi
31
32
	[[ ${a[*]} ]] && echo -n " -a '${a[*]}'"
33
}
34
35
create_initramfs() {
36
	local tmprd="${TMPDIR}/initramfs-${KV}" opts='-f' add_files=()
37
38
	print_info 1 'initramfs: >> Initializing Dracut...'
39
40
	if isTrue "${GENERIC}"
41
	then
42
		print_info 1 '           >> Will build generic (read: huge) initramfs'
43
	else
44
		opts+=\ -H
45
	fi
46
47
	if isTrue "${NORAMDISKMODULES}"
48
	then
49
		print_info 1 '           >> Not copying kernel modules and firmware...'
50
		opts+=\ --no-kernel
51
	else
52
		isTrue "${FIRMWARE}" && opts+=" --fwdir ${FIRMWARE_DIR}"
53
		[[ ${FIRMWARE_FILES} ]] && add_files+=(${FIRMWARE_FILES})
54
	fi
55
56
	[[ ${DRACUT_DIR} ]] && opts="-l ${opts}"
57
	[[ ${INITRAMFS_OVERLAY} ]] && opts+=" ${INITRAMFS_OVERLAY} /"
58
	[[ ${add_files[*]} ]] && opts+=" -I '${add_files[*]}'"
59
	opts+=" ${EXTRA_OPTIONS}"
60
	opts+=" $(dracut_modules)"
61
62
	print_info 1 "           >> dracut ${opts} '${tmprd}' '${KV}'"
63
	if [[ ${DRACUT_DIR} ]]; then
64
		cd "${DRACUT_DIR}"
65
		eval ./dracut ${opts} -v \'${tmprd}\' \'${KV}\'
66
		cd - >/dev/null
67
	else
68
		eval dracut ${opts} \'${tmprd}\' \'${KV}\'
69
	fi
70
71
	if isTrue "${INTEGRATED_INITRAMFS}"
72
	then
73
		mv ${tmprd} ${tmprd}.cpio.gz
74
		sed -i '/^.*CONFIG_INITRAMFS_SOURCE=.*$/d' ${KERNEL_DIR}/.config
75
		echo -e "CONFIG_INITRAMFS_SOURCE=\"${tmprd}.cpio.gz\"\nCONFIG_INITRAMFS_ROOT_UID=0\nCONFIG_INITRAMFS_ROOT_GID=0" \
76
				>> ${KERNEL_DIR}/.config
77
	fi
78
79
	if ! isTrue "${CMD_NOINSTALL}"
80
	then
81
		if ! isTrue "${INTEGRATED_INITRAMFS}"
82
		then
83
			copy_image_with_preserve initramfs "${tmprd}" \
84
				"initramfs-${KNAME}-${ARCH}-${KV}"
85
		fi
86
	fi
87
}
(-)a/genkernel (-14 / +31 lines)
Lines 23-28 parse_opt() { Link Here
23
	esac
23
	esac
24
}
24
}
25
25
26
case "$*" in
27
	*--local*) GK_LOCAL_MODE=1 ;;
28
esac
29
26
# We don't know where our config is, so we check for it, and default to using
30
# We don't know where our config is, so we check for it, and default to using
27
# /etc/genkernel.conf if nobody has specified one.
31
# /etc/genkernel.conf if nobody has specified one.
28
case "$*" in
32
case "$*" in
Lines 32-38 case "$*" in Link Here
32
esac
36
esac
33
37
34
# Pull in our configuration
38
# Pull in our configuration
39
[ "${GK_LOCAL_MODE}" = 1 ] && CMD_GK_CONFIG=./genkernel.conf
35
source ${CMD_GK_CONFIG:-/etc/genkernel.conf} || small_die "Could not read /etc/genkernel.conf"
40
source ${CMD_GK_CONFIG:-/etc/genkernel.conf} || small_die "Could not read /etc/genkernel.conf"
41
[ "${GK_LOCAL_MODE}" = 1 ] && GK_SHARE=.
36
42
37
# Start sourcing other scripts
43
# Start sourcing other scripts
38
source ${GK_SHARE}/gen_funcs.sh || small_die "Could not read ${GK_SHARE}/gen_funcs.sh"
44
source ${GK_SHARE}/gen_funcs.sh || small_die "Could not read ${GK_SHARE}/gen_funcs.sh"
Lines 41-47 source ${GK_SHARE}/gen_arch.sh || gen_die "Could not read ${GK_SHARE}/gen_arch.s Link Here
41
source ${GK_SHARE}/gen_determineargs.sh || gen_die "Could not read ${GK_SHARE}/gen_determineargs.sh"
47
source ${GK_SHARE}/gen_determineargs.sh || gen_die "Could not read ${GK_SHARE}/gen_determineargs.sh"
42
source ${GK_SHARE}/gen_compile.sh || gen_die "Could not read ${GK_SHARE}/gen_compile.sh"
48
source ${GK_SHARE}/gen_compile.sh || gen_die "Could not read ${GK_SHARE}/gen_compile.sh"
43
source ${GK_SHARE}/gen_configkernel.sh || gen_die "Could not read ${GK_SHARE}/gen_configkernel.sh"
49
source ${GK_SHARE}/gen_configkernel.sh || gen_die "Could not read ${GK_SHARE}/gen_configkernel.sh"
44
source ${GK_SHARE}/gen_initramfs.sh || gen_die "Could not read ${GK_SHARE}/gen_initramfs.sh"
50
if isTrue "${DRACUT}"
51
then
52
	source ${GK_SHARE}/gen_initramfs.sh || gen_die "Could not read ${GK_SHARE}/gen_initramfs.sh"
53
else
54
	source ${GK_SHARE}/gen_dracut.sh || gen_die "Could not read ${GK_SHARE}/gen_dracut.sh"
55
fi
45
source ${GK_SHARE}/gen_moddeps.sh || gen_die "Could not read ${GK_SHARE}/gen_moddeps.sh"
56
source ${GK_SHARE}/gen_moddeps.sh || gen_die "Could not read ${GK_SHARE}/gen_moddeps.sh"
46
source ${GK_SHARE}/gen_package.sh || gen_die "Could not read ${GK_SHARE}/gen_package.sh"
57
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"
58
source ${GK_SHARE}/gen_bootloader.sh || gen_die "Could not read ${GK_SHARE}/gen_bootloader.sh"
Lines 94-100 fi Link Here
94
105
95
clear_log
106
clear_log
96
NORMAL=${GOOD} print_info 1 "Gentoo Linux Genkernel; Version ${GK_V}${NORMAL}"
107
NORMAL=${GOOD} print_info 1 "Gentoo Linux Genkernel; Version ${GK_V}${NORMAL}"
97
print_info 1 "Running with options: ${Options}"
108
[ "${GK_LOCAL_MODE}" = 1 ] && localmsg=' in local mode'
109
print_info 1 "Running${localmsg} with options: ${Options}"
98
echo
110
echo
99
111
100
# Set ${ARCH}
112
# Set ${ARCH}
Lines 122-130 set_kernel_arch Link Here
122
134
123
[ ! -f "${TEMP}" ] && mkdir -p "${TEMP}"
135
[ ! -f "${TEMP}" ] && mkdir -p "${TEMP}"
124
136
125
setup_cache_dir
137
if ! isTrue "${DRACUT}"
126
138
then
127
check_distfiles
139
	setup_cache_dir
140
	check_distfiles
141
fi
128
142
129
dump_debugcache
143
dump_debugcache
130
144
Lines 279-295 fi Link Here
279
293
280
if [ "${BUILD_RAMDISK}" -eq '1' ]
294
if [ "${BUILD_RAMDISK}" -eq '1' ]
281
then
295
then
282
	[ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
296
	if ! isTrue "${DRACUT}"
283
284
	if [ "${BUSYBOX}" -eq '1' ]
285
	then
297
	then
286
		# Compile Busybox
298
		[ "${DISKLABEL}" -eq '1' ] && compile_e2fsprogs
287
		compile_busybox
288
	fi
289
299
290
	if isTrue "${UNIONFS}"
300
		if [ "${BUSYBOX}" -eq '1' ]
291
	then
301
		then
292
		compile_unionfs_fuse
302
			# Compile Busybox
303
			compile_busybox
304
		fi
305
306
		if isTrue "${UNIONFS}"
307
		then
308
			compile_unionfs_fuse
309
		fi
293
	fi
310
	fi
294
311
295
	# Compile initramfs
312
	# Compile initramfs
(-)a/genkernel.conf (-10 / +20 lines)
Lines 53-69 USECOLOR="yes" Link Here
53
# compile static LVM binaries if static ones do not exist.
53
# compile static LVM binaries if static ones do not exist.
54
# LVM="no"
54
# LVM="no"
55
55
56
# Add in EVMS support from static binaries if they exist on the system: you
57
# should run "emerge evms" first.
58
# EVMS="no"
59
60
# Add DMRAID support.
56
# Add DMRAID support.
61
# DMRAID="no"
57
# DMRAID="no"
62
58
63
# Include (or suppresses the inclusion of) busybox in the initrd or initramfs.
64
# If included, busybox is rebuilt if the cached copy is out of date.
65
# BUSYBOX="yes"
66
67
# Copy /etc/mdadm.conf to initramfs.
59
# Copy /etc/mdadm.conf to initramfs.
68
# MDADM="no"
60
# MDADM="no"
69
61
Lines 80-90 USECOLOR="yes" Link Here
80
# Specify specific firmware files to include. This overrides FIRMWARE_DIR
72
# Specify specific firmware files to include. This overrides FIRMWARE_DIR
81
# FIRMWARE_FILES=""
73
# FIRMWARE_FILES=""
82
74
75
# Add new kernel to grub?
76
# BOOTLOADER="grub"
77
78
# ==============Internal engine===============
79
#
83
# Enable disklabel support (copies blkid to initrd)
80
# Enable disklabel support (copies blkid to initrd)
84
DISKLABEL="yes"
81
DISKLABEL="yes"
85
82
86
# Add new kernel to grub?
83
# Include (or suppresses the inclusion of) busybox in the initrd or initramfs.
87
# BOOTLOADER="grub"
84
# If included, busybox is rebuilt if the cached copy is out of date.
85
# BUSYBOX="yes"
86
87
# Add in EVMS support from static binaries if they exist on the system: you
88
# should run "emerge evms" first.
89
# EVMS="no"
90
91
# ===============Dracut engine================
92
93
# Build system using Dracut [yes] or old internal engine [no]. "yes" is default.
94
# DRACUT="yes"
95
96
# Include RAID support via mdadm
97
# MDRAID="no"
88
98
89
# =========Low Level Compile Settings=========
99
# =========Low Level Compile Settings=========
90
#
100
#

Return to bug 330127