I opened a fork of openwrt/packages. I modded just the init, config, and Makefile files in my forked repo and added a hotplug script and README.md files.
It's been pretty easy just to add my modifications in my
Buildroot/files and select the relevant package from the openwrt/packages feed in
make nconfig to compile the binaries. Now that I've accomplished the changes I wanted I figured I'd try this approach in my Buildroot: *https://openwrt.org/docs/guide-developer/build-system/use-buildsystem#creating_a_local_feed
Points 1 & 2 are clear enough, but I struggle starting at point 3.
? - please correct me:
I assume I want the
Makefile from my forked repo I modified to add the hotplug script, and I have download the source package from sources.openwrt.org, extracted the tarball and placed the files in my Buildroot/<package_name> directory.
Forgive me for being obtuse, but could some one explain to me how this updates/installs my changes into my local Buildroot?
Just copy the folder where resides the package you have modified.
Makefile and directory files and other if there is !
The full directory.
Copy it to another destination (it is the my_package reference of the documentation)...
Then add in
feeds.conf.default the src-link to your new directory (my_package).
Check and add with
./scripts/feeds update -a and
./scripts/feeds install -a
Then you can do your make,
make menuconfig or make
Hope it will help, but keep it simple.
Creating a local feed
<buildroot> with git cloning openwrt sources from github (e.g. from your fork).
Create a dir:
mkdir -p <buildroot>/my_packages/<section>/<category>/<package_name>.
<package_name> with the name of your package.
mkdir -p my_packages/net/network/rpcbind.
The section and category can be found in the
Write a Makefile or download one
Makefile from another package, look at samples on github.
Edit your Makefile and add necessary files, sources...
Append a line with your custom feed to
src-link my_packages <buildroot>/my_packages.
<buildroot> with cloned openwrt sources directory e.g.
Move the line with your custom feed above standard feeds to override them.
./scripts/feeds update -a; ./scripts/feeds install <package_name>
If you are doing this to resolve a dependency you can run
install one more time and you should notice the dependency has been resolved.
Build your package.
Select it in the menu of
Build it with
EDIT : the same doc as https://openwrt.org/docs/guide-developer/build-system/use-buildsystem#creating_a_local_feed but a little reordered !
Thank you! Much clearer.
I'm going to rebuild my buildroot first. Who knows what havoc I may have created to it.
@vgaetera I have review/reword this section on the wiki
It seems I am still missing a link to the solution.
By the steps:
go to my fork of openwrt/packages in github, select my branch, select
Code and generate a zip archive - i.e. Clone my source.
in my buildroot I
mkdir -p /openwrt/my_package/net/network/<package_name> and extract my
<package_name> contents here.
Makefile has been updated properly.
I append a line with my custom feed to the top of
src-link my_package <buildroot>/<package_name>
./scripts/feeds update -a -f; ./scripts/feeds install -a -f
Build new firmware incorporating <package_name> into new build:
make nconfig, select <package_name>, and save .config and run
date && make -j $(($(nproc)+1)) download && date && make -j $(($(nproc)+1)) && date
Result: same package as openwrt/packages results, not my updated package.
(It's been a trial considering everything already worked by simply copying
config, init.d, and hotplug scripts into
<buildroot>/files, but then, I did ask for this ¯\_(ツ)_/¯ .
After several days trying different permutations and builds, I cannot make it work as advertised, but, simply overlaying the openwrt/feeds/packages/net/ with my
openwrt/my_package/net/network/<my_package> does produce a working build to my specs.
/openwrt/my_package/net/network/<package_name> into the relevent Master
/openwrt/feeds/packages/net/<my_package>, and rebuilt once more - AND - It all works in the new build!
Looking through my buildroot, I did notice that
openwrt/feeds/my_package indicates link(broken)` in a directory listing. Haven't pursued that yet.
Convoluted I'm sure. I can make my build work with this workaround, but cannot make it work with a local source????????????????????????? per the wiki.
Any further HINTS?