![]() |
HOWTO: Change, remove or add u-boot on power kernel image
This is my simple guide to modify power kernel v45 image and to change or remove u-boot from it.
It needs a linux pc (or you can use N900 itself) do some steps. With some modifications steps can be adapted to windows systems too How-to remove u-boot:
How-to change u-boot with Matan's version:
ATTENTION: Actual Matan's u-boot can have problems with HW revision different from v2101 How-to add u-boot Matan's version:
ATTENTION: Actual Matan's u-boot can have problems with HW revision different from v2101 |
Re: HOWTO: Change or remove u-boot on power kernel image
It might be worth mentioning that uninstalling power kernel v45 and installing v42 is also an option.
http://wiki.maemo.org/Kernel_Power#Deinstallation |
Re: HOWTO: Change, remove or add u-boot on power kernel image
Added guide to add u-boot on power-kernel v46
|
Re: HOWTO: Change, remove or add u-boot on power kernel image
Hey
Is it possible to install v45 via apt-get to device. I just wanted to test meegon and figured out that v46 does not have u-boot anymore :) |
Re: HOWTO: Change or remove u-boot on power kernel image
Quote:
|
Re: HOWTO: Change, remove or add u-boot on power kernel image
If you're flashing from onboard the device, instead of running this as root:
Code:
flasher-3.5 -f -k [image name] [-R] Code:
softupd --local -D - Edit - Didn't actually say this first time around so: Thanks for posting this in a single concise how-to. I suspect this information was lying around in various places, but it's always nice to see people making clear instructions. Also, I haven't tried this one, but I thought I'd point out that e-yes (one of the NITDroid developers) created a patch for uboot that makes it boot the attached kernel if you boot with keyboard closed, and takes you to the normal uboot loader screen with the countdown if you boot with keyboard slid out. Thread - first post on this page: http://talk.maemo.org/showthread.php?t=64921&page=10 Post itself: http://talk.maemo.org/showpost.php?p...1&postcount=91 |
Re: HOWTO: Change, remove or add u-boot on power kernel image
Quote:
|
Re: HOWTO: Change, remove or add u-boot on power kernel image
Oh. Was this in power44? I never noticed, but then again I was on Power44 maybe 4-5 days and then power45 came out. Thanks for correcting me on that.
|
Re: HOWTO: Change, remove or add u-boot on power kernel image
Yay, fun stuff:
Followed instructions of adding uboot to Power 46. Downloaded the respective files and extracted u-boot.bin.0x38000 and zImage-2.6.28-maemo46.fiasco images. Used flasher-3.5 to extract the, well, whatever was in there, from the zImage-2.6.28-maemo46.fiasco image. It put out one file, a "zImage". I ran it again just to make sure, it put out the same file, so I figured everything was correct. This was on a Windows Vista 32 bit laptop. Plugged in N900, copied both the uboot.bin.0x38000 and zImage files on board. (I then remembered the u-boot-for-power-kernel package installed a uboot.bin.0x38000 file into the /usr/lib/uboot.bin/0x38000/ directory. ls -l showed the files as being the same size, so there was no reason to think that the file I got out of that package's source .tar.gz was any different.) Okay, so, I copied uboot.bin.0x038000 to a file I called "u-boot.power46". (Since I've used Matan's "my.u-boot.power41[a/d]" images, I had deduced the name didn't matter.) Then I ran the dd command above, with "of=u-boot.power46" being the only difference. (This was all done in the directory the files were in, so I don't think that should've been any issue.) From here, I used fiasco-flasher, instead of the softupd -D / flasher combo. Because out of the two, fiasco-flasher, if you have it, is just faster for flashing kernel, and as far as I know does the same exact thing. At any rate, result? I reboot, and it loads uboot - even though I have the keyboard in, the uboot menu does the countdown. Then it does the normal looking-for-kernel-on-SD-card thing. Doesn't have one (I don't have one there, so so far so good), and then it reports that the format of the kernel image is wrong, so it can't boot. "run noloboot", predictably, reports the same error. So it stays in uboot. The white LED stays on indefinitely. If there's a way to shutdown from uboot directly, I don't know it. So eventually I had to just pull the battery. Which to me is unpleasant but something I knew I was signing up for when I started mucking with kernel flashing. I know how to reflash, not too much of an issue. So I figured I'll go reflash to the just-previously-working power46 kernel (using the same zImage-2.6.28-maemo46.fiasco image I originally extracted my zImage to make the uboot one from). Did that from my Windows laptop - no problem, it flashed. However, even that's not loading now. It takes me to the white Nokia screen, and just sits there. Just like with the non-working uboot just beforehand. White LED stays on, white nokia screen stays on. Right now I'm gonna test by trying to flash just kernel from stock global pr1.3 fiasco image. I suspect I either got a messed up version of the power46 zImage, or the zImage flasher extracted from that got messed up. If so, it's probably PeaZip's fault, because that's the archive manager I used to get the image out of the .deb on Windows. If that doesn't work, I'll try for an entire fiasco-image reflash. Not my idea of fun, restoring all my programs afterwords, but, again, something I don't mind doing because I knew I was signing up for that when I fiddle with custom kernel images. What I am REALLY worried about though, is that somehow, I screwed up the NAND chip itself, or the bootloader on it. In which case I suppose necessity will dictate I spend the time to figure out how to fix that. Anyway, I'll report if even a stock kernel reflash doesn't work. At that point, suggestions will be welcome, especially if the full fiasco-image reflash doesn't work either. - Edit - *Sigh of relief* Extracted zImage from the stock Global firmware fiasco image. It worked. I'm assuming it was just something messed up in the power46 fiasco image or the extracted zImage I got. Emboldened by things working again, I prepare to attempt to do the same thing all over again. I'm supposing that I should be able to use the N900's available tools to extract the image from the power-kernel deb onboard. |
Re: HOWTO: Change, remove or add u-boot on power kernel image
There is indeed a problem in the instructions. u-boot expects a uImage, not a zImage. power46 is u-boot-less, so its image is not a uImage. This is just a few bytes added at the start of the image, telling u-boot about its size, purpose, etc.
So indeed, of the three operations in the original post, only the middle one - replacing one u-boot with another will work. The others need an extra step of converting between uImage and zImage. You can find a mkimage binary (for x86_64 linux) here: http://my.svgalib.org/770/n900/u-boot/ and instructions for converting a zImage to a uImage here: http://al.robotfuzz.com/~al/maemo/u-boot/ |
All times are GMT. The time now is 13:11. |
vBulletin® Version 3.8.8