All times are UTC




Post new topic Reply to topic  [ 314 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14 ... 21  Next
Author Message
 Post subject: Re: Support for Netbook Pro
PostPosted: Fri May 13, 2011 12:48 pm 
JLime Guru User
JLime Guru User

Joined: Sun Mar 21, 2010 1:17 pm
Posts: 56
EdCa:

About the serial output.....

The original Psion 2.6.9 nBkProOs file expects the serial to be switched on even *before* the bootloader starts running! The bootloader code has a load of commands that write directly to the PXA255 serial port, outputting various addresses - I guess you see a load of hexadecimal addresses coming up right at the start, before anything else happens?

Therefore, I assume that the development system (Psion LX) they were using came with a modified BooST bootloader or PCON software that left / kept the serial port going before handing over to the bootloader.

The bootstrap does set up an ATAG list (I don't know how much this is actually used by the kernel though), and it does pass a basic kernel parameter (telling it to output 115200bps on the serial port). However that would stay there even if you use a different kernel spliced into the bootloader.

I will send you an initrd soon (I guess you mean the initrd removed from the nBkProOs.img?). In addition, I could send you a bootloader that continually prints 'Hello' to the serial port, if that is helpful?

I'm just going to set up my build environment again (I upgraded to Ubuntu 11.04, found it to be very unstable, crashing often, so downgraded to 10.10 and will keep that, but need to get all my stuff (including the Risc PC emulator I use for building bootstrap images) going again!


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Sun Sep 18, 2011 10:28 am 
JLime Professional User
JLime Professional User

Joined: Sun Sep 18, 2011 10:04 am
Posts: 28
Location: Warsaw, Poland
Hi,

I've bought NetBook Pro a few weeks ago and I've decided to spend some time on getting Linux to support this machine. So far I've been mostly gathering information, but last week I've started working on a tool which could be used for generating nBkProOs.img image files. While on it I've also spent some time on researching and recreating the binary glue code. If someone's interested the the source for both projects can be found here:
https://github.com/tworaz/boost-bootcode
https://github.com/tworaz/boost-img

EDIT:
As of 20.09.2011 the tool can extract original Linux 2.6.9 nBkProOs.img and recreate it from extracted components. The newly created image is exactly the same as the original one (SHA sums are the same). With this version it's also possible to create custom and fully working images based on original Linux 2.6.9 sources from Psion. Bootcode from original Psion images works as well as the new one (at this time they're binary compatible).


Last edited by tworaz on Fri Oct 14, 2011 6:44 pm, edited 2 times in total.

Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Wed Sep 21, 2011 9:01 am 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
Great progress, please keep us posted!


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Fri Sep 23, 2011 8:51 am 
JLime Professional User
JLime Professional User

Joined: Sun Sep 18, 2011 10:04 am
Posts: 28
Location: Warsaw, Poland
Is there anyone with working serial cable connection who could test some images for me?

EDIT:
I've added very basic support for NetBook Pro to Qemu. It doesn't emulate all the peripherials, but it's enough to boot custom 2.6.9 psion kernels. The same kernels can be started on the actual HW. This should help in initial porting effort of newer kernels. The patch can be found here:
http://tworaz.net/gitweb?p=nbpro-qemu.g ... 107c18c60f

EDIT2:
25.09.2011 - Finally managed to get kernel 3.1-rc4 running on the actual hw. Right now it's not very spectacular. It starts, initializes core XScale peripherials, framebuffer and spawns a shell.

If somebody want's to give this new image a try it can be found here:
http://tworaz.net/downloads/NetBookPro/ ... _1-rc4.img

EDIT3:
Another image for testing. This one is actually quite usefull.
Known to work:
- Framebuffer console,
- PCON keyboard,
- MMC card reader,
- RTC

Not tested, probably work:
- USB port,
- IRDA,
- NAND flash driver,
- Serial port.

Broken, or not supported (yet):
- Sound,
- Power management and suspend,
- PCMCIA,
- CF Card reader

The username is "default", there is no password. To gain root use su. MMC driver has to be modprobed manually.

http://tworaz.net/downloads/NetBookPro/ ... -nbpro.img


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Thu Oct 06, 2011 3:44 pm 
JLime Newbie
JLime Newbie

Joined: Thu Oct 06, 2011 3:37 pm
Posts: 1
@tworaz

I have a Netbook Pro with a working serial cable connection. I just got this from work and was interested in installing linux on it. I haven't done much research and I am not completely familiar with linux but I would be happy to test your images. I would need some instructions though as I have no idea how it works. I also have cf card that 64mb.

Let me know if you want some help.


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Sun Oct 09, 2011 10:21 am 
JLime Professional User
JLime Professional User

Joined: Sun Sep 18, 2011 10:04 am
Posts: 28
Location: Warsaw, Poland
Thanks for the offer. Right now I don't need any help. Qemu was enough to help me get new kernel running on the actual device. Currently I'm mostly focusing on writing/porting drivers for all the peripherials. Still at some point I'll have to try to get suspend and resume working. This might be very hard to do without access to serial console.

If you'd like to do some testing I guess you can use my previous images. However don't expect any GUI. It's just kernel with a ramdisk and few usable console programs. Also the images I'm using for testing right now are much more usable. I'll upload a new one once I'm finished with battery driver.

EDIT:
The latest image can be found here: http://tworaz.net/downloads/NetBookPro/ ... mg_3.1-rc9

What should be working:
- Framebuffer console (no brightness controlls yet),
- Keyboard,
- Touchscreen,
- RTC,
- USB port,
- Serial port (tested only on qemu),
- NAND flash,
- MMC card reader,
- PCMCIA port,
- CF card reader,
- Sound (not really tested),
- Battery monitoring (brand new driver using power_supply class interface, just go to /sys/class/power_supply/lx-{main-battery,backup-battery,wall}/ and cat apropriate files to get the readings.

Not working:
- Suspend/Resume,
- Screen brightness control,
- IRDA (I have no way to test, but looking at the code some bits are still missing.)
- Internal modem (I have no way to test it, same as above some bits of code are missing.)

The sources for the kernel can be found here:
https://github.com/tworaz/linux/tree/3.1-rc9-nbpro

To test the image just download it, rename to nBkProOs.img and put on the first partition of your CF card (has to be fat formatted). Next reboot your device (small hole near right shift key, use paperclip) and press CTRL+ESC+D. You can log in as root, no password required. After done playing just type reboot and after a few seconds you should be back in windows CE.


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Wed Oct 12, 2011 8:48 pm 
JLime Professional User
JLime Professional User

Joined: Sun Sep 18, 2011 10:04 am
Posts: 28
Location: Warsaw, Poland
Finally managed to get suspend and resume working. The code is far from perfect but it works. I've put my netbook to sleep several times in a row and each time it came back to life. It'll probably take me another couple of days to clean the code up and push it to github, but the hardest part is done :).


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Thu Oct 13, 2011 2:42 pm 
Administrator
Administrator
User avatar

Joined: Wed Feb 22, 2006 12:49 pm
Posts: 1137
Location: Sweden
congratz :)

