-
Notifications
You must be signed in to change notification settings - Fork 47
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
utils: docker: add files for using docker as building-environment
- Loading branch information
Showing
3 changed files
with
52 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
FROM ubuntu:noble | ||
|
||
RUN apt-get update \ | ||
&& apt-get -y -q upgrade \ | ||
&& apt-get -y -q install \ | ||
bc \ | ||
bison \ | ||
build-essential \ | ||
ccache \ | ||
flex \ | ||
gcc-arm-linux-gnueabihf \ | ||
gcc-aarch64-linux-gnu \ | ||
git \ | ||
libc6-armhf-cross \ | ||
libncurses-dev \ | ||
libssl-dev \ | ||
make \ | ||
u-boot-tools \ | ||
wget \ | ||
xz-utils \ | ||
libncurses-dev \ | ||
nano \ | ||
sudo \ | ||
kmod \ | ||
debhelper rsync cpio \ | ||
&& apt-get clean | ||
|
||
RUN usermod -aG sudo ubuntu && \ | ||
echo 'ubuntu ALL=(ALL) NOPASSWD:ALL' >> /etc/sudoers | ||
|
||
RUN mkdir -p /srv/code && chmod a+rwx -R /srv | ||
|
||
WORKDIR /srv/code |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/sh | ||
|
||
DIR=$(dirname "$(readlink -f "$0")") | ||
|
||
docker build "$DIR" --tag bpi-cross-compile:1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
#!/bin/sh | ||
|
||
DIR=$(dirname "$(readlink -f "$0")") | ||
REPO_DIR="$DIR/../.." | ||
|
||
export UID=$(id -u) | ||
export GID=$(id -g) | ||
|
||
mkdir -p "$REPO_DIR/SD" | ||
docker run --privileged -it \ | ||
--user $UID:$GID \ | ||
-v "$REPO_DIR/SD":/srv/SD \ | ||
-v "$REPO_DIR":/srv/code \ | ||
bpi-cross-compile:1 /bin/bash |