linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Later Kernels

Sat Jan 10, 2015 4:34 pm

I have a Model B

Running Pidora,

The Pidora-2014-R3.zip works when written to the SD card, no issues.

If I try to use any Kernels compiled from github later that 3.6 the pi wont complete booting.
It stalls when enumerating USB devices.

[ 2.362134] usb 1-1: new high-speed USB device number 2 using dwc_otg
[ 2.371104] Indeed it is in host mode hprt0 = 00001101
[ 2.582401] usb 1-1: New USB device found, idVendor=0424, idProduct=9512
[ 2.592136] usb 1-1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 2.602157] hub 1-1:1.0: USB hub found
[ 2.608817] hub 1-1:1.0: 3 ports detected
[ 2.892341] usb 1-1.1: new high-speed USB device number 3 using dwc_otg
[ 3.022731] usb 1-1.1: New USB device found, idVendor=0424, idProduct=ec00
[ 3.031744] usb 1-1.1: New USB device strings: Mfr=0, Product=0, SerialNumber=0
[ 3.061686] smsc95xx v1.0.4
[ 3.137691] smsc95xx 1-1.1:1.0: eth0: register 'smsc95xx' at usb-bcm2708_usb-1.1, smsc95xx USB 2.0 Ethernet, b8:27:eb:ae:3b:00

Never gets beyond this line.

The Pi has no USB devices connected.
Ethernet is connected.
Serial cable connected to GPIO, ( running headless )

Basically I don't understand this, because the standard Pidora images work. Kernel 3.6 from github compiled works,
But any of the later kernels from github, eg rpi-3.12.y , rpi-3.15.y , rpi-3.18.y start to boot but hang on USB enumeration.

Is this an attempt to get the customer to purchase a B+ pi? ie the later kernels just wont work with the older pis.

OR,

Is there something in my .config for kernel that needs to be changed prior to compilation.
I am using .config from > zcat /proc/config.gz > .config from a working Pidora Model B

OR

Is there a cmdline.txt parameter I can pass to rectify this?

OR

Am I just an idiot, who doesn't know what he is doing and should just stick to Windows.... :oops:

PLEASE HELP!

kayvan
Posts: 14
Joined: Mon Dec 29, 2014 6:30 am

Re: Later Kernels

Sat Jan 10, 2015 11:33 pm

I haven't done what you are asking, but maybe some of the Raspbian-specific info here can help:

http://www.raspberrypi.org/documentatio ... uilding.md

Combined with the Fedora-specific kernel building procedures:

https://fedoraproject.org/wiki/Building_a_custom_kernel

Best regards,

---Kayvan

linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Re: Later Kernels

Sun Jan 11, 2015 10:55 am

Thanks,

I am using the following as a guide to cross-compiling the kernel for the RasPi:-

http://elinux.org/Raspberry_Pi_Kernel_Compilation

If I follow the above with the 3.6 Kernel from github, it works fine. No boot problems.
If I just write the Pidora latest image to the SD card, it works fine. No boot problems.

However if I use the current:- https://github.com/raspberrypi/linux rpi-3.12.y
or anything later the boot stalls on enumerating the USB controller.

I think this is related to the following section in the kernel .config file:-


# Miscellaneous USB options
#
CONFIG_USB_DEFAULT_PERSIST=y
# CONFIG_USB_DYNAMIC_MINORS is not set
CONFIG_USB_OTG=n
# CONFIG_USB_OTG_WHITELIST is not set
CONFIG_USB_OTG_BLACKLIST_HUB=y
CONFIG_USB_OTG_FSM=n
CONFIG_USB_MON=m
# CONFIG_USB_WUSB_CBAF is not set

#
# USB Host Controller Drivers
#
# CONFIG_USB_C67X00_HCD is not set
# CONFIG_USB_XHCI_HCD is not set
# CONFIG_USB_EHCI_HCD is not set
# CONFIG_USB_OXU210HP_HCD is not set
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_ISP1760_HCD is not set
# CONFIG_USB_ISP1362_HCD is not set
# CONFIG_USB_FUSBH200_HCD is not set
# CONFIG_USB_FOTG210_HCD is not set
# CONFIG_USB_MAX3421_HCD is not set
# CONFIG_USB_OHCI_HCD is not set
# CONFIG_USB_U132_HCD is not set
# CONFIG_USB_SL811_HCD is not set
# CONFIG_USB_R8A66597_HCD is not set
CONFIG_USB_DWCOTG=y
# CONFIG_USB_HCD_BCMA is not set
# CONFIG_USB_HCD_SSB is not set
# CONFIG_USB_HCD_TEST_MODE is not set


specifically these options:-

CONFIG_USB_OTG=n
CONFIG_USB_OTG_BLACKLIST_HUB=y
CONFIG_USB_OTG_FSM=n
CONFIG_USB_MON=m
CONFIG_USB_DWCOTG=y

