[mdlug] LED on Raspberry Pi
gib at juno.com
gib at juno.com
Sat Oct 11 09:24:46 EDT 2014
Cool.
Hope to see you at the meeting in a few hours.
---------- Original Message ----------
From: Drew <drew4096 at gmail.com>
To: "MDLUG's Main discussion list" <mdlug at mdlug.org>
Subject: Re: [mdlug] LED on Raspberry Pi
Date: Sat, 11 Oct 2014 00:53:53 -0400
Got the problem fixed.
When I did the restore, I only restored the contents of the ext4
partition, and was just using the files on the FAT partition that were
on the original Raspbian disk image. But apparently, the apt-get
upgrade I had done at JFKlib had upgraded most of the files on the FAT
as well. So apparently something wasn't starting properly; I still
don't know what it was.
Fortunately I also had made a tarball of the FAT partition contents
(after the upgrade) just in case. Untarring it back into the
filesystem (overwriting the initial version of the files) fixed the
problem.
On 10/10/14, gib at juno.com <gib at juno.com> wrote:
> We have our meeting tomorrow (Saturday 10/11/2014) around Noon. If you don't
> get an a reply today perhaps we can talk about it then. Maybe you can backup
> the data you have and start over, as a fresh install.I just did some quick
> research and I found
> this:http://www.spinics.net/lists/linux-leds/msg01095.html Which says (the
> remainder of this reply is from the site): This API will create the sysfs
> node for your:
> return led_classdev_register(&pdev->dev, &dummy_led_cdev);
>
>> Any pointers on what additional steps I need to take to get my "LED" to
>> show up are greatly appreciated.
>>
>
> Your dummy driver is basically right, the /sys/class/leds/dummy should
> be shown up.
> But you missed to register this platform device in your kernel. You
> should put some code in your specific's board file, like
> arch/arm/mach-omap2/board-omap3beagle.c.
>
> Define a structure to tell kernel that you have a dummy led device.
>
> +static struct platform_device leds_dummy_device = {
> + .name = "dummy-led",
> + .id = 0,
> +};
>
> Then register it in your board init code:
> + platform_device_register(&leds_dummy_device);
>
> NOTE: the .name should match the name in your driver code like "dummy-led"
>
> Then you will get the right things.
>
> The better why is to use Device Tree instead of platform device register.
>
>
> ---------- Original Message ----------
> From: Drew <drew4096 at gmail.com>
> To: mdlug at mdlug.org
> Subject: [mdlug] LED on Raspberry Pi
> Date: Fri, 10 Oct 2014 00:08:14 -0400
>
> I had the Pi's filesystem go bad on me. I managed to restore the
> system along with the upgrades I had done so far, by dd-ing in the FAT
> partition, putting in an ext4, then restoring from a tarball.
>
> Only problem is, on bootup the /sys/class/leds directory, which
> normally contains the "file" that controls the state of the green LED
> (the one I'd been using to flash the last part of the local IP
> address), isn't being created. So both the blinkIP script and the part
> of the vncboot script that signals when it has the vnc server up,
> aren't working.
>
> Can someone help me figure out why? What normally creates this
> directory and its contents?
> _______________________________________________
> mdlug mailing list
> mdlug at mdlug.org
> http://mdlug.org/mailman/listinfo/mdlug
> ____________________________________________________________
> Kaiser Permanente® FEHB
> A Leader in Quality Care With the Lowest Cost HMO Plan. Learn More!
> http://thirdpartyoffers.juno.com/TGL3131/5437cf4951f8a4f4923cdst03vuc
> _______________________________________________
> mdlug mailing list
> mdlug at mdlug.org
> http://mdlug.org/mailman/listinfo/mdlug
>
_______________________________________________
mdlug mailing list
mdlug at mdlug.org
http://mdlug.org/mailman/listinfo/mdlug
More information about the mdlug
mailing list