]> www.infradead.org Git - nvme.git/commitdiff
kbuild: deb-pkg: add debarch for ARCH=um
authorMasahiro Yamada <masahiroy@kernel.org>
Tue, 3 Dec 2024 11:14:45 +0000 (20:14 +0900)
committerMasahiro Yamada <masahiroy@kernel.org>
Sat, 21 Dec 2024 03:42:04 +0000 (12:42 +0900)
'make ARCH=um bindeb-pkg' shows the following warning.

  $ make ARCH=um bindeb-pkg
     [snip]
    GEN     debian

  ** ** **  WARNING  ** ** **

  Your architecture doesn't have its equivalent
  Debian userspace architecture defined!
  Falling back to the current host architecture (amd64).
  Please add support for um to ./scripts/package/mkdebian ...

This commit hard-codes i386/amd64 because UML is only supported for x86.

Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
scripts/package/mkdebian

index 4ffcc70f8e319c88439ab80c020f9da8087eac23..b038a1380b8af1543e9d7725228a9d9ed3783d2d 100755 (executable)
@@ -70,6 +70,13 @@ set_debarch() {
                        debarch=sh4$(if_enabled_echo CONFIG_CPU_BIG_ENDIAN eb)
                fi
                ;;
+       um)
+               if is_enabled CONFIG_64BIT; then
+                       debarch=amd64
+               else
+                       debarch=i386
+               fi
+               ;;
        esac
        if [ -z "$debarch" ]; then
                debarch=$(dpkg-architecture -qDEB_HOST_ARCH)