HAMNET-Access-Protocol / HNAP4PlutoSDR

Main transceiver application
GNU Lesser General Public License v3.0
27 stars 5 forks source link

Set up build scripts for all ARM build artifacts and the firmware #27

Open dl1com opened 3 years ago

dl1com commented 3 years ago

image

lukasostendorf commented 3 years ago

I've been working on a first version of this. Current state:

create_sysroot.sh

build_firmware.sh

Open questions

I do not want to download the whole firmware repo from scratch every time. It takes much time to download and even more time to compile the linux kernel from scratch every time. What is a good way to check whether it is already downloaded? Currently plutosdr-fw download path is fixed and a check whether the dir exists is performed.

Do we want to let the user choose where to create the plutosdr-fw dir?

Kernel patching and changing the buildroot+kernel configuration must be only done once or it will fail. How to check if this has already been done? The current script does not properly handle this.

dl1com commented 3 years ago

Please see my comments in your commit https://github.com/HAMNET-Access-Protocol/HNAP4PlutoSDR/commit/05bd6211b5ce5f05ca07e61bf4cb6f6ed419b974

Open questions

I do not want to download the whole firmware repo from scratch every time. It takes much time to download and even more time to compile the linux kernel from scratch every time. What is a good way to check whether it is already downloaded? Currently plutosdr-fw download path is fixed and a check whether the dir exists is performed.

Do we want to let the user choose where to create the plutosdr-fw dir?

I'd propose a fixed directory inside a designated build directory within the repo.

Kernel patching and changing the buildroot+kernel configuration must be only done once or it will fail. How to check if this has already been done? The current script does not properly handle this.

I'd propose touching a flag file and check if it exists prior to applying the Kernel modifications. This method won't be sufficient for many cases (e.g. changing to a different Tag / Branch in plutosdr-fw), but for our current quasi-static use case (always v0.32), this would be working, I guess.

dl1com commented 3 years ago

While setting up CI for the build_standalone_binaries.sh script (https://github.com/HAMNET-Access-Protocol/HNAP4PlutoSDR/compare/develop...workflow), I became aware of something we might want to optimize. Currently, the custom sysroot would be built each time we trigger a build, which increases build time unnecessarily to about 3 minutes. We could reduce it by either caching the custom sysroot folder or downloading an already customized sysroot folder: