Skip to content

Docker local build#1983

Open
DeDaMrAzR wants to merge 10 commits intoopenshwprojects:mainfrom
DeDaMrAzR:gui-build-tool
Open

Docker local build#1983
DeDaMrAzR wants to merge 10 commits intoopenshwprojects:mainfrom
DeDaMrAzR:gui-build-tool

Conversation

@DeDaMrAzR
Copy link
Contributor

  • Added build_tool.py: Interactive CLI build tool with dependency resolver
  • Added GUI_build_tool.py: GUI wrapper for build tool
  • Added entrypoint.sh: Docker entrypoint script with parallel build support
  • Updated Dockerfile: Optimizations for faster builds
  • Updated README.md: Documentation for new build tool

- Added build_tool.py: Interactive CLI build tool with dependency resolver
- Added GUI_build_tool.py: GUI wrapper for build tool
- Added entrypoint.sh: Docker entrypoint script with parallel build support
- Updated Dockerfile: Optimizations for faster builds
- Updated README.md: Documentation for new build tool
@DeDaMrAzR
Copy link
Contributor Author

DeDaMrAzR commented Feb 8, 2026

For context make sure you RTF readme.md 🙂 but worth putting it here again WARNING!!! - 40+ Gb of HDD space needed for docker volumes, images and cache!!!

- Added Python packages (fdt, toml, configobj, pycryptodomex) for BL602 SDK
- Fixed Windows localization: Added UTF-8 encoding to all subprocess calls
- Updated Dockerfile: Ubuntu 22.04 with required Python packages
- Updated entrypoint.sh: Ensure packages available at runtime
- Fixes BL602 post-build packaging step and encoding errors on non-English Windows
@DeDaMrAzR
Copy link
Contributor Author

ATM tested on BK, BL and ESP platforms only, please report here any errors on other platforms and thanks!

@MaxineMuster
Copy link
Contributor

Thanks for this work!
No error, but confirmation LN882H works!

Maybe you could revise the md "documentation"?
The information about build_tool.py is not 100% straight (for me).

First it claims:

NOTE!! - build_tool.py goes in the root folder, while the other two go in the docker folder.

Later:

Copy Files (Crucial Step):

Copy/replace Dockerfile, build_tool.py and entrypoint.sh to: OpenBK7231T_App\docker\
(The docker folder is already present in the repository).

Final Structure must look like this:


OpenBK7231T_App\

├── docker\
│   ├── Dockerfile         <-- Docker config is HERE
│   ├── entrypoint.sh      <-- Entry script is HERE
│   └── build_tool.py      <-- Script is HERE
├── platforms\
├── src\
└── ... (other git files)

Since python code checks for the case, where it's in the docker directory, both selections are fine:


if os.path.basename(_script_dir) == "docker":
    # If we are in docker/, repo root is one level up
    REPO_ROOT = os.path.dirname(_script_dir)
else:
    # Assume script is in root
    REPO_ROOT = _script_dir

And thanks for pointing out bl_shared was still depending on NTP. Hope this will be resolved soon with #1984

@DeDaMrAzR
Copy link
Contributor Author

@MaxineMuster thank you for the test, I appreciate it. I am on a marathon dev session on this so yeah readme is not 100% accurate and/or complete - it will be soon. For now monitor this thread for updates - https://www.elektroda.com/rtvforum/viewtopic.php?p=21834411#21834411

@DeDaMrAzR
Copy link
Contributor Author

image

my last clean check (from zero, new folder and all) was successful, added hardening for SDK downloads as much as I think I should but github is funny with large downloads so be patient....

it was tested against latest upstream main, play around, test it, break it and report in the forum

- add basic source-folder checks and UI gating when not in repo root
- require output folder before build to avoid failed/stalled runs
- update GUI script and bundled OpenBK_GUI_Build_Tool.exe
I was not aware of the massive overhead so EXE from the GUI script is extremely slow and not up to par - removed until I can figure out how to recreate it to function properly.
@DeDaMrAzR
Copy link
Contributor Author

PR complete unless someone finds anything wrong, I did multiple stress-tests and found it working as it should. One thing to mention if you encounter build errors - use clean checkbox and rebuild, if that fails tick no cache checkbox, it will rebuild everything - if the build still fails report with specifics.

…8 fix in Dockerfile (all volumes have to be recreated!!!) run the script with --clean --no-cache flags for this to wokr on localized machines, please report issues
@DeDaMrAzR
Copy link
Contributor Author

Last commit added local OTA option, some guardrails are implemented like platform check and basic IP structure check. Source Dir path should be blank now on every start - no persistence at this point. Driver list is a checkbox "table" beter visibility and it is not cleared on Start Build button push. UTF-8 is also checked/forced now so localized Windows problems should be gone ( I have no way of testing that - report back please). Since Dockerfile is changed full rebuild of containers and volumes should be done.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Comments