Openwrt Study Notes

Source: Internet
Author: User

Compile openwrt-index with http://blog.csdn.net/openme_openwrt/article/details/7348452


Wiki navigation: http://wiki.openwrt.org/doc/start


Compile openwrt
Early openwrt compilation documentation: http://downloads.openwrt.org/docs/buildroot-documentation.html#about


1 tool chain: http://wiki.openwrt.org/about/toolchain

2 Preparation: http://wiki.openwrt.org/doc/howto/buildroot.exigence

3 compile: http://wiki.openwrt.org/doc/howto/build

4 Add feeds: Http://wiki.openwrt.org/doc/devel/feeds

5 image builder: http://wiki.openwrt.org/doc/howto/obtain.firmware.generate

6 SDK:Http://wiki.openwrt.org/doc/howto/obtain.firmware.sdk

7 rootfs on External Storage (extroot ):

Http://wiki.openwrt.org/doc/howtobuild/extroot.howtobuild

Http://wiki.openwrt.org/doc/howto/extroot

8 wireless router which is connected to either a wired, a wireless or a 3G wireless connection:

Http://wiki.openwrt.org/doc/howtobuild/wireless-router-with-a-3g-dongle

9 how to build a single package

Http://wiki.openwrt.org/doc/howtobuild/single.package


Developing Development


1 cross compile: http://wiki.openwrt.org/doc/devel/crosscompile


External compiler settings

Https://forum.openwrt.org/viewtopic.php? Id = 32330

Https://forum.openwrt.org/viewtopic.php? Id = 29804

Https://forum.openwrt.org/viewtopic.php? Id = 12436

Internal compiler settings

2 creating packages:Http://wiki.openwrt.org/doc/devel/packages

3 feeds:Http://wiki.openwrt.org/doc/devel/feeds

4 using dependencies: http://wiki.openwrt.org/doc/devel/dependencies

5 How to submit patches to openwrt:

Https://dev.openwrt.org/wiki/SubmittingPatches

6 external toolchain-Use openwrt as external toolchain

Http://wiki.openwrt.org/doc/howto/external_toolchain

Https://lists.openwrt.org/pipermail/openwrt-devel/2009-February/003774.html

Http://blog.csdn.net/openme_openwrt/article/details/8299215 openwrt method for removing strip or resetting strip Parameters

Http://andelf.diandian.com/post/2013-05-22/40050677370 add new device


Http://wiki.openwrt.org/doc/devel/packages production package reference

Section: = segment of the Base in opkg
Category: = classification of network in menuconfig
Default: = y is selected by default in menuconfig.
Pkg_release is similar to the tail sub-version of the arch package, refer to i2c-gpio-custom, kernel. mk package-default.mk


Pkg_cat-how to decompress the sources (zcat, bzcat, unzip)

  • Pkg_name-the name of the package, as seen via menuconfig and ipkg

  • Pkg_version-the upstream version number that we're re downloading

  • Pkg_release-the version of this package makefile

  • Pkg_license-the license (s) the package is available under, spdx form.

  • Pkg_license_file-file containing the license text

  • Pkg_build_dir-Where to compile the package

  • Pkg_source-the filename of the original sources

  • Pkg_source_url-Where to download the sources from (directory)

  • Pkg_md5sum-a checksum to validate the download

  • Pkg_cat-how to decompress the sources (zcat, bzcat, unzip)

  • Pkg_build_depends-packages that need to be built before this package, but are not required at runtime. uses the same syntax as depends below.

  • Pkg_install-setting it to "1" will call the package's original "make install" with prefix set to pkg_install_dir

  • Pkg_install_dir-Where "make install" copies the compiled files

  • Pkg_fixup -???


Adding configuration options

If you wowould like configure your package installation/compilation in the menuconfig you can do the following: Add menu: = 1 to your package definition like this:

define Package/mjpg-streamer  SECTION:=multimedia  CATEGORY:=Multimedia  TITLE:=MJPG-streamer  DEPENDS:[email protected]!LINUX_2_4 +libpthread-stubs +jpeg  URL:=http://mjpg-streamer.wiki.sourceforge.net/  MENU:=1endef

Create a Config Key in the makefile:

define Package/mjpg-streamer/configsource "$(SOURCE)/Config.in"endef


And finally you can check your configuration parameters in your makefile in the following way: (Note that you can reference to the parameters value with it name prefixed with config _)

ifeq ($(CONFIG_MJPEG_STREAMER_INPUT_UVC),y)$(CP) $(PKG_BUILD_DIR)/input_uvc.so $(1)/usr/libendif

Kernel module autoload

  AUTOLOAD:=$(call AutoLoad,30,loop)


define Build/InstallDev$(INSTALL_DIR) $(STAGING_DIR)/usr/include/madwifiendef

Http://wiki.openwrt.org/doc/devel/dependencies dependency, close look

In depends @ gpio_support will appear in depends in menuconfig, and other sub-packages + kmod-i2c-core will not appear in it, will be referenced by opkg's package dependency


Extra_kconfig: = config_spi_gpio_custom = m (SPI-gpio-custom package)

Extra_cflags

Autoload indicates that it will be automatically loaded and put into/etc/modules. d/

Files

Pkg_build_parallel parallel Compilation

Http://wiki.openwrt.org/doc/devel/feeds add custom feed method using Src-link local Link Method

Src-link customfeed/home/user/openwrt/project/Packages

Pkg_file_depends and pkg_build_depneds: = opkg/Host

Reference base-files example

This article is from the blog "gun and Rose", please be sure to keep this source http://axlrose.blog.51cto.com/434566/1530954

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.