Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating to 3.8? #225

Closed
Ferroin opened this issue Feb 20, 2013 · 99 comments
Closed

Updating to 3.8? #225

Ferroin opened this issue Feb 20, 2013 · 99 comments

Comments

@Ferroin
Copy link
Contributor

Ferroin commented Feb 20, 2013

Are there any plans to update the tree to Linux 3.8?

There are a number of updates that would be nice to have, especially the stuff in the EXT4 drivers.

While I would be happy to merge the kernel.org mainline into a new branch and submit a pull request, I don't know if there is some special way that people might want it done.

@popcornmix
Copy link
Collaborator

Yes, 3.8 is interesting. For me, mostly due to F2FS.

I'd prefer a new branch (e.g. 3.8.y). I'd prefer it to be rebased on remotes/stable/linux-3.8.y, which I don't think is available yet.

There's normally a few gotchas of APIs that have changed, or worse APIs that haven't changed but things that need to be done differently. Finding NEED_MACH_MEMORY_H and NEED_MACH_IO_H took me a long time to find last time....

So, if you can get a 3.8 tree up and running, and fix the gotchas, that would be useful.
We can then work out if a PR or some other scheme is best to get it into this repo.

Initially prebuilt firmware with 3.8 will be released to "next" tree until it is deemed stable.

Another question is whether some squashing of commits (particularly dwc_otg and the addition and removal of the 64-bit crypto functions) that produce a lot of conflicts when rebasing is worthwhile.

There's also the question of using mach-bcm2835 as the machine driver, but I accept that's a much harder merge.

(neither of these two point is required for a move to 3.8).

@Ferroin
Copy link
Contributor Author

Ferroin commented Feb 20, 2013

I can definitely get started on it.

Currently, it really isn't all that feasible for me to debug built kernels, but I can almost certainly get 3.8 to build without problems.

@N8Fear
Copy link

N8Fear commented Feb 20, 2013

I have 3.8.0 building and booting (at least for me, did the same for 3.7 before). I started from a kernel tarball and ported most stuff from this repo over to it. If you want I could surely help.
If you want to take a look my repo is here: git://github.com/N8Fear/rpi-sources.git

@Ferroin
Copy link
Contributor Author

Ferroin commented Feb 20, 2013

Thanks, I'd love some help.

This is the first time I've rebased anything, and I just had to start over because I realized halfway thru (at commit 179 of 323) that I had misunderstood the relation between LOCAL, BASE, and HEAD.

@popcornmix Do you have any problem with just starting a new branch based on git://github.com/N8Fear/rpi-sources.git? If not, that would be much easier than a rebase.

@popcornmix
Copy link
Collaborator

@Ferroin
Unfortunately not. The commit history has to be preserved (for many reasons).
One being that commits may be cherry-picked into the upstream kernel.

@N8Fear
Copy link

N8Fear commented Feb 20, 2013

@popcornmix
If you can tell me how to start best (clean remotes/stable/linux-3.8.y I presume) and then apply patches on top of that, I can do that. Is there a way to preserve both the commit history of remotes/stable/linux-3.8.y and of this repo?

@popcornmix
Copy link
Collaborator

