How to compile packages from upper version

Kind of a noob question but i could't find any answer.

I have to compile an older version of OpenWRT due to various reasons for some old routers . I have come to the following problem:

  • There are some packages (userspace or scripts nothing kernel related) that I need latest version.
  • How can I acomplish that ? For instance build an image 21 with one package (mainly a script with some dependecies) from 23 ? If I install manualy it works without any issue but the problem is that i need iti built during compile in order to be compressed in squashfs.

Maybe is a noob question but I couldnt find anywhere the answer.

I tried to add as feed as an alternative the package git sources but since the package has the same name does not get installed . I have to dig into that also.

There must be a simple option that i cannot get hold on .

Is's just a simple 5k package.

There is no simple option, you will have to modify the Makefile(s) of your desired package(s) individually.

1 Like

You could try:

Creating a local source for your 23 package on your buildroot box.

  • Make a directory structure like: ~/mypackages/source/package-name

  • Go to github.com/openwrt/packages and select the 23 branch. Select your 23 package and copy the individual source files from the 23 branch package to your local ~/mypackages/source/package-name ie. /files, /Patches, Makefile . . . following the same structure.

  • Add your src-link Mypackages /home/user/mypackages, as the first line to feeds.conf.default and copy it to feeds.conf.
    feeds.conf overrides feeds.conf.default and since your local source for the 23 package is first, it will get pulled in to ./feeds first. The regular 21 package name won't clobber your 23 package.

It is imperitive to Clean your feeds. I just typically use rm -rf feeds.

That should basically be it. When you run ./scripts/feeds/update && ./scripts/feeds/install you should find the 23 package when you run make nconfig/menuconfig under a main menu entry Mypackages. Select it to build it into your custom build.

1 Like

Thank you. It was one of the options that it did work . I was trying something simpler with less file management .

I also managed to do scripts/feeds uninstall xxx
Then /scripts/feed update xxx-feed
Then /scripts/feed install xxxpakage

That way it installs only the package from the feed not from repository as it doesn't know that it exists there .

Still this solution works only for packages that have working sources somewhere .

Actually I had to do both as I have some packages only available in OpenWrt .

Still I think I have to create my special build system and have everything that works for me there and that's it .

Lot of manual work but at least I can get the desired result.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.