diff -Nru opensbi-1.0/debian/bin/git-snapshot opensbi-1.0/debian/bin/git-snapshot --- opensbi-1.0/debian/bin/git-snapshot 2021-11-29 17:55:54.000000000 +0000 +++ opensbi-1.0/debian/bin/git-snapshot 2022-03-27 03:14:08.000000000 +0000 @@ -5,7 +5,7 @@ commit="$1" test -z "$commit" && echo "invalid commit" && exit 1 package=opensbi -archive=tar.xz +archive=tar.gz version=$(git describe "$commit" | sed -e 's,-,+,' -e 's,-g,.,' -e 's,^v,,g') output=../${package}_${version}.orig.${archive} test -f "${output}" && echo "already present: ${output}" && exit 1 diff -Nru opensbi-1.0/debian/changelog opensbi-1.0/debian/changelog --- opensbi-1.0/debian/changelog 2022-02-14 09:24:09.000000000 +0000 +++ opensbi-1.0/debian/changelog 2022-03-27 03:14:10.000000000 +0000 @@ -1,3 +1,18 @@ +opensbi (1.0-4build1) kinetic; urgency=low + + * No-change rebuild debian package. + + -- Ubuntu Merge-o-Matic Sun, 27 Mar 2022 03:14:10 +0000 + +opensbi (1.0-4) unstable; urgency=medium + + * debian/patches: Use upstream patch to fix compatibility with binutils + 2.38+. + * debian/control: Drop versioned Build-Depends on binutils. + * debian/bin/git-snapshot: Switch to tar.gz format. (Closes: #1003155) + + -- Vagrant Cascadian Sat, 26 Mar 2022 16:47:21 -0700 + opensbi (1.0-3ubuntu1) jammy; urgency=medium * debian/patches: @@ -129,3 +144,4 @@ * Initial release based on git commit 392749f (Closes: #928724). -- Vagrant Cascadian Sun, 12 May 2019 19:40:04 -0700 + diff -Nru opensbi-1.0/debian/control opensbi-1.0/debian/control --- opensbi-1.0/debian/control 2022-02-14 09:24:09.000000000 +0000 +++ opensbi-1.0/debian/control 2022-03-27 03:14:10.000000000 +0000 @@ -1,11 +1,9 @@ Source: opensbi Section: misc Priority: optional -Maintainer: Ubuntu Developers -XSBC-Original-Maintainer: Vagrant Cascadian +Maintainer: Vagrant Cascadian Uploaders: Karsten Merker Build-Depends: debhelper-compat (=13), - binutils (>= 2.37.90.20220123-2~), gcc-riscv64-linux-gnu, Standards-Version: 4.6.0 Rules-Requires-Root: no diff -Nru opensbi-1.0/debian/patches/series opensbi-1.0/debian/patches/series --- opensbi-1.0/debian/patches/series 2022-02-14 09:24:03.000000000 +0000 +++ opensbi-1.0/debian/patches/series 2022-03-27 03:14:10.000000000 +0000 @@ -1,3 +1,3 @@ upstream/0003-platform-sifive_fu740-do-not-use-a-global-in-da9063_.patch upstream/0004-platform-sifive_fu740-fix-reset-when-watchdog-is-run.patch -upstream/0005-Makefile-fix-build-with-binutils-2.38.patch +upstream/0009-Makefile-fix-build-with-binutils-2.38.patch diff -Nru opensbi-1.0/debian/patches/upstream/0005-Makefile-fix-build-with-binutils-2.38.patch opensbi-1.0/debian/patches/upstream/0005-Makefile-fix-build-with-binutils-2.38.patch --- opensbi-1.0/debian/patches/upstream/0005-Makefile-fix-build-with-binutils-2.38.patch 2022-02-14 09:23:23.000000000 +0000 +++ opensbi-1.0/debian/patches/upstream/0005-Makefile-fix-build-with-binutils-2.38.patch 1970-01-01 00:00:00.000000000 +0000 @@ -1,58 +0,0 @@ -From c25d77c777ca8942218b0aa3e0d51d07b7f7c09c Mon Sep 17 00:00:00 2001 -From: Aurelien Jarno -Date: Fri, 28 Jan 2022 18:33:46 +0100 -Subject: [PATCH] Makefile: fix build with binutils 2.38 - -From version 2.38, binutils default to ISA spec version 20191213. This -means that the csr read/write (csrr*/csrw*) instructions and fence.i -instruction has separated from the `I` extension, become two standalone -extensions: Zicsr and Zifencei. As the kernel uses those instruction, -this causes the following build failure: - - CC lib/sbi/sbi_tlb.o -<>/lib/sbi/sbi_tlb.c: Assembler messages: -<>/lib/sbi/sbi_tlb.c:190: Error: unrecognized opcode `fence.i' -make: *** [Makefile:431: <>/build/lib/sbi/sbi_tlb.o] Error 1 - -The fix is to specify those extensions explicitly in -march. However as -older binutils version do not support this, we first need to detect -that. - -Signed-off-by: Aurelien Jarno -Reviewed-by: Bin Meng -Tested-by: Alexandre Ghiti -Reviewed-by: Anup Patel ---- - Makefile | 9 ++++++++- - 1 file changed, 8 insertions(+), 1 deletion(-) - -diff --git a/Makefile b/Makefile -index 062883e..fc1ea13 100644 ---- a/Makefile -+++ b/Makefile -@@ -153,6 +153,9 @@ OPENSBI_LD_PIE := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) $(USE_LD_FLAG) -fP - # Check whether the compiler supports -m(no-)save-restore - CC_SUPPORT_SAVE_RESTORE := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -mno-save-restore -x c /dev/null -o /dev/null 2>&1 | grep "\-save\-restore" >/dev/null && echo n || echo y) - -+# Check whether the assembler and the compiler support the Zicsr and Zifencei extensions -+CC_SUPPORT_ZICSR_ZIFENCEI := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -march=rv$(OPENSBI_CC_XLEN)imafd_zicsr_zifencei -x c /dev/null -o /dev/null 2>&1 | grep "zicsr\|zifencei" > /dev/null && echo n || echo y) -+ - # Build Info: - # OPENSBI_BUILD_TIME_STAMP -- the compilation time stamp - # OPENSBI_BUILD_COMPILER_VERSION -- the compiler version info -@@ -223,7 +226,11 @@ ifndef PLATFORM_RISCV_ABI - endif - ifndef PLATFORM_RISCV_ISA - ifneq ($(PLATFORM_RISCV_TOOLCHAIN_DEFAULT), 1) -- PLATFORM_RISCV_ISA = rv$(PLATFORM_RISCV_XLEN)imafdc -+ ifeq ($(CC_SUPPORT_ZICSR_ZIFENCEI), y) -+ PLATFORM_RISCV_ISA = rv$(PLATFORM_RISCV_XLEN)imafdc_zicsr_zifencei -+ else -+ PLATFORM_RISCV_ISA = rv$(PLATFORM_RISCV_XLEN)imafdc -+ endif - else - PLATFORM_RISCV_ISA = $(OPENSBI_CC_ISA) - endif --- -2.32.0 - diff -Nru opensbi-1.0/debian/patches/upstream/0009-Makefile-fix-build-with-binutils-2.38.patch opensbi-1.0/debian/patches/upstream/0009-Makefile-fix-build-with-binutils-2.38.patch --- opensbi-1.0/debian/patches/upstream/0009-Makefile-fix-build-with-binutils-2.38.patch 1970-01-01 00:00:00.000000000 +0000 +++ opensbi-1.0/debian/patches/upstream/0009-Makefile-fix-build-with-binutils-2.38.patch 2022-03-26 23:32:46.000000000 +0000 @@ -0,0 +1,58 @@ +From 5d53b55aa77ffeefd4012445dfa6ad3535e1ff2c Mon Sep 17 00:00:00 2001 +From: Aurelien Jarno +Date: Fri, 28 Jan 2022 18:33:46 +0100 +Subject: [PATCH 9/9] Makefile: fix build with binutils 2.38 + +From version 2.38, binutils default to ISA spec version 20191213. This +means that the csr read/write (csrr*/csrw*) instructions and fence.i +instruction has separated from the `I` extension, become two standalone +extensions: Zicsr and Zifencei. As the kernel uses those instruction, +this causes the following build failure: + + CC lib/sbi/sbi_tlb.o +<>/lib/sbi/sbi_tlb.c: Assembler messages: +<>/lib/sbi/sbi_tlb.c:190: Error: unrecognized opcode `fence.i' +make: *** [Makefile:431: <>/build/lib/sbi/sbi_tlb.o] Error 1 + +The fix is to specify those extensions explicitly in -march. However as +older binutils version do not support this, we first need to detect +that. + +Signed-off-by: Aurelien Jarno +Reviewed-by: Bin Meng +Tested-by: Alexandre Ghiti +Reviewed-by: Anup Patel +--- + Makefile | 9 ++++++++- + 1 file changed, 8 insertions(+), 1 deletion(-) + +diff --git a/Makefile b/Makefile +index 062883e..fc1ea13 100644 +--- a/Makefile ++++ b/Makefile +@@ -153,6 +153,9 @@ OPENSBI_LD_PIE := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) $(USE_LD_FLAG) -fP + # Check whether the compiler supports -m(no-)save-restore + CC_SUPPORT_SAVE_RESTORE := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -mno-save-restore -x c /dev/null -o /dev/null 2>&1 | grep "\-save\-restore" >/dev/null && echo n || echo y) + ++# Check whether the assembler and the compiler support the Zicsr and Zifencei extensions ++CC_SUPPORT_ZICSR_ZIFENCEI := $(shell $(CC) $(CLANG_TARGET) $(RELAX_FLAG) -nostdlib -march=rv$(OPENSBI_CC_XLEN)imafd_zicsr_zifencei -x c /dev/null -o /dev/null 2>&1 | grep "zicsr\|zifencei" > /dev/null && echo n || echo y) ++ + # Build Info: + # OPENSBI_BUILD_TIME_STAMP -- the compilation time stamp + # OPENSBI_BUILD_COMPILER_VERSION -- the compiler version info +@@ -223,7 +226,11 @@ ifndef PLATFORM_RISCV_ABI + endif + ifndef PLATFORM_RISCV_ISA + ifneq ($(PLATFORM_RISCV_TOOLCHAIN_DEFAULT), 1) +- PLATFORM_RISCV_ISA = rv$(PLATFORM_RISCV_XLEN)imafdc ++ ifeq ($(CC_SUPPORT_ZICSR_ZIFENCEI), y) ++ PLATFORM_RISCV_ISA = rv$(PLATFORM_RISCV_XLEN)imafdc_zicsr_zifencei ++ else ++ PLATFORM_RISCV_ISA = rv$(PLATFORM_RISCV_XLEN)imafdc ++ endif + else + PLATFORM_RISCV_ISA = $(OPENSBI_CC_ISA) + endif +-- +2.35.1 +