b.liu | e958203 | 2025-04-17 19:18:16 +0800 | [diff] [blame] | 1 | # Copyright (C) 2006-2012 OpenWrt.org |
| 2 | # Copyright (C) 2010 Vertical Communications |
| 3 | # |
| 4 | # This is free software, licensed under the GNU General Public License v2. |
| 5 | # See /LICENSE for more information. |
| 6 | # |
| 7 | |
| 8 | config TARGET_DEFAULT_LAN_IP_FROM_PREINIT |
| 9 | bool "Use preinit IP configuration as default LAN IP" if IMAGEOPT |
| 10 | default n |
| 11 | help |
| 12 | Enabling this will set the default LAN IP address and netmask |
| 13 | to the preinit values set in the image config. |
| 14 | |
| 15 | menuconfig PREINITOPT |
| 16 | bool "Preinit configuration options" if IMAGEOPT |
| 17 | default n |
| 18 | help |
| 19 | These options are used to control the environment used to initialize |
| 20 | the system before running init (which typically mean /sbin/init which |
| 21 | switches to multiuser mode). |
| 22 | |
| 23 | config TARGET_PREINIT_SUPPRESS_STDERR |
| 24 | bool "Suppress stderr messages during preinit" if PREINITOPT |
| 25 | default y |
| 26 | help |
| 27 | Sends stderr to null during preinit. This is the default behaviour |
| 28 | in previous versions of OpenWrt. This also prevents init process |
| 29 | itself from displaying stderr, however processes launched by init |
| 30 | in multiuser through inittab will use the current terminal (e.g. |
| 31 | the ash shell launched by inittab will display stderr). That's |
| 32 | the same behaviour as seen in previous version of OpenWrt. |
| 33 | |
| 34 | config TARGET_PREINIT_DISABLE_FAILSAFE |
| 35 | bool |
| 36 | prompt "Disable failsafe" if PREINITOPT |
| 37 | default n |
| 38 | help |
| 39 | Disable failsafe mode. While it is very handy while |
| 40 | experimenting or developing it really ought to be |
| 41 | disabled in production environments as it is a major |
| 42 | security loophole. |
| 43 | |
| 44 | config TARGET_PREINIT_TIMEOUT |
| 45 | int |
| 46 | prompt "Failsafe/Debug wait timeout" if PREINITOPT |
| 47 | default 2 |
| 48 | help |
| 49 | How long to wait for failsafe mode to be entered or for |
| 50 | a debug option to be pressed before continuing with a |
| 51 | regular boot. |
| 52 | |
| 53 | config TARGET_PREINIT_SHOW_NETMSG |
| 54 | bool |
| 55 | prompt "Show all preinit network messages" if PREINITOPT |
| 56 | default n |
| 57 | help |
| 58 | Show preinit all network messages (via netmsg broadcast), not only |
| 59 | the message indicating to press reset to enter failsafe. Note that |
| 60 | if the architecture doesn't define an interface, and there is no |
| 61 | 'Preinit network interface' defined, then no messages will be |
| 62 | emitted, even if this is set. |
| 63 | |
| 64 | config TARGET_PREINIT_SUPPRESS_FAILSAFE_NETMSG |
| 65 | bool |
| 66 | prompt "Suppress network message indicating failsafe" if ( PREINITOPT && !TARGET_PREINIT_SHOW_NETMSG && !TARGET_PREINIT_DISABLE_FAILSAFE ) |
| 67 | default n |
| 68 | help |
| 69 | If "Show all preinit network messages" above is not set, then |
| 70 | setting this option suppresses the only message that would be |
| 71 | emitted otherwise, name the network message to enter failsafe |
| 72 | (via netmsg). |
| 73 | |
| 74 | config TARGET_PREINIT_IFNAME |
| 75 | string |
| 76 | prompt "Preinit network interface" if PREINITOPT |
| 77 | default "" |
| 78 | help |
| 79 | Interface for sending preinit messages to network, and any other |
| 80 | default networking in failsafe or preinit. If empty |
| 81 | uses $ifname (if defined in /etc/preinit.arch). |
| 82 | |
| 83 | config TARGET_PREINIT_IP |
| 84 | string |
| 85 | prompt "IP address for preinit network messages" if PREINITOPT |
| 86 | default "192.168.1.1" |
| 87 | help |
| 88 | IP address used to configure interface for preinit network |
| 89 | messages, including failsafe messages |
| 90 | |
| 91 | config TARGET_PREINIT_NETMASK |
| 92 | string |
| 93 | prompt "Netmask for preinit network messages" if PREINITOPT |
| 94 | default "255.255.255.0" |
| 95 | help |
| 96 | Netmask used to configure interface for preinit network |
| 97 | messages, including failsafes messages |
| 98 | |
| 99 | config TARGET_PREINIT_BROADCAST |
| 100 | string |
| 101 | prompt "Broadcast address for preinit network messages" if PREINITOPT |
| 102 | default "192.168.1.255" |
| 103 | help |
| 104 | Broadcast address to which to send preinit network messages, as |
| 105 | as failsafe messages |
| 106 | |
| 107 | |
| 108 | menuconfig INITOPT |
| 109 | bool "Init configuration options" if IMAGEOPT |
| 110 | default n |
| 111 | help |
| 112 | These option choose the command that will run as the 'init' command |
| 113 | (that is which is responsible for controlling the system once preinit |
| 114 | transfers control to it) as well as some options controlling its |
| 115 | behaviour. Normally init is /sbin/init. |
| 116 | |
| 117 | config TARGET_INIT_PATH |
| 118 | string |
| 119 | prompt "PATH for regular boot" if INITOPT |
| 120 | default "/usr/sbin:/usr/bin:/sbin:/bin" |
| 121 | help |
| 122 | Default PATH used during normal operation |
| 123 | |
| 124 | config TARGET_INIT_ENV |
| 125 | string |
| 126 | prompt "Environment variables to set when starting init (start with none)" if INITOPT |
| 127 | default "" |
| 128 | help |
| 129 | Should be a space separated list of variable assignments. These |
| 130 | variables will be present in the environment. Spaces may not be |
| 131 | present (including through expansion) even in a quoted string |
| 132 | (env doesn't understanding quoting). |
| 133 | |
| 134 | config TARGET_INIT_CMD |
| 135 | string |
| 136 | prompt "Init command" if INITOPT |
| 137 | default "/sbin/init" |
| 138 | help |
| 139 | The executable to run as the init process. Is 'exec'd by |
| 140 | preinit (which is the init that the kernel launches on boot). |
| 141 | |
| 142 | config TARGET_INIT_SUPPRESS_STDERR |
| 143 | bool |
| 144 | prompt "Suppress stderr messages of init" if INITOPT |
| 145 | default y |
| 146 | help |
| 147 | Prevents showing stderr messages for init command if not already |
| 148 | suppressed during preinit. This is the default behaviour in |
| 149 | previous versions of OpenWrt. Removing this does nothing if |
| 150 | stderr is suppressed during preinit (which is the default). |
| 151 | |
| 152 | |
| 153 | menuconfig VERSIONOPT |
| 154 | bool "Version configuration options" if IMAGEOPT |
| 155 | default n |
| 156 | help |
| 157 | These options allow to override the version information embedded in |
| 158 | the /etc/openwrt_version, /etc/openwrt_release, /etc/banner, |
| 159 | /etc/opkg.conf, and /etc/os-release files. Usually there is no need |
| 160 | to set these, but they're useful for release builds or custom OpenWrt |
| 161 | redistributions that should carry custom version tags. |
| 162 | |
| 163 | if VERSIONOPT |
| 164 | |
| 165 | config VERSION_DIST |
| 166 | string |
| 167 | prompt "Release distribution" |
| 168 | default "OpenWrt" |
| 169 | help |
| 170 | This is the name of the release distribution. |
| 171 | If unspecified, it defaults to OpenWrt. |
| 172 | |
| 173 | config VERSION_NUMBER |
| 174 | string |
| 175 | prompt "Release version number" |
| 176 | help |
| 177 | This is the release version number embedded in the image. |
| 178 | If unspecified, it defaults to SNAPSHOT for the master branch |
| 179 | or to ##.##-SNAPSHOT on release branches. |
| 180 | |
| 181 | config VERSION_CODE |
| 182 | string |
| 183 | prompt "Release version code" |
| 184 | help |
| 185 | This is the release version code embedded in the image. |
| 186 | If unspecified, it defaults to a revision number describing the |
| 187 | repository version of the source, e.g. the number of commits |
| 188 | since a branch point or a short Git commit ID. |
| 189 | |
| 190 | config VERSION_REPO |
| 191 | string |
| 192 | prompt "Release repository" |
| 193 | default "https://downloads.openwrt.org/releases/24.10-SNAPSHOT" |
| 194 | help |
| 195 | This is the repository address embedded in the image, it defaults |
| 196 | to the trunk snapshot repo; the url may contain the following placeholders: |
| 197 | %R .. Repository revision ID |
| 198 | %V .. Configured release version number or "SNAPSHOT", uppercase |
| 199 | %v .. Configured release version number or "snapshot", lowercase |
| 200 | %C .. Configured release revision code or value of %R, uppercase |
| 201 | %c .. Configured release revision code or value of %R, lowercase |
| 202 | %D .. Distribution name or "OpenWrt", uppercase |
| 203 | %d .. Distribution name or "openwrt", lowercase |
| 204 | %T .. Target name |
| 205 | %S .. Target/Subtarget name |
| 206 | %A .. Package architecture |
| 207 | %t .. Build taint flags, e.g. "no-all busybox" |
| 208 | %M .. Manufacturer name or "OpenWrt" |
| 209 | %P .. Product name or "Generic" |
| 210 | %h .. Hardware revision or "v0" |
| 211 | |
| 212 | config VERSION_HOME_URL |
| 213 | string |
| 214 | prompt "Release Homepage" |
| 215 | help |
| 216 | This is the release version homepage |
| 217 | |
| 218 | config VERSION_MANUFACTURER |
| 219 | string |
| 220 | prompt "Manufacturer name" |
| 221 | help |
| 222 | This is the manufacturer name embedded in /etc/device_info |
| 223 | Useful for OEMs building OpenWrt based firmware |
| 224 | |
| 225 | config VERSION_MANUFACTURER_URL |
| 226 | string |
| 227 | prompt "Manufacturer URL" |
| 228 | help |
| 229 | This is an URL to the manufacturer's website embedded in /etc/device_info |
| 230 | Useful for OEMs building OpenWrt based firmware |
| 231 | |
| 232 | config VERSION_BUG_URL |
| 233 | string |
| 234 | prompt "Bug reporting URL" |
| 235 | help |
| 236 | This is an URL to provide users for providing bug reports |
| 237 | |
| 238 | config VERSION_SUPPORT_URL |
| 239 | string |
| 240 | prompt "Support URL" |
| 241 | help |
| 242 | This an URL to provide users seeking support |
| 243 | |
| 244 | config VERSION_PRODUCT |
| 245 | string |
| 246 | prompt "Product name" |
| 247 | help |
| 248 | This is the product name embedded in /etc/device_info |
| 249 | Useful for OEMs building OpenWrt based firmware |
| 250 | |
| 251 | config VERSION_HWREV |
| 252 | string |
| 253 | prompt "Hardware revision" |
| 254 | help |
| 255 | This is the hardware revision string embedded in /etc/device_info |
| 256 | Useful for OEMs building OpenWrt based firmware |
| 257 | |
| 258 | config VERSION_FILENAMES |
| 259 | bool |
| 260 | prompt "Version number in filenames" |
| 261 | default y |
| 262 | help |
| 263 | Enable this to include the version number in firmware image, SDK- |
| 264 | and Image Builder archive file names |
| 265 | |
| 266 | config VERSION_CODE_FILENAMES |
| 267 | bool |
| 268 | prompt "Revision code in filenames" |
| 269 | default y |
| 270 | help |
| 271 | Enable this to include the revision identifier or the configured |
| 272 | version code into the firmware image, SDK- and Image Builder archive |
| 273 | file names |
| 274 | endif |
| 275 | |
| 276 | |
| 277 | menuconfig PER_FEED_REPO |
| 278 | bool "Separate feed repositories" if IMAGEOPT |
| 279 | default y |
| 280 | help |
| 281 | If set, a separate repository is generated within bin/*/packages/ |
| 282 | for the core packages and each enabled feed. |
| 283 | |
| 284 | source "tmp/.config-feeds.in" |