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.

tmr 2010-04-17 11:16

Re: I値l just leave this here
 
About p54spi.

Look at board-n8x0.c, spi_board_info, wifi .modailias, it's a bit strange, but modalias different between board-n8x0.c and p54spi.c, p54spi_driver .name. Should be same.

I patch .name and get wifi working. Without this, p54spi.ko can't find device and dmesg output nothing.

Capn_Fish 2010-04-17 15:25

Re: I値l just leave this here
 
I hacked it together (thanks to your information); just replacing 2 instances of "cx3110x" with "p54spi" in driver/net/wireless/p54/p54spi.c at least makes wlan0 show up.

Thanks once again, tmr!

EDIT: This edit done from Midori under Mer/Deban Sid with Linux 2.6.33 and p54 drivers.

Lord Raiden 2010-04-17 17:02

Re: I値l just leave this here
 
*raises hand* Is this for patching the kernel on the n8xx to the latest version? At least that's what I'm understanding from reading this.

tmr 2010-04-17 17:23

Re: I値l just leave this here
 
Lord Raiden, yep, this is for latest n8x0 kernel. I'm was not going to support this thread, my language too bad for this, just dump some works.

svs57 2010-04-17 21:02

Re: I値l just leave this here
 
I tried Termana's patch and kernel for n810.
His kernel works. But it use rootfs on MTD.
I applied his patch to mainline 2.6.33.2 kernel, changed CONFIG_CMDLINE to use rootfs on external SD and compiled it.
But kernel doesn't work :(

Capn_Fish 2010-04-17 21:34

Re: I値l just leave this here
 
What are you trying to boot?

I kept the rootfs line to boot from internal flash, but, with fanoush's initfs, you can still choose which to boot from.

If you go into device drivers->watchdogs there should be an option "Disable watchdog shutdown on close" - you don't want that. Without it, you can at least see what's messing up your boot.

I've also set up a n810-dedicated thread here:

http://talk.maemo.org/showthread.php?t=50290

in an effort to make stuff easier to find and more consolidated.

svs57 2010-04-17 22:27

Re: I値l just leave this here
 
I try boot 2.6.32.2 kernel with your patches and rootfs on SD in .config.
I try install bootmenu, but it doesn't work
"Disable watchdog shutdown on close" is set

TheHitcher 2010-06-06 02:07

Re: N800 latest kernel, patch and config
 
I managed to compile a bootable kernel for my N800 following the steps in the OP using this commit from the linux-omap git:

eba014745cc806d625b6a553d1af6efd14e16321

If you check out the latest the patches wont apply...


EDIT:

To summarise, ignore Capn_Fish's post on the last page, as he seems to have tmr and the other guy confused...

Follow the instructions in the first post, but instead of checking out the latest from the linux omap git:

Quote:

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/
get the snapshot from the commit referenced above:

http://git.kernel.org/?p=linux/kerne...af6efd14e16321

Click on 'snapshot' on that page and extract. Use that in place of the linux-omap-2.6 folder in the instructions...

nwerneck 2010-06-07 03:17

Re: N800 latest kernel, patch and config
 
Hi thanks to all for the instructions.

I am going to compile a kernel for the N800 for the first time, and I didn't understand: what should I do in the rootfs step? Are there any other specific and usual instructions, or is that related to setting up the filesystem of the distro I want to use (e.g. debian, mer, maemo, meego)?

I am trying to learn this stuff to help bring MeeGo to the N800...

nwerneck 2010-06-07 03:55

Re: N800 latest kernel, patch and config
 
Quote:

Originally Posted by TheHitcher (Post 701804)
get the snapshot from the commit referenced above:

http://git.kernel.org/?p=linux/kerne...af6efd14e16321

Click on 'snapshot' on that page and extract. Use that in place of the linux-omap-2.6 folder in the instructions...

How do we apply the patch in this case? Shouldn't we instead use git clone and then checkout this earlier version?...

luca 2010-06-07 08:35

Re: N800 latest kernel, patch and config
 
Quote:

Originally Posted by nwerneck (Post 702946)
I am trying to learn this stuff to help bring MeeGo to the N800...

In that case I suggest you follow the discussion here:

http://forum.meego.com/showthread.php?p=2495

I suppose that stskeeps is still monitoring the maemo forums, but he's more likely to follow the thread on the meego forum than this one.

nwerneck 2010-06-07 20:38

Re: N800 latest kernel, patch and config
 
Quote:

