OpenWRT and Compiling

Wiki.TerraBase.info
Revision as of 10:44, 12 October 2020 by Root (talk | contribs) (Created page with "This article was written because of several aborted attempts to write and make sense of the OpenWRT build system. As of the first version of the article, it represents just t...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

This article was written because of several aborted attempts to write and make sense of the OpenWRT build system. As of the first version of the article, it represents just tested cliff notes and will be expanded upon.

This article is based on several sources;


  • The below command will download / clone the 19.07 branch of OpenWRT to a specific directory.
    • git clone -b openwrt-19.07 https://github.com/openwrt/openwrt.git ~/openwrt-19.07.3
  • cd openwrt-19.07.3
  • git checkout v19.07.3
  • Verify or Check what has occurred
    • git branch -a (shows all of the available branches of OpenWRT available with an * next to what has been downloaded and cloned)
    • git tag (shows different versions available to build)
  • Update the "feeds"* with the below command. *The documentation on "feeds" notes that "feeds" are 'additional packages'... Additional to what is a question that isn't answered. It is implied that the packages are in addition to other packages which are deemed essential to the operation of OpenWRT. And of course there's the question of 'package'. What is a package? See here: https://openwrt.org/packages/start
    • ./scripts/feeds update -a
  • Install the feeds with the below command. Additional information can be found here: https://openwrt.org/docs/guide-developer/feeds
    • ./scripts/feeds install -a (if there are any 'dependency errors', run the command again)
  • Just as a note, the following Entware command seems to accomplish the same thing (with a minor BASH error)
    • make package/symlinks (no need to actually run this, just noted as a comparison)
  • Prepare the OpenWRT build configuration file
    • make menuconfig (and select packages
    • changes, if saved are stored in the ~/openwrt-19.07.3/.config file and can be manually manipulated
  • Make the tools and toolchain for cross compiling (explicitly, as these commands will be run when the first make command is run)


An article

on removing LuCI from an OpenWRT Image that accidentally does a great job of explaining the different methods of building OpenWRT: https://hamy.io/post/0016/how-to-properly-remove-luci-from-openwrt/#gsc.tab=0

Another article from the same author on a different subject also gives some great insight into other aspects of OpenWRT: https://hamy.io/post/0015/how-to-compile-openwrt-and-still-use-the-official-repository/#gsc.tab=0