PuppetHoundZ
Posts: 170
Joined: Wed Jan 21, 2015 2:57 am

Re: New device tree kernel is in testing

Tue Feb 03, 2015 6:13 am

PhilE wrote:I think it depends on your enthusiasm. If you see it as a hassle then stop playing now and grab a fresh NOOBS when it becomes available. I would suggest copying of your current config.txt before a re-install, if only to see what has changed.
Well I see what has changed. I really stress out for nothing. It's the same on this current noobs, mostly. I really like the new Raspi-config features though nice job. Also nice job on the Raspberry Pi 2. You all pulled a fast one on us, I didn't even see it coming. :lol: The old and new config.txt is the same for me :D

Also I see that you all removed the Raspi blacklist file ;) and added the overlays file to boot folder 8-)

User avatar
DougieLawson
Posts: 39813
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: New device tree kernel is in testing

Tue Feb 03, 2015 8:31 am

I think we can all see why there was a strong push to get DT working and Phil needs praise for getting it done ready for PI2.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

sbp
Posts: 128
Joined: Wed Sep 26, 2012 7:54 pm

Re: New device tree kernel is in testing

Thu Feb 05, 2015 5:11 pm

Hi regarding the initramfs problem, then it seems to be solved for me by using ramfsaddr=-1
This was suggested by ghollingsworth in github.

Steen
piCorePlayer webpage: https://sites.google.com/site/picoreplayer/home

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

Re: New device tree kernel is in testing

Thu Feb 05, 2015 5:24 pm

You can also use the slightly nicer syntax:

Code: Select all

initramfs initramfs.gz followkernel
which has the same effect.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: New device tree kernel is in testing

Fri Feb 06, 2015 12:26 pm

sbp wrote:Hi regarding the initramfs problem, then it seems to be solved for me by using ramfsaddr=-1
This was suggested by ghollingsworth in github.

Steen
PhilE wrote:You can also use the slightly nicer syntax:

Code: Select all

initramfs initramfs.gz followkernel
which has the same effect.
I wish either of these fixes solved it for me. I've rebuilt the kernel a couple times now.

This is how I create the initramfs:

Code: Select all

update-initramfs -c -k `uname -r` -v
Here's some of the output (which I can see) on boot when I have initramfs enabled:

Code: Select all

Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
mount: No such file or directory
Begin: Running /scripts/local-bottom ... done.
done.
Being: Running /scripts/init-bottom ... mount: No such file or directory
done.
Could not copy file: No such file or directory
Target filesystem doesn't have requested /sbin/init.
No init found. Try passing init= bootarg.
(initramfs) 

Code: Select all

smsc95xx.turbo_mode=N dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1 root=PARTUUID=000c45c9-02 rootfstype=ext4 elevator=deadline rootwait ip=192.168.1.11::192.168.1.1:255.255.255.0 cgroup_enable=memory usbhid.mousepoll=0

Code: Select all

kernel=kernel7-3.18.5+dt.img

#ramfsaddr=-1
# initramfs generated using initramfs-tools
initramfs initrd.img-3.18.5-v7+ followkernel
OK, it appears my problem is in cmdline.txt with root=PARTUUID=000c45c9-02. This does not work when using initramfs. Changing to the standard root=/dev/mmcblk0p2 allows me to boot again. I'll have to play around with it I suppose.
Last edited by ktb on Fri Feb 06, 2015 1:18 pm, edited 1 time in total.

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

Re: New device tree kernel is in testing

Fri Feb 06, 2015 1:00 pm

I'm happy you're making progress - I've never played around with the PARTUUID system. Thanks for sharing your findings.

For the record, the "followkernel" parameter replaces the "ramfsaddr=-1", so you don't need both. Either use the two separate assignments as you had before, or the one initramfs command.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: New device tree kernel is in testing

Fri Feb 06, 2015 1:06 pm

PhilE wrote:I'm happy you're making progress - I've never played around with the PARTUUID system. Thanks for sharing your findings.

For the record, the "followkernel" parameter replaces the "ramfsaddr=-1", so you don't need both. Either use the two separate assignments as you had before, or the one initramfs command.
Yeah, I understood your other post. I had tried it with both, with either, trying anything... Thanks.