This is how I did one of the early rebases:
git clone [email protected]:popcornmix/linux.git
git remote add -f stable git://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git
git rebase --onto v3.2.27 v3.1.9 rpi-patches
(fix conflict)
git rebase --continue
and repeat (you'll get at leats a dozen conflicts)

You'll obviously need to change the tags in the rebase.
However this is quite a tricky procedure. You end up fixing the same lines of code multiple times.
One reason why squashing commits can make life easier.

It may be more useful to take N8Fear's tree, and give it a good test.

@N8Fear
Copy link

N8Fear commented Feb 21, 2013

I'm about 3/4 through the rebase. Not sure how it will all come together afterwards.
I think somewhen tonight I should have a buildable tree, if I don't hit anything major...

@N8Fear
Copy link

N8Fear commented Feb 22, 2013

Hi,
it took me a little while longer than expected, but here is my repo with (most likely most of) the commit history: git://github.com/N8Fear/linux.git

To get it build (except for one WLAN driver - still working on that) I had to hack it a bit:

  • removal of __devinit and friends due to removal of api
  • make zsmalloc bool instead of tristate (otherwise build fails)
  • commented out some version specific code
  • added typecasts to uncompress.h (to get rid of warnings)

IMPORTANT: CONFIG_RTL8192CU does not build right now - needs fix

Everything should be tested / get a sanity check - with some more time some of the more "hacky" fixes could surly be replaced by something proper...

@avesal
Copy link

avesal commented Feb 23, 2013

Hi N8Fear,
I've downloaded and compiled kernel using your git, but from usb doesn't boot. I see:" Waiting for root device /dev/sda1". If I use as root my SD card, it boots, but with a lot of errors. Can you post me your .config?

Thanks you for your work

@N8Fear
Copy link

N8Fear commented Feb 23, 2013

I never tried booting from USB, sdcard worked fine for me, though (I just did a quick "testboot" and rebooted to 3.7.9 again afterwards, because there was no grsecpatch for 3.8.0 at that time).
IIRC I used bcmrpi_defconfig without CONFIG_RTL8192CU - my normal config wouldn't help you much (as it is with grsec enabled).
I'm in the process of getting a grsec enabled 3.8.0 right now, but afterwards I can try to replicate you issues.
Maybe you could post some logs so that I can take a look at the errors?

@avesal
Copy link

avesal commented Feb 23, 2013

how can I post logs if system doesn't boot? Should I add any string to cmdline.txt? Sorry, but I'm a very newbie.

Maybe the problem of "waiting for root device.." is that kernel loads pendrive after init?

@licaon-kter
Copy link

@avesal : did you use a known working .config ? say from your working kernel zcat /proc/config > ~/.config copy it and then use /make oldconfig

@N8Fear
Copy link

N8Fear commented Feb 23, 2013

I was able to boot into 3.8.0. It's running without a serious problem so far. As stated aboce CONFIG_RTL8192CU needs to be disabled to be able to successfully build the kernel and i get an issue with THERMAL_BCM2835 (NULL pointer dereference at boot - seems like the API changed somewhat) - you should disable that one too.
I boot from an sd-card so I don't know, if booting from a pendrive works.
You said it booted (with errors) from sd-card: you could post that errors and you config - maybe that would give some hints about your problem.
Other than that: try what licaon-kter wrote or try bcmrpi_defconfig (and disable the aforementioned two options).

@N8Fear
Copy link

N8Fear commented Feb 24, 2013

The issue with THERMAL_BCM2835 should be fixed (at least the null pointer dereference). I have to check for correct function, though...

@avesal
Copy link

avesal commented Feb 24, 2013

@licaon-kter
I used this commands:

root # ARCH=arm make bcmrpi_cutdown_defconfig
root # ARCH=arm CROSS_COMPILE=/usr/bin/armv6j-hardfloat-linux-gnueabi- make oldconfig
root # ARCH=arm CROSS_COMPILE=/usr/bin/armv6j-hardfloat-linux-gnueabi- make -j2

@licaon-kter
Copy link

Use a working config extracted like I pointed out.

@avesal
Copy link

avesal commented Feb 26, 2013

tryed with zcat /proc/config > ~/.config, but nothing: from usb doesn't boot, from sd card boots.

IMHO, I think it's a kernel problem, not a config problem

@licaon-kter
Copy link

what chipset? is the module being build?

@N8Fear
Copy link

N8Fear commented Feb 26, 2013

can you try to add rootdelay= n to your kernel commandline? (n is the delay in seconds the kernel should wait to mount the rootfs). Start with something higher (maybe 15 or the like) and reduce it, if it works with a delay.

@popcornmix
Copy link
Collaborator

I can confirm that nfs boot hangs:
http://pastebin.com/2yxvaGBB

@N8Fear
Copy link

N8Fear commented Feb 26, 2013

Fixed build of rtl8192cu

@N8Fear
Copy link

N8Fear commented Feb 26, 2013

@popcornmix : I can see an error in the paste - most likely I will have to try different bootdevices myself...

@avesal
Copy link

avesal commented Feb 27, 2013

@N8Fear
Yes, I've tried rootdelay, but doesn't resolv

@kzemek
Copy link

kzemek commented Mar 3, 2013

I've backported F2FS to Raspberry's rpi-3.6.y . I completly removed ACL support and had to revert one minor enhancement, both due to being dependent on some newer features, but otherwise everything seems to be working fine (I'm using it as I write).
The changes backported are all of the F2FS commits from current git kernel, so it may be a bit newer than what's in current 3.8 . So of course treat this as triple-experimental: one because it's an experimental filesystem, two because it's backported, and three because it may contain changes not yet in stable.

https://github.com/kzemek/rpi-linux

@popcornmix
Copy link
Collaborator

@kzemek
Have you measured any improvements or degredations in performance with f2fs on Pi?

@kzemek
Copy link

kzemek commented Mar 3, 2013

Only anecdotal, but I find it to be generally more responsive (which would be consistent with f2fs' features). I'm having a hard time to run actual benchmarks, as I have only one SD to experiment with, and that's the one running "main" system.

@licaon-kter
Copy link

Should general f2fs benchmarks apply to Pi as well?
'Cause we have:
160GB INTEL SSDSA2M160: http://www.phoronix.com/scan.php?page=article&item=linux_f2fs_benchmarks&num=1
Patriot LX Series 16GB Class 10 SDHC card: http://www.phoronix.com/scan.php?page=article&item=linux_f2fs_sdhc&num=1
160GB INTEL SSDSA2M160: http://www.phoronix.com/scan.php?page=article&item=linux_38_nilfs2&num=1
as data points ;)

@kzemek
Copy link

kzemek commented Mar 3, 2013

Sooman Jeong ran some simple benchmarks on an earlier version of F2FS, for a desktop and Galaxy S3:
http://lkml.indiana.edu/hypermail/linux/kernel/1210.2/00005.html

@licaon-kter
Copy link

What's the status of 3.9.x s' CONFIG_ARCH_BCM2835 ? As I see that, at least for now, the default config still uses CONFIG_ARCH_BCM2708.

@popcornmix
Copy link
Collaborator

My guess is that CONFIG_ARCH_BCM2835 will provide a system that boots, but lacks the drivers that have not been upstreamed (e.g. USB, vchiq).

There's a question mark over whether these will ever be upstreamed.

I have no plans to switch to CONFIG_ARCH_BCM2835, but if someone wants to test it, and then add patches for the missing drivers (USB, vchiq) and get a kernel has similar functionality to the existing one, then that would be very beneficial, and should make future kernel updates much easier.

@licaon-kter
Copy link

Are those (USB, vchiq) under some legal (licence) issues or what?

@popcornmix
Copy link
Collaborator

Not license issues. Generally the drivers that are supported on 2835 have been rewritten by a kernel dev (e.g. Stephen Warren) to follow the linux kernel coding standards.

The dwc_otg usb driver is big and ugly, written for an older kernel with ifdefs to handle newer versions. It's unlikely anyone will be willing to rewrite it to get it up to the standards required.

The kernel generally doesn't like interfaces into proprietry firmware, which vchiq may fall foul of, although that's very much a grey area.

A quick search looks like someone may have vchiq merged into a bcm2835 tree:
hackerspace/rpi-linux@f7c0d48

@ghost
Copy link

ghost commented May 2, 2013

@popcornmix

Rebased onto 3.8.10.

Please also include the PPS-over-GPIO patch:
http://ntpi.openchaos.org/pps_pi/

pps-gpio patch for the bcm2708 platform and clone the raspberry kernel
tree:
https://raw.github.com/lampeh/rpi-misc/master/linux-pps/linux-rpi-pps-gpio-bcm2708.diff

This enables one to sync the RPI using a GPS with PPS (pulse per second)
signal.

regards

Folkert van Heusden

Multitail es una herramienta flexible que permite visualizar los "log
file" y seguir la ejecución de comandos. Permite filtrar, añadir
colores, combinar archivos, la visualización de diferencias (diff-

view), etc. http://www.vanheusden.com/multitail/

Phone: +31-6-41278122, PGP-key: 1F28D8AE, www.vanheusden.com

@popcornmix
Copy link
Collaborator

@flok99
Please open a new issue.

@hvenzke
Copy link

hvenzke commented May 2, 2013

@popcornmix @flok99 pps-gpio #109 .. just update it there and close the old shit :-)

@rbej
Copy link

rbej commented May 8, 2013

Please updated to 3.8.12

@hvenzke
Copy link

hvenzke commented May 8, 2013

CONFIG_USB_HCD_BCMA=m faild see #291 , shuold be fixed with update to 3.8.12 please.

@popcornmix
Copy link
Collaborator

Rebased to 3.8.12. Also updated 3.9.y kernel to 3.9.1.

@hvenzke
Copy link

hvenzke commented May 8, 2013

@popcornmix please add the DLM & DRBD Options to the default RPI Firmware ( CONFIG_DLM=m )
to to get corosync & pacemaker to work with DRBD

@popcornmix
Copy link
Collaborator

I spotted a possible spinlock issue in sdcard driver, and have committed a fix.
I've pushed it to next firmware tree.

@matiasdelellis
Copy link

Sorry,
How I can test the 3.8 branch?

@hvenzke
Copy link

hvenzke commented May 9, 2013

@Ferroin
Copy link
Contributor Author

Ferroin commented May 10, 2013

Is there any major reason at this point to not transition to using the 3.8 firmware tree as the master branch?

@popcornmix
Copy link
Collaborator

This is the main obstacle:
#280

@rbej
Copy link

rbej commented May 11, 2013

Please updated to 3.8.13 and 3.9.2

@popcornmix
Copy link
Collaborator

@rbej
Kernels updated.

@rbej
Copy link

rbej commented May 19, 2013

3.9.3 is out ;)

@licaon-kter
Copy link

Any reason to keep up the update race every day?

@rbej
Copy link

rbej commented Jun 8, 2013

3.9.5 is out. Please updated :). Thanks.

