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

Add support for OpenWRT builds #10228

Open
mark-stopka opened this issue Sep 30, 2020 · 21 comments
Open

Add support for OpenWRT builds #10228

mark-stopka opened this issue Sep 30, 2020 · 21 comments
Labels

Comments

@mark-stopka
Copy link

Is your feature request related to a problem? Please describe.
I think the process for building OpenWRT packages is terrible,

Describe the solution you'd like
I would like Open Build Service which I use often to support OpenWRT packages also.

Describe alternatives you've considered
Building custom CD workflow for 3rd party software out of their repo, which breaks traditional distribution release workflow.

Additional context
I would be willing to financially contribute and I think CZ.NIC who makes Turris Omnia would also appreciate better OpenWRT system, correct @miska?

@adrianschroeter
Copy link
Member

Most of the needed work is described here:

https://github.com/openSUSE/obs-build/blob/master/HOWTO.add_another_format

you can run local builds easily via the build script. Ask on IRC or mailing list if you need help.

@miska
Copy link
Member

miska commented Oct 13, 2020

I was looking nto that, tricky part is that it is hard to make something like -devel packages out of OpenWrt build and SDK :-(

@mark-stopka
Copy link
Author

mark-stopka commented Oct 13, 2020 via email

@miska
Copy link
Member

miska commented Oct 17, 2020

Sure, I might have some contact information how to reach you, just us two is ok, or does somebody else want to join the discussion?

@mark-stopka
Copy link
Author

mark-stopka commented Oct 17, 2020 via email

@mark-stopka
Copy link
Author

@adrianschroeter I think OpenWRT by default uses cross-compilation so we may avoid using Qemu for cross-platform builds and this implement in a way that is secribed as SAFE here, without the many risks of executing arbitrary code, @miska do I remember correctly from our last conversation about this?

@adrianschroeter
Copy link
Member

the cross build would most likely still happen inside of any VM mode, so using KVM would make it secure.

The only problem which may appear is that you may need to track dependency for host and target independend. But you could try first without (and having always the superset of dependencies). You may need to package the openwrt packages in addition into a rpm/deb/arch in first step. So you would just need to implement the build-receipe-openwrt.

We could do native binary package format parsing and/or cross dependency resolutions in later steps.

@mark-stopka
Copy link
Author

@pavlix, would you be able to assist?

@mark-stopka
Copy link
Author

@vyskocilm could perhaps have the right balance of bandwidth and skill, as discussed with @miska today...

@mark-stopka
Copy link
Author

@nijel aren't you building OpenWRT images / packages for Braiins OS+ and Braiins OS?

@nijel
Copy link
Contributor

nijel commented Nov 5, 2020

@mark-stopka I'm not involved in Braiins OS builds at all, sorry. The build system used there is at https://github.com/braiins/braiins/tree/bos-devel/braiins-os

@adrianschroeter
Copy link
Member

adrianschroeter commented Nov 5, 2020

@miska regarding OpenWRT build and SDK: I would suggest for the start that you put it into an opkg package manually.

We can also think about to change the preinstallimage mechanic into something what is able to install the system without the need to have it some package before (atm it is only cache mechanic). I can help with that if needed.

@mark-stopka
Copy link
Author

@nijel, thanks for the link, it looks like almost a reasonable build system for OpenWRT :-) what do you think @pavlix, @miska?

@pavlix
Copy link

pavlix commented Nov 16, 2020

As far as I know the dependency system in OpenWRT builds (SDK would work the same I guess) just calls into the build of the dependencies before building the requested package. The results are freely kept in directories that are used in subsequent build. A build service based approach might be much more reliable than the current way.

@miska Why don't we just cache the newly added files to staging_dir as -devel packages. OpenWRT already supports host and target packages, right? We could just hook into the build process and pick up everything we need to create a new type of host packages? Correct me if I'm wrong. I didn't check all the details.

@zoobab
Copy link

zoobab commented Feb 22, 2022

I am looking to add support OpenWRT support to OBS in the context of GSOC 2022 under the Freifunk umbrella, right now I wrapped the SDK in a docker image, and I am using Docker build args to pass some variables, like the git location of the Makefiles:

https://github.com/zoobab/openwrtsdkbuild

Will try to check OBS but the docker-compose.yml to start hacking does not work here, it seems it wants to "build" something which fails here.

@adrianschroeter
Copy link
Member

the docker file makes only sense for webui development.

Please check out this instead:

https://github.com/openSUSE/obs-build/blob/master/HOWTO.add_another_format

if you add support in build (and/or pbuild) we can take care of the OBS parts easily. feel free to reach out via mailing list or IRC for further support though.

@zoobab
Copy link

zoobab commented Feb 25, 2022

"Internet access is not available during the build."

If you use the OpenWRT SDK, you could build your package without internet access, if you have the tarball on localhost.

I am new to OBS, but I can see the tarballs are cached/stored on OBS.

@ndren
Copy link

ndren commented May 6, 2023

Hi!

I've been recently approved for GSoC 2023 to work on adding support for OpenWRT under the Freifunk project. I'd love to talk and learn more about how this could work! I've just set up a local build system as per https://github.com/openSUSE/open-build-service/blob/master/CONTRIBUTING.md#how-to-setup-an-obs-development-environment.

How could I set up a package for a different build recipe (for example build-recipe-arch) so I could get useful logs and keep track of what is happening at each build stage to slowly port towards build-recipe-openwrt? I could not figure out what calls build-recipe-* exactly. (In short, what is a good, simple example package I can use to verify the changes I make to the build system "work"?)

@hennevogel
Copy link
Member

hennevogel commented May 8, 2023

@ndren https://github.com/openSUSE/obs-build/blob/master/HOWTO.add_another_format

and you will probably get attention of more people if you discuss large changes in advance on the developer mailing list.

@ndren
Copy link

ndren commented May 8, 2023

@hennevogel Thanks, I've already posted to the mailing list. I'm reading through the flatpak support PR to see how that was implemented.

@antermin
Copy link

It seems that openSUSE/obs-build#934 is about building OpenWrt packages, and not about building OpenWrt images?

Can we request OpenWrt images too? Or are building firmware images out-of-scope for OBS?

(Currently GitHub CI can be used for building OpenWrt images, but it is rather slow.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

10 participants