When you have something ready please drop me a mess so I can push into linux-hpc (kernel.org not fully up yet).


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Thu Oct 20, 2011 10:08 pm 
JLime Professional User
JLime Professional User

Joined: Sun Sep 18, 2011 10:04 am
Posts: 28
Location: Warsaw, Poland
Just a small status update. I'm still working on this project. Unfortunately I've hit some problems with suspend and resume. It works but after some time it leads to memory corruptions. I've tracked first problem to PCMCIA layer. It seems that pcmcia_socket kobject reference count decreases with each resume. The root cause: https://github.com/tworaz/linux/commit/ ... 6deaef4adb
I don't know the code to well but this call looks out of place there. I think the function should first get the socket before trying to release(put) it. This is how it was done in kernel 2.6.32. The code was modified by 7b24e7988263d3cae25ff35cfeae8a5657d93051 commit (see ds_event function). The pcmcia_get_socket call was removed by, but pcmcia_put_socket stayed.

Anyway, with this problem solved suspend/resume is much more reliable, but still not perfect. Right now I'm looking for the root cause of other problems.


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Fri Oct 21, 2011 12:21 pm 
JLime Professional User
JLime Professional User

Joined: Sun Sep 18, 2011 10:04 am
Posts: 28
Location: Warsaw, Poland
Ok, tracked the second problem to s1dxxxfb driver. Some pointers were kfree'd without being NULL'ed afterwards. Because of this during next resume they were double kfree'd leading to quite serious memory corruption. The fix can be found here: https://github.com/tworaz/linux/commit/ ... 2964c7b48d

