Skip to content

Commit 65c927b

Browse files
committed
working image
0 parents  commit 65c927b

1 file changed

Lines changed: 41 additions & 0 deletions

File tree

Dockerfile

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
FROM ubuntu:20.04
2+
3+
RUN apt-get update
4+
RUN apt install -y software-properties-common
5+
RUN add-apt-repository ppa:apt-fast/stable
6+
RUN apt-get update
7+
RUN apt-get -y install apt-fast
8+
9+
WORKDIR /root
10+
11+
# Install dependencies.
12+
RUN apt-get update && DEBIAN_FRONTEND=noninteractive\
13+
apt-get install -y build-essential libncurses5-dev rsync cpio python unzip bc wget axel aria2
14+
15+
# Install Buildroot.
16+
RUN axel -n 10 https://buildroot.org/downloads/buildroot-2022.05.tar.gz &&\
17+
tar xf buildroot-*.tar* &&\
18+
rm buildroot-*.tar* &&\
19+
ln -s buildroot-* buildroot &&\
20+
mkdir -v buildroot/patches
21+
22+
# Create rootfs overlay.
23+
RUN mkdir -vpm775 buildroot/rootfs_overlay
24+
COPY ./overlay buildroot/rootfs_overlay
25+
26+
WORKDIR /root/buildroot
27+
28+
# Patch wget so it will work with axel and aria2c
29+
COPY wget-o.patch ./
30+
RUN patch -p1 < wget-o.patch
31+
32+
ENV ARCH=riscv
33+
34+
RUN make qemu_riscv32_virt_defconfig
35+
RUN sed -i -e '/BR2_WGET=/ s/=.*/="axel -n 10 "/' .config
36+
37+
COPY buildroot_config/linux_rv32_config ./linux_rv32_config
38+
COPY buildroot_config/buildroot_rv32_config ./
39+
COPY buildroot_config/busybox_config ./
40+
41+
RUN make defconfig BR2_DEFCONFIG=buildroot_rv32_config

0 commit comments

Comments
 (0)