Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Use modules-file instead of generating it from config.mk and feeds.conf #781

Closed
wants to merge 2 commits into from

Conversation

SvenRoederer
Copy link
Contributor

The modules-file controls which code of the upstream-repos is used. With the implementation of PR #714 we added some "glue-code" to create the modules file from the currently used files (config.mk, feeds.conf).
This "glue-code" works well with the official Upstream-repos but seems to have some problems with alternative repos as shown by issue #780. This PR drops the "very brittle" code and moves the repo-definitions to modules directly.

  • Drops the additional converting code
  • speeds up build, by not copying each repo an additional time to find the branch of the referencing commit
  • moves the definition of any upstream-repo into a single file (not spread around two files anymore)
  • an instant lookup of the branch, the code firmware-build is based on, is possible

@pmelange
Copy link
Contributor

I am currently building with these changes cherry-picked into a private branch of the "next" branch. The goal is to prototype kernel 5.4 on the erx-sfp.

One thing that I noticed, is that I have to put a commit ID into the modules file. If not, I get the following error:

Initialized empty Git repository in /home/pmelange/src/mt7621/openwrt/.git/     
remote: Enumerating objects: 2, done.                                           
remote: Counting objects: 100% (2/2), done.                                     
remote: Compressing objects: 100% (2/2), done.                                  
remote: Total 488150 (delta 0), reused 0 (delta 0), pack-reused 488148          
Receiving objects: 100% (488150/488150), 171.31 MiB | 5.21 MiB/s, done.         
Resolving deltas: 100% (332298/332298), done.                                   
From https://github.com/vDorst/openwrt                                          
 * branch            ramips-5.4 -> FETCH_HEAD                                   
fatal: Not a valid object name: ''.                                             
unable to find commit "" on branch "ramips-5.4" in repo "https://github.com/vDor
st/openwrt.git".                                                                
make: *** [Makefile:90: .stamp-pre-patch] Error 1                               

It would be really cool if this code would use the HEAD of the branch if no commit-id is given.

So, I would say that this fixes issue #780, but not #477

@pmelange
Copy link
Contributor

Running "make clean" deletes the modules file. Afterwards running make again results in

rm -f /home/pmelange/src/mt7621/openwrt/.config
rm -f .stamp-
make: *** No rule to make target '/home/pmelange/src/mt7621/modules', needed by '.stamp-pre-patch'.  Stop.

Also, it seems like that if I change the commit-id (for example in luci) in the modules file, and run make again, then the new commits are not integrated and built.

@SvenRoederer
Copy link
Contributor Author

fixed in 3443833

Switch from defining the upstream-repos and relating commit in config.mk
and feeds.conf to define all in the modules-file.
The modules-files is the real file used by the build-system to setup the
working checkout. It originates from the Gluon-buildsystemand some
documentation is avail at https://gluon.readthedocs.io/en/latest/dev/build.html
When using the modules-file in place of config.mk and feeds.conf to
define the upstream-repos, there is no need to keep the code which
will synthesize it. This primarily reverts 7a72a84.
@SvenRoederer SvenRoederer changed the title Use modules-file Use modules-file instead of generating it from config.mk and feeds.conf Apr 25, 2020
@SvenRoederer
Copy link
Contributor Author

Any additional feedback?
What about merging this?

@pmelange
Copy link
Contributor

I still haven't gotten around to testing alternative git repos. Specifically I would like to try the equivalent of src-lnk, which I have found to be very useful for prototyping

@Akira25
Copy link
Member

Akira25 commented Apr 25, 2020

I havn't test this, but I like the goals to be achieved by this PR. Sounds like a good Idea.

@pmelange
Copy link
Contributor

I'm having trouble being able to use alternative git feed types. How are we supposed to be able to use the different types of feeds support by openwrt and shown here: https://openwrt.org/docs/guide-developer/feeds

@SvenRoederer
Copy link
Contributor Author