@Kristoffer

If you're interested I've cleaned up and squashed my NetBook Pro patches and pushed them here:
https://github.com/tworaz/linux/commits ... c10-nbpro0
Please feel free to pull them into your tree. Note however that I still plan to do some more work on them. They're not yet finished.


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Fri Oct 21, 2011 12:59 pm 
JLime Guru User
JLime Guru User

Joined: Wed Mar 17, 2010 4:55 pm
Posts: 70
Tworaz: this is all awesome work! I love your code too, very clean.

Last week I got a debian armel installed on my CF using one of your images with modified kernel arguments. I even have X working, with touch screen support. It's quite slow, and I had to do a few things that were out of the ordinary for debian to install in the first place, but eventually I got there. There was a lot of fiddling with xorg.conf and xmodmap to get the keyboard and touchscreen working properly in X. I've now hit a wall in that I only have a 512MB CF card, so can't get much more working.

I don't really have a lot of time to work on this right now, but I'd really like to try your newer patches with suspend/resume in a couple of weeks. Really we should get jlime or angstrom or something going.

Note that the Y axis in your touchscreen driver is inverted. This can be swapped in xorg.conf, so it's not too much trouble.

My immediate list of things to do is

1. get touch screen calibration working
2. Accelerated X driver. X is _really_ slow

There actually used to be an accelerated X driver for our chip, written by Psion. But it was removed from xorg/kdrive a few years ago because it didn't build any more and no one was maintaining or using it. This will be the first port of call to get X working more nicely, and then we should actually be able to move windows around without horrible redraw artifacts.

Another note; I was using a 3c589 ethernet card, and I had a lot of problems with it. In the end I had to stop using it completely and switched to an NE2000 which works fine. I can't remember what the error was off the top of my head, but will check it and post back later. I'm guessing this is a regression somewhere, because it worked with older kernels and works on my old pentium laptop, but there were reports of it from years and years ago (some time in the 90s).


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Mon Oct 24, 2011 6:01 pm 
JLime Professional User
JLime Professional User

Joined: Sun Sep 18, 2011 10:04 am
Posts: 28
Location: Warsaw, Poland
The majority of the code is not mine. I've only ported it from old 2.6.9 psion sources. Some of the patches I've actually found on various mailing list archives. It seems that around 2.6.27 Russel King tried to bring support for NetBook Pro back to life[1][2]. Boost-bootcode was reverse engineered from original binary glue code shipped with Psion linux image. My version diverged a little from original, but the function it serves is exactly the same. Boost-img was written by me, but the format of nBkProOs.img was deciphered by somebody else [3].

In regards to X11, I've actually ported Xepson code from xserver 1.5 to 1.10. It builds fine, but I haven't had the time to test it. So far my main focus was getting the kernel as stable and usable as possible. If you'd like to give it a try I can push my code to github.

I've spent last weekend on integrating my work with openembedded build system. I've decided to use new meta layer approach instead of old tree with old the recipes in one tree. The results can be found here: https://github.com/tworaz/oe-tworaz. (Sorry for the lack of documentation, haven't had the time to write it, yet.) If you know how to use oe it should be relatively easy to set up. My layers depend on openembedded-core and meta-openembedded. Just add meta-jlime and meta-netbookpro on top of those, set DISTRO to Jlime and MACHINE to netbookpro. After that bitbake jlime-base-image. If everything goes all right you should end up with jlime-base-image-2012.0-pre0-netbookpro.rootfs.tar.bz2 archive. This image should be used with CF card. The first partition sda1 has to be vfat formatted, the second one, sda2 ext2. sda1 should be mounted as <sda1_mount_point>/boot. With such setup in place it's just a matter of unpacking the archive into <sda1_mount_point>. The next step is simple, insert the CF card into NetBook, reset it and press CTRL-ESC-D.