@popcornmix
Copy link
Collaborator

3.9.5 is pushed.

@popcornmix
Copy link
Collaborator

I've updated the "next" tree to 3.9.5.
It's been confirmed that 3.8 won't have long term support, and it hasn't been updated (upstream) for some time, so I don't see a reason to stay with 3.8.
There's no guarantee that 3.9 will have long support either, but it is at least getting regular updates.

@hvenzke
Copy link

hvenzke commented Dec 22, 2013

My Pi´s left kicked off 3.8.y .. so close if you wisch

anholt pushed a commit to anholt/linux that referenced this issue Mar 17, 2016
Despite care take to allocate clocks state containers the
SP810 driver actually just supports creating one instance:
all clocks registered for every instance will end up with the
exact same name and __clk_init() will fail.

Rename the timclken<0> .. timclken<n> to sp810_<instance>_<n>
so every clock on every instance gets a unique name.

This is necessary for the RealView PBA8 which has two SP810
blocks: the second block will not register its clocks unless
every clock on every instance is unique and results in boot
logs like this:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at ../drivers/clk/versatile/clk-sp810.c:137
  clk_sp810_of_setup+0x110/0x154()
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.5.0-rc2-00030-g352718fc39f6-dirty raspberrypi#225
Hardware name: ARM RealView Machine (Device Tree Support)
[<c00167f8>] (unwind_backtrace) from [<c0013204>]
             (show_stack+0x10/0x14)
