Added a patch from Joshua Kinard <kumba@gentoo.org> to clean up the Pegasos hacks...
[genkernel.git] / gen_cmdline.sh
1 #!/bin/bash
2
3 longusage() {
4   echo "Gentoo Linux Genkernel ${GK_V}"
5   echo "Usage: "
6   echo "  genkernel [options] action"
7   echo
8   echo "Available Actions: "
9   echo "  all                           Build all steps"
10   echo "  bzImage                       Build only the kernel"
11   echo "  kernel                        Build only the kernel and modules"
12   echo "  initrd                        Build only the initrd"
13   echo
14   echo "Available Options: "
15   echo "  Configuration settings"
16   echo "        --config=<file> genkernel configuration file to use"
17   echo "  Debug settings"
18   echo "        --loglevel=<0-5>        Debug Verbosity Level"
19   echo "        --logfile=<outfile>     Output file for debug info"
20   echo "        --color                 Output debug in color"
21   echo "        --no-color              Do not output debug in color"
22   echo "  Kernel Configuration settings"
23   echo "        --menuconfig            Run menuconfig after oldconfig"
24   echo "        --no-menuconfig         Do not run menuconfig after oldconfig"
25   echo "        --gconfig               Run gconfig after oldconfig"
26   echo "        --xconfig               Run xconfig after oldconfig"
27   echo "        --save-config           Save the configuration to /etc/kernels"
28   echo "        --no-save-config        Don't save the configuration to /etc/kernels"
29   echo "  Kernel Compile settings"
30   echo "        --clean                 Run make clean before compilation"
31   echo "        --mrproper              Run make mrproper before compilation"
32   echo "        --no-clean              Do not run make clean before compilation"
33   echo "        --no-mrproper           Do not run make mrproper before compilation"
34   echo "        --oldconfig             Implies --no-clean and runs a 'make oldconfig'"
35   echo "        --gensplash             Install framebuffer splash support into initramfs"
36   echo "        --splash                Install framebuffer splash support into initramfs"
37   echo "        --no-splash             Do not install framebuffer splash"
38   echo "        --install               Install the kernel after building"
39   echo "        --no-install            Do not install the kernel after building"
40   echo "        --symlink               Manage symlinks in /boot for installed images"
41   echo "        --no-symlink            Do not manage symlinks"
42   echo "        --no-initrdmodules      Don't copy any modules to the initrd"
43   echo "        --callback=<...>        Run the specified arguments after the"
44   echo "                                kernel and modules have been compiled"
45   echo "        --static                Build a static (monolithic kernel)."
46   echo "        --initramfs             Builds initramfs before kernel and embeds it"
47   echo "                                into the kernel."
48   echo "  Kernel settings"
49   echo "        --kerneldir=<dir>       Location of the kernel sources"
50   echo "        --kernel-config=<file>  Kernel configuration file to use for compilation"
51   echo "        --module-prefix=<dir>   Prefix to kernel module destination, modules"
52   echo "                                will be installed in <prefix>/lib/modules"
53   echo "  Low-Level Compile settings"
54   echo "        --kernel-cc=<compiler>  Compiler to use for kernel (e.g. distcc)"
55   echo "        --kernel-as=<assembler> Assembler to use for kernel"
56   echo "        --kernel-ld=<linker>    Linker to use for kernel"
57   echo "        --kernel-cross-compile=<cross var> CROSS_COMPILE kernel variable"
58   echo "        --kernel-make=<makeprg> GNU Make to use for kernel"
59   echo "        --utils-cc=<compiler>   Compiler to use for utilities"
60   echo "        --utils-as=<assembler>  Assembler to use for utils"
61   echo "        --utils-ld=<linker>     Linker to use for utils"
62   echo "        --utils-make=<makeprog> GNU Make to use for utils"
63   echo "        --utils-cross-compile=<cross var> CROSS_COMPILE utils variable"
64   echo "        --utils-arch=<arch>     Force to arch for utils only instead of"
65   echo "                                autodetect."
66   echo "        --makeopts=<makeopts>   Make options such as -j2, etc..."
67   echo "        --mountboot             Mount BOOTDIR automatically if mountable"
68   echo "        --no-mountboot          Don't mount BOOTDIR automatically"  
69   echo "        --bootdir=<dir>         Set the location of the boot-directory, default is /boot"
70   echo "  Initialization"
71   echo "        --gensplash=<theme>     Enable framebuffer splash using <theme>"
72   echo "        --gensplash-res=<res>   Select splash theme resolutions to install"
73   echo "        --splash=<theme>        Enable framebuffer splash using <theme>"
74   echo "        --splash-res=<res>      Select splash theme resolutions to install"
75   echo "        --do-keymap-auto        Forces keymap selection at boot"
76   echo "        --evms                  Include EVMS support"
77   echo "                                --> 'emerge evms' in the host operating system"
78   echo "                                first"
79   echo "        --evms2                 Include EVMS support"
80   echo "                                --> 'emerge evms' in the host operating system"
81   echo "                                first"
82   echo "        --lvm                   Include LVM support"
83   echo "        --lvm2                  Include LVM support"
84   echo "        --mdadm                 Copy /etc/mdadm.conf to initramfs"
85   echo "        --dmraid                Include DMRAID support"
86   echo "        --slowusb               Enables extra pauses for slow USB CD boots"
87   echo "        --bootloader=grub       Add new kernel to GRUB configuration"
88   echo "        --linuxrc=<file>        Specifies a user created linuxrc"
89   echo "        --disklabel             Include disk label and uuid support in your"
90   echo "                                initrd"
91   echo "        --luks                  Include LUKS support"
92   echo "                                --> 'emerge cryptsetup-luks' with USE=-dynamic"
93   echo "  Internals"
94   echo "        --arch-override=<arch>  Force to arch instead of autodetect"
95   echo "        --cachedir=<dir>        Override the default cache location"
96   echo "        --tempdir=<dir>         Location of Genkernel's temporary directory"
97   echo "        --postclear             Clear all tmp files and caches after genkernel has run"
98   echo "  Output Settings"
99   echo "        --kernname=<...>        Tag the kernel and initrd with a name:"
100   echo "                                If not defined the option defaults to"
101   echo "                                'genkernel'"
102   echo "        --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:"
103   echo "                                No modules outside of the initrd will be"
104   echo "                                included..."
105   echo "        --modulespackage=<tbz2> File to output a .tar.bz2'd modules after the"
106   echo "                                callbacks have run"
107   echo "        --kerncache=<tbz2>      File to output a .tar.bz2'd kernel contents"
108   echo "                                of /lib/modules/ and the kernel config"
109   echo "                                NOTE: This is created before the callbacks"
110   echo "                                are run!"
111   echo "        --no-kernel-sources     This option is only valid if kerncache is"
112   echo "                                defined. If there is a valid kerncache no checks"
113   echo "                                will be made against a kernel source tree"
114   echo "        --initramfs-overlay=<dir>"
115   echo "                                Directory structure to include in the initramfs,"
116   echo "                                only available on 2.6 kernels"
117 }
118
119 usage() {
120   echo "Gentoo Linux Genkernel ${GK_V}"
121   echo "Usage: "
122   echo "        genkernel [options] all"
123   echo
124   echo 'Some useful options:'
125   echo '        --menuconfig            Run menuconfig after oldconfig'
126   echo '        --no-clean              Do not run make clean before compilation'
127   echo '        --no-mrproper           Do not run make mrproper before compilation,'
128   echo '                                this is implied by --no-clean.'
129   echo
130   echo 'For a detailed list of supported options and flags; issue:'
131   echo '        genkernel --help'
132 }
133
134 parse_cmdline() {
135         case "$*" in
136                 --kernel-cc=*)
137                         CMD_KERNEL_CC=`parse_opt "$*"`
138                         print_info 2 "CMD_KERNEL_CC: ${CMD_KERNEL_CC}"
139                         ;;
140                 --kernel-ld=*)
141                         CMD_KERNEL_LD=`parse_opt "$*"`
142                         print_info 2 "CMD_KERNEL_LD: ${CMD_KERNEL_LD}"
143                         ;;
144                 --kernel-as=*)
145                         CMD_KERNEL_AS=`parse_opt "$*"`
146                         print_info 2 "CMD_KERNEL_AS: ${CMD_KERNEL_AS}"
147                         ;;
148                 --kernel-make=*)
149                         CMD_KERNEL_MAKE=`parse_opt "$*"`
150                         print_info 2 "CMD_KERNEL_MAKE: ${CMD_KERNEL_MAKE}"
151                         ;;
152                 --kernel-cross-compile=*)
153                         CMD_KERNEL_CROSS_COMPILE=`parse_opt "$*"`
154                         CMD_KERNEL_CROSS_COMPILE=$(echo ${CMD_KERNEL_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')
155                         print_info 2 "CMD_KERNEL_CROSS_COMPILE: ${CMD_KERNEL_CROSS_COMPILE}"
156                         ;;
157                 --utils-cc=*)
158                         CMD_UTILS_CC=`parse_opt "$*"`
159                         print_info 2 "CMD_UTILS_CC: ${CMD_UTILS_CC}"
160                         ;;
161                 --utils-ld=*)
162                         CMD_UTILS_LD=`parse_opt "$*"`
163                         print_info 2 "CMD_UTILS_LD: ${CMD_UTILS_LD}"
164                         ;;
165                 --utils-as=*)
166                         CMD_UTILS_AS=`parse_opt "$*"`
167                         print_info 2 "CMD_UTILS_AS: ${CMD_UTILS_AS}"
168                         ;;
169                 --utils-make=*)
170                         CMD_UTILS_MAKE=`parse_opt "$*"`
171                         print_info 2 "CMD_UTILS_MAKE: ${CMD_UTILS_MAKE}"
172                         ;;
173                 --utils-cross-compile=*)
174                         CMD_UTILS_CROSS_COMPILE=`parse_opt "$*"`
175                         CMD_UTILS_CROSS_COMPILE=$(echo ${CMD_UTILS_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')
176                         print_info 2 "CMD_UTILS_CROSS_COMPILE: ${CMD_UTILS_CROSS_COMPILE}"
177                         ;;
178                 --utils-arch=*)
179                         CMD_UTILS_ARCH=`parse_opt "$*"`
180                         print_info 2 "CMD_UTILS_ARCH: ${CMD_ARCHOVERRIDE}"
181                         ;;
182                 --makeopts=*)
183                         CMD_MAKEOPTS=`parse_opt "$*"`
184                         print_info 2 "CMD_MAKEOPTS: ${CMD_MAKEOPTS}"
185                         ;;
186                 --mountboot)
187                         CMD_MOUNTBOOT=1
188                         print_info 2 "CMD_MOUNTBOOT: ${CMD_MOUNTBOOT}"
189                         ;;
190                 --no-mountboot)
191                         CMD_MOUNTBOOT=0
192                         print_info 2 "CMD_MOUNTBOOT: ${CMD_MOUNTBOOT}"
193                         ;;
194                 --bootdir=*)
195                         BOOTDIR=`parse_opt "$*"`
196                         print_info 2 "BOOTDIR: ${BOOTDIR}"
197                         ;;
198                 --do-keymap-auto)
199                         CMD_DOKEYMAPAUTO=1
200                         print_info 2 "CMD_DOKEYMAPAUTO: ${CMD_DOKEYMAPAUTO}"
201                         ;;
202                 --evms)
203                         CMD_EVMS=1
204                         print_info 2 "CMD_EVMS: ${CMD_EVMS}"
205                         ;;
206                 --evms2)
207                         CMD_EVMS=1
208                         print_info 2 "CMD_EVMS: ${CMD_EVMS}"
209                         echo
210                         print_warning 1 "Please use --evms, as --evms2 is deprecated."
211                         ;;
212                 --unionfs)
213                         CMD_UNIONFS=1
214                         print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}"
215                         echo
216                         print_warning 1 "WARNING: unionfs support is in active development and is not meant for general"
217                         print_warning 1 "use."
218                         print_warning 1 "Bug Reports without patches/fixes will be ignored."
219                         print_warning 1 "Use at your own risk as this could blow up your system."
220                         print_warning 1 "This code is subject to change at any time."
221                         echo
222                         ;;
223                 --lvm)
224                         CMD_LVM=1
225                         print_info 2 "CMD_LVM: ${CMD_LVM}"
226                         ;;
227                 --lvm2)
228                         CMD_LVM=1
229                         print_info 2 "CMD_LVM: ${CMD_LVM}"
230                         echo
231                         print_warning 1 "Please use --lvm, as --lvm2 is deprecated."
232                         ;;
233                 --mdadm)
234                         CMD_MDADM=1
235                         print_info 2 "CMD_MDADM: $CMD_MDADM"
236                         ;;
237                 --no-busybox)
238                         CMD_NO_BUSYBOX=1
239                         print_info 2 "CMD_NO_BUSYBOX: ${CMD_NO_BUSYBOX}"
240                         ;;
241                 --slowusb)
242                         CMD_SLOWUSB=1
243                         print_info 2 "CMD_SLOWUSB: ${CMD_SLOWUSB}"
244                         ;;
245                 --dmraid)
246                         if [ ! -e /usr/include/libdevmapper.h ]
247                         then
248                                 echo 'Error: --dmraid requires device-mapper to be installed'
249                                 echo '           on the host system; try "emerge device-mapper".'
250                                 exit 1
251                         fi
252                         CMD_DMRAID=1
253                         print_info 2 "CMD_DMRAID: ${CMD_DMRAID}"
254                         ;;
255                 --bootloader=*)
256                         CMD_BOOTLOADER=`parse_opt "$*"`
257                         print_info 2 "CMD_BOOTLOADER: ${CMD_BOOTLOADER}"
258                         ;;
259                 --loglevel=*)
260                         CMD_LOGLEVEL=`parse_opt "$*"`
261                         LOGLEVEL="${CMD_LOGLEVEL}"
262                         print_info 2 "CMD_LOGLEVEL: ${CMD_LOGLEVEL}"
263                         ;;
264                 --menuconfig)
265                         TERM_LINES=`stty -a | head -n 1 | cut -d\  -f5 | cut -d\; -f1`
266                         TERM_COLUMNS=`stty -a | head -n 1 | cut -d\  -f7 | cut -d\; -f1`
267                         if [[ TERM_LINES -lt 19 || TERM_COLUMNS -lt 80 ]]
268                         then
269                                 echo "Error: You need a terminal with at least 80 columns"
270                                 echo "           and 19 lines for --menuconfig; try --nomenuconfig..."
271                                 exit 1
272                         fi
273                         CMD_MENUCONFIG=1
274                         print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}"
275                         ;;
276                 --no-menuconfig)
277                         CMD_MENUCONFIG=0
278                         print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}"
279                         ;;
280                 --gconfig)
281                         CMD_GCONFIG=1
282                         print_info 2 "CMD_GCONFIG: ${CMD_GCONFIG}"
283                         ;;
284                 --xconfig)
285                         CMD_XCONFIG=1
286                         print_info 2 "CMD_XCONFIG: ${CMD_XCONFIG}"
287                         ;;
288                 --save-config)
289                         CMD_SAVE_CONFIG=1
290                         print_info 2 "CMD_SAVE_CONFIG: ${CMD_SAVE_CONFIG}"
291                         ;;
292                 --no-save-config)
293                         CMD_SAVE_CONFIG=0
294                         print_info 2 "CMD_SAVE_CONFIG: ${CMD_SAVE_CONFIG}"
295                         ;;
296                 --mrproper)
297                         CMD_MRPROPER=1
298                         print_info 2 "CMD_MRPROPER: ${CMD_MRPROPER}"
299                         ;;
300                 --no-mrproper)
301                         CMD_MRPROPER=0
302                         print_info 2 "CMD_MRPROPER: ${CMD_MRPROPER}"
303                         ;;
304                 --clean)
305                         CMD_CLEAN=1
306                         print_info 2 "CMD_CLEAN: ${CMD_CLEAN}"
307                         ;;
308                 --no-clean)
309                         CMD_CLEAN=0
310                         print_info 2 "CMD_CLEAN: ${CMD_CLEAN}"
311                         ;;
312                 --oldconfig)
313                         CMD_CLEAN=0
314                         CMD_OLDCONFIG=1
315                         print_info 2 "CMD_CLEAN: ${CMD_CLEAN}"
316                         print_info 2 "CMD_OLDCONFIG: ${CMD_OLDCONFIG}"
317                         ;;
318                 --gensplash=*)
319                         CMD_SPLASH=1
320                         SPLASH_THEME=`parse_opt "$*"`
321                         print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
322                         print_info 2 "SPLASH_THEME: ${SPLASH_THEME}"
323                         echo
324                         print_warning 1 "Please use --splash, as --gensplash is deprecated."
325                         ;;
326                 --gensplash)
327                         CMD_SPLASH=1
328                         SPLASH_THEME='default'
329                         print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
330                         echo
331                         print_warning 1 "Please use --splash, as --gensplash is deprecated."
332                         ;;
333                 --splash=*)
334                         CMD_SPLASH=1
335                         SPLASH_THEME=`parse_opt "$*"`
336                         print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
337                         print_info 2 "SPLASH_THEME: ${SPLASH_THEME}"
338                         ;;
339                 --splash)
340                         CMD_SPLASH=1
341                         SPLASH_THEME='default'
342                         print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
343                         ;;
344                 --no-splash)
345                         CMD_SPLASH=0
346                         print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
347                         ;;
348                 --gensplash-res=*)
349                         SPLASH_RES=`parse_opt "$*"`
350                         print_info 2 "SPLASH_RES: ${SPLASH_RES}"
351                         echo
352                         print_warning 1 "Please use --splash-res, as --gensplash-res is deprecated."
353                         ;;
354                 --splash-res=*)
355                         SPLASH_RES=`parse_opt "$*"`
356                         print_info 2 "SPLASH_RES: ${SPLASH_RES}"
357                         ;;
358                 --install)
359                         CMD_NOINSTALL=0
360                         print_info 2 "CMD_NOINSTALL: ${CMD_NOINSTALL}"
361                         ;;
362                 --no-install)
363                         CMD_NOINSTALL=1
364                         print_info 2 "CMD_NOINSTALL: ${CMD_NOINSTALL}"
365                         ;;
366                 --no-initrdmodules)
367                         CMD_NOINITRDMODULES=1
368                         print_info 2 "CMD_NOINITRDMODULES: ${CMD_NOINITRDMODULES}"
369                         ;;
370                 --callback=*)
371                         CMD_CALLBACK=`parse_opt "$*"`
372                         print_info 2 "CMD_CALLBACK: ${CMD_CALLBACK}/$*"
373                         ;;
374                 --static)
375                         CMD_STATIC=1
376                         print_info 2 "CMD_STATIC: ${CMD_STATIC}"
377                         ;;
378                 --initramfs)
379                         CMD_INITRAMFS=1
380                         print_info 2 "CMD_INITRAMFS: ${CMD_INITRAMFS}"
381                         ;;
382                 --tempdir=*)
383                         TMPDIR=`parse_opt "$*"`
384                         TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
385                         print_info 2 "TMPDIR: ${TMPDIR}"
386                         print_info 2 "TEMP: ${TEMP}"
387                         ;; 
388                 --postclear)
389                         CMD_POSTCLEAR=1
390                         print_info 2 "CMD_POSTCLEAR: ${CMD_POSTCLEAR}"
391                         ;; 
392                 --arch-override=*)
393                         CMD_ARCHOVERRIDE=`parse_opt "$*"`
394                         print_info 2 "CMD_ARCHOVERRIDE: ${CMD_ARCHOVERRIDE}"
395                         ;;
396                 --color)
397                         USECOLOR=1
398                         print_info 2 "USECOLOR: ${USECOLOR}"
399                         setColorVars
400                         ;;
401                 --no-color)
402                         USECOLOR=0
403                         print_info 2 "USECOLOR: ${USECOLOR}"
404                         setColorVars
405                         ;;
406                 --logfile=*)
407                         CMD_LOGFILE=`parse_opt "$*"`
408                         LOGFILE=`parse_opt "$*"`
409                         print_info 2 "CMD_LOGFILE: ${CMD_LOGFILE}"
410                         print_info 2 "LOGFILE: ${CMD_LOGFILE}"
411                         ;;
412                 --kerneldir=*)
413                         CMD_KERNELDIR=`parse_opt "$*"`
414                         print_info 2 "CMD_KERNELDIR: ${CMD_KERNELDIR}"
415                         ;;
416                 --kernel-config=*)
417                         CMD_KERNEL_CONFIG=`parse_opt "$*"`
418                         print_info 2 "CMD_KERNEL_CONFIG: ${CMD_KERNEL_CONFIG}"
419                         ;;
420                 --module-prefix=*)
421                         CMD_INSTALL_MOD_PATH=`parse_opt "$*"`
422                         print_info 2 "CMD_INSTALL_MOD_PATH: ${CMD_INSTALL_MOD_PATH}"
423                         ;;
424                 --cachedir=*)
425                         CACHE_DIR=`parse_opt "$*"`
426                         print_info 2 "CACHE_DIR: ${CACHE_DIR}"
427                         ;;
428                 --minkernpackage=*)
429                         CMD_MINKERNPACKAGE=`parse_opt "$*"`
430                         print_info 2 "MINKERNPACKAGE: ${CMD_MINKERNPACKAGE}"
431                         ;;
432                 --modulespackage=*)
433                         CMD_MODULESPACKAGE=`parse_opt "$*"`
434                         print_info 2 "MODULESPACKAGE: ${CMD_MODULESPACKAGE}"
435                         ;;
436                 --kerncache=*)
437                         CMD_KERNCACHE=`parse_opt "$*"`
438                         print_info 2 "KERNCACHE: ${CMD_KERNCACHE}"
439                         ;;
440                 --kernname=*)
441                         CMD_KERNNAME=`parse_opt "$*"`
442                         print_info 2 "KERNNAME: ${CMD_KERNNAME}"
443                         ;;
444                 --symlink)
445                         CMD_SYMLINK=1
446                         print_info 2 "CMD_SYMLINK: ${CMD_SYMLINK}"
447                         ;;
448                 --no-symlink)
449                         CMD_SYMLINK=0
450                         print_info 2 "CMD_SYMLINK: ${CMD_SYMLINK}"
451                         ;;
452                 --no-kernel-sources)
453                         CMD_NO_KERNEL_SOURCES=1
454                         print_info 2 "CMD_NO_KERNEL_SOURCES: ${CMD_NO_KERNEL_SOURCES}"
455                         ;;
456                 --initramfs-overlay=*)
457                         CMD_INITRAMFS_OVERLAY=`parse_opt "$*"`
458                         print_info 2 "CMD_INITRAMFS_OVERLAY: ${CMD_INITRAMFS_OVERLAY}"
459                         ;;
460                 --linuxrc=*)
461                         CMD_LINUXRC=`parse_opt "$*"`
462                         print_info 2 "CMD_LINUXRC: ${CMD_LINUXRC}"
463                         ;;
464                 --genzimage)
465                         KERNEL_MAKE_DIRECTIVE_2='zImage.initrd'
466                         KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd'
467                         ENABLE_PEGASOS_HACKS="yes"
468                         print_info 2 "ENABLE_PEGASOS_HACKS: ${ENABLE_PEGASOS_HACKS}"
469                         ;;
470                 --disklabel)
471                         CMD_DISKLABEL=1
472                         print_info 2 "CMD_DISKLABEL: ${CMD_DISKLABEL}"
473                         ;;
474                 --luks)
475                         CMD_LUKS=1
476                         print_info 2 "CMD_LUKS: ${CMD_LUKS}"
477                         ;;
478                 all)
479                         BUILD_KERNEL=1
480                         BUILD_MODULES=1
481                         BUILD_INITRD=1
482                         ;;
483                 initrd)
484                         BUILD_INITRD=1
485                         ;;
486                 kernel)
487                         BUILD_KERNEL=1
488                         BUILD_MODULES=1
489                         BUILD_INITRD=0
490                         ;;
491                 bzImage)
492                         BUILD_KERNEL=1
493                         BUILD_MODULES=0
494                         BUILD_INITRD=1
495                         CMD_NOINITRDMODULES=1
496                         print_info 2 "CMD_NOINITRDMODULES: ${CMD_NOINITRDMODULES}"
497                         ;;
498                 --help)
499                         longusage
500                         exit 1
501                         ;;
502                 --version)
503                         echo "${GK_V}"
504                         exit 0
505                         ;;
506                 *)
507                         echo "Error: Unknown option '$*'!"
508                         exit 1
509                         ;;
510         esac
511 }