Skip to content

Commit 5794e7c

Browse files
committed
build: Switch allcross to debian
Debian provides more cross compilers built for ppc64le, so use it as the base distro for allcross.
1 parent 4021f3b commit 5794e7c

4 files changed

Lines changed: 44 additions & 11 deletions

File tree

build/Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ ALL_DISTROS := ${UBUNTU_DISTROS} ${KORG_DISTROS} ${FEDORA_DISTROS}
2222
DOCS_DISTRO := docs@${UBUNTU_LATEST}
2323
X86_DISTROS := ubuntu@${UBUNTU_LATEST} ubuntu
2424
ALIAS_DISTROS := ubuntu allcross fedora
25-
ALLCROSS_DISTROS := allcross@${UBUNTU_LATEST} allcross
25+
ALLCROSS_DISTROS := allcross@sid allcross
2626
ALL_ARCHES := alpha arm arm64 i686 m68k mips mips64 riscv s390 sh sparc x86_64
2727
SUBARCHES := ppc64le ppc64 ppc
2828

build/allcross/Dockerfile

Lines changed: 41 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,24 @@
11
ARG from
22
FROM ${from}
3-
4-
USER root
5-
6-
ARG apt_mirror
7-
ENV apt_mirror=${apt_mirror}
8-
RUN [ -n "$apt_mirror" ] && sed -i -e "s|ports.ubuntu.com|$apt_mirror|" /etc/apt/sources.list || true
3+
ARG from
94

105
RUN apt-get -q -y update && \
116
DEBIAN_FRONTEND=noninteractive \
127
apt-get -q -y install --no-install-recommends \
8+
bc \
9+
bison \
10+
bsdmainutils \
11+
bzip2 \
12+
ca-certificates \
13+
ccache \
14+
cpio \
15+
crossbuild-essential-powerpc \
16+
gcc-multilib-powerpc-linux-gnu \
17+
dwarves \
18+
file \
19+
flex \
20+
gcc \
21+
gcc-powerpc-linux-gnu g++-powerpc-linux-gnu \
1322
gcc-aarch64-linux-gnu g++-aarch64-linux-gnu \
1423
gcc-alpha-linux-gnu g++-alpha-linux-gnu \
1524
gcc-arm-linux-gnueabihf g++-arm-linux-gnueabihf \
@@ -21,7 +30,31 @@ RUN apt-get -q -y update && \
2130
gcc-s390x-linux-gnu g++-s390x-linux-gnu \
2231
gcc-sh4-linux-gnu g++-sh4-linux-gnu \
2332
gcc-sparc64-linux-gnu g++-sparc64-linux-gnu \
24-
&& \
25-
rm -rf /var/lib/apt/lists/* /var/cache/* /var/log/dpkg.log
33+
git \
34+
kmod \
35+
libc-dev \
36+
libelf-dev \
37+
libfuse-dev \
38+
liblz4-tool \
39+
libssl-dev \
40+
lzop \
41+
make \
42+
openssl \
43+
python3 \
44+
python3-dev \
45+
u-boot-tools \
46+
rename \
47+
rsync \
48+
sparse \
49+
xz-utils && \
50+
rm -rf /var/lib/apt/lists/* /tmp/packages.sh /var/cache/* /var/log/dpkg.log
2651

52+
ARG uid
53+
ARG gid
54+
55+
RUN groupadd --gid $gid linuxppc
56+
RUN useradd --uid $uid --gid $gid linuxppc
2757
USER linuxppc
58+
59+
COPY scripts/container-build.sh /bin/container-build.sh
60+
COPY VERSION /VERSION

build/scripts/image.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ from="docker.io/$distro:$version"
2222
if [[ "$distro" == "docs" ]]; then
2323
from="docker.io/ubuntu:$version"
2424
elif [[ "$distro" == "allcross" ]]; then
25-
from="linuxppc/build:ubuntu-$version"
25+
from="docker.io/debian:$version"
2626
elif [[ "$distro" == "korg" ]]; then
2727
# Use an older distro for the 5.x toolchains.
2828
if [[ "$version" == 5.* ]]; then

build/scripts/lib.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ function get_default_version()
102102

103103
case "$distro" in
104104
ubuntu) latest="$UBUNTU_LATEST" ;;
105-
allcross) latest="$UBUNTU_LATEST" ;;
105+
allcross) latest="sid" ;;
106106
fedora) latest="$FEDORA_LATEST" ;;
107107
esac
108108

0 commit comments

Comments
 (0)