x
This website is using cookies. We use cookies to ensure that we give you the best experience on our website. More info. That's Fine
HPC:Factor Logo 
 
Latest Forum Activity

Netbook Pro I've found a working linux distro!

« Prev ... 4 5 6 7 8 9 10 11 12 13 14 15 ... Next »
salmonito Page Icon Posted 2007-11-01 3:44 PM
#
Avatar image of salmonito
Factor Fanatic

Posts:
61
Location:
Vermont
Status:
And who was the author?
chiark, the LX link contained oe-netbook folder in the netbook-sources archive, is that a CVS checkout , because there is no actual source code in there. only patches and oe instructions... Actually i'd like to have the checksum, it would be nice to know how to change the header of nBkProOS.img, to change cksum there... Anyone knows?

Edited by salmonito 2007-11-01 3:46 PM
 Top of the page
chiark Page Icon Posted 2007-11-01 4:04 PM
#
Avatar image of chiark
H/PC Sensei

Posts:
1,330
Location:
North of England
Status:
it's in the netbook booting text file, and is in this utility that I've received.
 Top of the page
oldman Page Icon Posted 2007-11-01 6:10 PM
#
Avatar image of oldman
H/PC Newbie

Posts:
22
Status:
The original LX sources for kernel 2.6.9-pre1-bk18-nbp1 are exactly the same as when patching kernel 2.6.9-rc1-bk18 with http://linuxtogo.org/~koen/linux-2.6.9-pre1-bk18-nbp1.patch . Today I got able to compile such a kernel. By comparing the disassemblings I could see the boot images contain some extra boot-up-code for which we do not have any sources. That code makes some hardware setups, it moves the kernel and initrd to other addresses, and it tells the kernel about all necessary parameters. I tried to run a self-compiled kernel by replacing the original kernel in a nBkProOs.img without changing the size or so (yes, in between I wrote my own tool to pack an nBkProOs.img). The kernel starts booting and switches the display hardware on, I even got a true penguin logo , but then nothing more happens . I tried four different kernel configurations this way, but all with the same disappointing result. Maybe I should order a serial cable now.

The attachment contains the source of my tool. Instructions:
1.) Edit the header values in the file for your needs.
2.) Compile with: gcc mk-nBkProOsImg.c -lz -o mk-nBkProOsImg
3.) Use with: mk-nBkProOsImg < rawimage > nbkProOs.img


Edited by oldman 2007-11-01 6:15 PM




Attachments
----------------
Attachments mk-nBkProOsImg.c (5KB - 21 downloads)
 Top of the page
chiark Page Icon Posted 2007-11-02 3:34 AM
#
Avatar image of chiark
H/PC Sensei

Posts:
1,330
Location:
North of England
Status:
Thanks for that - that's pretty much exactly what the other code that I've got does, including the CRC lookup array

So in short there's something in the image which bootstraps the machine and that's what we're missing. Hmm, how on earth do we crack that one given that you've already tried to replace the image, change pointers and see if it works?

I wonder who wrote the bootstrap code - any clues in the decompilation?
 Top of the page
oldman Page Icon Posted 2007-11-02 5:04 AM
#
Avatar image of oldman
H/PC Newbie

Posts:
22
Status:
Quote
chiark - 2007-11-02 3:34 AM

Thanks for that - that's pretty much exactly what the other code that I've got does, including the CRC lookup array

So in short there's something in the image which bootstraps the machine and that's what we're missing. Hmm, how on earth do we crack that one given that you've already tried to replace the image, change pointers and see if it works?

I wonder who wrote the bootstrap code - any clues in the decompilation?


There are no texts in the bootstrap code. I think I understand 97% of its disassembling, but because I don't know the license, I don't like to publish my comments or to generate source from it. But for the current experiments I think its enough just to replace the kernel image without changing any pointers or sizes. Here is the layout of the raw image, which I called nBkProOs.img_cf.no-header.decompressed in an earlier posting (read there how to get it).

Offset 0: 4 bytes code which calls the bootstrap stuff.
Offset 4: 2532720 bytes kernel image. Here you could overwrite with your own kernel image, but it must not be larger. If it's smaller, fill the rest with zeros.
Offset 2532724: 1052 bytes data and code making up the bootstrap stuff (yes it starts with some zeros).
Offset 2533776: 8388608 bytes initrd image.

Remember, all this is about nBkProOs.img_cf, and not the flashing variant.

With my new knowlege, I tried kernel 2.6.17-nbp0 again, but without success. chiark, did you heard anything from Jon whether anyone ever got a 2.6.17 kernel running on the NBP?
 Top of the page
chiark Page Icon Posted 2007-11-02 6:27 AM
#
Avatar image of chiark
H/PC Sensei

Posts:
1,330
Location:
North of England
Status:
I've asked Jon whether he ever managed to boot another kernel - I'll let you know. I think I know the answer!

Going forward, I think it would be useful to try to distil this thread into a sticky with a "where are we now" style. I'll try to do that.
 Top of the page
salmonito Page Icon Posted 2007-11-02 8:37 AM
#
Avatar image of salmonito
Factor Fanatic

Posts:
61
Location:
Vermont
Status:
Quote
chiark - 2007-11-02 6:27 AM

I've asked Jon whether he ever managed to boot another kernel - I'll let you know. I think I know the answer!

Going forward, I think it would be useful to try to distil this thread into a sticky with a "where are we now" style. I'll try to do that.

Where are we now or what's next Let's do that!
 Top of the page
chiark Page Icon Posted 2007-11-02 9:14 AM
#
Avatar image of chiark
H/PC Sensei

