Open Troyhy opened 5 years ago
I have a docker container working to compile the T16 firmware from source. I'll post it soon after some cleanning.
Friendly reminder, that Dockerfile would be appreciated!
I know, I know, just mega busy on the MPM code lately... I have to add some new protocols to the radio GUI so I need to recompile the JumperTX fw to test, I'll do the cleanning at that time, this WE probably.
I'm also working on something. It probably won't be as clever as Pascal's but it will build the T16 firmware using the standard cmake command given in the JumperTX readme. I should be able to share it later today.
https://hub.docker.com/r/benlye/jumpertx-build
It uses the cmake command given in the readme here, so if you need to add extra flags you'll want to edit the build_jumpertx.sh
script and create your own container.
It's all in Github: https://github.com/benlye/JumperTX-Docker
The only difference with mine is that I read the command line argument when you launch the container , parse it and launch the build based on either default or what you want so you don't need to edit anything... But I need a bit more time to clean up the code. Ben, can you get Travis to build the container and attach it to a release?
Ben, can you get Travis to build the container and attach it to a release?
Travis build and test is next on the to-do list. Docker is already automatically updating the build on Docker Hub, is there any need to also attach the built container on Github?
If Docker Hub is getting automatically updated, perfect!!!
I've added the ability to change default build flags and add new ones. Just waiting for Travis to do its thing then I'll push the update to Docker Hub.
New build is on Docker Hub now, and the doc page is updated.
Extra flags are given like this:
docker run --rm -it -v "C:/Users/benlye/Github/JumperTX:/jumpertx" -e "CMAKE_FLAGS=HELI=NO FOO=BAR" benlye/jumpertx-build
If there's no -e
parameter then the defaults will be used.
PERFECT!!! Do you display the cmake command line so that people can see what the default is? Same do they see what the cmake command line is when they add the parameter? I know I should try instead of asking....
PERFECT!!! Do you display the cmake command line so that people can see what the default is? Same do they see what the cmake command line is when they add the parameter? I know I should try instead of asking....
Yes!
For this command:
docker run --rm -it -v /tmp/JumperTX:/jumpertx -e "CMAKE_FLAGS=FOO=BAR HELI=NO" benlye/jumpertx-build
The beginning of output will look like this:
Extra CMAKE Flags: HELI=NO FOO=BAR
Overriding default flag: HELI=YES => HELI=NO
Adding additional flag: FOO=BAR
cmake -DMODULE_R9M_FULLSIZE=YES -DLUA_COMPILER=YES -DGVARS=YES -DGUI=YES -DLUA=YES -DPCB=T16 -DPPM_UNIT=US -DHELI=NO -DDISABLE_COMPANION=YES -DPPM_CENTER_ADJUSTABLE=YES -DLCD_DUAL_BUFFER=YES -DCMAKE_BUILD_TYPE=Release -DMULTIMODULE=YES -DRAS=YES -DFOO=BAR /tmp/jumpertx
The cmake command is still displayed even if no extra flags are given.
Cool nothing to add 🥇
I've been building new versions of the T16 this WE. It works very well ;-) In my Multi pull request I've added a link in the readme pointing to the docker page. You might want to put a link in the docker page to your github page if people wants to mess around with the container but for me it's fine as it is.
Yep, Docker Hub has a link to Github on the right side of the page.
One thing I'm curious about is that the default flags given by Jumper include the flags LCD_DUAL_BUFFER=YES
and MODULE_R9M_FULLSIZE=YES
, but when you compile you get this warning from cmake:
CMake Warning:
Manually-specified variables were not used by the project:
LCD_DUAL_BUFFER
MODULE_R9M_FULLSIZE
It's not just my container, every build does it. Poking around in the source it seems like LCD_DUAL_BUFFER only applies to the T12 and a couple of Taranis models, and MODULE_R9M_FULLSIZE is only relevant for the X-Lite. I wonder why the Jumper defaults includes those flags?
I need different flags that are now included in JumperTX. Can you provide more detailed description hot to build JumperTX. Docker container for building it would be really cool!