Skip to content

Compiling with Docker #64

Description

@marwonline

Today I wanted to compile the Kernel on a fresh Archlinux and realized that installing all those cross-compiler packages may take a time. So I hacked a small Dockerfile for me, which I'll share with you:

Dockerfile:

FROM ubuntu:xenial

RUN useradd -ms /bin/bash builder

RUN apt-get update               \
 && apt-get -y -q upgrade        \
 && apt-get -y -q install        \
    bc                           \
    binutils-arm-linux-gnueabihf \
    bison                        \
    build-essential              \
    ccache                       \
    flex                         \
    gcc-arm-linux-gnueabihf      \
    gccgo-4.7-arm-linux-gnueabi  \
    gcc-aarch64-linux-gnu        \
    git                          \
    libc6-armhf-cross            \
    libncurses-dev               \
    libssl-dev                   \
    make                         \
    u-boot-tools                 \
    wget                         \
    xz-utils                     \
 && apt-get clean

USER builder
WORKDIR /srv/

Create the local image with: docker build . --tag bpi-compile:1

Run the compile environment (adjust the path before the colon):
docker run -it -v $(pwd)/SD:/SD -v $(pwd)/BPI-R2-4.14:/srv bpi-compile:1 /bin/bash

Is it worth to create a pull request for this?

Activity

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions