mirror of
https://github.com/bensuperpc/dockcross.git
synced 2024-12-22 08:24:25 +01:00
Improve buildroot builder
Improve buildroot builder Signed-off-by: Bensuperpc <bensuperpc@gmail.com>
This commit is contained in:
parent
cb5ab9f914
commit
b5a73bef22
@ -22,6 +22,8 @@ COPY \
|
||||
RUN mkdir /dockcross/buildroot \
|
||||
&& cd /dockcross/buildroot \
|
||||
&& /dockcross/install-buildroot-toolchain.sh \
|
||||
-c /dockcross/buildroot.config \
|
||||
-v "${BR_VERSION}" \
|
||||
&& rm -rf /dockcross/buildroot /dockcross/install-buildroot-toolchain.sh
|
||||
|
||||
# Restore our default workdir (from "dockcross/base").
|
||||
|
@ -48,7 +48,7 @@ RUN mkdir /dockcross/crosstool \
|
||||
&& cd /dockcross/crosstool \
|
||||
&& /dockcross/install-crosstool-ng-toolchain.sh \
|
||||
-p "${XCC_PREFIX}" \
|
||||
-c /dockcross/crosstool-ng.config \
|
||||
-c "/dockcross/crosstool-ng.config" \
|
||||
-v "${CT_VERSION}" \
|
||||
&& rm -rf /dockcross/crosstool /dockcross/install-crosstool-ng-toolchain.sh
|
||||
|
||||
|
@ -5,9 +5,39 @@ set -o pipefail
|
||||
|
||||
ROOT=${PWD}
|
||||
|
||||
usage() { echo "Usage: $0 -c <config-path> -v <version>" 1>&2; exit 1; }
|
||||
|
||||
REPO_URL="https://github.com/buildroot/buildroot.git"
|
||||
|
||||
git clone "$REPO_URL" --recurse-submodules --remote-submodules --depth=1 --branch=2021.08-rc1
|
||||
CONFIG_PATH=""
|
||||
REV="2021.08-rc1"
|
||||
while getopts "c:v:" o; do
|
||||
case "${o}" in
|
||||
c)
|
||||
CONFIG_PATH=$(readlink -f ${OPTARG})
|
||||
;;
|
||||
v)
|
||||
REV=${OPTARG}
|
||||
;;
|
||||
*)
|
||||
usage
|
||||
;;
|
||||
esac
|
||||
done
|
||||
shift $((OPTIND-1))
|
||||
|
||||
if [ -z ${CONFIG_PATH} ] || [ ! -f ${CONFIG_PATH} ]; then
|
||||
echo "ERROR: Missing config path (-c)."
|
||||
usage
|
||||
fi
|
||||
|
||||
if [ -z ${REV} ]; then
|
||||
echo "WARNING: No version selected, use default version: $REV (-v)."
|
||||
fi
|
||||
|
||||
|
||||
git clone "$REPO_URL" --recurse-submodules --remote-submodules #--branch="$REV"
|
||||
cd buildroot
|
||||
cp /dockcross/buildroot.config .config
|
||||
git checkout "$REV"
|
||||
cp "$CONFIG_PATH" .config
|
||||
make
|
||||
|
@ -3,7 +3,7 @@ FROM dockcross/base:latest
|
||||
# This is for 64-bit ARM Linux machine
|
||||
|
||||
# Buildroot version
|
||||
#ENV BR_VERSION d47b234152980a09196355b77a12cb425f3f1d2e
|
||||
ENV BR_VERSION 2021.08-rc1
|
||||
|
||||
#include "common.buildroot"
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user