dom
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 5408
Joined: Wed Aug 17, 2011 7:41 pm
Location: Cambridge

Linux kernel is now 3.18

Tue Jan 20, 2015 7:09 pm

The default firmware branch updated to 3.18 kernel with device tree enabled.
The "next" firmware branch has been using this for the last few weeks without major problems. See here

Update with:

Code: Select all

sudo rpi-update
Ideally nothing much will change. The newer kernel tree does support more devices (e.g. USB devices like wifi and dvb).
If you are using modules like audio cards, i2c, i2s, spi, lirc you may need to enable these through device tree (see here).

Please report if there are any regressions compared to the 3.12 kernel. If testing is positive it will appear in "apt-get upgrade" and on new raspbian images in the near future.

If you have problems, the you can disable device tree by adding to config.txt:

Code: Select all

device_tree=
For more info on why things are changing read here

EDIT: Linux kernel is now 4.0
viewtopic.php?f=29&t=113753

User avatar
DougieLawson
Posts: 37507
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 9:31 pm

Running OK on my A+ with my RT5370 WiFi dongle and my custom made DTB.

I just have to get the source stuff so I can build the enc28j60 module into that kernel. Would be nice if that was included in the stock kernel.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

PhilE
Raspberry Pi Engineer & Forum Moderator
Raspberry Pi Engineer & Forum Moderator
Posts: 2648
Joined: Mon Sep 29, 2014 1:07 pm
Location: Cambridge

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 9:41 pm

Have you modified the DTB because it is easier than writing an overlay, or did you find there was something that you couldn't do in an overlay? Either way, I'm interested.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 10:15 pm

All right. I did the firmware upgrade and now my one-wire devices don't work. I read the other thread, so what do I do with overlays?

I see this:

Code: Select all

[email protected] ~ $ ls /boot/overlays/
hifiberry-dac-overlay.dtb      iqaudio-dacplus-overlay.dtb
hifiberry-dacplus-overlay.dtb  lirc-rpi-overlay.dtb
hifiberry-digi-overlay.dtb     w1-gpio-overlay.dtb
iqaudio-dac-overlay.dtb        w1-gpio-pullup-overlay.dtb
And I have to add something to config.txt, like this?

Code: Select all

device_tree_overlay=overlays/w1-gpio-pullup-overlay.dtb
What if I want more than one? Do I need w1-gpio-overlay.dtb and w1-gpio-pullup-overlay.dtb?

Do I still have to have the w1 drivers in /etc/modules?
This is what I have:

Code: Select all

snd-bcm2835
w1-gpio pullup=1
w1-therm strong_pullup=1
And I see DS2406 is available as a module!! I really want to use this, so thanks for putting it in.

User avatar
DougieLawson
Posts: 37507
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 10:30 pm

PhilE wrote:Have you modified the DTB because it is easier than writing an overlay, or did you find there was something that you couldn't do in an overlay? Either way, I'm interested.
I rebuilt my blob from bcm2708-rpi-b.dts, skeleton.dtsi and bcm2708.dtsi that I pulled out of the 3.18.2 source tree and modified for the enc28j60 spidev0.0 parms.

I couldn't find detailed enough docs for how the overlays are built.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 10:32 pm

All right, I added this to config.txt and rebooted.

Code: Select all

device_tree_overlay=overlays/w1-gpio-pullup-overlay.dtb
I still have the w1 modules in /etc/modules

Now I can see my devices in /sys/bus/w1/devices/, however I can't read them. I am using parasite power, which was working well, but now my sensors all report 85.0 degrees, which is a known side effect of using parasite power.

Any suggestions?

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 10:45 pm

I removed the w1 drivers from /etc/modules and rebooted. They are still present after reboot (they show up in lsmod) so they are being loaded automagically. However, my temperature readings are still bad. Perhaps the pullup mode is not being activated?

My /etc/modules looks like this now:

Code: Select all

snd-bcm2835
#w1-gpio pullup=1
#w1-therm strong_pullup=1
As you can see, I used to specify the pullup should be used. Is there something missing from the device-tree implementation? Perhaps there is no difference between w1-gpio-overlay.dtb and w1-gpio-pullup-overlay.dtb?

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:01 pm

