[OpenWrt-Devel] Project specific settings

Bruno Randolf br1 at einfach.org
Wed Sep 16 11:23:10 EDT 2015

Hi Christoph,

On 09/15/2015 07:32 PM, Rüdiger, Christoph wrote:
> Our build tree is full of custom patches to different packages,
> mainly in the openwrt/package directory. This makes it close to
> impossible to update the repository to a new OpenWrt version without
> producing a good bunch of merge conflicts.

I have go thru this pain every time I do a major upgrade between OpenWRT
releases, but AFAIK there is no real solution, except keeping your diffs

You can override packages from openwrt/packages with a package from your
own feeds with the "./scripts/feeds install -f" option (see commit I
quote below), but as openwrt/packages are considered essential packages
and are usually tightly integrated into the whole system, in general
you'd have to update/merge your own overriding package anyhow, so in
practice you might as well change openwrt/packages directly...

Usually, and when done regularly, "git merge upstream-15.05/master"
works, but sometimes it creates merge errors. In this case it can help
to do merge like this, to favour upstream, but keep your own additions:

  git merge -s recursive -X theirs upstream-15.05/master

Followed by thorough diffing to upstream-15.05/master and your own
branch to make sure you keep all necessary changes from both branches.

Anyone who knows a better way, please let us know...


commit 80710b0f2796c0573e78d200ec185e3d8d7db0c8
Author: blogic <blogic at 3c298f89-4303-0410-b956-a3cf2f4a3e73>
Date:   Mon Feb 9 12:09:23 2015 +0000

    build: allow openwrt.git packages to be replaced by feeds

    Currently, replacing a package available in openwrt.git requires
    modifications in openwrt.git, or requires duplicating the package in a
    feed but with a different name, which causes all kind of problems
    related to dependencies (all packages selecting it would have to be
    modified accordingly to select the new package).

    With this change, if a package with the same name is present both in
    feeds/ and package/ folders, the one in feeds/ can override the one
    in package/, both in the menuconfig and during the build, by passing the
    "-f" option to "./scripts/feeds install"

    This mechanism is particularly useful for vendor tree, or in general for
    application which needs to replace one particular package which exists
    within openwrt.git by a custom/newer version.

    Signed-off-by: Mathieu Olivari <mathieu at qca.qualcomm.com>
openwrt-devel mailing list
openwrt-devel at lists.openwrt.org

More information about the openwrt-devel mailing list