Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
The diff you're trying to view is too large. We only load the first 3000 changed files.
6 changes: 4 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ $(if $(findstring $(space),$(TOPDIR)),$(error ERROR: The path to the OpenWrt dir

world:

DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep -E '\/usr' -m 1)
export PATH:=$(TOPDIR)/staging_dir/host/bin:$(PATH)
DISTRO_PKG_CONFIG:=$(shell $(TOPDIR)/scripts/command_all.sh pkg-config | grep '/usr' -m 1)

export ORIG_PATH:=$(if $(ORIG_PATH),$(ORIG_PATH),$(PATH))
export PATH:=$(if $(STAGING_DIR),$(abspath $(STAGING_DIR)/../host/bin),$(TOPDIR)/staging_dir/host/bin):$(PATH)

ifneq ($(OPENWRT_BUILD),1)
_SINGLE=export MAKEFLAGS=$(space);
Expand Down
20 changes: 19 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,24 @@ full customization, to use the device in ways never envisioned.

Sunshine!

## Download

Built firmware images are available for many architectures and come with a
package selection to be used as WiFi home router. To quickly find a factory
image usable to migrate from a vendor stock firmware to OpenWrt, try the
*Firmware Selector*.

* [OpenWrt Firmware Selector](https://firmware-selector.openwrt.org/)

If your device is supported, please follow the **Info** link to see install
instructions or consult the support resources listed below.

##

An advanced user may require additional or specific package. (Toolchain, SDK, ...) For everything else than simple firmware download, try the wiki download page:

* [OpenWrt Wiki Download](https://openwrt.org/downloads)

## Development

To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case
Expand All @@ -26,7 +44,7 @@ documentation.

```
binutils bzip2 diff find flex gawk gcc-6+ getopt grep install libc-dev libz-dev
make4.1+ perl python3.6+ rsync subversion unzip which
make4.1+ perl python3.7+ rsync subversion unzip which
```

### Quickstart
Expand Down
24 changes: 15 additions & 9 deletions config/Config-build.in
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@

config EXPERIMENTAL
bool "Enable experimental features by default"
default n
help
Set this option to build with latest bleeding edge features
which may or may not work as expected.
Expand Down Expand Up @@ -42,7 +41,6 @@ menu "Global build settings"

config BUILDBOT
bool "Set build defaults for automatic builds (e.g. via buildbot)"
default n
help
This option changes several defaults to be more suitable for
automatic builds. This includes the following changes:
Expand Down Expand Up @@ -75,18 +73,15 @@ menu "Global build settings"

config DISPLAY_SUPPORT
bool "Show packages that require graphics support (local or remote)"
default n

config BUILD_PATENTED
default n
bool "Compile with support for patented functionality"
help
When this option is disabled, software which provides patented functionality
will not be built. In case software provides optional support for patented
functionality, this optional support will get disabled for this package.

config BUILD_NLS
default n
bool "Compile with full language support"
help
When this option is enabled, packages are built with the full versions of
Expand All @@ -100,22 +95,19 @@ menu "Global build settings"
config CLEAN_IPKG
bool
prompt "Remove ipkg/opkg status data files in final images"
default n
help
This removes all ipkg/opkg status data files from the target directory
before building the root filesystem.

config IPK_FILES_CHECKSUMS
bool
prompt "Record files checksums in package metadata"
default n
help
This makes file checksums part of package metadata. It increases size
but provides you with pkg_check command to check for flash corruptions.

config INCLUDE_CONFIG
bool "Include build configuration in firmware" if DEVEL
default n
help
If enabled, buildinfo files will be stored in /etc/build.* of firmware.

Expand Down Expand Up @@ -149,10 +141,24 @@ menu "Global build settings"
config DEBUG
bool
prompt "Compile packages with debugging info"
default n
help
Adds -g3 to the CFLAGS.

config USE_GC_SECTIONS
bool
prompt "Dead code and data elimination for all packages (EXPERIMENTAL)"
help
Places functions and data items into its own sections to use the linker's
garbage collection capabilites.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-gc-sections

config USE_LTO
bool
prompt "Use the link-time optimizer for all packages (EXPERIMENTAL)"
help
Adds LTO flags to the CFLAGS and LDFLAGS.
Packages can choose to opt-out via setting PKG_BUILD_FLAGS:=no-lto

config IPV6
def_bool y

Expand Down
24 changes: 20 additions & 4 deletions config/Config-devel.in
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@

menuconfig DEVEL
bool "Advanced configuration options (for developers)"
default n

config BROKEN
bool "Show broken platforms / packages / devices" if DEVEL
default n

config BINARY_FOLDER
string "Binary folder" if DEVEL
Expand All @@ -17,6 +15,20 @@ menuconfig DEVEL
Store built firmware images and filesystem images in this directory.
If not set, uses './bin/$(BOARD)'

config DOWNLOAD_TOOL_CUSTOM
string "Use custom download tool" if DEVEL
default ""
help
Use and force custom download tool instead of relying on autoselection
between curl if available and wget as a fallback.

download.pl supports 3 tools officially aria2c, curl and wget.
If one of the tool is used in this config, download.pl will use the
default args to make use of them.

If the provided string is different than aria2c, curl or wget, the command
is used as is and the download url will be appended at the end of such command.

config DOWNLOAD_FOLDER
string "Download folder" if DEVEL
default ""
Expand All @@ -39,12 +51,17 @@ menuconfig DEVEL

config AUTOREMOVE
bool "Automatic removal of build directories" if DEVEL
default n
help
Automatically delete build directories after make target completed.
This allows you to symlink build_dir into a scratch location, e.g. a ramdisk,
which does not have enough space to keep a complete build_dir.

config BUILD_ALL_HOST_TOOLS
bool "Compile all host tools" if DEVEL
help
Compile all host host tools even if not needed. This is needed to prepare a
universal precompiled host tools archive to use in another buildroot.

config BUILD_SUFFIX
string "Build suffix to append to the target BUILD_DIR variable" if DEVEL
default ""
Expand All @@ -63,7 +80,6 @@ menuconfig DEVEL

config CCACHE
bool "Use ccache" if DEVEL
default n
help
Compiler cache; see https://ccache.samba.org/

Expand Down
28 changes: 14 additions & 14 deletions config/Config-images.in
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ menu "Target Images"
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_lantiq
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_mpc85xx
default TARGET_INITRAMFS_COMPRESSION_LZMA if TARGET_ramips
default TARGET_INITRAMFS_COMPRESSION_ZSTD if TARGET_qualcommax
default TARGET_INITRAMFS_COMPRESSION_XZ if USES_SEPARATE_INITRAMFS
default TARGET_INITRAMFS_COMPRESSION_NONE
depends on TARGET_ROOTFS_INITRAMFS
Expand All @@ -36,18 +37,15 @@ menu "Target Images"
bool "lzma"

config TARGET_INITRAMFS_COMPRESSION_LZO
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
bool "lzo"

config TARGET_INITRAMFS_COMPRESSION_LZ4
depends on !TARGET_ROOTFS_INITRAMFS_SEPARATE
bool "lz4"

config TARGET_INITRAMFS_COMPRESSION_XZ
bool "xz"

config TARGET_INITRAMFS_COMPRESSION_ZSTD
depends on !LINUX_5_4 && !LINUX_4_19
bool "zstd"
endchoice

Expand All @@ -61,7 +59,6 @@ menu "Target Images"
config TARGET_INITRAMFS_FORCE
bool "Force"
depends on TARGET_ROOTFS_INITRAMFS
default n
help
Ignore the initramfs passed by the bootloader.

Expand Down Expand Up @@ -130,7 +127,6 @@ menu "Target Images"
config TARGET_EXT4_JOURNAL
bool "Create a journaling filesystem"
depends on TARGET_ROOTFS_EXT4FS
default n
help
Create an ext4 filesystem with a journal.

Expand All @@ -151,14 +147,17 @@ menu "Target Images"
bool "squashfs"
default y if USES_SQUASHFS
help
Build a squashfs-lzma root filesystem.
Build a squashfs root filesystem.

config TARGET_SQUASHFS_BLOCK_SIZE
int "Block size (in KiB)"
depends on TARGET_ROOTFS_SQUASHFS
default 64 if LOW_MEMORY_FOOTPRINT
default 1024 if (SMALL_FLASH && !LOW_MEMORY_FOOTPRINT)
default 256
help
Select squashfs block size, must be one of:
4, 8, 16, 32, 64, 128, 256, 512, 1024

menuconfig TARGET_ROOTFS_UBIFS
bool "ubifs"
Expand Down Expand Up @@ -205,11 +204,12 @@ menu "Target Images"

config GRUB_EFI_IMAGES
bool "Build GRUB EFI images (Linux x86 or x86_64 host only)"
depends on TARGET_x86
depends on TARGET_x86 || TARGET_armsr
depends on TARGET_ROOTFS_EXT4FS || TARGET_ROOTFS_JFFS2 || TARGET_ROOTFS_SQUASHFS
select PACKAGE_grub2
select PACKAGE_grub2-efi
select PACKAGE_grub2-bios-setup
select PACKAGE_grub2 if TARGET_x86
select PACKAGE_grub2-efi if TARGET_x86
select PACKAGE_grub2-bios-setup if TARGET_x86
select PACKAGE_grub2-efi-arm if TARGET_armsr
select PACKAGE_kmod-fs-vfat
default y

Expand All @@ -232,7 +232,6 @@ menu "Target Images"
config GRUB_FLOWCONTROL
bool "Use RTE/CTS on serial console"
depends on GRUB_SERIAL != ""
default n

config GRUB_BOOTOPTS
string "Extra kernel boot options"
Expand Down Expand Up @@ -268,7 +267,7 @@ menu "Target Images"

config VMDK_IMAGES
bool "Build VMware image files (VMDK)"
depends on TARGET_x86
depends on TARGET_x86 || TARGET_armsr
depends on GRUB_IMAGES || GRUB_EFI_IMAGES
select PACKAGE_kmod-e1000

Expand All @@ -280,18 +279,20 @@ menu "Target Images"

config TARGET_IMAGES_GZIP
bool "GZip images"
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armvirt || TARGET_malta
depends on TARGET_ROOTFS_EXT4FS || TARGET_x86 || TARGET_armsr || TARGET_malta
default y

comment "Image Options"

source "target/linux/*/image/Config.in"
source "target/linux/*/*/image/Config.in"

config TARGET_KERNEL_PARTSIZE
int "Kernel partition size (in MiB)"
depends on USES_BOOT_PART
default 8 if TARGET_apm821xx_sata
default 64 if TARGET_bcm27xx
default 128 if TARGET_armsr
default 16

config TARGET_ROOTFS_PARTSIZE
Expand All @@ -311,7 +312,6 @@ menu "Target Images"

config TARGET_ROOTFS_PERSIST_VAR
bool "Make /var persistent"
default n
help
Do not symlink /var to /tmp, so that its content will persist
across reboots. When enabled, /var/run will still be linked
Expand Down
Loading