diff options
| author | Andrew Donnellan <ajd@linux.ibm.com> | 2020-10-06 18:28:28 +1100 |
|---|---|---|
| committer | Dmitry Vyukov <dvyukov@google.com> | 2020-10-08 12:17:15 +0200 |
| commit | 92390980c13f2571a66bfdca5802d55b137f0ccc (patch) | |
| tree | 2552495bbaf7bf70bb931db739affa311b44dbf1 | |
| parent | 4598187963f9fe976d56f4f0fc81f680cc215583 (diff) | |
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 <ajd@linux.ibm.com>
| -rwxr-xr-x | tools/create-image.sh | 7 |
1 files changed, 6 insertions, 1 deletions
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 |
