maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Alternatives (https://talk.maemo.org/forumdisplay.php?f=36)
-   -   N800 latest kernel, patch and config (https://talk.maemo.org/showthread.php?t=49660)

tmr 2010-04-10 11:28

N800 latest kernel, patch and config
 
3 Attachment(s)
Patch and config for latest git kernel linux-omap 2.6.34-rc3 with FB Blizzard, LCD Mipid, WiFi p54spi, TS-KBD TSC2301

Buld process described, for example, here.

USB extremely buggy, IT spontaneous reboots with just cable attached without devices (OTG glitch?). Don't use.

WiFi 3826.arm firmware should be placed on appropriate path, for example /lib/firmware/

.config rootfs is ext3 on first partition of internal card.

Kernel with debian rootfs works very stable. I use apache+php+mysql and sometime X.

Fast guide for new build.

I. toolchain
Code:

$ cd ~
$ su
Password:
# nano /etc/apt/sources.list
...
deb http://www.emdebian.org/debian/ unstable main
...
# apt-get update
...
Get: http://www.emdebian.org unstable/main Packages/DiffIndex [kB]
...
# apt-get install gcc-4.4-arm-linux-gnueabi
...
Do you want to continue [Y/n]? y
...
# exit

II. kernel
Code:

$ cd ~
$ git clone git://git.kernel.org/pub/scm/linux/kernel/git/tmlind/linux-omap-2.6.git
...
Checking out files: 100% (32289/32289), done.
...
$ cd linux-omap-2.6/
$ wget --content-disposition http://talk.maemo.org/attachment.php...0&d=1271114164
...
Saving to: "n800.diff.gz"
...
$ wget --content-disposition http://talk.maemo.org/attachment.php...4&d=1270898329
...
Saving to: ".config.gz"
...
$ gzip -d n800.diff.gz .config.gz
$ git apply --whitespace=nowarn n800.diff
$ export ARCH=arm CROSS_COMPILE=arm-linux-gnueabi-
$ make zImage modules
...
Kernel: arch/arm/boot/zImage is ready
...
LD [M]  drivers/net/wireless/p54/p54spi.ko
...

III. rootfs

Code:

Don't make me do it again.
IV. boot

Code:

$ cd ~
Download http://tablets-dev.nokia.com/maemo-d...2.5.2.2.tar.gz
Code:

$ tar -zxf maemo_flasher-3.5_2.5.2.2.tar.gz
$ su
Password:
# maemo_flasher-3.5_2.5.2.2/flasher-3.5 -k linux-omap-2.6/arch/arm/boot/zImage -f -R
...
Flashing kernel... done.
...


Termana 2010-04-10 12:58

Re: I値l just leave this here
 
Since we're dumping things, and your patch is only for n800, heres a patch against 2.6.33.1 for n810. Config file is included in the patch - arch/arm/configs/n810_defconfig. It's against linus' tree rather than linux-omap though.

And, zImage included.

Mostly everything is working for the n810 in this build.

File was to big to add as an attachment so its here: http://bit.ly/bDP4LA

luca 2010-04-10 20:33

Re: I値l just leave this here
 
Hey, that's not stolen from original nokia code.
Paraphrasing ntk, they stole our revolution, you're giving it us back.

rlinfati 2010-04-12 15:24

Re: I値l just leave this here
 
booting kernel (flasher-3.5 -k zImage -l -b) do not complete the boot, this reboot and i see some error loading modules ( 2.6.34 vs 2.6.21 ? )

tmr 2010-04-12 18:56

Re: I値l just leave this here
 
rlinfati, something with fs, i think... or maybe something else. serial console can help

Capn_Fish 2010-04-12 19:42

Re: I値l just leave this here
 
Code:

arch/arm/mach-omap2/board-n8x0.c: In function 'tsc2301_dev_init':
arch/arm/mach-omap2/board-n8x0.c:314: error: 'struct tsc2301_platform_data' has no member named 'dav_int'
arch/arm/mach-omap2/board-n8x0.c: In function 'n8x0_ts_set_config':
arch/arm/mach-omap2/board-n8x0.c:335: error: 'struct tsc2301_platform_data' has no member named 'ts_max_pressure'
arch/arm/mach-omap2/board-n8x0.c:347: error: 'struct tsc2301_platform_data' has no member named 'ts_max_pressure'

There IS a ts_pressure_max (this file was copied from the Diablo sources, since it doesn't exist in my git, AFAICT). I don't see anything related to dav_int.

Is there some other place I should be getting the file?

Thanks a bunch! You've got exactly what I've been looking for!

EDIT: Trying it with dav_int changed to dav_gpio and ts_max_pressure to ts_pressure_max in board_n8x0.c. We'll see how this goes...

EDIT2: It seems to also be lacking drivers/input/tsc2301_kp.c.

EDIT3: And ASM stuff seems to not be symlinked correctly, or something (asm/arch/gpio.h not found; symlinking arch/arm/asm to include/asm/arch gives a bunch of "xxx undefined" errors)

EDIT4: I'm building with " CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make -j3 zImage" for what it's worth

tmr 2010-04-13 00:00

Re: I値l just leave this here
 
Capn_Fish, my bad, post updated.

Capn_Fish 2010-04-13 01:35

Re: I値l just leave this here
 
Much better! I still had to enable tsc2301 (drivers->spi->tsc2301), but other than that, things seem to be going well.

andy c-y 2010-04-16 22:04

Re: I値l just leave this here
 
Quote:

Originally Posted by Termana (Post 604110)
Since we're dumping things, and your patch is only for n800, heres a patch against 2.6.33.1 for n810. Config file is included in the patch - arch/arm/configs/n810_defconfig. It's against linus' tree rather than linux-omap though.

And, zImage included.

Mostly everything is working for the n810 in this build.

File was to big to add as an attachment so its here: http://bit.ly/bDP4LA

Hi Termana, I just flashed your zImage to my n810, now everything is fine except that the wifi does not work. Is that because I need to compile the kernel on my machine and add the p54spi.ko by myself? I just followed tmr's guide, and compile the 2.6.34.rc3 step by step. But I don't know how to use the patch you provided in the attachment. Could you please give me a detailed guidence? I would be very appreciated for your reply. Everything here is new to me, so forgive me if I asked a silly question. Thanks!

Capn_Fish 2010-04-17 03:50

Re: I値l just leave this here
 
Firstly: I too am wondering about how p54spi relates to wifi. I have it built as a module, but modprobing it does nothing; at least I don't get any new interfaces and dmesg shows nothing. My impression is that it's essentially stlc45xx, but it doesn't seem to do anything. Pointers?


andy: tmr's patches aren't for 2.6.34-rc3, or even the linux-omap-2.6 tree. I used Termana's on the mainline 2.6.33. The steps I went through:

1. Download linux-2.6.33 from kernel.org

2. Download linux-2.6.33.2 patches from kernel.org

3. Download termana's patches

4. Extract kernel source and patches

5. Patch with tmr's patches (cd /path/to/linux-2.6.33; patch -p1 < /path/to/patch-2.6.33.1-tmr.patch). Everything should apply without any output/fuzz, except the Makefile patch will fail. That's OK, it only changes the version number (which you can easily do yourself)

6. Patch to 2.6.33.2 (cd /path/to/linux-2.6.33; patch -p1 < /path/to/patch-2.6.33.2.patch). Everything should apply cleanly.

7. Add the toolchain to your PATH (export PATH=$PATH:/path/to/toolchain/bin)

8. Change options (make n8*0_defconfig; ARCH=arm make menuconfig)

9. Build (CROSS_COMPILE=arm-none-linux-gnueabi- ARCH=arm make zImage modules)

Note that you'll have to substitute actual names and paths.


All times are GMT. The time now is 08:00.

vBulletin® Version 3.8.8