Well, if I specify w1-gpio-overlay.dtb in config.txt it still doesn't work.

Manually removing and installing the modules does not work:

Code: Select all

[email protected] ~ $ sudo modprobe w1-gpio pullup=1

Message from [email protected] at Jan 21 11:56:09 ...
 kernel:[  215.847040] Internal error: Oops: 8000000d [#1] PREEMPT ARM

Message from [email protected] at Jan 21 11:56:09 ...
 kernel:[  215.964645] Process modprobe (pid: 2649, stack limit = 0xd96c01b0)
 
Message from [email protected] at Jan 21 11:56:09 ...
 kernel:[  215.972679] Stack: (0xd96c1cc8 to 0xd96c2000)

Message from [email protected] at Jan 21 11:56:09 ...
 kernel:[  215.978844] 1cc0:                   bf26412c db11aa10 fffffdfb bf264818 bf264818 0000001a

Message from [email protected] at Jan 21 11:56:09 ...
 kernel:[  215.990604] 1ce0: d96c1d0c d96c1cf0 c03698c4 bf264138 c08e4d48 db11aa10 00000000 bf264818
<snippety snip>
What to do?

User avatar
DougieLawson
Posts: 37507
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:04 pm

ame wrote: As you can see, I used to specify the pullup should be used. Is there something missing from the device-tree implementation? Perhaps there is no difference between w1-gpio-overlay.dtb and w1-gpio-pullup-overlay.dtb?
Use the dtc compiler to turn the blobs back to source (dts) and take a look.

[email protected] ~/dtb # dtc -I dtb -O dts < w1-gpio-overlay.dtb > overlay.dts
DTC: dtb->dts on file "-"
[email protected] ~/dtb # dtc -I dtb -O dts < w1-gpio-pullup-overlay.dtb > pullup-overlay.dts
DTC: dtb->dts on file "-"
[email protected] ~/dtb # diff overlay.dts pullup-overlay.dts
15c15
< gpios = <0xdeadbeef 0x4 0x0>;
---
> gpios = <0xdeadbeef 0x4 0x0 0xdeadbeef 0x5 0x1>;
29,31c29,31
< brcm,pins = <0x4>;
< brcm,function = <0x0>;
< brcm,pull = <0x0>;
---
> brcm,pins = <0x4 0x5>;
> brcm,function = <0x0 0x1>;
> brcm,pull = <0x0 0x0>;
39a40
> pullup = [00 00 00 02 67 70 69 6f 73 3a 31 36 00 00 00 00 01 62 72 63 6d 2c 70 69 6e 73 3a 34 00];
48c49
< gpio = "/[email protected]/__overlay__/[email protected]:gpios:0", "/[email protected]:target:0";
---
> gpio = "/[email protected]/__overlay__/[email protected]:gpios:0", "/[email protected]/__overlay__/[email protected]:gpios:12", "/[email protected]:target:0";
52c53
< fixup = "/[email protected]/__overlay__/[email protected]:pinctrl-0:0", "/__overrides__:gpiopin:0", "/__overrides__:gpiopin:12";
---
> fixup = "/[email protected]/__overlay__/[email protected]:pinctrl-0:0", "/__overrides__:gpiopin:0", "/__overrides__:gpiopin:12", "/__overrides__:pullup:0", "/__overrides__:pullup:13";
[email protected] ~/dtb #


You may need to install the compiler with apt-get install device-tree-compiler
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Sheddyian
Posts: 21
Joined: Thu Jul 17, 2014 4:33 pm

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:06 pm

Hi,

Just to add that I ran sudo rpi-update on my old Model B 256Mb about an hour ago, and can no longer see my 1 wire DS18B20+ temperature probe after a reboot. Previously it's been running for about 6 weeks without problem.

I have nothing showing in /sys/bus/w1/devices :(

Ian

User avatar
DougieLawson
Posts: 37507
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:09 pm

Sheddyian wrote:Hi,

Just to add that I ran sudo rpi-update on my old Model B 256Mb about an hour ago, and can no longer see my 1 wire DS18B20+ temperature probe after a reboot. Previously it's been running for about 6 weeks without problem.

I have nothing showing in /sys/bus/w1/devices :(

Ian
Add this

Code: Select all

device_tree=bcm2708-rpi-b.dtb 
device_tree_overlay=overlays/w1-gpio-overlay.dtb
to /boot/config.txt and reboot.

I'm not sure whether there's a parm like device_tree_param=1-wire=on needed.
Edit: looking at the source for the overlay it's got status = "okay"; so it should come up enabled.
Last edited by DougieLawson on Tue Jan 20, 2015 11:14 pm, edited 1 time in total.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:12 pm

DougieLawson wrote:
ame wrote: As you can see, I used to specify the pullup should be used. Is there something missing from the device-tree implementation? Perhaps there is no difference between w1-gpio-overlay.dtb and w1-gpio-pullup-overlay.dtb?
Use the dtc compiler to turn the blobs back to source (dts) and take a look.

[email protected] ~/dtb # dtc -I dtb -O dts < w1-gpio-overlay.dtb > overlay.dts
DTC: dtb->dts on file "-"
[email protected] ~/dtb # dtc -I dtb -O dts < w1-gpio-pullup-overlay.dtb > pullup-overlay.dts
DTC: dtb->dts on file "-"
[email protected] ~/dtb # diff overlay.dts pullup-overlay.dts
15c15
< gpios = <0xdeadbeef 0x4 0x0>;
---
> gpios = <0xdeadbeef 0x4 0x0 0xdeadbeef 0x5 0x1>;
29,31c29,31
< brcm,pins = <0x4>;
< brcm,function = <0x0>;
< brcm,pull = <0x0>;
---
> brcm,pins = <0x4 0x5>;
> brcm,function = <0x0 0x1>;
> brcm,pull = <0x0 0x0>;
39a40
> pullup = [00 00 00 02 67 70 69 6f 73 3a 31 36 00 00 00 00 01 62 72 63 6d 2c 70 69 6e 73 3a 34 00];
48c49
< gpio = "/[email protected]/__overlay__/[email protected]:gpios:0", "/[email protected]:target:0";
---
> gpio = "/[email protected]/__overlay__/[email protected]:gpios:0", "/[email protected]/__overlay__/[email protected]:gpios:12", "/[email protected]:target:0";
52c53
< fixup = "/[email protected]/__overlay__/[email protected]:pinctrl-0:0", "/__overrides__:gpiopin:0", "/__overrides__:gpiopin:12";
---
> fixup = "/[email protected]/__overlay__/[email protected]:pinctrl-0:0", "/__overrides__:gpiopin:0", "/__overrides__:gpiopin:12", "/__overrides__:pullup:0", "/__overrides__:pullup:13";
[email protected] ~/dtb #


You may need to install the compiler with apt-get install device-tree-compiler
Now I am sad, because I don't want this level of complexity. :(

Unfortunately, anyone else who is using the w1 drivers and runs rpi-update will also be sad.

Can I downgrade the firmware? Or should I just re-image my SD card and not run rpi-update? Now my Pi won't boot. I'm going to have to bring it in from the garage and put it on the bench and stare at it for a while.

User avatar
DougieLawson
Posts: 37507
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:15 pm

ame wrote: Now I am sad, because I don't want this level of complexity. :(
It's complex for about a week, then it suddenly clicks into place and you'll wonder how it worked without the device tree.
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

Sheddyian
Posts: 21
Joined: Thu Jul 17, 2014 4:33 pm

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:20 pm

+1 for rollback

I'm rather ignorant as to the more detailed workings of rpi-update, and previous firmware versions.

How can I get rpi-update to revert to the backup it makes (does it?) or how can I download the previous version that was working fine for me? I last ran rpi-update a few days ago and all was happy then.

At least for the time being until there's a simple and definitive answer to getting 1 wire sensors working, going back to previous firmware seems simplest way.

Thanks

Ian

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:20 pm

I did not have this in config.txt:

device_tree=bcm2708-rpi-b.dtb

I just added it. The end of my config.txt now looks like this:

Code: Select all

# uncomment for composite PAL
#sdtv_mode=2

#uncomment to overclock the arm. 700 MHz is the default.
#arm_freq=800

device_tree=bcm2708-rpi-b.dtb 
device_tree_overlay=overlays/w1-gpio-pullup-overlay.dtb
Now to reboot again (Pi is happy. Just got lonely in the garage and wanted some attention I think).

User avatar
DougieLawson
Posts: 37507
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:24 pm

ame wrote: Can I downgrade the firmware? Or should I just re-image my SD card and not run rpi-update? Now my Pi won't boot. I'm going to have to bring it in from the garage and put it on the bench and stare at it for a while.
Sheddyian wrote: How can I get rpi-update to revert to the backup it makes (does it?) or how can I download the previous version that was working fine for me? I last ran rpi-update a few days ago and all was happy then.
I know how to regress firmware when it's the same kernel version, not sure if that works across versions.

rpi-update ee678123f93649fe54b547edf1de01f4837e9e06
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:28 pm

No dice. I can see my devices in the w1 bus directory, but I cannot read them. I need the equivalent of pullup=1 or strong_pullup=1 that I previously specified in /etc/modules

User avatar
DougieLawson
Posts: 37507
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:32 pm

ame wrote:No dice. I can see my devices in the w1 bus directory, but I cannot read them. I need the equivalent of pullup=1 or strong_pullup=1 that I previously specified in /etc/modules
Is that stuff still in /etc/modules? Move it to a /etc/modprobe.d/1wire.conf file

Code: Select all

option w1-gpio pullup=1
option w1-therm strong_pullup=1
You may need separate w1-gpio.conf & w1-therm.conf files for each module [not sure about that].
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:41 pm

DougieLawson wrote:
ame wrote:No dice. I can see my devices in the w1 bus directory, but I cannot read them. I need the equivalent of pullup=1 or strong_pullup=1 that I previously specified in /etc/modules
Is that stuff still in /etc/modules? Move it to a /etc/modprobe.d/1wire.conf file.
I can find no documentation for this.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:54 pm

Sheddyian wrote:Hi,

Just to add that I ran sudo rpi-update on my old Model B 256Mb about an hour ago, and can no longer see my 1 wire DS18B20+ temperature probe after a reboot. Previously it's been running for about 6 weeks without problem.

I have nothing showing in /sys/bus/w1/devices :(

Ian
Just curious, are you using parasite power?

User avatar
DougieLawson
Posts: 37507
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Linux kernel is now 3.18

Tue Jan 20, 2015 11:57 pm

man 5 modprobe.d
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Wed Jan 21, 2015 12:16 am

DougieLawson wrote:man 5 modprobe.d
Thanks. Now I understand.

The correct syntax is "options" so I now have an /etc/modprobe.d/1wire.conf file like this:

Code: Select all

options w1-gpio pullup=1
options w1-therm strong_pullup=1
But... reading a sensor takes a long time (about 30 seconds), then gives me the fixed 85.0 output.

User avatar
DougieLawson
Posts: 37507
Joined: Sun Jun 16, 2013 11:19 pm
Location: Basingstoke, UK
Contact: Website Twitter

Re: Linux kernel is now 3.18

Wed Jan 21, 2015 12:30 am

What happens if you split that out to /etc/modprobe.d/w1-gpio.conf & /etc/modprobe.d/w1-therm.conf ?
Note: Having anything humorous in your signature is completely banned on this forum. Wear a tin-foil hat and you'll get a ban.

Any DMs sent on Twitter will be answered next month.

This is a doctor free zone.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Wed Jan 21, 2015 12:46 am

DougieLawson wrote:What happens if you split that out to /etc/modprobe.d/w1-gpio.conf & /etc/modprobe.d/w1-therm.conf ?
I don't expect anything different to happen (based on my understanding of how modprobe.d works) but I am trying it now.

Incidentally I tried device_tree_overlay=overlays/w1-gpio-pullup-overlay.dtb and device_tree_overlay=overlays/w1-gpio-overlay.dtb, but neither of them work for me.

ame
Posts: 3172
Joined: Sat Aug 18, 2012 1:21 am
Location: New Zealand

Re: Linux kernel is now 3.18

Wed Jan 21, 2015 12:49 am

DougieLawson wrote:What happens if you split that out to /etc/modprobe.d/w1-gpio.conf & /etc/modprobe.d/w1-therm.conf ?
Nothing happens.

Return to “Advanced users”