1> I don't know the difference between:- [ CONFIG_USB_OTG ] and [ CONFIG_USB_DWCOTG ]
as in what either actually means and why both rather than one of them is present.

2> I don't know what these options do:- [ CONFIG_USB_OTG_FSM ] && [ CONFIG_USB_MON ]

Assuming these options are relevant to the issue I am facing, I compiling different rpi-3.18.y
kernel of the permutations of [ CONFIG_USB_OTG ] and [ CONFIG_USB_DWCOTG ], to see
if either will allow the pi to boot.

But , I am fumbling about here, I don't really understand the influence of these options on
the kernels ability to enumerate the 2 USB ports and the USB NIC.

Also I don't know when I have to update the bootcode.bin/fixup.dat/start.elf files.

What do the /opt/vc files do?

How do you match a firmware revision to a kernel revision?

I think there are 2 branches of firmware on github, default and next.....

Any help from the community much appreciated......

linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Re: Later Kernels

Sun Jan 11, 2015 6:44 pm

On looking at the USB drivers between rpi-3.6.y and rpi-3-18.y, there is some source code
change:-

\rpi-3.18.y\drivers\usb\host\dwc_otg
1.27 MB (1,335,802 bytes)
1.35 MB (1,417,216 bytes)
38 Files, 2 Folders

\rpi-3.6.y\drivers\usb\host\dwc_otg
1.20 MB (1,262,016 bytes)
1.27 MB (1,339,392 bytes)
37 Files, 2 Folders

\rpi-3.6.y\drivers\usb
11.8 MB (12,376,519 bytes)
13.1 MB (13,746,176 bytes)
643 Files, 26 Folders

\rpi-3.18.y\drivers\usb
13.5 MB (14,215,103 bytes)
15.1 MB (15,839,232 bytes)
732 Files, 31 Folders


Whatever the changes have been, they have screwed me building the latest
kernels for my pi. The latest 3.12 kernel rpi-3.12.y and any later ones
don't boot with an old Model B pi.

I am wondering if I am alone here ??? or if anyone else has experienced this,
because it is a very real possibility that I am doing something stupid here... :oops:

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

Re: Later Kernels

Sun Jan 11, 2015 9:42 pm

linuxpiuser wrote:Whatever the changes have been, they have screwed me building the latest
kernels for my pi. The latest 3.12 kernel rpi-3.12.y and any later ones
don't boot with an old Model B pi.
I have run Raspbian with 3.12 and 3.18 on various model B (rev 1 (!!) rev 2 (256MB!!) and 2.1), B+, A and A+.
So I don't think it's the kernel...

Maybe there are new settings missing in your config?

Gr.
Dirk.

linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Re: Later Kernels

Mon Jan 12, 2015 12:10 am

Thanks, interesting.....

I don't have enough knowledge to know what all the different CONFIG options do in
the kernel build .config

What I am going to try for my Model B is the following......

1> Install latest version of Raspian.
2> get the .config from zcat /proc/config.gz from a running Rasbian with the latest kernel.
3> use that to try and build a working 3.18 and use it with Pidora latest.......

I hope this works.......but I am not holding my breath......

I run Raspian on my Model A because the Edimax USB wifi works out of the box on Raspian
and not in Pidora.

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

Re: Later Kernels

Mon Jan 12, 2015 1:12 am

Stick with 3.12, the 3.18 kernel is not ready for you.
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.

linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Re: Later Kernels

Mon Jan 12, 2015 10:49 am

Thanks Dougie,

any ideas why the 3.18 doesn't work with the Model B ?
To me it seems related to the USB drivers.

As a test of the process I am using to produce a kernel I have downloaded the
current rpi-3.12.y and am going to try with that....

Kind regards.

:)

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

Re: Later Kernels

Mon Jan 12, 2015 2:06 pm

My custom built 3.18.1 works brilliantly with my Bs and my A+ it's just not yet ready for normal users until the device tree support is complete and ready for the mainstream. If you are just a hobbyist user and don't want to have to debug kernel errors then updating with BRANCH=next rpi-update is NOT for you.
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.

linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Re: Later Kernels

Mon Jan 12, 2015 11:24 pm

Thanks Dougie,

1> Stating that "my stuff works brilliantly", doesn't really help me.
2> If you can't give a technical answer as to why 3.18 doesn't work with a Model B
then please don't post to my thread just to tell me how brilliant you are.
3> I am interested in learning. Therefore find the suggestion that looking at
a future kernel and why its not working on my Model B pi is "Not for me",
is just plain patronising.

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

Re: Later Kernels

Mon Jan 12, 2015 11:37 pm

What part of "not ready for the mainstream" do you fail to grasp? If you want to run on the leading edge then fill your boots.

But, if you're not an experienced kernel builder you're going to struggle getting 3.18 running as it's still being developed, it's still got some bugs that haven't been resolved. It's still in a state where you'll be rebuilding your kernel every week to keep up with the clever folk at the RPF and the software changes they're pushing out.

