You are not logged in.

#1 2018-05-23 15:05:04

Arch Linux Tux
Member
Registered: 2017-04-01
Posts: 34

kernel compilation fails "ERROR: A failure occurred in prepare()"

Hello,

I'm trying to follow the workaround of user whitesnow here.

He suggested to use an older kernel on unix.stackexchange.com, in order to get Renesas Technology Corp. uPD720202 USB 3.0 Host Controller working.

So I'm trying to build an older kernel (v4.15.15) from Arch Build System in order to get the express card working.

I checked out Revision r321602 of linux package using this command

svn update -r321602

... I believe. The revision-numbers and the kernel versions didn't seem to match on

svn log linux

besides.

Please tell me if there is an easier way. Didn't find suiting version of linux-lts kernel.

Hoever when

makepkg -s

tries to apply patches it fails saying:

...
patching file virt/kvm/arm/mmu.c
patching file virt/kvm/arm/psci.c
patching file virt/kvm/arm/vgic/vgic-v2.c
patching file virt/kvm/arm/vgic/vgic-v3.c
patching file virt/kvm/arm/vgic/vgic.c
patching file virt/kvm/arm/vgic/vgic.h
patching file virt/kvm/kvm_main.c
==> ERROR: A failure occurred in prepare().
    Aborting...

OR

patching file virt/kvm/arm/psci.c
patching file virt/kvm/arm/vgic/vgic-v2.c
patching file virt/kvm/arm/vgic/vgic-v3.c
patching file virt/kvm/arm/vgic/vgic.c
patching file virt/kvm/arm/vgic/vgic.h
patching file virt/kvm/kvm_main.c
patching file kernel/fork.c
patching file kernel/sysctl.c
patching file kernel/user_namespace.c
patching file drivers/gpu/drm/i915/intel_dp.c
  HOSTCC  scripts/basic/fixdep
  HOSTCC  scripts/kconfig/conf.o
  SHIPPED scripts/kconfig/zconf.tab.c
  SHIPPED scripts/kconfig/zconf.lex.c
  HOSTCC  scripts/kconfig/zconf.tab.o
In file included from scripts/kconfig/zconf.tab.c:2468:
scripts/kconfig/confdata.c: In function ‘conf_write’:
scripts/kconfig/confdata.c:773:19: warning: ‘%s’ directive writing likely 7 or more bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
  sprintf(newname, "%s%s", dirname, basename);
                   ^~~~~~
scripts/kconfig/confdata.c:773:19: note: assuming directive output of 7 bytes
scripts/kconfig/confdata.c:773:2: note: ‘sprintf’ output 1 or more bytes (assuming 4104) into a destination of size 4097
  sprintf(newname, "%s%s", dirname, basename);
  ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:776:20: warning: ‘.tmpconfig.’ directive writing 11 bytes into a region of size between 1 and 4097 [-Wformat-overflow=]
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
                    ^~~~~~~~~~~~~~~~~
scripts/kconfig/confdata.c:776:3: note: ‘sprintf’ output between 13 and 4119 bytes into a destination of size 4097
   sprintf(tmpname, "%s.tmpconfig.%d", dirname, (int)getpid());
   ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
  HOSTLD  scripts/kconfig/conf