[<c0013204>] (show_stack) from [<c01a049c>]
             (dump_stack+0x84/0x9c)
[<c01a049c>] (dump_stack) from [<c0024990>]
             (warn_slowpath_common+0x74/0xb0)
[<c0024990>] (warn_slowpath_common) from [<c0024a68>]
             (warn_slowpath_null+0x1c/0x24)
[<c0024a68>] (warn_slowpath_null) from [<c051eb44>]
             (clk_sp810_of_setup+0x110/0x154)
[<c051eb44>] (clk_sp810_of_setup) from [<c051e3a4>]
             (of_clk_init+0x12c/0x1c8)
[<c051e3a4>] (of_clk_init) from [<c0504714>]
             (time_init+0x20/0x2c)
[<c0504714>] (time_init) from [<c0501b18>]
             (start_kernel+0x244/0x3c4)
[<c0501b18>] (start_kernel) from [<7000807c>] (0x7000807c)
---[ end trace cb88537fdc8fa200 ]---

Cc: Michael Turquette <[email protected]>
Cc: Pawel Moll <[email protected]>
Fixes: 6e973d2 "clk: vexpress: Add separate SP810 driver"
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
popcornmix pushed a commit that referenced this issue May 13, 2016
commit ec7957a upstream.

Despite care take to allocate clocks state containers the
SP810 driver actually just supports creating one instance:
all clocks registered for every instance will end up with the
exact same name and __clk_init() will fail.