Posts:
1,330
Location:
North of England
Status:
you're farther on than Jon - he never got the penguin, he got a zlib decompression error or something like that, so the good news is you've moved it on a bit!

I've pointed Jon at this thread rather than sitting in the middle!
 Top of the page
salmonito Page Icon Posted 2007-11-02 9:42 AM
#
Avatar image of salmonito
Factor Fanatic

Posts:
61
Location:
Vermont
Status:
Quote
chiark - 2007-11-02 9:14 AM

you're farther on than Jon - he never got the penguin, he got a zlib decompression error or something like that, so the good news is you've moved it on a bit!

I've pointed Jon at this thread rather than sitting in the middle!

did you give him the link to LX ?
 Top of the page
Intrepid-Eddie Page Icon Posted 2007-11-02 11:41 PM
#
Avatar image of Intrepid-Eddie
Factorite (Junior)

Posts:
34
Location:
Castle Rock, Colorado
Status:
Grrrrr... been having and absolute bitch of a time getting the OE toolchain set up on my current linux distro (Vector). So, now I'm going to scrap the whole damn thing and install Ark Linux as recommended by OE: http://www.openembedded.org/wiki/OEandYourDistro

Hopefully this will speed things along.

The Angstrom website has a lot of good info for getting the environment set up for building for the netbook pro. From a few tidbits I read, it seems like if we build the X11 image (and are successful in getting internet connectivity to the netbook) we may even be able to get e17 running on it. Actually, I believe I remember seeing a few screenshots of the netbook pro running linux with e17.

After I get my laptop set up with Ark Linux, I'll start on building.
 Top of the page
oldman Page Icon Posted 2007-11-03 8:45 AM
#
Avatar image of oldman
H/PC Newbie

Posts:
22
Status:
Quote
Intrepid-Eddie - 2007-11-02 11:41 PM
Grrrrr... been having and absolute bitch of a time getting the OE toolchain set up on my current linux distro (Vector).


I have to admit that I hesitated with the OE stuff, because I have no experience with monoton. Finally I found GCC-3.4.4 toolchain binaries (RPM's) here: http://www.schnozzle.org/~coldwell/toolchain/ . It is good for compiling kernel 2.6.9, but surely not for compiling angstrom. For kernel 2.6.17 I used an up-to-date GCC-4.2.1 toolchain found here: http://www.codesourcery.com/gnu_toolchains/arm/download.html
 Top of the page
cmonex Page Icon Posted 2007-11-03 12:41 PM
#
Avatar image of cmonex
H/PC Oracle

Posts:
16,175
Location:
Budapest, Hungary
Status:
Quote
oldman - 2007-11-02 11:04 AM


There are no texts in the bootstrap code. I think I understand 97% of its disassembling, but because I don't know the license, I don't like to publish my comments or to generate source from it.



just send me that bootstrap code, i'll publish my comments, i don't care about licenses.

Edited by cmonex 2007-11-03 12:42 PM
 Top of the page
chiark Page Icon Posted 2007-11-03 3:52 PM
#
Avatar image of chiark
H/PC Sensei

Posts:
1,330
Location:
North of England
Status:
Slightly more legally, reverse engineering for compatibility reasons is recognised as a legal activity in most countries.

Good luck setting up the toolchain - I must admit that I haven't yet started that, as I looked at the OE stuff and thought 'woah'.
 Top of the page
oldman Page Icon Posted 2007-11-03 6:00 PM
#
Avatar image of oldman
H/PC Newbie

Posts:
22
Status:

Sorry - you may call me a paranoid, but I care about licenses. And if it's commercial stuff, re-engineering may really not be permitted. Therefore, I officially state here that I disassembled for nothing more than realizing that there is a code section which does not belong to the Linux kernel and that it is something for which I cannot find any sources or licenses. I deleted the disassembling afterwards.

As soon as necessary, we can write our own bootstrap code from scratch. All the required information for doing that, is in the Linux kernel docs and the official arm/Xscale programming manuals. It's really not that hard.
 Top of the page
Intrepid-Eddie Page Icon Posted 2007-11-04 1:20 AM
#
Avatar image of Intrepid-Eddie
Factorite (Junior)

Posts:
34
Location:
Castle Rock, Colorado
Status:
Quote
chiark - 2007-11-03 2:52 PM
Good luck setting up the toolchain - I must admit that I haven't yet started that, as I looked at the OE stuff and thought 'woah'.


Setting up the toolchain isn't too bad. The instructions are fairly good, though they could use a "tweak" here and there. The Ark Linux distro makes it *very* easy -- not that everything is already installed, just that you can install everything from the package manager (even the dev version of GNU Patch).

And now that I have my laptop installed with Ark, the OE toolchain set up, and the Angstrom distro ready to build... it craps out. When I run bitbake to start the build, I keep getting seg faults at various points in the build process.

Much to my dismay, I forgot that my laptop has some bad RAM. Not bad enough to affect the day-to-day running of the OS or apps, but try anything intense like a build and it dies. This is the reason I could never get a source-based distro (like Gentoo) working on my laptop.

Crap.

Well, I'm more than willing to help out testing different scripts and images on my NPB. I can look over code, as well, though I'm not terribly gifted in the area of programming (and I can't build/compile anything).

--Eddie

Edited by Intrepid-Eddie 2007-11-04 1:21 AM
 Top of the page
« Prev ... 4 5 6 7 8 9 10 11 12 13 14 15 ... Next »
Jump to forum:
Seconds to generate: 0.453 - Cached queries : 27 - Executed queries : 56