From 92390980c13f2571a66bfdca5802d55b137f0ccc Mon Sep 17 00:00:00 2001 From: Andrew Donnellan Date: Tue, 6 Oct 2020 18:28:28 +1100 Subject: tools/create-image.sh: support building riscv64 images riscv64 is not yet a released Debian port, so it's hosted by the debian-ports repository. Add a special case to use debian-ports if the architecture is riscv64. Signed-off-by: Andrew Donnellan --- tools/create-image.sh | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'tools/create-image.sh') diff --git a/tools/create-image.sh b/tools/create-image.sh index a9be8d10c..54c9685d9 100755 --- a/tools/create-image.sh +++ b/tools/create-image.sh @@ -8,7 +8,7 @@ set -eux # Create a minimal Debian distribution in a directory. DIR=chroot -PREINSTALL_PKGS=openssh-server,curl,tar,gcc,libc6-dev,time,strace,sudo,less,psmisc,selinux-utils,policycoreutils,checkpolicy,selinux-policy-default,firmware-atheros +PREINSTALL_PKGS=openssh-server,curl,tar,gcc,libc6-dev,time,strace,sudo,less,psmisc,selinux-utils,policycoreutils,checkpolicy,selinux-policy-default,firmware-atheros,debian-ports-archive-keyring # If ADD_PACKAGE is not defined as an external environment variable, use our default packages if [ -z ${ADD_PACKAGE+x} ]; then @@ -139,6 +139,11 @@ if [ $FOREIGN = "true" ]; then DEBOOTSTRAP_PARAMS="--foreign $DEBOOTSTRAP_PARAMS" fi +# riscv64 is hosted in the debian-ports repository +# debian-ports doesn't include non-free, so we exclude firmware-atheros +if [ $DEBARCH == "riscv64" ]; then + DEBOOTSTRAP_PARAMS="--keyring /usr/share/keyrings/debian-ports-archive-keyring.gpg --exclude firmware-atheros $DEBOOTSTRAP_PARAMS http://deb.debian.org/debian-ports" +fi sudo debootstrap $DEBOOTSTRAP_PARAMS # 2. debootstrap stage: only necessary if target != host architecture -- cgit mrf-deployment