Buildroot & offline package


please try to be kind I am new to both linux and elinux.

I am trying to built an image using a modified version of one of the package selected for build.

Is there a way I could modified the "makefile" file inside the package directory (/openwrt/package/...)

so that the PKG_SOURCE_URL:=https://...... will point to an offline downloaded (git cloned) directory where I modified

some of the package bits ?

Please correct if I am wrong: I am assuming that the make file will download the package from the repo

and build/compile as per my setting so If a want a modified version of the package I could download an

offline cloned repo, modify it, and then tell the" makefile" where to look for my version of the package.

In case my procedure is logical, what would happen to the other values:






inside the 'makefile' file ?

Thank You very much indeed.


It will download the source as described in the Makefile, yes.

You can also use patches, which is a more easily maintainable way of managing changes relative to upstream sources.

I'm not sure what you're looking for in the other fields. They are pretty typical for package systems. What specific questions do you have around entries for the Makefile package metadata?

Hi Jeff,

I am stil trying to have acces to channel 13 of my router radio when I connect the second radio usb wifi dongle to it.

I was thinking at modifing the db.txt file of the openwrt/pakage/firmware/wireless-regdb package.

Problem is that the makefile points to a git repo, so I was wondering If I could download the repo locally, modify the db.txt and then having makefile to point to the offline copy of the repo.

I read about the buildroot override-srcdir mechanism, but I am not sure it would be feasible with openwrt buildroot, I cannot find the the 'Build options' sub-menu:

($(CONFIG_DIR)/ location of a package override file as per:


So, by default, Buildroot will look for a file named "" in the
same directory with the .config file. You can change the location where
to find that file. If it does not exist, that's not an error. If it
exists, Buildroot will parse it.

The file is suposed to include override-srcdir directives, like

MY_PACKAGE_OVERRIDE_SRCDIR = /path/to/my/local/source/for/my/package

For example:

LINUX_OVERRIDE_SRCDIR = /path/to/my/linux
UBOOT_OVERRIDE_SRCDIR = /path/to/my/uboot

With those, Buildroot will conclude that it should download the affected
package, and just use the sources it finds in the specified directory.
Note that Buildroot will not apply any patches in this case; you are
responsbile for propagating whatever patch you need. Buildroot jsut use
the sources as-is.

moreover I'll have to figure out what about the patches inside openwrt/package/firmware/wireless-regdb/patches.

Just speculating

This channel 13 problem is bugging me a lot :wink:

I havent read anything at all about patches, so far. Please point me towards and easy explanation web available, of them, will you ?. I red about the build and compiling but everything is still confusing to me.

If the patches files describe the difference between the sources invoked by makefile and the one modified by myself ...... but still dont understand how they are managed by buildroot.

Thanks again


got the hyperlink about patches I am on them

Hi Jeff,

sorry to bother. Before I started reading about diff and patch I tried to modify the wireless-regdb package (inside firmware) db.txt file with channel 13 present in US settings into the openwrt/dl directory. After that I cleaned my builds with make clean and make dirclean and launched make again. With my surprise the compiled bulid brought up the original wireless-regdb package. After inspecting the dl directory where openwrt store downloaded packages etc.. I found two copy of the wireless-regdb pakage: the one modified by me and another one.

My question is does the makefile checks the package source date version hash contained into the makefile
described above and in case they are not the expected ones re-download the package ? I am in the process of trying with the patch approach but was just wondering about what happened to grasp the logic of the buildroot system. ? If my idea is correct could I just delete the package atttributes from makefile to let the system read my modified wirelessregdb ?

THanks again



The forum guidelines do not permit anyone to post a response describing a solution to your issue:

It should bug you. Channel 13 is not a legal band for WiFi usage in the United States. I would be nervous too - if attempting to violate the Communications Act.

Also, I do not believe you can modify WiFi channels in that manner.


OP is having some strange problems with, as I understand it, plugging in a second wireless adapter and losing the ability to configure the on-board wireless.

1 Like

Hi yep I am not in the US. Problem I was getting is described here:

I resorted to the patch approach after trying to figure out what was happening.

I'll go back to that post and add the dmesg the system was giving me while booting with the _USB wifi dongle

attached. I dont remember exactly but it was like the system was trying to set the regulatory region twice

after detectiong the wifi usb.

I'll post it as soon as I recreate the configuration.

Thank to everybody again



1 Like