this PR is only about solving the problem described in #780 (interpreting external GIT repos from config.mk and feeds.conf to build the modules-file). In addition this PR should also fix #772.
We should avios to use a solution for an issue (here #780) to solve another different issue (#777 ) too. Even both issues somehow relate to each other.

@SvenRoederer
Copy link
Contributor Author

I'm having trouble being able to use alternative git feed types. How are we supposed to be able to use the different types of feeds support by openwrt and shown here: https://openwrt.org/docs/guide-developer/feeds

@pmelange can you put this into a separate issue?

@pmelange
Copy link
Contributor

I'm having trouble being able to use alternative git feed types. How are we supposed to be able to use the different types of feeds support by openwrt and shown here: https://openwrt.org/docs/guide-developer/feeds

@pmelange can you put this into a separate issue?

See issue #789

@SvenRoederer
Copy link
Contributor Author

Independent of fix for issue #789 this PR will solve the #780 & #772 already.

@SvenRoederer
Copy link
Contributor Author

I'm going to merge this by this week, as it solves to issues and doesn't break anything. I tested it for some time in the "SAm0815-experimental" branches.

SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this pull request May 7, 2020
Switch from defining the upstream-repos and relating commit in config.mk
and feeds.conf to define all in the modules-file.
The modules-files is the real file used by the build-system to setup the
working checkout. It originates from the Gluon-buildsystemand some
documentation is avail at https://gluon.readthedocs.io/en/latest/dev/build.html

This also relates to
* PR freifunk-berlin#781
* Issue freifunk-berlin#780
* Issue freifunk-berlin#772
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this pull request May 7, 2020
When using the modules-file in place of config.mk and feeds.conf to
define the upstream-repos, there is no need to keep the code which
will synthesize it. This primarily reverts 7a72a84.

This also relates to
* PR freifunk-berlin#781
* Issue freifunk-berlin#780
* Issue freifunk-berlin#772
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this pull request May 7, 2020
Switch from defining the upstream-repos and relating commit in config.mk
and feeds.conf to define all in the modules-file.
The modules-files is the real file used by the build-system to setup the
working checkout. It originates from the Gluon-buildsystemand some
documentation is avail at https://gluon.readthedocs.io/en/latest/dev/build.html

This also relates to
* PR freifunk-berlin#781
* Issue freifunk-berlin#780
* Issue freifunk-berlin#772
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this pull request May 7, 2020
When using the modules-file in place of config.mk and feeds.conf to
define the upstream-repos, there is no need to keep the code which
will synthesize it. This primarily reverts 7a72a84.

This also relates to
* PR freifunk-berlin#781
* Issue freifunk-berlin#780
* Issue freifunk-berlin#772
SvenRoederer added a commit that referenced this pull request May 7, 2020
Switch from defining the upstream-repos and relating commit in config.mk
and feeds.conf to define all in the modules-file.
The modules-files is the real file used by the build-system to setup the
working checkout. It originates from the Gluon-buildsystemand some
documentation is avail at https://gluon.readthedocs.io/en/latest/dev/build.html

This also relates to
* PR #781
* Issue #780
* Issue #772
SvenRoederer added a commit that referenced this pull request May 7, 2020
When using the modules-file in place of config.mk and feeds.conf to
define the upstream-repos, there is no need to keep the code which
will synthesize it. This primarily reverts 7a72a84.

This also relates to
* PR #781
* Issue #780
* Issue #772
SvenRoederer added a commit that referenced this pull request May 8, 2020
Switch from defining the upstream-repos and relating commit in config.mk
and feeds.conf to define all in the modules-file.
The modules-files is the real file used by the build-system to setup the
working checkout. It originates from the Gluon-buildsystemand some
documentation is avail at https://gluon.readthedocs.io/en/latest/dev/build.html

This also relates to
* PR #781
* Issue #780
* Issue #772
SvenRoederer added a commit that referenced this pull request May 8, 2020
When using the modules-file in place of config.mk and feeds.conf to
define the upstream-repos, there is no need to keep the code which
will synthesize it. This primarily reverts 7a72a84.

This also relates to
* PR #781
* Issue #780
* Issue #772
@SvenRoederer
Copy link
Contributor Author

merged into master with 487cb33 and c6aa875.

@SvenRoederer SvenRoederer deleted the modules-file branch May 8, 2020 09:03
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this pull request May 8, 2020
Switch from defining the upstream-repos and relating commit in config.mk
and feeds.conf to define all in the modules-file.
The modules-files is the real file used by the build-system to setup the
working checkout. It originates from the Gluon-buildsystemand some
documentation is avail at https://gluon.readthedocs.io/en/latest/dev/build.html

This also relates to
* PR freifunk-berlin#781
* Issue freifunk-berlin#780
* Issue freifunk-berlin#772
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this pull request May 8, 2020
When using the modules-file in place of config.mk and feeds.conf to
define the upstream-repos, there is no need to keep the code which
will synthesize it. This primarily reverts 7a72a84.

This also relates to
* PR freifunk-berlin#781
* Issue freifunk-berlin#780
* Issue freifunk-berlin#772
pmelange pushed a commit that referenced this pull request May 15, 2020
Switch from defining the upstream-repos and relating commit in config.mk
and feeds.conf to define all in the modules-file.
The modules-files is the real file used by the build-system to setup the
working checkout. It originates from the Gluon-buildsystemand some
documentation is avail at https://gluon.readthedocs.io/en/latest/dev/build.html

This also relates to
* PR #781
* Issue #780
* Issue #772
pmelange pushed a commit that referenced this pull request May 15, 2020
When using the modules-file in place of config.mk and feeds.conf to
define the upstream-repos, there is no need to keep the code which
will synthesize it. This primarily reverts 7a72a84.

This also relates to
* PR #781
* Issue #780
* Issue #772
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this pull request May 15, 2020
Switch from defining the upstream-repos and relating commit in config.mk
and feeds.conf to define all in the modules-file.
The modules-files is the real file used by the build-system to setup the
working checkout. It originates from the Gluon-buildsystemand some
documentation is avail at https://gluon.readthedocs.io/en/latest/dev/build.html

This also relates to
* PR freifunk-berlin#781
* Issue freifunk-berlin#780
* Issue freifunk-berlin#772
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this pull request May 15, 2020
When using the modules-file in place of config.mk and feeds.conf to
define the upstream-repos, there is no need to keep the code which
will synthesize it. This primarily reverts 7a72a84.

This also relates to
* PR freifunk-berlin#781
* Issue freifunk-berlin#780
* Issue freifunk-berlin#772
SvenRoederer added a commit to SvenRoederer/freifunk-berlin-firmware that referenced this pull request Feb 3, 2022
55a8827 batman-adv: update to version 2022.0
911a4ba batctl: update to version 2022.0
3aa4cfb alfred: update to version 2022.0
d7adf18 Merge pull request freifunk-berlin#781 from ecsv/batadv-2022.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants