1
0
mirror of https://git.openwrt.org/openwrt/openwrt.git synced 2024-10-18 21:48:23 +02:00
OpenWrt Source Repository https://openwrt.org/
Go to file
Michael Pratt 5f47ccc0ea tools/elfutils: do not directly link gnulib to libelf
The compiled library resulting from importing gnulib has been
linked to libelf in order to easily cover other link dependencies.
However, this is not appropriate for linking libelf to other programs
as it bloats the resulting libelf library, and may result in
multiple defintions of symbols based on whether or not
certain modules from gnulib are included while elfutils
already has it's own definition of a function.

This is not a problem while building elfutils, because gnulib has
it's own way of creating function aliases and special declarations
that allow the linker to ignore the original function definitions,
however, when libelf is used to link to something else,
this results in an error at link time.

The gnulib manual recommended linking the libraries directly,
but those who have written it may not have considered how this
can affect the ability to link that library in other builds,
they likely assume the build targets would not be a dependency.

Fix this by removing the linking between gnulib and libelf
and instead overriding Make variables in order to add linking
between gnulib and each of the binaries provided by elfutils,
using Make functions to avoid applying it to other subdirectories.

The function tdestroy() would still be missing on macOS,
but the existence of the gnulib tsearch object having been built
is an indicator of whether or not it is needed
because it is only built conditionally by gnulib,
so include linking that object only when it exists.

Block the unnecessary replacement of some functions by gnulib
so that future linking with libelf doesn't require
the associated gnulib "rpl" prefixed functions.
These replacements are very strict in order to correct
minor bugs that don't have a real impact in almost all cases
or new standards requirements that are not yet in effect or used.

Tested-by: Georgi Valkov <gvalkov@gmail.com> # macOS
Signed-off-by: Michael Pratt <mcpratt@pm.me>
Link: https://github.com/openwrt/openwrt/pull/15368
Signed-off-by: Robert Marko <robimarko@gmail.com>
2024-05-31 16:01:43 +02:00
.devcontainer/ci-env devcontainer: Add development environment for gihub codespace 2023-10-30 23:34:26 +01:00
.github uboot-bmips: Add U-Boot for the BMIPS target 2024-05-01 21:30:32 +02:00
config build: add APK package build capabilities 2024-05-17 23:21:26 +03:00
include kernel: bump 6.6 to 6.6.32 2024-05-30 00:04:27 +02:00
LICENSES
package kernel: video-dma: explicitly state packaged modules 2024-05-31 14:38:17 +02:00
scripts scripts: Add GNU ftp mirror redirector for GNU and Savannah 2024-05-29 11:19:08 +02:00
target imagebuilder: fix broken IB_STANDALONE option 2024-05-31 15:48:00 +02:00
toolchain toolchain: gcc: update to 13.3 2024-05-28 23:55:27 +02:00
tools tools/elfutils: do not directly link gnulib to libelf 2024-05-31 16:01:43 +02:00
.gitattributes
.gitignore gitignore: ignore local APK keys 2024-05-17 22:03:06 +03:00
BSDmakefile
Config.in
COPYING
feeds.conf.default
Makefile build: fix pkg-config detection when inside of a nix-shell 2023-11-02 20:26:32 +01:00
README.md README: replace "MacOSX" with "macOS" 2024-04-01 18:46:30 +02:00
rules.mk build: add APK package build capabilities 2024-05-17 23:21:26 +03:00

OpenWrt logo

OpenWrt Project is a Linux operating system targeting embedded devices. Instead of trying to create a single, static firmware, OpenWrt provides a fully writable filesystem with package management. This frees you from the application selection and configuration provided by the vendor and allows you to customize the device through the use of packages to suit any application. For developers, OpenWrt is the framework to build an application without having to build a complete firmware around it; for users this means the ability for 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.

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:

Development

To build your own firmware you need a GNU/Linux, BSD or macOS system (case sensitive filesystem required). Cygwin is unsupported because of the lack of a case sensitive file system.

Requirements

You need the following tools to compile OpenWrt, the package names vary between distributions. A complete list with distribution specific packages is found in the Build System Setup documentation.

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

Quickstart

  1. Run ./scripts/feeds update -a to obtain all the latest package definitions defined in feeds.conf / feeds.conf.default

  2. Run ./scripts/feeds install -a to install symlinks for all obtained packages into package/feeds/

  3. Run make menuconfig to select your preferred configuration for the toolchain, target system & firmware packages.

  4. Run make to build your firmware. This will download all sources, build the cross-compile toolchain and then cross-compile the GNU/Linux kernel & all chosen applications for your target system.

The main repository uses multiple sub-repositories to manage packages of different categories. All packages are installed via the OpenWrt package manager called opkg. If you're looking to develop the web interface or port packages to OpenWrt, please find the fitting repository below.

  • LuCI Web Interface: Modern and modular interface to control the device via a web browser.

  • OpenWrt Packages: Community repository of ported packages.

  • OpenWrt Routing: Packages specifically focused on (mesh) routing.

  • OpenWrt Video: Packages specifically focused on display servers and clients (Xorg and Wayland).

Support Information

For a list of supported devices see the OpenWrt Hardware Database

Documentation

Support Community

  • Forum: For usage, projects, discussions and hardware advise.
  • Support Chat: Channel #openwrt on oftc.net.

Developer Community

License

OpenWrt is licensed under GPL-2.0