One thing I'm curious about... this particular card was originally written from the 12/24/2014 Raspbian release IMG. Is it normal to have 3-4 MB of unallocated space at the beginning of the card? I just opened it in gparted and noticed that the boot partition doesn't start at the beginning of the drive. Is this necessary?

Oh well, I'm going to install a fresh image and go from there.

User avatar
carriba
Posts: 140
Joined: Tue Nov 18, 2014 5:55 pm
Contact: ICQ

Re: New device tree kernel is in testing

Sat Feb 07, 2015 6:05 pm

Thank you for thee feedback on this, and I have followed the documentation under

http://www.raspberrypi.org/documentatio ... ce-tree.md

and after the changes in /boot/config.txt everything is now working as before :D

lahcejopa
Posts: 4
Joined: Mon Feb 09, 2015 7:39 am

Re: New device tree kernel is in testing

Mon Feb 09, 2015 7:47 am

Hi,

3.18 kernel with no ipt_ULOG module available breaks ulogd.
ulogd2 which is capable of using xt_NFLOG instead is not available within Raspbian Wheezy.

Regards,
Lahc

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

Re: New device tree kernel is in testing

Mon Feb 09, 2015 7:57 am

If you have a specific request or bug against the kernel then it is best to create an issue on the raspberrypi/linux github repo, because that way it is guaranteed to be seen and tracked.

lahcejopa
Posts: 4
Joined: Mon Feb 09, 2015 7:39 am

Re: New device tree kernel is in testing

Mon Feb 09, 2015 10:50 am

Lack of ipt_ULOG in new kernel is one thing (I'd say it is no longer available in this version; I recall it being marked as obsolete in 3.14 or so) while introducing kernel breaking current packages is the other...

vraptor666
Posts: 1
Joined: Mon Feb 09, 2015 8:31 pm

Re: New device tree kernel is in testing

Mon Feb 09, 2015 8:41 pm

hi all,

i want to update my rasp kernel and firmware to use USBPI, I2C, etc. my rasp kernell is 3.12.13, i do this:

sudo apt-get update
sudo apt-get upgrade rpi-update
sudo BRANCH=next rpi-update

after some minute all done. but i reboot my rasp and run uname -a and still say kernel is 3.12.13

my question: i need to do something else to update my kernel and firmware to 3.18?

DirkS
Posts: 10417
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: New device tree kernel is in testing

Mon Feb 09, 2015 8:49 pm

I don't think there's a 'next' at the moment and 'sudo rpi-update' should be enough.
apt-get update / dist-upgrade should get you the new 3.18 kernel.

rpi-update then gets you the latest version if that kernel (3.18.6 IIRC)

Make sure you have read http://www.raspberrypi.org/forums/viewt ... 28&t=97314 before udating

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

Re: New device tree kernel is in testing

Mon Feb 09, 2015 8:50 pm

Code: Select all

sudo apt-get update
sudo apt-get upgrade
will get you the latest Raspbian release, which is now about a week old and has some known problems. For example, the ARM is limited to 750MB, but SonicPi works. You can expect a point release soon.

For the very latest kernel, which isn't limited to 750MB but which won't run SonicPi (yet):

Code: Select all

sudo rpi-update
Stay away from BRANCH=next - for the time being it is actually behind the standard release.

ktb
Posts: 1447
Joined: Fri Dec 26, 2014 7:53 pm

Re: New device tree kernel is in testing

Tue Feb 10, 2015 4:00 am

ktb wrote:
PhilE wrote:I'm happy you're making progress - I've never played around with the PARTUUID system. Thanks for sharing your findings.

For the record, the "followkernel" parameter replaces the "ramfsaddr=-1", so you don't need both. Either use the two separate assignments as you had before, or the one initramfs command.
Yeah, I understood your other post. I had tried it with both, with either, trying anything... Thanks.

One thing I'm curious about... this particular card was originally written from the 12/24/2014 Raspbian release IMG. Is it normal to have 3-4 MB of unallocated space at the beginning of the card? I just opened it in gparted and noticed that the boot partition doesn't start at the beginning of the drive. Is this necessary?

Oh well, I'm going to install a fresh image and go from there.
Alright, I tried over and over again to get everything working in a variety of ways using the same old external 80GB Toshiba MK8025GAS hard drive (the enclosure has an adapter/controller named "Cypress Semiconductor Corp. CY7C68300A EZ-USB AT2 USB 2.0 to ATA/ATAPI"). The hard drive was always recognized when I would boot using root=/dev/sda1, but it wasn't mounting early enough no matter what I tried (I even tried rootdelay=100 and boot_delay=100 in cmdline.txt based on another member's posts in the forum). When I would boot up to the microSD root (/dev/mmcblk0p2), I could see that the external hard drive would end up mounting a little too late for it to work (even with those delays). Finally, I tried a different newer external hard drive and that was successful. The newer drive mounted earlier, worked great and did not require any ridiculous tinkering with cmdline.txt. Everything (initramfs, PARTUUID, UUID, and root on an external hard drive) works. Good stuff.