Rename the timclken<0> .. timclken<n> to sp810_<instance>_<n>
so every clock on every instance gets a unique name.

This is necessary for the RealView PBA8 which has two SP810
blocks: the second block will not register its clocks unless
every clock on every instance is unique and results in boot
logs like this:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at ../drivers/clk/versatile/clk-sp810.c:137
  clk_sp810_of_setup+0x110/0x154()
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.5.0-rc2-00030-g352718fc39f6-dirty #225
Hardware name: ARM RealView Machine (Device Tree Support)
[<c00167f8>] (unwind_backtrace) from [<c0013204>]
             (show_stack+0x10/0x14)
[<c0013204>] (show_stack) from [<c01a049c>]
             (dump_stack+0x84/0x9c)
[<c01a049c>] (dump_stack) from [<c0024990>]
             (warn_slowpath_common+0x74/0xb0)
[<c0024990>] (warn_slowpath_common) from [<c0024a68>]
             (warn_slowpath_null+0x1c/0x24)
[<c0024a68>] (warn_slowpath_null) from [<c051eb44>]
             (clk_sp810_of_setup+0x110/0x154)
[<c051eb44>] (clk_sp810_of_setup) from [<c051e3a4>]
             (of_clk_init+0x12c/0x1c8)
[<c051e3a4>] (of_clk_init) from [<c0504714>]
             (time_init+0x20/0x2c)
[<c0504714>] (time_init) from [<c0501b18>]
             (start_kernel+0x244/0x3c4)
[<c0501b18>] (start_kernel) from [<7000807c>] (0x7000807c)
---[ end trace cb88537fdc8fa200 ]---

Cc: Michael Turquette <[email protected]>
Cc: Pawel Moll <[email protected]>
Fixes: 6e973d2 "clk: vexpress: Add separate SP810 driver"
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
popcornmix pushed a commit that referenced this issue May 13, 2016
commit ec7957a upstream.

Despite care take to allocate clocks state containers the
SP810 driver actually just supports creating one instance:
all clocks registered for every instance will end up with the
exact same name and __clk_init() will fail.

Rename the timclken<0> .. timclken<n> to sp810_<instance>_<n>
so every clock on every instance gets a unique name.

This is necessary for the RealView PBA8 which has two SP810
blocks: the second block will not register its clocks unless
every clock on every instance is unique and results in boot
logs like this:

------------[ cut here ]------------
WARNING: CPU: 0 PID: 0 at ../drivers/clk/versatile/clk-sp810.c:137
  clk_sp810_of_setup+0x110/0x154()
Modules linked in:
CPU: 0 PID: 0 Comm: swapper/0 Not tainted
4.5.0-rc2-00030-g352718fc39f6-dirty #225
Hardware name: ARM RealView Machine (Device Tree Support)
[<c00167f8>] (unwind_backtrace) from [<c0013204>]
             (show_stack+0x10/0x14)
[<c0013204>] (show_stack) from [<c01a049c>]
             (dump_stack+0x84/0x9c)
[<c01a049c>] (dump_stack) from [<c0024990>]
             (warn_slowpath_common+0x74/0xb0)
[<c0024990>] (warn_slowpath_common) from [<c0024a68>]
             (warn_slowpath_null+0x1c/0x24)
[<c0024a68>] (warn_slowpath_null) from [<c051eb44>]
             (clk_sp810_of_setup+0x110/0x154)
[<c051eb44>] (clk_sp810_of_setup) from [<c051e3a4>]
             (of_clk_init+0x12c/0x1c8)
[<c051e3a4>] (of_clk_init) from [<c0504714>]
             (time_init+0x20/0x2c)
[<c0504714>] (time_init) from [<c0501b18>]
             (start_kernel+0x244/0x3c4)
[<c0501b18>] (start_kernel) from [<7000807c>] (0x7000807c)
---[ end trace cb88537fdc8fa200 ]---

Cc: Michael Turquette <[email protected]>
Cc: Pawel Moll <[email protected]>
Fixes: 6e973d2 "clk: vexpress: Add separate SP810 driver"
Signed-off-by: Linus Walleij <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

10 participants