scripts/kconfig/conf  --silentoldconfig Kconfig
.config:9517:warning: override: reassigning to symbol LOCALVERSION
.config:9518:warning: override: reassigning to symbol LOCALVERSION_AUTO
#
# configuration written to .config
#
  SYSTBL  arch/x86/include/generated/asm/syscalls_32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_32_ia32.h
  SYSHDR  arch/x86/include/generated/asm/unistd_64_x32.h
  SYSTBL  arch/x86/include/generated/asm/syscalls_64.h
  HYPERCALLS arch/x86/include/generated/asm/xen-hypercalls.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_32.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_64.h
  SYSHDR  arch/x86/include/generated/uapi/asm/unistd_x32.h
  HOSTCC  scripts/basic/bin2c
  HOSTCC  arch/x86/tools/relocs_32.o
  HOSTCC  arch/x86/tools/relocs_64.o
  HOSTCC  arch/x86/tools/relocs_common.o
  HOSTLD  arch/x86/tools/relocs
  CHK     include/config/kernel.release
  UPD     include/config/kernel.release
  WRAP    arch/x86/include/generated/uapi/asm/bpf_perf_event.h
  WRAP    arch/x86/include/generated/asm/clkdev.h
  WRAP    arch/x86/include/generated/asm/dma-contiguous.h
  WRAP    arch/x86/include/generated/asm/early_ioremap.h
  WRAP    arch/x86/include/generated/asm/mcs_spinlock.h
  WRAP    arch/x86/include/generated/asm/mm-arch-hooks.h
  CHK     include/generated/uapi/linux/version.h
  UPD     include/generated/uapi/linux/version.h
  CHK     include/generated/utsrelease.h
  UPD     include/generated/utsrelease.h
  CC      arch/x86/purgatory/purgatory.o
  AS      arch/x86/purgatory/stack.o
  AS      arch/x86/purgatory/setup-x86_64.o
  CC      arch/x86/purgatory/sha256.o
  AS      arch/x86/purgatory/entry64.o
  CC      arch/x86/purgatory/string.o
  LD      arch/x86/purgatory/purgatory.ro
  BIN2C   arch/x86/purgatory/kexec-purgatory.c
  CC      kernel/bounds.s
  CHK     include/generated/bounds.h
  UPD     include/generated/bounds.h
  CHK     include/generated/timeconst.h
  UPD     include/generated/timeconst.h
  CC      arch/x86/kernel/asm-offsets.s
  CHK     include/generated/asm-offsets.h
  UPD     include/generated/asm-offsets.h
  CALL    scripts/checksyscalls.sh
  DESCEND  objtool
  HOSTCC   /home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/objtool/fixdep.o
  HOSTLD   /home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/objtool/fixdep-in.o
  LINK     /home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/objtool/fixdep
  CC       /home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/objtool/exec-cmd.o
  CC       /home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/objtool/help.o
  CC       /home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/objtool/pager.o
pager.c: In function ‘pager_preexec’:
pager.c:36:12: error: passing argument 2 to restrict-qualified parameter aliases with argument 4 [-Werror=restrict]
  select(1, &in, NULL, &in, NULL);
            ^~~        ~~~
cc1: all warnings being treated as errors
mv: cannot stat '/home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/objtool/.pager.o.tmp': No such file or directory
make[4]: *** [/home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/build/Makefile.build:97: /home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/objtool/pager.o] Error 1
make[3]: *** [Makefile:52: /home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/objtool/libsubcmd-in.o] Error 2
make[2]: *** [Makefile:54: /home/tux/Downloads/build-linux-kernel/4.15.15/svn/packages/linux/repos/core-x86_64/src/linux-4.15/tools/objtool/libsubcmd.a] Error 2
make[1]: *** [Makefile:63: objtool] Error 2
make: *** [Makefile:1650: tools/objtool] Error 2
==> ERROR: A failure occurred in prepare().
    Aborting...

... when compiling the first time.

Is there an easier way to archiv installing the older kernel along with the current kernel or how can I fix the above problem?

Thank you for your help!

Last edited by Arch Linux Tux (2018-05-23 18:02:49)


I do software development for fun and professionally!

I'm strongly interested in robotics and mechatronics! My favorite programming language is Rust

Offline

#2 2018-05-23 15:37:34

V1del
Forum Moderator
Registered: 2012-10-16
Posts: 21,427

Re: kernel compilation fails "ERROR: A failure occurred in prepare()"

