linux icon indicating copy to clipboard operation
linux copied to clipboard

Updating to 3.8?

Open Ferroin opened this issue 13 years ago • 99 comments

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.

Ferroin avatar Feb 20 '13 18:02 Ferroin

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).

popcornmix avatar Feb 20 '13 19:02 popcornmix

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.

Ferroin avatar Feb 20 '13 19:02 Ferroin

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

N8Fear avatar Feb 20 '13 22:02 N8Fear

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.

Ferroin avatar Feb 20 '13 23:02 Ferroin

@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.

popcornmix avatar Feb 20 '13 23:02 popcornmix

@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?

N8Fear avatar Feb 20 '13 23:02 N8Fear

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.

popcornmix avatar Feb 21 '13 13:02 popcornmix

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 avatar Feb 21 '13 18:02 N8Fear

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...

N8Fear avatar Feb 22 '13 23:02 N8Fear

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

avesal avatar Feb 23 '13 12:02 avesal

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?

N8Fear avatar Feb 23 '13 15:02 N8Fear

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?

avesal avatar Feb 23 '13 20:02 avesal

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

licaon-kter avatar Feb 23 '13 21:02 licaon-kter

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 avatar Feb 23 '13 22:02 N8Fear

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

N8Fear avatar Feb 24 '13 01:02 N8Fear

@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

avesal avatar Feb 24 '13 10:02 avesal

Use a working config extracted like I pointed out.

licaon-kter avatar Feb 24 '13 23:02 licaon-kter

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

avesal avatar Feb 26 '13 11:02 avesal

what chipset? is the module being build?

licaon-kter avatar Feb 26 '13 16:02 licaon-kter

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.

N8Fear avatar Feb 26 '13 19:02 N8Fear