Add a docker build environment
This will make it easier to support a single build environment (or possibly two including whatever my desktop is running).
The build - re: compilations - can be run in the docker environment. However it probably can't support the mksd and/or mkinstall scripts due to the need to create loopback devices.
Note that only the PiBox Dev Platform needs to be built in docker. Once that's been done the cross compiling of apps can be done on the host by pointing env variables at the appropriate directories.
- % Done changed from 10 to 20
Testing the build. There are some missing pieces being added to the Dockerfile as the build is run.So far the following components have been built successfully under the docker image.
- xcc: Building Cross Toolchain RPM should be Building Cross Toolchain Package
- xcc: Add a debian packaging target
- buildroot-pkg has problems using sudo even with NOPASSWD set for the user:
### 2021-03-09 04:48:54 AM Generating EXT3 filesystem image mount: /home/mjhammel/src/ximba/raspberrypi3/src/../bld/buildroot-2020.02.4.bld/mnt: mount failed: Operation not permitted. make: [configs/buildroot.mk:226: buildroot-ext3] Error 1 (ignored) ### 2021-03-09 04:48:54 AM Unpacking rootfs to EXT3 image umount: /home/mjhammel/src/ximba/raspberrypi3/src/../bld/buildroot-2020.02.4.bld/mnt: must be superuser to unmount. make: [configs/buildroot.mk:230: buildroot-ext3] Error 32 (ignored)
More to come...
- % Done changed from 20 to 50
The mount problem is related to using loopback devices in the Docker image. This was fixed on my Fedora machine by adding -privileged=true to the docker run command. It's unclear if this works on all distros.
I completed the first pass of a build yesterday. I'm now rebuilding the Docker image with all the updates and will try the build again.
- Status changed from In Progress to Closed
- % Done changed from 50 to 100
Build was a success, including package targets. Install scripts failed but those failures have been addressed. Now build and installation can be run completely from the docker environment.
Changes have been added to the new "docker" directory in the root of the PiBox tree. Changes are committed and pushed, including updates to the top level README.md to point to the docker README.txt to bring up the docker environment before starting the build.