Project

General

Profile

Actions

Feature #818

closed

Add a docker build environment

Added by Hammel over 3 years ago. Updated over 3 years ago.

Status:
Closed
Priority:
Immediate
Assignee:
Category:
00 - Basic Build Issues
Target version:
Start date:
20 Feb 2021
Due date:
% Done:

100%

Estimated time:
Severity:
01 - Critical

Description

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.


Related issues

Has duplicate PiBox - Feature #811: Create a docker build system for the pibox dev platformRejectedHammel15 Feb 2021

Actions
Actions #1

Updated by Hammel over 3 years ago

  • Status changed from New to In Progress
  • Priority changed from Urgent to Immediate
  • % Done changed from 0 to 10

I created a Debian image but have yet to test a build in it.
The test environment is in <rpi 1>/extras/docker.

Actions #2

Updated by Hammel over 3 years ago

  • % 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.
  1. xcc
  2. rpifw
  3. kernel
  4. gles
  5. busybox
  6. buildroot
Some bits to come back to:
  1. xcc: Building Cross Toolchain RPM should be Building Cross Toolchain Package
  2. xcc: Add a debian packaging target
  3. 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[1]: [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[1]: [configs/buildroot.mk:230: buildroot-ext3] Error 32 (ignored)

More to come...

Actions #3

Updated by Hammel over 3 years ago

  • % 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.

Actions #4

Updated by Hammel over 3 years ago

  • 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.

Closing issue.

Actions

Also available in: Atom PDF