mirror of
https://github.com/armbian/build
synced 2025-09-24 19:47:06 +07:00
Make builder dockerfile to be x64 and aarch64 compatible (#2867)
* Make builder dockerfile to be x64 and aarch64 compatible and building speed optimization * remove hardcoded amd64 currently docker from edge not work, stable works, then stable instead edge * libc6-dev-armhf-cross need to build rockchip uboot for helios64 under arm64 * need to add architecture to avoid blame for no docker for i386 arch * hirsute uses same names for qemu-user-static * let's only x64 use aptly from dev
This commit is contained in:
@@ -168,7 +168,7 @@ if [[ "${1}" == docker && -f /etc/debian_version && -z "$(command -v docker)" ]]
|
||||
[[ "${codename}" == "hirsute" ]] && DOCKER_BINARY="docker containerd docker.io"
|
||||
|
||||
display_alert "Docker not installed." "Installing" "Info"
|
||||
echo "deb [arch=amd64] https://download.docker.com/linux/${codeid} ${codename} edge" > /etc/apt/sources.list.d/docker.list
|
||||
echo "deb [arch=$(dpkg --print-architecture)] https://download.docker.com/linux/${codeid} ${codename} stable" > /etc/apt/sources.list.d/docker.list
|
||||
|
||||
# minimal set of utilities that are needed for prep
|
||||
packages=("curl" "gnupg")
|
||||
|
||||
@@ -191,11 +191,14 @@ legacy_uboot_locations()
|
||||
uboot_custom_postprocess()
|
||||
{
|
||||
if [ "$(uname -m)" = "aarch64" ]; then
|
||||
if [ "$(lsb_release -sc)" = "focal" ]; then
|
||||
PKG_PREFIX="qemu-x86_64-static -L /usr/x86_64-linux-gnu "
|
||||
else
|
||||
case "$(lsb_release -sc)" in
|
||||
"focal"|"hirsute")
|
||||
PKG_PREFIX="qemu-x86_64-static -L /usr/x86_64-linux-gnu "
|
||||
;;
|
||||
*)
|
||||
PKG_PREFIX="qemu-x86_64 -L /usr/x86_64-linux-gnu "
|
||||
fi
|
||||
;;
|
||||
esac
|
||||
else
|
||||
PKG_PREFIX=""
|
||||
fi
|
||||
|
||||
@@ -1,18 +1,32 @@
|
||||
FROM ubuntu:21.04
|
||||
ARG DEBIAN_FRONTEND=noninteractive
|
||||
RUN apt-get update && apt-get -y install joe software-properties-common
|
||||
RUN apt-get install -y --no-install-recommends \
|
||||
RUN apt-get update && apt-get -y install \
|
||||
joe \
|
||||
software-properties-common \
|
||||
gnupg \
|
||||
gnupg1 \
|
||||
gpgv1 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN sh -c "if [ x"" != x$http_proxy ]; then \
|
||||
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --keyserver-options http-proxy=$http_proxy --recv-keys ED75B5A4483DA07C >/dev/null 2>&1; \
|
||||
else \
|
||||
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 --recv-keys ED75B5A4483DA07C >/dev/null 2>&1; \
|
||||
fi"
|
||||
RUN echo "deb http://repo.aptly.info/ nightly main" > /etc/apt/sources.list.d/aptly.list
|
||||
RUN dpkg --add-architecture i386
|
||||
RUN sh -c " \
|
||||
if [ $(dpkg --print-architecture) = amd64 ]; then \
|
||||
if [ x'' != x$http_proxy ]; then \
|
||||
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 \
|
||||
--keyserver-options http-proxy=$http_proxy \
|
||||
--recv-keys ED75B5A4483DA07C >/dev/null 2>&1; \
|
||||
else \
|
||||
apt-key adv --keyserver hkp://p80.pool.sks-keyservers.net:80 \
|
||||
--recv-keys ED75B5A4483DA07C >/dev/null 2>&1; \
|
||||
fi; \
|
||||
echo \"deb http://repo.aptly.info/ nightly main\" > /etc/apt/sources.list.d/aptly.list; \
|
||||
dpkg --add-architecture i386 \
|
||||
&& apt-get update \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
lib32ncurses6 \
|
||||
lib32stdc++6 \
|
||||
lib32tinfo6 \
|
||||
libc6-i386 \
|
||||
zlib1g:i386; \
|
||||
fi"
|
||||
RUN apt-get update \
|
||||
&& apt-get -y upgrade \
|
||||
&& apt-get install -y --no-install-recommends \
|
||||
@@ -47,12 +61,9 @@ RUN apt-get update \
|
||||
imagemagick \
|
||||
jq \
|
||||
kmod \
|
||||
lib32ncurses6 \
|
||||
lib32stdc++6 \
|
||||
lib32tinfo6 \
|
||||
libbison-dev \
|
||||
libc6-dev-armhf-cross \
|
||||
libc6-i386 \
|
||||
libfdt-dev \
|
||||
libfile-fcntllock-perl \
|
||||
libfl-dev \
|
||||
liblz4-tool \
|
||||
@@ -100,7 +111,6 @@ RUN apt-get update \
|
||||
xxd \
|
||||
zip \
|
||||
zlib1g-dev \
|
||||
zlib1g:i386 \
|
||||
&& rm -rf /var/lib/apt/lists/*
|
||||
RUN locale-gen en_US.UTF-8
|
||||
|
||||
|
||||
@@ -1025,7 +1025,7 @@ prepare_host()
|
||||
local hostdeps="wget ca-certificates device-tree-compiler pv bc lzop zip binfmt-support build-essential ccache debootstrap ntpdate \
|
||||
gawk gcc-arm-linux-gnueabihf qemu-user-static u-boot-tools uuid-dev zlib1g-dev unzip libusb-1.0-0-dev fakeroot \
|
||||
parted pkg-config libncurses5-dev whiptail debian-keyring debian-archive-keyring f2fs-tools libfile-fcntllock-perl rsync libssl-dev \
|
||||
nfs-kernel-server btrfs-progs ncurses-term p7zip-full kmod dosfstools libc6-dev-armhf-cross imagemagick \
|
||||
nfs-kernel-server btrfs-progs ncurses-term p7zip-full kmod dosfstools libc6-amd64-cross libc6-dev-armhf-cross imagemagick \
|
||||
curl patchutils liblz4-tool libpython2.7-dev linux-base swig aptly acl python3-dev \
|
||||
locales ncurses-base pixz dialog systemd-container udev libfdt-dev libc6 qemu \
|
||||
bison libbison-dev flex libfl-dev cryptsetup gpg gnupg1 cpio aria2 pigz dirmngr python3-distutils"
|
||||
|
||||
Reference in New Issue
Block a user