The kernel is pretty self contained and as such you could also install the old binary (the "only" thing you have to be weary of is if you are using external kernel modules like nvidia or similar, there you'd have to use the corresponding package or likely preferably in this situation relevant dkms versions), if you have it in your cache it's a pacman -U away, otherwise use the Arch Linux Archive to get an old version

Offline

#3 2018-05-23 17:32:34

Arch Linux Tux
Member
Registered: 2017-04-01
Posts: 34

Re: kernel compilation fails "ERROR: A failure occurred in prepare()"

I know that way, but when I install an older linux package the newer kernel will be overwritten, won't it?

I want to have both the current version and an older version of the kernel installed simultaneously.


I do software development for fun and professionally!

I'm strongly interested in robotics and mechatronics! My favorite programming language is Rust

Offline

#4 2018-05-24 13:22:32

Lone_Wolf
Member
From: Netherlands, Europe
Registered: 2005-10-04
Posts: 11,868

Re: kernel compilation fails "ERROR: A failure occurred in prepare()"

https://git.archlinux.org/svntogit/pack … ce2fb8966d

Notice it shows 2 download links, both contain a snapshot of the PKGBUILD and other files needed to build 4.15.15-1 .

downlload, extract , change pkgname to something like linux-old, try building/installing .


Disliking systemd intensely, but not satisfied with alternatives so focusing on taming systemd.


(A works at time B)  && (time C > time B ) ≠  (A works at time C)

Offline

#5 2018-05-24 15:56:26

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: kernel compilation fails "ERROR: A failure occurred in prepare()"

Why not try the patches from the linux-usb mailing list for the issue?  https://www.spinics.net/lists/linux-usb/msg169384.html
Edit:
for 4.16.11
needs a cherry-pick of fa31b3cb2ae143aa6e26974fcbe75689da60bdbe
then applied three patches from https://patchwork.kernel.org/patch/10421969/ https://patchwork.kernel.org/patch/10421971/ https://patchwork.kernel.org/patch/10421973/
git diff is then

diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c
index 67ad4bb6919a..3625a5c1a41b 100644
--- a/drivers/usb/host/pci-quirks.c
+++ b/drivers/usb/host/pci-quirks.c
@@ -1268,23 +1268,3 @@ static void quirk_usb_early_handoff(struct pci_dev *pdev)
 }
 DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
 			PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff);
-
-bool usb_xhci_needs_pci_reset(struct pci_dev *pdev)
-{
-	/*
-	 * Our dear uPD72020{1,2} friend only partially resets when
-	 * asked to via the XHCI interface, and may end up doing DMA
-	 * at the wrong addresses, as it keeps the top 32bit of some
-	 * addresses from its previous programming under obscure
-	 * circumstances.
-	 * Give it a good wack at probe time. Unfortunately, this
-	 * needs to happen before we've had a chance to discover any
-	 * quirk, or the system will be in a rather bad state.
-	 */
-	if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
-	    (pdev->device == 0x0014 || pdev->device == 0x0015))
-		return true;
-
-	return false;
-}
-EXPORT_SYMBOL_GPL(usb_xhci_needs_pci_reset);
diff --git a/drivers/usb/host/pci-quirks.h b/drivers/usb/host/pci-quirks.h
index 4ca0d9b7e463..63c633077d9e 100644
--- a/drivers/usb/host/pci-quirks.h
+++ b/drivers/usb/host/pci-quirks.h
@@ -16,7 +16,6 @@ void usb_asmedia_modifyflowcontrol(struct pci_dev *pdev);
 void usb_enable_intel_xhci_ports(struct pci_dev *xhci_pdev);
 void usb_disable_xhci_ports(struct pci_dev *xhci_pdev);
 void sb800_prefetch(struct device *dev, int on);
-bool usb_xhci_needs_pci_reset(struct pci_dev *pdev);
 bool usb_amd_pt_check_port(struct device *device, int port);
 #else
 struct pci_dev;
diff --git a/drivers/usb/host/xhci-pci.c b/drivers/usb/host/xhci-pci.c
index 85ffda85f8ab..6372edf339d9 100644
--- a/drivers/usb/host/xhci-pci.c
+++ b/drivers/usb/host/xhci-pci.c
@@ -196,11 +196,15 @@ static void xhci_pci_quirks(struct device *dev, struct xhci_hcd *xhci)
 		xhci->quirks |= XHCI_BROKEN_STREAMS;
 	}
 	if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
