9e1d4570c7246bb51a71b9e4d2a37cce0c993f06
[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 "    --no-busybox    Do not include busybox in the initrd or initramfs."
94   echo "  Internals"
95   echo "        --arch-override=<arch>  Force to arch instead of autodetect"
96   echo "        --cachedir=<dir>        Override the default cache location"
97   echo "        --tempdir=<dir>         Location of Genkernel's temporary directory"
98   echo "        --postclear             Clear all tmp files and caches after genkernel has run"
99   echo "  Output Settings"
100   echo "        --kernname=<...>        Tag the kernel and initrd with a name:"
101   echo "                                If not defined the option defaults to"
102   echo "                                'genkernel'"
103   echo "        --minkernpackage=<tbz2> File to output a .tar.bz2'd kernel and initrd:"
104   echo "                                No modules outside of the initrd will be"
105   echo "                                included..."
106   echo "        --modulespackage=<tbz2> File to output a .tar.bz2'd modules after the"
107   echo "                                callbacks have run"
108   echo "        --kerncache=<tbz2>      File to output a .tar.bz2'd kernel contents"
109   echo "                                of /lib/modules/ and the kernel config"
110   echo "                                NOTE: This is created before the callbacks"
111   echo "                                are run!"
112   echo "        --no-kernel-sources     This option is only valid if kerncache is"
113   echo "                                defined. If there is a valid kerncache no checks"
114   echo "                                will be made against a kernel source tree"
115   echo "        --initramfs-overlay=<dir>"
116   echo "                                Directory structure to include in the initramfs,"
117   echo "                                only available on 2.6 kernels"
118 }
119
120 usage() {
121   echo "Gentoo Linux Genkernel ${GK_V}"
122   echo "Usage: "
123   echo "        genkernel [options] all"
124   echo
125   echo 'Some useful options:'
126   echo '        --menuconfig            Run menuconfig after oldconfig'
127   echo '        --no-clean              Do not run make clean before compilation'
128   echo '        --no-mrproper           Do not run make mrproper before compilation,'
129   echo '                                this is implied by --no-clean.'
130   echo
131   echo 'For a detailed list of supported options and flags; issue:'
132   echo '        genkernel --help'
133 }
134
135 parse_cmdline() {
136         case "$*" in
137                 --kernel-cc=*)
138                         CMD_KERNEL_CC=`parse_opt "$*"`
139                         print_info 2 "CMD_KERNEL_CC: ${CMD_KERNEL_CC}"
140                         ;;
141                 --kernel-ld=*)
142                         CMD_KERNEL_LD=`parse_opt "$*"`
143                         print_info 2 "CMD_KERNEL_LD: ${CMD_KERNEL_LD}"
144                         ;;
145                 --kernel-as=*)
146                         CMD_KERNEL_AS=`parse_opt "$*"`
147                         print_info 2 "CMD_KERNEL_AS: ${CMD_KERNEL_AS}"
148                         ;;
149                 --kernel-make=*)
150                         CMD_KERNEL_MAKE=`parse_opt "$*"`
151                         print_info 2 "CMD_KERNEL_MAKE: ${CMD_KERNEL_MAKE}"
152                         ;;
153                 --kernel-cross-compile=*)
154                         CMD_KERNEL_CROSS_COMPILE=`parse_opt "$*"`
155                         CMD_KERNEL_CROSS_COMPILE=$(echo ${CMD_KERNEL_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')
156                         print_info 2 "CMD_KERNEL_CROSS_COMPILE: ${CMD_KERNEL_CROSS_COMPILE}"
157                         ;;
158                 --utils-cc=*)
159                         CMD_UTILS_CC=`parse_opt "$*"`
160                         print_info 2 "CMD_UTILS_CC: ${CMD_UTILS_CC}"
161                         ;;
162                 --utils-ld=*)
163                         CMD_UTILS_LD=`parse_opt "$*"`
164                         print_info 2 "CMD_UTILS_LD: ${CMD_UTILS_LD}"
165                         ;;
166                 --utils-as=*)
167                         CMD_UTILS_AS=`parse_opt "$*"`
168                         print_info 2 "CMD_UTILS_AS: ${CMD_UTILS_AS}"
169                         ;;
170                 --utils-make=*)
171                         CMD_UTILS_MAKE=`parse_opt "$*"`
172                         print_info 2 "CMD_UTILS_MAKE: ${CMD_UTILS_MAKE}"
173                         ;;
174                 --utils-cross-compile=*)
175                         CMD_UTILS_CROSS_COMPILE=`parse_opt "$*"`
176                         CMD_UTILS_CROSS_COMPILE=$(echo ${CMD_UTILS_CROSS_COMPILE}|sed -e 's/.*[^-]$/&-/g')
177                         print_info 2 "CMD_UTILS_CROSS_COMPILE: ${CMD_UTILS_CROSS_COMPILE}"
178                         ;;
179                 --utils-arch=*)
180                         CMD_UTILS_ARCH=`parse_opt "$*"`
181                         print_info 2 "CMD_UTILS_ARCH: ${CMD_ARCHOVERRIDE}"
182                         ;;
183                 --makeopts=*)
184                         CMD_MAKEOPTS=`parse_opt "$*"`
185                         print_info 2 "CMD_MAKEOPTS: ${CMD_MAKEOPTS}"
186                         ;;
187                 --mountboot)
188                         CMD_MOUNTBOOT=1
189                         print_info 2 "CMD_MOUNTBOOT: ${CMD_MOUNTBOOT}"
190                         ;;
191                 --no-mountboot)
192                         CMD_MOUNTBOOT=0
193                         print_info 2 "CMD_MOUNTBOOT: ${CMD_MOUNTBOOT}"
194                         ;;
195                 --bootdir=*)
196                         CMD_BOOTDIR=`parse_opt "$*"`
197                         print_info 2 "CMD_BOOTDIR: ${CMD_BOOTDIR}"
198                         ;;
199                 --do-keymap-auto)
200                         CMD_DOKEYMAPAUTO=1
201                         print_info 2 "CMD_DOKEYMAPAUTO: ${CMD_DOKEYMAPAUTO}"
202                         ;;
203                 --evms)
204                         CMD_EVMS=1
205                         print_info 2 "CMD_EVMS: ${CMD_EVMS}"
206                         ;;
207                 --evms2)
208                         CMD_EVMS=1
209                         print_info 2 "CMD_EVMS: ${CMD_EVMS}"
210                         echo
211                         print_warning 1 "Please use --evms, as --evms2 is deprecated."
212                         ;;
213                 --unionfs)
214                         CMD_UNIONFS=1
215                         print_info 2 "CMD_UNIONFS: ${CMD_UNIONFS}"
216                         echo
217                         print_warning 1 "WARNING: unionfs support is in active development and is not meant for general"
218                         print_warning 1 "use."
219                         print_warning 1 "Bug Reports without patches/fixes will be ignored."
220                         print_warning 1 "Use at your own risk as this could blow up your system."
221                         print_warning 1 "This code is subject to change at any time."
222                         echo
223                         ;;
224                 --lvm)
225                         CMD_LVM=1
226                         print_info 2 "CMD_LVM: ${CMD_LVM}"
227                         ;;
228                 --lvm2)
229                         CMD_LVM=1
230                         print_info 2 "CMD_LVM: ${CMD_LVM}"
231                         echo
232                         print_warning 1 "Please use --lvm, as --lvm2 is deprecated."
233                         ;;
234                 --mdadm)
235                         CMD_MDADM=1
236                         print_info 2 "CMD_MDADM: $CMD_MDADM"
237                         ;;
238                 --no-busybox)
239                         CMD_BUSYBOX=0
240                         print_info 2 "CMD_BUSYBOX: ${CMD_BUSYBOX}"
241                         ;;
242                 --slowusb)
243                         CMD_SLOWUSB=1
244                         print_info 2 "CMD_SLOWUSB: ${CMD_SLOWUSB}"
245                         ;;
246                 --dmraid)
247                         if [ ! -e /usr/include/libdevmapper.h ]
248                         then
249                                 echo 'Error: --dmraid requires device-mapper to be installed'
250                                 echo '           on the host system; try "emerge device-mapper".'
251                                 exit 1
252                         fi
253                         CMD_DMRAID=1
254                         print_info 2 "CMD_DMRAID: ${CMD_DMRAID}"
255                         ;;
256                 --bootloader=*)
257                         CMD_BOOTLOADER=`parse_opt "$*"`
258                         print_info 2 "CMD_BOOTLOADER: ${CMD_BOOTLOADER}"
259                         ;;
260                 --loglevel=*)
261                         CMD_LOGLEVEL=`parse_opt "$*"`
262                         LOGLEVEL="${CMD_LOGLEVEL}"
263                         print_info 2 "CMD_LOGLEVEL: ${CMD_LOGLEVEL}"
264                         ;;
265                 --menuconfig)
266                         TERM_LINES=`stty -a | head -n 1 | cut -d\  -f5 | cut -d\; -f1`
267                         TERM_COLUMNS=`stty -a | head -n 1 | cut -d\  -f7 | cut -d\; -f1`
268                         if [[ TERM_LINES -lt 19 || TERM_COLUMNS -lt 80 ]]
269                         then
270                                 echo "Error: You need a terminal with at least 80 columns"
271                                 echo "           and 19 lines for --menuconfig; try --nomenuconfig..."
272                                 exit 1
273                         fi
274                         CMD_MENUCONFIG=1
275                         print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}"
276                         ;;
277                 --no-menuconfig)
278                         CMD_MENUCONFIG=0
279                         print_info 2 "CMD_MENUCONFIG: ${CMD_MENUCONFIG}"
280                         ;;
281                 --gconfig)
282                         CMD_GCONFIG=1
283                         print_info 2 "CMD_GCONFIG: ${CMD_GCONFIG}"
284                         ;;
285                 --xconfig)
286                         CMD_XCONFIG=1
287                         print_info 2 "CMD_XCONFIG: ${CMD_XCONFIG}"
288                         ;;
289                 --save-config)
290                         CMD_SAVE_CONFIG=1
291                         print_info 2 "CMD_SAVE_CONFIG: ${CMD_SAVE_CONFIG}"
292                         ;;
293                 --no-save-config)
294                         CMD_SAVE_CONFIG=0
295                         print_info 2 "CMD_SAVE_CONFIG: ${CMD_SAVE_CONFIG}"
296                         ;;
297                 --mrproper)
298                         CMD_MRPROPER=1
299                         print_info 2 "CMD_MRPROPER: ${CMD_MRPROPER}"
300                         ;;
301                 --no-mrproper)
302                         CMD_MRPROPER=0
303                         print_info 2 "CMD_MRPROPER: ${CMD_MRPROPER}"
304                         ;;
305                 --clean)
306                         CMD_CLEAN=1
307                         print_info 2 "CMD_CLEAN: ${CMD_CLEAN}"
308                         ;;
309                 --no-clean)
310                         CMD_CLEAN=0
311                         print_info 2 "CMD_CLEAN: ${CMD_CLEAN}"
312                         ;;
313                 --oldconfig)
314                         CMD_CLEAN=0
315                         CMD_OLDCONFIG=1
316                         print_info 2 "CMD_CLEAN: ${CMD_CLEAN}"
317                         print_info 2 "CMD_OLDCONFIG: ${CMD_OLDCONFIG}"
318                         ;;
319                 --gensplash=*)
320                         CMD_SPLASH=1
321                         SPLASH_THEME=`parse_opt "$*"`
322                         print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
323                         print_info 2 "SPLASH_THEME: ${SPLASH_THEME}"
324                         echo
325                         print_warning 1 "Please use --splash, as --gensplash is deprecated."
326                         ;;
327                 --gensplash)
328                         CMD_SPLASH=1
329                         SPLASH_THEME='default'
330                         print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
331                         echo
332                         print_warning 1 "Please use --splash, as --gensplash is deprecated."
333                         ;;
334                 --splash=*)
335                         CMD_SPLASH=1
336                         SPLASH_THEME=`parse_opt "$*"`
337                         print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
338                         print_info 2 "SPLASH_THEME: ${SPLASH_THEME}"
339                         ;;
340                 --splash)
341                         CMD_SPLASH=1
342                         SPLASH_THEME='default'
343                         print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
344                         ;;
345                 --no-splash)
346                         CMD_SPLASH=0
347                         print_info 2 "CMD_SPLASH: ${CMD_SPLASH}"
348                         ;;
349                 --gensplash-res=*)
350                         SPLASH_RES=`parse_opt "$*"`
351                         print_info 2 "SPLASH_RES: ${SPLASH_RES}"
352                         echo
353                         print_warning 1 "Please use --splash-res, as --gensplash-res is deprecated."
354                         ;;
355                 --splash-res=*)
356                         SPLASH_RES=`parse_opt "$*"`
357                         print_info 2 "SPLASH_RES: ${SPLASH_RES}"
358                         ;;
359                 --install)
360                         CMD_NOINSTALL=0
361                         print_info 2 "CMD_NOINSTALL: ${CMD_NOINSTALL}"
362                         ;;
363                 --no-install)
364                         CMD_NOINSTALL=1
365                         print_info 2 "CMD_NOINSTALL: ${CMD_NOINSTALL}"
366                         ;;
367                 --no-initrdmodules)
368                         CMD_NOINITRDMODULES=1
369                         print_info 2 "CMD_NOINITRDMODULES: ${CMD_NOINITRDMODULES}"
370                         ;;
371                 --callback=*)
372                         CMD_CALLBACK=`parse_opt "$*"`
373                         print_info 2 "CMD_CALLBACK: ${CMD_CALLBACK}/$*"
374                         ;;
375                 --static)
376                         CMD_STATIC=1
377                         print_info 2 "CMD_STATIC: ${CMD_STATIC}"
378                         ;;
379                 --initramfs)
380                         CMD_INITRAMFS=1
381                         print_info 2 "CMD_INITRAMFS: ${CMD_INITRAMFS}"
382                         ;;
383                 --tempdir=*)
384                         TMPDIR=`parse_opt "$*"`
385                         TEMP=${TMPDIR}/$RANDOM.$RANDOM.$RANDOM.$$
386                         print_info 2 "TMPDIR: ${TMPDIR}"
387                         print_info 2 "TEMP: ${TEMP}"
388                         ;; 
389                 --postclear)
390                         CMD_POSTCLEAR=1
391                         print_info 2 "CMD_POSTCLEAR: ${CMD_POSTCLEAR}"
392                         ;; 
393                 --arch-override=*)
394                         CMD_ARCHOVERRIDE=`parse_opt "$*"`
395                         print_info 2 "CMD_ARCHOVERRIDE: ${CMD_ARCHOVERRIDE}"
396                         ;;
397                 --color)
398                         USECOLOR=1
399                         print_info 2 "USECOLOR: ${USECOLOR}"
400                         setColorVars
401                         ;;
402                 --no-color)
403                         USECOLOR=0
404                         print_info 2 "USECOLOR: ${USECOLOR}"
405                         setColorVars
406                         ;;
407                 --logfile=*)
408                         CMD_LOGFILE=`parse_opt "$*"`
409                         LOGFILE=`parse_opt "$*"`
410                         print_info 2 "CMD_LOGFILE: ${CMD_LOGFILE}"
411                         print_info 2 "LOGFILE: ${CMD_LOGFILE}"
412                         ;;
413                 --kerneldir=*)
414                         CMD_KERNELDIR=`parse_opt "$*"`
415                         print_info 2 "CMD_KERNELDIR: ${CMD_KERNELDIR}"
416                         ;;
417                 --kernel-config=*)
418                         CMD_KERNEL_CONFIG=`parse_opt "$*"`
419                         print_info 2 "CMD_KERNEL_CONFIG: ${CMD_KERNEL_CONFIG}"
420                         ;;
421                 --module-prefix=*)
422                         CMD_INSTALL_MOD_PATH=`parse_opt "$*"`
423                         print_info 2 "CMD_INSTALL_MOD_PATH: ${CMD_INSTALL_MOD_PATH}"
424                         ;;
425                 --cachedir=*)
426                         CACHE_DIR=`parse_opt "$*"`
427                         print_info 2 "CACHE_DIR: ${CACHE_DIR}"
428                         ;;
429                 --minkernpackage=*)
430                         CMD_MINKERNPACKAGE=`parse_opt "$*"`
431                         print_info 2 "MINKERNPACKAGE: ${CMD_MINKERNPACKAGE}"
432                         ;;
433                 --modulespackage=*)
434                         CMD_MODULESPACKAGE=`parse_opt "$*"`
435                         print_info 2 "MODULESPACKAGE: ${CMD_MODULESPACKAGE}"
436                         ;;
437                 --kerncache=*)
438                         CMD_KERNCACHE=`parse_opt "$*"`
439                         print_info 2 "KERNCACHE: ${CMD_KERNCACHE}"
440                         ;;
441                 --kernname=*)
442                         CMD_KERNNAME=`parse_opt "$*"`
443                         print_info 2 "KERNNAME: ${CMD_KERNNAME}"
444                         ;;
445                 --symlink)
446                         CMD_SYMLINK=1
447                         print_info 2 "CMD_SYMLINK: ${CMD_SYMLINK}"
448                         ;;
449                 --no-symlink)
450                         CMD_SYMLINK=0
451                         print_info 2 "CMD_SYMLINK: ${CMD_SYMLINK}"
452                         ;;
453                 --no-kernel-sources)
454                         CMD_NO_KERNEL_SOURCES=1
455                         print_info 2 "CMD_NO_KERNEL_SOURCES: ${CMD_NO_KERNEL_SOURCES}"
456                         ;;
457                 --initramfs-overlay=*)
458                         CMD_INITRAMFS_OVERLAY=`parse_opt "$*"`
459                         print_info 2 "CMD_INITRAMFS_OVERLAY: ${CMD_INITRAMFS_OVERLAY}"
460                         ;;
461                 --linuxrc=*)
462                         CMD_LINUXRC=`parse_opt "$*"`
463                         print_info 2 "CMD_LINUXRC: ${CMD_LINUXRC}"
464                         ;;
465                 --genzimage)
466                         KERNEL_MAKE_DIRECTIVE_2='zImage.initrd'
467                         KERNEL_BINARY_2='arch/powerpc/boot/zImage.initrd'
468                         ENABLE_PEGASOS_HACKS="yes"
469                         print_info 2 "ENABLE_PEGASOS_HACKS: ${ENABLE_PEGASOS_HACKS}"
470                         ;;
471                 --disklabel)
472                         CMD_DISKLABEL=1
473                         print_info 2 "CMD_DISKLABEL: ${CMD_DISKLABEL}"
474                         ;;
475                 --luks)
476                         CMD_LUKS=1
477                         print_info 2 "CMD_LUKS: ${CMD_LUKS}"
478                         ;;
479                 all)
480                         BUILD_KERNEL=1
481                         BUILD_MODULES=1
482                         BUILD_INITRD=1
483                         ;;
484                 initrd)
485                         BUILD_INITRD=1
486                         ;;
487                 kernel)
488                         BUILD_KERNEL=1
489                         BUILD_MODULES=1
490                         BUILD_INITRD=0
491                         ;;
492                 bzImage)
493                         BUILD_KERNEL=1
494                         BUILD_MODULES=0
495                         BUILD_INITRD=1
496                         CMD_NOINITRDMODULES=1
497                         print_info 2 "CMD_NOINITRDMODULES: ${CMD_NOINITRDMODULES}"
498                         ;;
499                 --help)
500                         longusage
501                         exit 1
502                         ;;
503                 --version)
504                         echo "${GK_V}"
505                         exit 0
506                         ;;
507                 *)
508                         echo "Error: Unknown option '$*'!"
509                         exit 1
510                         ;;
511         esac
512 }