This docker will build all or some of the platforms that OpenBeken supports. To use, first build the docker image:
docker build -t openbk_build --build-arg UID=$UID --build-arg USERNAME=$USER .
Note that the current user name and user ID is passed through to the docker image build. This is to preserve local file permissions when OpenBeken is built.
If you want to change the timezone you can use the argument TZ for that like
docker build -t openbk_build --build-arg UID=$UID --build-arg USERNAME=$USER --build-arg TZ="Etc/UTC" .
or
docker build -t openbk_build --build-arg UID=$UID --build-arg USERNAME=$USER --build-arg TZ="Asia/Tokyo" .
Once the docker image is build, you can use it to build the SDKs as follows (assumed you are in the current docker
directory):
docker run -it -v "$(pwd)/..":/OpenBK7231T_App openbk_build
When complete, all target platform builds with be present in the repository's output
directory.
When running the docker image, you may pass the following environment variables with the --env
option:
-
APP_VERSION
- The version identifier for the build. If not provided, a default version will be used based on the time of the build. -
TARGET_SDKS
- A comma-separated list of platforms (with no spaces) that should be built. If not present, all platforms will be built. The supported platform identifiers are:OpenBK7231T
OpenBK7231N
OpenXR809
OpenBL602
OpenW800
OpenW600
OpenLN882H
For example, to build
OpenBK7231T
andOpenXR809
, the options should be-env TARGET_SDKS="OpenBK7231T,OpenXR809"
-
MAKEFLAGS
- This is the standardmake
environment variable for setting defaultmake
flags. It is recommended to use this to configuremake
to use multiple cores. for exmaple, to use 8 cores:--env MAKEFLAGS="-j 8"
The software that the build process uses to compile the binaries is for the x86
platform and can only be run by x86
CPUs. Fortunately, this does not mean you cannot build OpenBeken on Apple Silicon (ARM) Macintosh computers. Docker is able to run x86
docker images on Apple Silicon Macs through the Rosetta emulator. To do this, you need to enable running x86
images in docker by following the instructions outlined in this article (or this article).
Once you have set up your Apple Silicon Mac to run x86
docker images, build the OpenBeken build environment docker image with this command from within the docker
directory of this repository:
docker buildx build --platform linux/amd64 --load -t openbk_build --build-arg USERNAME=$USER .
Once the docker image is built, you can run the OpenBeken build with this instruction:
docker run --platform linux/amd64 -it -v "$(pwd)/..":/OpenBK7231T_App openbk_build
All the same environment variable options described above work here too. Sometimes builds will not be successful using this approach as x86
emulation can have occasional glitches. Retrying the build for the OpenBeken platforms that failed usually works on the second try.