-			pdev->device == 0x0014)
+	    pdev->device == 0x0014) {
 		xhci->quirks |= XHCI_TRUST_TX_LENGTH;
+		xhci->quirks |= XHCI_ZERO_64B_REGS;
+	}
 	if (pdev->vendor == PCI_VENDOR_ID_RENESAS &&
-			pdev->device == 0x0015)
+	    pdev->device == 0x0015) {
 		xhci->quirks |= XHCI_RESET_ON_RESUME;
+		xhci->quirks |= XHCI_ZERO_64B_REGS;
+	}
 	if (pdev->vendor == PCI_VENDOR_ID_VIA)
 		xhci->quirks |= XHCI_RESET_ON_RESUME;
 
@@ -284,13 +288,6 @@ static int xhci_pci_probe(struct pci_dev *dev, const struct pci_device_id *id)
 
 	driver = (struct hc_driver *)id->driver_data;
 
-	/* For some HW implementation, a XHCI reset is just not enough... */
-	if (usb_xhci_needs_pci_reset(dev)) {
-		dev_info(&dev->dev, "Resetting\n");
-		if (pci_reset_function_locked(dev))
-			dev_warn(&dev->dev, "Reset failed");
-	}
-
 	/* Prevent runtime suspending between USB-2 and USB-3 initialization */
 	pm_runtime_get_noresume(&dev->dev);
 
diff --git a/drivers/usb/host/xhci.c b/drivers/usb/host/xhci.c
index b60a02c50b89..1f4daf1e01d0 100644
--- a/drivers/usb/host/xhci.c
+++ b/drivers/usb/host/xhci.c
@@ -33,8 +33,8 @@ static int link_quirk;
 module_param(link_quirk, int, S_IRUGO | S_IWUSR);
 MODULE_PARM_DESC(link_quirk, "Don't clear the chain bit on a link TRB");
 
-static unsigned int quirks;
-module_param(quirks, uint, S_IRUGO);
+static unsigned long long quirks;
+module_param(quirks, ullong, S_IRUGO);
 MODULE_PARM_DESC(quirks, "Bit flags for quirks to be enabled as default");
 
 /* TODO: copied from ehci-hcd.c - can this be refactored? */
@@ -209,6 +209,68 @@ int xhci_reset(struct xhci_hcd *xhci)
 	return ret;
 }
 
