Initial
This commit is contained in:
commit
2c91181c30
File diff suppressed because it is too large
Load Diff
|
|
@ -0,0 +1,68 @@
|
|||
FROM debian:bookworm
|
||||
|
||||
# Install all build dependencies
|
||||
RUN apt-get update && apt-get install -y \
|
||||
build-essential \
|
||||
git \
|
||||
curl \
|
||||
wget \
|
||||
bzip2 \
|
||||
unzip \
|
||||
ca-certificates \
|
||||
python3 \
|
||||
file \
|
||||
g++ \
|
||||
make \
|
||||
libncurses-dev \
|
||||
rsync \
|
||||
bc \
|
||||
patch \
|
||||
perl \
|
||||
cpio \
|
||||
sudo \
|
||||
xz-utils \
|
||||
gnupg \
|
||||
flex \
|
||||
bison \
|
||||
texinfo
|
||||
|
||||
|
||||
# Create non-root user and setup environment
|
||||
RUN useradd -m -s /bin/bash buildroot && \
|
||||
echo "buildroot ALL=(ALL) NOPASSWD:ALL" >> /etc/sudoers
|
||||
|
||||
# Buildroot version
|
||||
ENV BUILDROOT_VERSION=2025.05
|
||||
ENV BUILDROOT_DIR=/home/buildroot/buildroot
|
||||
|
||||
USER buildroot
|
||||
WORKDIR /home/buildroot
|
||||
|
||||
# Download and extract Buildroot
|
||||
RUN mkdir -p $BUILDROOT_DIR && \
|
||||
curl -LO https://buildroot.org/downloads/buildroot-${BUILDROOT_VERSION}.tar.gz && \
|
||||
tar -xzf buildroot-${BUILDROOT_VERSION}.tar.gz -C /home/buildroot && \
|
||||
rm buildroot-${BUILDROOT_VERSION}.tar.gz && \
|
||||
mv /home/buildroot/buildroot-${BUILDROOT_VERSION}/* $BUILDROOT_DIR
|
||||
|
||||
# Set up workdir
|
||||
WORKDIR $BUILDROOT_DIR
|
||||
|
||||
# Unset host compiler env vars
|
||||
ENV CC=
|
||||
ENV CXX=
|
||||
|
||||
|
||||
COPY .config .config
|
||||
RUN make oldconfig
|
||||
RUN make -j16
|
||||
|
||||
# Done — toolchain will be in /opt/buildroot/output/host
|
||||
# Rootfs (if selected) will be in /opt/buildroot/output/images
|
||||
|
||||
# Set default workdir in case user wants to enter
|
||||
RUN echo 'export "PATH=/home/buildroot/buildroot/output/host/bin:$PATH"' >> ~/.bashrc
|
||||
|
||||
WORKDIR /build
|
||||
|
||||
CMD ["/bin/bash"]
|
||||
Loading…
Reference in New Issue