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