+static void xhci_zero_64b_regs(struct xhci_hcd *xhci)
+{
+	struct device *dev = xhci_to_hcd(xhci)->self.sysdev;
+	int err, i;
+	u64 val;
+
+	/*
+	 * Some Renesas controllers get into a weird state if they are
+	 * reset while programmed with 64bit addresses (they will preserve
+	 * the top half of the address in internal, non visible
+	 * registers). You end up with half the address coming from the
+	 * kernel, and the other half coming from the firmware. Also,
+	 * changing the programming leads to extra accesses even if the
+	 * controller is supposed to be halted. The controller ends up with
+	 * a fatal fault, and is then ripe for being properly reset.
+	 *
+	 * Special care is taken to only apply this if the device is behind
+	 * an iommu. Doing anything when there is no iommu is definitely
+	 * unsafe...
+	 */
+	if (!(xhci->quirks & XHCI_ZERO_64B_REGS) || !dev->iommu_group)
+		return;
+
+	xhci_info(xhci, "Zeroing 64bit base registers, expecting fault\n");
+
+	/* Clear HSEIE so that faults do not get signaled */
+	val = readl(&xhci->op_regs->command);
+	val &= ~CMD_HSEIE;
+	writel(val, &xhci->op_regs->command);
+
+	/* Clear HSE (aka FATAL) */
+	val = readl(&xhci->op_regs->status);
+	val |= STS_FATAL;
+	writel(val, &xhci->op_regs->status);
+
+	/* Now zero the registers, and brace for impact */
+	val = xhci_read_64(xhci, &xhci->op_regs->dcbaa_ptr);
+	if (upper_32_bits(val))
+		xhci_write_64(xhci, 0, &xhci->op_regs->dcbaa_ptr);
+	val = xhci_read_64(xhci, &xhci->op_regs->cmd_ring);
+	if (upper_32_bits(val))
+		xhci_write_64(xhci, 0, &xhci->op_regs->cmd_ring);
+
+	for (i = 0; i < HCS_MAX_INTRS(xhci->hcs_params1); i++) {
+		struct xhci_intr_reg __iomem *ir;
+
+		ir = &xhci->run_regs->ir_set[i];
+		val = xhci_read_64(xhci, &ir->erst_base);
+		if (upper_32_bits(val))
+			xhci_write_64(xhci, 0, &ir->erst_base);
+		val= xhci_read_64(xhci, &ir->erst_dequeue);
+		if (upper_32_bits(val))
+			xhci_write_64(xhci, 0, &ir->erst_dequeue);
+	}
+
+	/* Wait for the fault to appear. It will be cleared on reset */
+	err = xhci_handshake(&xhci->op_regs->status,
+			     STS_FATAL, STS_FATAL,
+			     XHCI_MAX_HALT_USEC);
+	if (!err)
+		xhci_info(xhci, "Fault detected\n");
+}
 
 #ifdef CONFIG_USB_PCI
 /*
@@ -1004,6 +1066,7 @@ int xhci_resume(struct xhci_hcd *xhci, bool hibernated)
 
 		xhci_dbg(xhci, "Stop HCD\n");
 		xhci_halt(xhci);
+		xhci_zero_64b_regs(xhci);
 		xhci_reset(xhci);
 		spin_unlock_irq(&xhci->lock);
 		xhci_cleanup_msix(xhci);
@@ -4840,6 +4903,8 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
 	if (retval)
 		return retval;
 
+	xhci_zero_64b_regs(xhci);
+
 	xhci_dbg(xhci, "Resetting HCD\n");
 	/* Reset the internal HC memory state and registers. */
 	retval = xhci_reset(xhci);
@@ -4882,7 +4947,7 @@ int xhci_gen_setup(struct usb_hcd *hcd, xhci_get_quirks_t get_quirks)
 		return retval;
 	xhci_dbg(xhci, "Called HCD init\n");
 