3.18 does work on a B, it also works on an A+ but that's with Raspbian not with Pidora.

Best of luck, I'm outta here.
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.

linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Re: Later Kernels

Mon Jan 12, 2015 11:51 pm

Thanks Dougie,

Understood.

linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Re: Later Kernels

Tue Jan 13, 2015 12:24 am

So Dougie,

don't be mad, I am trying to learn here....

yeah, I understand now that you are saying don't expect the uttermost latest kernels to work,
"out of the box". That is understood. ( albeit you had to state it twice.......sorry :-) )

As an explanation:-

1> I don't know how to tell what is the current "mainstream" kernel for the pi apart from
when I visit this site:- https://github.com/raspberrypi/linux it defaults to 3.12
How else would I tell?

2> My frustration comes from the self-doubt that the build process I was following was somehow
flawed. I have just compiled the 3.12 from github using the same process and it did boot all the way to
a login prompt.
So I guess my process is OK.

:)

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

Re: Later Kernels

Tue Jan 13, 2015 12:35 am

Part of the problem is that you've chosen Pidora rather than Raspbian and that puts you in a very small minority group.

The mainstream kernel was shipped with a standard software update (apt-get) for all Raspbian users last month (they got 3.12.35+ if they chose to run a simple update). I'm not sure how Pidora is looking after that stuff with the yum repositories.

Raspbian also has a script rpi-update that will update firmware, kernel and /lib/modules. Running BRANCH=next rpi-update gets the 3.18.1+ kernel. Again I'm not sure how that stuff is handled on Pidora. You could backup your SDCard and try that, to see how much damage it does to your system vs whether you get a good system.

You can install rpi-update with
sudo curl -L --output /usr/bin/rpi-update https://raw.githubusercontent.com/Hexxeh/rpi-update/master/rpi-update && sudo chmod +x /usr/bin/rpi-update

Or you could build a new SDCard with Raspbian on it and join the Borg collective.
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.

linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Re: Later Kernels

Tue Jan 13, 2015 2:00 am

Thanks Dougie,

OK, I got 3.18 to boot all the way...

Process:-

I installed Raspbian latest version and zcat /proc/config.gz > latest_raspbian_config.

Copied that file over to my build machine.

445 make distclean
446 cp latest_raspbian_config .config
447 vi .config

added this line:- CONFIG_ARM_PATCH_PHYS_VIRT=y

448 make ARCH=arm CROSS_COMPILE=${CCPREFIX} olddefconfig
449 make ARCH=arm CROSS_COMPILE=${CCPREFIX} -j3


Installed Pidora, latest, did yum update, it did install firmware updates. <-- think this may be important.
Mounted SD under fedora on another computer
Then copied the 3.18 kernel Image over as kernel.img
Then copied the lib.tar to /usr/lib and untarred.

edited cmdline.txt removed "quiet"
created a headless file in boot directory
edited /usr/bin/headon

added this line at line 16:- systemctl start [email protected]

Booted with usb serial connected to see boot messages and got a login prompt.

This does seem like a rather convoluted way of doing this...., but at least my faith is restored
that I have some sort of build process to work with the latest kernels.

Thanks Dougie for all your help, mentioning that the firmware should also be updated links
in well with the fact that the yum update did update firmware when I tried it.

I wasn't sure whether to run with the standard firmware from github or the next branch.
[ still not sure ] but I'm a happier chappie now that 3.18 is booting all the way to login prompt.
I don't feel so stupid now!

Kind regards.

:)

linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Re: Later Kernels

Tue Jan 13, 2015 3:13 am

Hi,

I think some of my issues were caused by the fact that the eLinux guide
http://elinux.org/Raspberry_Pi_Kernel_Compilation
May have been writted for Raspbian in that when it suggests updating the firmware,
It states to clone it from git hub, change some files in /boot ( checked these are the same in Raspbian
and Pidora ) but there doesn't seem to be a /opt/vc directory in Pidora, is there one in Raspbian??
Anybody know where these are in Pidora?, trying to find that out now....

Thinking maybe I wasn't using matched kernel and firmware until I updated the firmware on Pidora
latest by running yum update.....

LTR....

linuxpiuser
Posts: 13
Joined: Sat Jan 10, 2015 4:13 pm

Re: Later Kernels

Tue Jan 13, 2015 3:27 am

It looks like on Pidora the vc directories

bin
include
lib
sbin
src

are in /usr mixed in with other "system" files, so a tar merge might be required.......

Will try this later.....

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

Re: Later Kernels

Tue Jan 13, 2015 8:30 am

/opt/vc just has the runtime stuff for the videocore including the camera. There's a bunch of symlinks from /usr/bin (and other places) on Raspbian.

You can build that from https://github.com/raspberrypi/userland

You appear to have reached the level of certified Raspberry Pi & Pidora hacker, well done.
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.

Return to “Pidora / Fedora”