Quickstart guide compiling OpenWrt

@sycohexor: I think you'll get what you need for a working image by selecting the correct target, but not much more. LuCi has to be selected explicitly.

I've finished the first version of the guide: https://lede-project.org/docs/user-guide/beginners-build-guide
Let me know what you think. The goal is to give anyone the bare minimum needed to start building their own firmwares.

@per: looks good to me, i agree understanding the bare minimums at first to build your own image will help with a lot less bricking and keep the fear out of peoples minds that development is a scary brainyack thing only geniuses are capable of, also leading to more improvements and releases, just beware with other peoples builds you never know if they dropped in a backdoor :stuck_out_tongue:

if the guide was for freshhand developers, it would be better if u explain a little bit about how openwrt is built. like kernel, toolchain, packages, mkimage, etc.

It's for normal users who have no clue as to what git is or even how to use Linux and bash.

@mwarning: I'm not sure it's a good idea to hard code a particular version in the docs. You could link to my guide (specifically https://lede-project.org/docs/user-guide/beginners-build-guide#initial_check_out_of_the_code), which explains how to list and check out a particular version.

Just to clarify, is this $source_directory/files ?

Edit: found the answer, yes. https://lede-project.org/docs/guide-developer/use-buildsystem#custom_files

Can I ask couple noob questions to improve my personal knowledge?

  1. If I use steps from this page: https://lede-project.org/docs/guide-developer/quickstart-build-images
    will built images have all latest fixes/commits or I need to do something else?
  2. How to update everything before new build? There are only steps for 1st build.
  3. If I add LuCI in menuconfig, it will be enabled by default or I still need ssh to enable it?
  1. Edit: Looks like it's got you using the current master branch, so yeah that's the most current available source. It may be better to use a snapshot if you're developing, or release if you want guaranteed stability.
  2. You just make your changes, save the config, and build again. It doesn't have to recompile the entire toolchain so that save a lot of time. Successive compiles are much faster than the first.
  3. If you star it, it's included, so yes enabled by default, if it's an M, it's an .ipk that you can transfer to your device and install with opkg.

Thanks for info.

  1. I need only master branch - I'm not a developer, I just need support for specific hardware, which is not in stable yet.
    Also, I don't know how to get specific snapshot or release source (can not think what to google or what exactly to look for to get answer). Can you teach?
  2. That is not what I had in mind. It is possible to quickly get/update files or I should just run all commands again from section "Get the LEDE source code:" from that quickstart page (will not take much time, but maybe this is not very correct solution).
    Edit: Tried that and it won't clone source again, because such dir already exists. Next ./scripts/feeds commands are working, but they won't update existing main source files. Update: Well, "git pull" is the answer. :slight_smile:

I created a script a while back to auto-configure and build an image on Ubuntu, which can be found on my GitHub

does the script add patches or extra files?

Neither... it simply installs all required packages in Ubuntu, builds the build environment, runs menuconfig, creates your diff, then builds the image.

  • As mentioned on my GitHub, if you have custom files to add, uncomment and edit the appropriate lines.

Is subversion still required?

There are only a few non-core packages whose source can be fetched only with svn. But no core package uses it any more. So, subversion has not been a prerequisite since July 2016:

I have updated the description - in case someone stumbles over this thread.

could someone post a guide on how to compile packages for openwrt?

I've put my own howto here: https://github.com/mwarning/openwrt-examples (anybody feel free to use it for the wiki).


This seems like a life-skill i should try and develop... might just not be me who sometimes complicates things. This was way better. I'm no coder, but this is a good summery. TLDR, or what you want to call it. Thanks

1 Like