source: trunk/config/firmware/shared/kernel/boot.in @ 902

Last change on this file since 902 was 902, checked in by amain, 3 years ago

native: erlite native kernel compile support

File size: 3.7 KB
RevLine 
[393]1# DebWrt - Debian on Embedded devices
2#
3# Copyright (C) 2010 Johan van Zoomeren <amain@debwrt.net>
4#
5# This program is free software: you can redistribute it and/or modify
6# it under the terms of the GNU General Public License as published by
7# the Free Software Foundation, either version 3 of the License, or
8# (at your option) any later version.
9#
10# This program is distributed in the hope that it will be useful,
11# but WITHOUT ANY WARRANTY; without even the implied warranty of
12# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
13# GNU General Public License for more details.
14#
15# You should have received a copy of the GNU General Public License
16# along with this program.  If not, see <http://www.gnu.org/licenses/>.
17
[676]18menu "Boot Options"
[393]19
[673]20config IMAGE_CMDLINE_HACK
21        tristate
22        default n if BOOT_METHOD_BOOTLOADER
23        default y if !BOOT_METHOD_BOOTLOADER
24         
25
[393]26choice
27    prompt "Boot method"
[674]28        default BOOT_METHOD_BOOTLOADER if TARGET_octeon
[688]29        default BOOT_METHOD_DEVICE
[393]30        help
31          Select how DebWrt should boot
32
[673]33config BOOT_METHOD_BOOTLOADER
34        bool "Ignore OpenWrt built-in kernel command line"
35        help
36          Don't use the OpenWrt built-in kernel command line, but use the command line
37          provided by the boot loader.
38          .
39          Many embedded devices don't provided easy access to the bootloader, or if you
40          manage to get access, the bootloader is very limited and might not allow changing
41          the kernel command line parameters.  Therefore OpenWrt normally creates kernels
42          with the kernel command line built-in.
43          .
44          This automatically sets OpenWrt's IMAGE_CMDLINE_HACK setting to n and replaces
45          the the patch-cmdline tool with a no-op script. Which is an ugly hack, but the
46          only way to avoid big patches.
47
[865]48config BOOT_METHOD_DEVICE
49        bool "Directly boot from device /dev/sda1"
50
[393]51config BOOT_METHOD_SCRIPT
[865]52        bool "Use DebWrt boot script (obsolete)"
[393]53        help
54          Auto discover root device, optionally kexec to a alternate kernel and boot from this device.
55          .
56          Normally DebWrt boots directly from the root= device. With this option enabled, DebWrt boots initially
57          from /dev/mtdblock2 and runs an alternate boot script (/etc/preinit). This scripts discovers block
58          devices and will look for a device with a label of DEBWRT_ROOT or fall back to /dev/sda1. And mounts it.
59          .
60          Next it will kexec to /boot/vmlinux.elf if it exits on the DEBWRT_ROOT device.
61          .
62          After mounting ( or kexec ), a pivot_root to the DEBWRT_ROOT device is done and /sbin/init is executed.
63
64endchoice
65
66config CMDLINE_BOOL
67        bool
68        default y
69        depends BOOT_METHOD_DEVICE
70
71#CONFIG_CMDLINE="root=/dev/sda1 init=/sbin/init rootdelay=10 noinitrd console=ttyS0,115200"
72# default "root=/dev/sda1 init=/sbin/init rootdelay=15 noinitrd console=ttyS0,115200"
73# default "root=/dev/sda1 init=/sbin/init rootdelay=15 noinitrd console=ttyS0,115200 netconsole=6665@10.0.2.1/eth0,6666@10.0.2.2"
74# TODO: use patch-kernel script to append only netconsole=6665@192.168.1.1/eth0,6666@192.168.1.2/ to OpenWrt default cmdline"
75#       for now netconsole can't be set when BOOT_METHOD_SCRIPT
76config CMDLINE
77        string "Default kernel command line"
[865]78        default "root=/dev/sda1 init=/sbin/init rootdelay=5 noinitrd console=ttyS0,115200 netconsole=6665@192.168.1.1/eth0,6666@192.168.1.2/"
[393]79        depends BOOT_METHOD_DEVICE
80        help
81          Override OpenWrt default kernel command line. Tell the kernel to boot from /dev/sda1,
82          an USB storage device. Rootdelay is specified, to give the USB storage/SCSI driver
83          to become ready, before the kernel tries to boot from it.
84
[902]85source "config/firmware/shared/kernel/kexec.in"
[393]86
[902]87source "config/firmware/shared/kernel/nfs.in"
[673]88
[393]89endmenu
[673]90
Note: See TracBrowser for help on using the repository browser.