EDIT: Unfortunately, I was mistaken. Not everything is working. PARTUUID in cmdline.txt, UUID in fstab, and root on an external hard drive will work together, but as soon as I add initramfs to the mix the boot process fails.

- If I use PARTUUID=2EAF42A6-0615-44A9-BB63-E09F80A307FE in cmdline.txt with initramfs commented-out in config.txt, then booting completes successfully.

- If I use use root=/dev/sda1 in cmdline.txt with initramfs enabled in config.txt, then booting also completes successfully.

- If I use use root=/dev/sda1 in cmdline.txt with initramfs commented-out in config.txt, then booting also completes successfully.

- If I use PARTUUID=2EAF42A6-0615-44A9-BB63-E09F80A307FE in cmdline.txt with initramfs enabled in config.txt, then the same failure occurs which I posted about earlier in the thread (Target filesystem doesn't have requested /sbin/init. No init found. Try passing init= bootarg.).

Maybe this https://bugs.debian.org/cgi-bin/bugrepo ... bug=762870 explains what I'm seeing?

Answer: YES.

Solution:
sudo su
apt-get install busybox
update-initramfs -u -k `uname -r` -v

NOW, it all works:
kernel=kernel-3.18.6-v7+.img
initramfs initrd.img-3.18.6-v7+ followkernel

Sorry for getting so far off-topic here. I would not be offended if my posts were moved elsewhere. Thanks again for taking a look.

baratam
Posts: 4
Joined: Tue Jan 27, 2015 6:22 am

Re: New device tree kernel is in testing

Wed Feb 11, 2015 3:23 pm

Hi,

I am working on cirrus audio card and facing issue with 3.18.5 when DT is enabled.

In 3.18.0, i specified property "interrupts" as <3 27> where 3 is the bank number and 27 is the gpio number (IRQ line of wm5102 is connected to GPIO27 of BCM). It is parsing irq number as 197 and which is working fine.

But with 3.18.5, getting exception while parsing the irq. I noticed that Bank 3 is removed now.
I tried couple of experiments but failed to register the IRQ. Setting interrupt parent as "gpio" also doesn't help me.

Can someone suggest me, how i have to specify it in DTS overlay file to achieve the same with 3.18.5 kernel?

Thanks,
Sapthagiri

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

Re: New device tree kernel is in testing

Wed Feb 11, 2015 5:42 pm

Good question. I'm having to work for this one, but I'll get back to you.

notro
Posts: 696
Joined: Tue Oct 16, 2012 6:21 pm
Location: Drammen, Norway

Re: New device tree kernel is in testing

Wed Feb 11, 2015 6:18 pm

In 3.18.0, i specified property "interrupts" as <3 27> where 3 is the bank number and 27 is the gpio number
Bank 3 was a hack used in the first phase of adding Device Tree support to ARCH_BCM2708.
Now we use pinctrl-bcm2835 as the gpio driver, which has made the hack obsolete.

Here's an example for an ads7846 touch controller using gpio25 as the interrupt source:

Code: Select all

	interrupts = <25 2>; /* high-to-low edge triggered */
	interrupt-parent = <&gpio>;
	pendown-gpio = <&gpio 25 0>;
Full DT fragment: https://github.com/notro/fbtft/blob/mas ... verlay.dts

Description of the 'interrupts' property:

Code: Select all

  The first cell is the GPIO number.
  The second cell is used to specify flags:
    bits[3:0] trigger type and level flags:
      1 = low-to-high edge triggered.
      2 = high-to-low edge triggered.
      4 = active high level-sensitive.
      8 = active low level-sensitive.
    Valid combinations are 1, 2, 3, 4, 8.
To make it complete, here's the description for the '-gpio' property:

Code: Select all

  The first cell is the pin number and the
  second cell is used to specify optional parameters:
  - bit 0 specifies polarity (0 for normal, 1 for inverted)
(The phandle &gpio is not part of this cell description)

Ref: https://www.kernel.org/doc/Documentatio ... 5-gpio.txt

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

Re: New device tree kernel is in testing

Wed Feb 11, 2015 8:22 pm

Thanks, notro - helpful, as always.

baratam - if you are converting non-DT code, be sure to replace:

Code: Select all

platform_get_resource(dev, RESOURCE_IRQ, index);
with

Code: Select all

platform_get_irq(dev, index);
which will call of_irq_get if there is a DT node for the device, otherwise it will use platform_get_resource.

baratam
Posts: 4
Joined: Tue Jan 27, 2015 6:22 am

Re: New device tree kernel is in testing

Thu Feb 12, 2015 9:46 am

Thank you notro & philE,

It is working fine after following the way you suggested.

Actually i tried the same way before raising this query in the forum, but i used flags as level triggering which is causing exception issue. If i change the flags to edge trigger then it is working fine.

Also i got parsed irq output value (virq) as 421 which i thought is not correct, because as per my understanding it should be 197 (in between 170 to 329).

Thanks,
Sapthagiri

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

Re: New device tree kernel is in testing

Thu Feb 12, 2015 12:48 pm

As I understand it, the interrupt numbers are now allocated dynamically, so could even change between runs. The values are not significant, provided producer and consumer are in agreement.

notro
Posts: 696
Joined: Tue Oct 16, 2012 6:21 pm
Location: Drammen, Norway

Re: New device tree kernel is in testing

Thu Feb 12, 2015 1:05 pm

Are there any considerations when making a DT overlay parameter for a 16 bit value?

Is this correct? No overflow into pressure-max?

Code: Select all


			mz61581_ts: mz61581_ts@1 {
				compatible = "ti,ads7846";
				reg = <1>;

				spi-max-frequency = <2000000>;
				interrupts = <4 2>; /* high-to-low edge triggered */
				interrupt-parent = <&gpio>;
				pendown-gpio = <&gpio 4 0>;

				ti,x-plate-ohms = /bits/ 16 <60>;
				ti,pressure-max = /bits/ 16 <255>;
			};
		};
	};

	__overrides__ {
[...]
		x-plate-ohms = <&mz61581_ts>, "x-plate-ohms:0";

	};

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