NOTE: Although my target is called jlime, right now it doesn't actually have anything to do with real Jlime distribution. It's my own contraption that I hope will be integrated with real Jlime at some point. Right now it just my playground. @Kristoffer I hope you don't mind I've branded my meta layer as Jlime.

[1] http://www.spinics.net/lists/linux-input/msg03230.html
[2] http://www.mail-archive.com/linux-i2c@v ... 00846.html
[3] http://www.linuxtogo.org/~anonymous/netbook-booting.txt


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Tue Oct 25, 2011 2:37 pm 
JLime Guru User
JLime Guru User

Joined: Wed Mar 17, 2010 4:55 pm
Posts: 70
Yep, that's how my setup is working at the moment - boost image on first partition (FAT) and debian on second parition (ext2).

I was actually talking about the boost bootcode/img when I said your code was clean. I haven't really looked much at the kernel source. We already found those patches by Russel King, though I didn't try doing anything with them.

The PCON seems to be resetting the netbook sometimes during boot. I haven't tried it with your more recent patches though.

If you could push the Xepson code that would be great... X is currently quite painful.

I'd like to be able to boot from SD card... I have a 16GB SDHC card, while my CF is only 512MB. Theoretically this should be possible already, but somehow large SD cards don't work so well. The card is never recognised if I leave it inserted at boot time, and only sometimes works when I put it in after booting. Again, I forget the error message, but will check it out in the next day or so. If it fails it leaves the system in a state where no SD cards will be recognised any more. I have some other, much smaller, SD cards that work fine.

Thoughts for the future;
Openembedded seems a good idea, as does going with openembedded-core. Though I have wondered whether buildroot or T2 might be more suitable/easier. Neither has a good package management system though, as far as I can tell.

I haven't had windows CE on my netbook for a long time now, and the NAND is partitioned with an old kernel in the first partition and an empty second partition. When the kernel is fully stable I'd like to flash it, and perhaps also add a small root partition. Then comes the question of how to support extra packages being installed on CF/SD, which could be tricky. Perhaps the NAND rootfs should just be used as a rescue system.

It might be nice to have the boost image just hold a small bootloader that allows you to select kernel image, root fs and kernel arguments and then boot, so you don't need to rebuild the bootcode and boost image just to change those things. That would however bring the pain of having to support SD/CF and filesystems in the bootloader. Maybe, as we were discussing before, it might be easier to have it boot uboot as second stage, as it should already support most of these things. On the other hand it also has lots of stuff that we don't need!


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Wed Oct 26, 2011 7:58 pm 
JLime Professional User
JLime Professional User

Joined: Sun Sep 18, 2011 10:04 am
Posts: 28
Location: Warsaw, Poland
Don't have much time to work on the project right now. I've cleaned up my xepson related changes as much as I could and pushed them here: https://github.com/tworaz/xserver/commi ... 1.10-epson. The code compiles without warnings, but I have no idea if it works. There is one FIXME left in epson1306.c:191. I think the code should be safe to remove, but I'm not 100% sure.

NOTE: To build it please pass "--enable-kdrive --enable-xepson" parameters to configure script.


Top
Offline Profile  
 
 Post subject: Re: Support for Netbook Pro
PostPosted: Fri Nov 04, 2011 10:34 pm 
JLime Newbie
JLime Newbie

Joined: Fri Nov 04, 2011 10:27 pm
Posts: 1
I've got a working Linux distribution running on my Netbook Pro, but I would like to be able to use Windows CE again as well. I ran the nBkPro.img that repartitions the nand flash and now I can't re-install Windows CE because the partition sizes are wrong. So, I have a question:

How do I re-partition the nand flash back to factory default and re-install the default nKkProOS.img file?

Any help would be greatly appreciated!

Thanks!


Top
Offline Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 314 posts ]  Go to page Previous  1 ... 8, 9, 10, 11, 12, 13, 14 ... 21  Next

All times are UTC


Who is online

Users browsing this forum: Google [Bot] and 1 guest


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum

Search for:
Jump to:  
cron