-	xhci_info(xhci, "hcc params 0x%08x hci version 0x%x quirks 0x%08x\n",
+	xhci_info(xhci, "hcc params 0x%08x hci version 0x%x quirks 0x%016llx\n",
 		  xhci->hcc_params, xhci->hci_version, xhci->quirks);
 
 	return 0;
diff --git a/drivers/usb/host/xhci.h b/drivers/usb/host/xhci.h
index 1d6cc29d0b3e..ba2de6795c89 100644
--- a/drivers/usb/host/xhci.h
+++ b/drivers/usb/host/xhci.h
@@ -1784,12 +1784,12 @@ struct xhci_hcd {
 #define XHCI_STATE_DYING	(1 << 0)
 #define XHCI_STATE_HALTED	(1 << 1)
 #define XHCI_STATE_REMOVING	(1 << 2)
-	unsigned int		quirks;
-#define	XHCI_LINK_TRB_QUIRK	(1 << 0)
-#define XHCI_RESET_EP_QUIRK	(1 << 1)
-#define XHCI_NEC_HOST		(1 << 2)
-#define XHCI_AMD_PLL_FIX	(1 << 3)
-#define XHCI_SPURIOUS_SUCCESS	(1 << 4)
+	unsigned long long	quirks;
+#define	XHCI_LINK_TRB_QUIRK	BIT_ULL(0)
+#define XHCI_RESET_EP_QUIRK	BIT_ULL(1)
+#define XHCI_NEC_HOST		BIT_ULL(2)
+#define XHCI_AMD_PLL_FIX	BIT_ULL(3)
+#define XHCI_SPURIOUS_SUCCESS	BIT_ULL(4)
 /*
  * Certain Intel host controllers have a limit to the number of endpoint
  * contexts they can handle.  Ideally, they would signal that they can't handle
@@ -1799,35 +1799,36 @@ struct xhci_hcd {
  * commands, reset device commands, disable slot commands, and address device
  * commands.
  */
-#define XHCI_EP_LIMIT_QUIRK	(1 << 5)
-#define XHCI_BROKEN_MSI		(1 << 6)
-#define XHCI_RESET_ON_RESUME	(1 << 7)
-#define	XHCI_SW_BW_CHECKING	(1 << 8)
-#define XHCI_AMD_0x96_HOST	(1 << 9)
-#define XHCI_TRUST_TX_LENGTH	(1 << 10)
-#define XHCI_LPM_SUPPORT	(1 << 11)
-#define XHCI_INTEL_HOST		(1 << 12)
-#define XHCI_SPURIOUS_REBOOT	(1 << 13)
-#define XHCI_COMP_MODE_QUIRK	(1 << 14)
-#define XHCI_AVOID_BEI		(1 << 15)
-#define XHCI_PLAT		(1 << 16)
-#define XHCI_SLOW_SUSPEND	(1 << 17)
-#define XHCI_SPURIOUS_WAKEUP	(1 << 18)
+#define XHCI_EP_LIMIT_QUIRK	BIT_ULL(5)
+#define XHCI_BROKEN_MSI		BIT_ULL(6)
+#define XHCI_RESET_ON_RESUME	BIT_ULL(7)
+#define	XHCI_SW_BW_CHECKING	BIT_ULL(8)
+#define XHCI_AMD_0x96_HOST	BIT_ULL(9)
+#define XHCI_TRUST_TX_LENGTH	BIT_ULL(10)
+#define XHCI_LPM_SUPPORT	BIT_ULL(11)
+#define XHCI_INTEL_HOST		BIT_ULL(12)
+#define XHCI_SPURIOUS_REBOOT	BIT_ULL(13)
+#define XHCI_COMP_MODE_QUIRK	BIT_ULL(14)
+#define XHCI_AVOID_BEI		BIT_ULL(15)
+#define XHCI_PLAT		BIT_ULL(16)
+#define XHCI_SLOW_SUSPEND	BIT_ULL(17)
+#define XHCI_SPURIOUS_WAKEUP	BIT_ULL(18)
 /* For controllers with a broken beyond repair streams implementation */
-#define XHCI_BROKEN_STREAMS	(1 << 19)
-#define XHCI_PME_STUCK_QUIRK	(1 << 20)
-#define XHCI_MTK_HOST		(1 << 21)
-#define XHCI_SSIC_PORT_UNUSED	(1 << 22)
-#define XHCI_NO_64BIT_SUPPORT	(1 << 23)
-#define XHCI_MISSING_CAS	(1 << 24)
+#define XHCI_BROKEN_STREAMS	BIT_ULL(19)
+#define XHCI_PME_STUCK_QUIRK	BIT_ULL(20)
+#define XHCI_MTK_HOST		BIT_ULL(21)
+#define XHCI_SSIC_PORT_UNUSED	BIT_ULL(22)
+#define XHCI_NO_64BIT_SUPPORT	BIT_ULL(23)
+#define XHCI_MISSING_CAS	BIT_ULL(24)
 /* For controller with a broken Port Disable implementation */
-#define XHCI_BROKEN_PORT_PED	(1 << 25)
-#define XHCI_LIMIT_ENDPOINT_INTERVAL_7	(1 << 26)
-#define XHCI_U2_DISABLE_WAKE	(1 << 27)
-#define XHCI_ASMEDIA_MODIFY_FLOWCONTROL	(1 << 28)
-#define XHCI_HW_LPM_DISABLE	(1 << 29)
-#define XHCI_SUSPEND_DELAY	(1 << 30)
-#define XHCI_INTEL_USB_ROLE_SW	(1 << 31)
+#define XHCI_BROKEN_PORT_PED	BIT_ULL(25)
+#define XHCI_LIMIT_ENDPOINT_INTERVAL_7	BIT_ULL(26)
+#define XHCI_U2_DISABLE_WAKE	BIT_ULL(27)
+#define XHCI_ASMEDIA_MODIFY_FLOWCONTROL	BIT_ULL(28)
+#define XHCI_HW_LPM_DISABLE	BIT_ULL(29)
+#define XHCI_SUSPEND_DELAY	BIT_ULL(30)
+#define XHCI_INTEL_USB_ROLE_SW	BIT_ULL(31)
+#define XHCI_ZERO_64B_REGS	BIT_ULL(32)
 
 	unsigned int		num_active_eps;
 	unsigned int		limit_active_eps;

Edit:
The original makepkg issue seems the same as https://bbs.archlinux.org/viewtopic.php … 9#p1784839

Last edited by loqs (2018-05-24 20:07:50)

Offline

#6 2018-05-25 20:40:30

Arch Linux Tux
Member
Registered: 2017-04-01
Posts: 34

Re: kernel compilation fails "ERROR: A failure occurred in prepare()"

@loqs

I'm trying to get this done using the method described here.

asp update linux
asp checkout linux

#and then your cherry pick:
cd linux
git cherry-pick fa31b3cb2ae143aa6e26974fcbe75689da60bdbe

But this gives me a

fatal: bad object fa31b3cb2ae143aa6e26974fcbe75689da60bdbe

error.

How should I do this? And how can I apply the patches?

I'm sorry, I'm not really into this "advanced git stuff".

Last edited by Arch Linux Tux (2018-05-25 20:41:45)


I do software development for fun and professionally!

I'm strongly interested in robotics and mechatronics! My favorite programming language is Rust

Offline

#7 2018-05-25 21:06:00

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: kernel compilation fails "ERROR: A failure occurred in prepare()"

Ah you can not find that commit as the git repo in use is for the PKGBUILD not the linux kernel.  The patch I supplied in comment #5 in the code block already contains the cherry pick and the three other patches you need.
You need to paste it to a file in the same directory as the PKGBUILD then follow Patching_packages#Applying_patches..
Which involves adding whatever filename you chose to the sources array.  In the prepare function duplicate one of existing patch lines and change the name to the name of the new patch.
Run updpkgsums to add the checksum for the new patch then you can run makepkg rsi to build the package.
Edit:
grammar missing is.

Last edited by loqs (2018-05-25 21:07:06)

Offline

#8 2018-05-29 12:56:58

Arch Linux Tux
Member
Registered: 2017-04-01
Posts: 34

Re: kernel compilation fails "ERROR: A failure occurred in prepare()"

Can I somehow list and checkout an older kernel, when I use PKGBUILD-repository of Arch (Arch Build System) like this?

asp update linux
asp checkout linux

I do software development for fun and professionally!

I'm strongly interested in robotics and mechatronics! My favorite programming language is Rust

Offline

#9 2018-05-29 19:35:40

eschwartz
Fellow
Registered: 2014-08-08
Posts: 4,097

Re: kernel compilation fails "ERROR: A failure occurred in prepare()"

Yes, it's a git repository, use git log and git checkout like any other git repository that you want to retrieve old commits for.


Managing AUR repos The Right Way -- aurpublish (now a standalone tool)

Offline

#10 2018-05-29 20:38:11

loqs
Member
Registered: 2014-03-06
Posts: 17,195

Re: kernel compilation fails "ERROR: A failure occurred in prepare()"

Is this what you are trying to do?

Offline

#11 2018-05-30 15:11:31

Arch Linux Tux
Member
Registered: 2017-04-01
Posts: 34

Re: kernel compilation fails "ERROR: A failure occurred in prepare()"

@loqs

This is me writting with Mathias Nyman, as I reported in the other thread.


I do software development for fun and professionally!

I'm strongly interested in robotics and mechatronics! My favorite programming language is Rust

Offline

Board footer

Powered by FluxBB