Control: tag -1 - patch On Thu, 2018-09-06 at 22:06 +0200, Karsten Merker wrote: > Source: linux > Version: 4.19~rc2-1~exp1 > Severity: wishlist > Tags: patch > X-Debbugs-CC: debian-riscv@lists.debian.org > User: debian-riscv@lists.debian.org > Usertags: riscv64 > > Hello, > > starting with version 4.19rc2, the mainline Linux kernel includes > all drivers necessary for running a riscv64 system in qemu, so it > would be great if the "linux" source package could be extended to > build a linux-image-*-riscv64 binary package. > > Attached is a patch that tries to add the necessary bits. This config sets a whole lot of things to be built-in, but our policy is to build everything as modules if it works properly work as a module. This will also cause the building of installer udebs to fail (empty packages are treated as a fatal error). It also seems to have some redundant settings. debian/config/config is always used first (see README.source), so don't repeat anything that's in there. Finally you should use kconfigeditor2 to add headings to the config file. You need to check out the kernel-team.git repository, and then in the linux repository run something like: ../kernel-team/utils/kconfigeditor2/process.py . > Unfortunately, with the patch applied the kernel itself builds > successfully, but the package build process then fails with > > -----8<----------8<----------8<----------8<----------8<----- > > make[3]: Leaving directory '<<builddir>>/linux-4.19~rc2/debian/build/build_riscv64_none_riscv64' > debian/bin/buildcheck.py debian/build/build_riscv64_none_riscv64 riscv64 none riscv64 > ABI is not completely versioned! Refusing to continue. > > Unversioned symbols: > _mcount module: vmlinux, version: 0x00000000, export: EXPORT_SYMBOL > return_to_handler module: vmlinux, version: 0x00000000, export: EXPORT_SYMBOL > Can't read ABI reference. ABI not checked! > make[2]: *** [debian/rules.real:217: debian/stamps/build_riscv64_none_riscv64] Fehler 1 > > -----8<----------8<----------8<----------8<----------8<----- > > I'm somewhat stuck here - is this an upstream issue or > have I overlooked something on the packaging side? Pointers > welcome :). It's an upstream issue, but not a fatal error there. For Debian it is a fatal error becasue unversioned symbols potentially undermine code signing. Any symbol exported from an assembly-language file won't automatically get a symbol version, since there's no type information there. The way to fix this is to include (or directly) add the function prototypes in arch/riscv/include/asm/asm-prototypes.h. I don't think that return_to_handler should be exported at all. No other architecture does. As for _mcount, that is declared in <asm/ftrace.h>, so <asm/asm-prototypes.h> should just be: /* SPDX-License-Identifier: GPL-2.0 */ #include <asm/ftrace.h> -- Finally, you have added module lists for installer udebs, but this won't have any effect unless you also add the new architecture and flavour to debian/installer/kernel-versions. -- I'm removing the patch tag as this patch isn't usable. Please add it again when you send another patch. Also, you are welcome to send a merge request on Gitlab instead of a patch; I find easier to discuss changes that way. Ben. > Regards, > Karsten -- Ben Hutchings I'm always amazed by the number of people who take up solipsism because they heard someone else explain it. - E*Borg on alt.fan.pratchett
Attachment:
signature.asc
Description: This is a digitally signed message part