Originally Posted by luca (Post 703152)
In that case I suggest you follow the discussion here:

http://forum.meego.com/showthread.php?p=2495

I suppose that stskeeps is still monitoring the maemo forums, but he's more likely to follow the thread on the meego forum than this one.

I'm there. I already managed to boot my N800 with that 2GB image and that kernel, but (as expected) the touchscreen doesn't work. I'm going to try to build the kernel with these instructions here and then use it with that same image to see what happens. Stskeeps already told me I will have to change an /etc file related to touchscreen calibration...

nwerneck 2010-06-07 22:03

Re: N800 latest kernel, patch and config
 
I managed to do it... I used git checkout <HASH> to get that previous version pointed out by TheHitcher, then I applied the patch using the git command, and did everything else as specified. I copied the modules by hand not know exactly what I was doing, using stskeeps' Meego image, and it booted.

Touchscreen worked just fine, I read in many places that could be an issue, but I am able to use Xfce. It's only a pity I have no keyboard to test anything else!

TheHitcher 2010-06-07 22:28

Re: N800 latest kernel, patch and config
 
A virtual keyboard maybe? Been trying to get one working in a plain debian install to no avail... but not even having the touch screen working makes it kinda pointless. Have tried ubuntu as well, but all the install guides use packages that are no longer avaliable, guess i'l give meego a try. The reason i suggested using the snapshot from the omap git site was just bandwidth efficiency, you can still use the git commands to apply tmr's patches. Might be worth seeing how much later a commit will still work, i just found the update to 2.6.34-rc3.

luisn800 2010-06-09 18:38

Re: N800 latest kernel, patch and config
 
Hi tmr, a question...
Can you share your n800 zImage?

nwerneck 2010-06-10 14:29

Re: N800 latest kernel, patch and config
 
Quote:

Originally Posted by TheHitcher (Post 704437)
A virtual keyboard maybe? Been trying to get one working in a plain debian install to no avail... but not even having the touch screen working makes it kinda pointless. Have tried ubuntu as well, but all the install guides use packages that are no longer avaliable, guess i'l give meego a try.

I don't know if meego will bring some kind of virtual keyboard. I am hoping the 1.1 release will come with a handheld version that offers a virtual keyboard. Right now I am just booting and working via SSH, using the USB for connection. But touchscreen is working already.

Quote:

Originally Posted by TheHitcher (Post 704437)
The reason i suggested using the snapshot from the omap git site was just bandwidth efficiency, you can still use the git commands to apply tmr's patches. Might be worth seeing how much later a commit will still work, i just found the update to 2.6.34-rc3.

I tried using that snapshot first, but I couldn't apply the patch... There is probably a way do download that, and then fix it so the git command will work. But in the end what worked for me was that: cloned the git repo, then checked out that version.

nwerneck 2010-06-10 21:56

Re: N800 latest kernel, patch and config
 
I got Wi-Fi and the touchscreen to work, but no sound. What could be missing? ALSA reports "no soundcards found".

nwerneck 2010-06-11 04:10

Re: N800 latest kernel, patch and config
 
...I have seen in a few places on Google that there should be a line "CONFIG_SPI_TSC2301_AUDIO=y" on the config. Many examples of older kernel build have this line, and also other TSC2301 related ones that this config has. Why is this missing from this version? Was there some kind of update, or is there something missing?

nwerneck 2010-06-11 12:46

Re: N800 latest kernel, patch and config
 
TSC2301 sound driver was removed from the tree some time ago. I'm looking for the latest version to try to update for the current ALSA version... Anyone would like to help?

touchtop 2010-06-16 10:53

Re: N800 latest kernel, patch and config
 
Quote:

Originally Posted by luisn800 (Post 707636)
Hi tmr, a question...
Can you share your n800 zImage?

i want it too....

jichuan89 2011-02-10 06:28

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

Termana, the link to your patch, http://bit.ly/bDP4LA, doesn't seem to work anymore. Would you mind posting it again? Thanks.

I've just started investigating doing my own port of Android onto the N810; I'm documenting the process here.

TheHitcher 2011-02-17 23:44

Re: N800 latest kernel, patch and config
 
Woah... man on a 6 day hack binge! :D

Please dont forget us N800 users in your furious efforts!

jichuan89 2011-02-18 00:34

Re: N800 latest kernel, patch and config
 
That will be my priority once I get the basic functionalities working :)


All times are GMT. The time now is 04:03.

vBulletin® Version 3.8.8