Troubleshooting Firmware version skew
Posted: Wed Jan 30, 2013 2:32 am
I built a custom kernel - just a GPIO pin for PPS (pulse-per-second) for NTP. NTP/PPS is working fine.
The short form question is: how do I get matching firmware? I followed the directions that I found, but ended up with version skew - but no clue what component is wrong.
The details:
The only change I made is:
Plus enabling PPS in menuconfig.
I built the cross-tools per akanto.wordprss.com/2012/10/02/cross-compiling-kernel-for-raspberry-pai-on-fedora-17-part2,
kernel from https://github.com/raspberrypi/linux/ar ... .27.tar.gz
firmware from git://github.com/raspberrypi/firmware.git
Followed the build directions at http://elinux.org/RPi_Kernel_Compilation.
So this was supposed to be a compatible pair.
Kernel boots OK; I usually run headless, but connecting a display seems to work.
However, I seem to have a version skew with the firmware:
strace of vcgen shows open("/dev/vchiq", O_RDWR) failing with errno == ENOTCONN (Transport endpoint is not connected) immediately before the error is printed.
How do I track down what's broken?
Given how long it takes to build the kernel, I'd prefer to get the matching firmware.
The short form question is: how do I get matching firmware? I followed the directions that I found, but ended up with version skew - but no clue what component is wrong.
The details:
The only change I made is:
Code: Select all
index bf9f730..7267ab8 100644
--- a/arch/arm/mach-bcm2708/bcm2708.c
+++ b/arch/arm/mach-bcm2708/bcm2708.c
@@ -60,6 +60,11 @@
#include "armctrl.h"
#include "clock.h"
+#ifdef CONFIG_BCM2708_GPIO
+#include <linux/pps-gpio.h>
+#endif
+
+
/* Effectively we have an IOMMU (ARM<->VideoCore map) that is set up to
* give us IO access only to 64Mbytes of physical memory (26 bits). We could
* represent this window by setting our dmamasks to 26 bits but, in fact
@@ -371,6 +376,21 @@ static struct resource bcm2708_gpio_resources[] = {
},
};
+/* PPS-GPIO platform data */
+static struct pps_gpio_platform_data pps_gpio_info = {
+.assert_falling_edge = true,
+.capture_clear= false,
+.gpio_pin=24,
+.gpio_label="PPS",
+};
+static struct platform_device pps_gpio_device = {
+.name = "pps-gpio",
+.id = -1,
+.dev = {
+.platform_data = &pps_gpio_info
+},
+};
+
static u64 gpio_dmamask = DMA_BIT_MASK(DMA_MASK_BITS_COMMON);
static struct platform_device bcm2708_gpio_device = {
@@ -579,6 +599,7 @@ void __init bcm2708_init(void)
bcm_register_device(&bcm2708_vcio_device);
#ifdef CONFIG_BCM2708_GPIO
bcm_register_device(&bcm2708_gpio_device);
+ bcm_register_device(&pps_gpio_device);
#endif
bcm_register_device(&bcm2708_systemtimer_device);
#ifdef CONFIG_MMC_BCM2708
I built the cross-tools per akanto.wordprss.com/2012/10/02/cross-compiling-kernel-for-raspberry-pai-on-fedora-17-part2,
kernel from https://github.com/raspberrypi/linux/ar ... .27.tar.gz
firmware from git://github.com/raspberrypi/firmware.git
Followed the build directions at http://elinux.org/RPi_Kernel_Compilation.
So this was supposed to be a compatible pair.
Kernel boots OK; I usually run headless, but connecting a display seems to work.
However, I seem to have a version skew with the firmware:
Code: Select all
/opt/vc/bin/vcgencmd version
VCHI initialization failed
How do I track down what's broken?
Given how long it takes to build the kernel, I'd prefer to get the matching firmware.