RobertCNelson / armv7-multiplatform

MIT License
75 stars 42 forks source link

Build issues with tegra and 4.7 #30

Closed sarnold closed 8 years ago

sarnold commented 8 years ago

Hey Robert:

On tegra20 (trimslice) we have some issues with 4.7, one dt issue (see below) and a couple of small patches for arm (see attached). First, getting a traceback on boot:

[    1.373160] tegra-ehci: Tegra EHCI driver
[    1.380039] ------------[ cut here ]------------
[    1.387393] WARNING: CPU: 0 PID: 1 at drivers/reset/core.c:187 __of_reset_control_get+0x18c/0x250
[    1.399052] Modules linked in:
[    1.404857] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 4.7.0-rc2-armv7-x0 #2
[    1.414582] Hardware name: NVIDIA Tegra SoC (Flattened Device Tree)
[    1.423636] [<c01107a4>] (unwind_backtrace) from [<c010b62c>] (show_stack+0x10/0x14)
[    1.434194] [<c010b62c>] (show_stack) from [<c07f4a98>] (dump_stack+0x90/0xa4)
[    1.444215] [<c07f4a98>] (dump_stack) from [<c0120720>] (__warn+0xe8/0x100)
[    1.453972] [<c0120720>] (__warn) from [<c0120830>] (warn_slowpath_null+0x20/0x28)
[    1.464380] [<c0120830>] (warn_slowpath_null) from [<c03eefdc>] (__of_reset_control_get+0x18c/0x250)
[    1.476396] [<c03eefdc>] (__of_reset_control_get) from [<c054d3ec>] (tegra_ehci_probe+0x394/0x518)
[    1.488261] [<c054d3ec>] (tegra_ehci_probe) from [<c0478fa8>] (platform_drv_probe+0x4c/0xb0)
[    1.499625] [<c0478fa8>] (platform_drv_probe) from [<c0477714>] (driver_probe_device+0x214/0x2c0)
[    1.511453] [<c0477714>] (driver_probe_device) from [<c0477878>] (__driver_attach+0xb8/0xbc)
[    1.522877] [<c0477878>] (__driver_attach) from [<c04758f8>] (bus_for_each_dev+0x7c/0xc0)
[    1.534057] [<c04758f8>] (bus_for_each_dev) from [<c0476b40>] (bus_add_driver+0x1a0/0x218)
[    1.545338] [<c0476b40>] (bus_add_driver) from [<c0477fb4>] (driver_register+0x78/0xf8)
[    1.556376] [<c0477fb4>] (driver_register) from [<c0101834>] (do_one_initcall+0x50/0x194)
[    1.567608] [<c0101834>] (do_one_initcall) from [<c0b00e64>] (kernel_init_freeable+0x158/0x1fc)
[    1.579392] [<c0b00e64>] (kernel_init_freeable) from [<c07f6108>] (kernel_init+0x8/0x114)
[    1.590679] [<c07f6108>] (kernel_init) from [<c0107ab8>] (ret_from_fork+0x14/0x3c)
[    1.601388] ---[ end trace 4aebf6c53f462c3c ]---
[    1.609098] tegra-ehci c5000000.usb: can't get utmi-pads reset from the PHY
[    1.619192] tegra-ehci c5000000.usb: continuing, but please update your DT
[    1.644912] tegra-ehci c5004000.usb: EHCI Host Controller
[    1.653408] tegra-ehci c5004000.usb: new USB bus registered, assigned bus number 1
[    1.664270] tegra-ehci c5004000.usb: irq 289, io mem 0xc5004000
[    1.681457] tegra-ehci c5004000.usb: USB 2.0 started, EHCI 1.00

Next, build fails on beaglebone patches without slab include:

--- include/linux/of.h.orig 2016-06-12 16:47:09.651252739 -0700
+++ include/linux/of.h  2016-06-12 16:55:07.504059836 -0700
@@ -23,6 +23,7 @@
 #include <linux/spinlock.h>
 #include <linux/topology.h>
 #include <linux/notifier.h>
+#include <linux/slab.h>
 #include <linux/property.h>
 #include <linux/list.h>
 #include <linux/rhashtable.h>

And, gcc5 doesn't recognize --pic-veneer any more.

--- a/arch/arm/Makefile
+++ b/arch/arm/Makefile
@@ -13,7 +13,13 @@
 # Ensure linker flags are correct
 LDFLAGS        :=

-LDFLAGS_vmlinux    :=-p --no-undefined -X --pic-veneer
+GCCVERSIONISGTE5 := $(shell expr `$(HOSTCC) -dumpversion | cut -f1 -d.` \>= 5)
+ifeq  "$(GCCVERSIONISGTE5)" "1"
+LDFLAGS_vmlinux :=-p --no-undefined -X
+else
+LDFLAGS_vmlinux :=-p --no-undefined -X --pic-veneer
+endif
+
 ifeq ($(CONFIG_CPU_ENDIAN_BE8),y)
 LDFLAGS_vmlinux    += --be8
 LDFLAGS_MODULE += --be8
RobertCNelson commented 8 years ago

hi @sarnold, hum noting obviou stand's out, later tegra devices got a rewritten xusb driver this cycle, shouldn't have affected tegra2..

sarnold commented 8 years ago

Since it complains about updating my DT, probably faster if you take a look but I'll see if I can find anything that looks odd...