Re: New device tree kernel is in testing

Thu Feb 12, 2015 1:34 pm

The considerations are that it won't work at present - I haven't come across that syntax before. I need to make a few changes to the loader, so I'll add in support for 8 and 16-bit values - 64-bit seems unnecessary.

DirkS
Posts: 10417
Joined: Tue Jun 19, 2012 9:46 pm
Location: Essex, UK

Re: New device tree kernel is in testing

Thu Feb 12, 2015 3:21 pm

Not sure if this has come up already:
Will Gert's VGA666 adapter work on the latest kernel using the instructions from the manual at https://github.com/fenlogic/vga666:
Copy the file dt-blob-dpi.bin to boot partition of sdcard, renaming it to dt-blob.bin
(The file is part of the git-hub database download: setup/dt-blob-dpi.bin).
Don’t forget that the dt-blob.bin will disable all GPIOs 2-21 for any other use. Thus if you switch
back to HDMI you might also want to give the dt-blob.bin file a different name.
Add this to config.txt
enable_dpi_lcd=1
display_default_lcd=1
So it assumes the device tree bin is loaded automatically.

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

Re: New device tree kernel is in testing

Thu Feb 12, 2015 3:25 pm

Rather confusingly, this is referring to the VideoCore/GPU-side DT Blob. This is completely independent of the Linux DT Blob.

I'm not going to guarantee that it will work, but this won't be the cause of the problem.

Return to “Advanced users”