maemo.org - Talk

maemo.org - Talk (https://talk.maemo.org/index.php)
-   Maemo 5 / Fremantle (https://talk.maemo.org/forumdisplay.php?f=40)
-   -   HOWTO: Change, remove or add u-boot on power kernel image (https://talk.maemo.org/showthread.php?t=65776)

Fabry 2010-11-17 15:49

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:
  1. Download power kernel deb file from repository and extract fiasco image from it
  2. Unpack Fiasco image
    flasher-3.5 -u -F zImage-2.6.28-maemo45.fiasco
  3. Remove u-boot from kernel image (starting read at offset 0x40000 aka 512 blocks)
    dd if=zImage of=uImage_pow45_noUBoot skip=512
  4. Remove uImage header from kernel file to obtain a flashable zImage kernel
    dd ibs=64 if=uImage_pow45_noUBoot of=zImage_pow45_noUBoot skip=1
  5. Flash new kernel to device
    sudo flasher-3.5 -f -k zImage_pow45_noUBoot -R

How-to change u-boot with Matan's version:

  1. Download power kernel deb file from repository and extract fiasco image from it
  2. Download Matan's u-boot from repository (it is named u-boot-for-power-kernel) and extract file image from it
  3. Unpack Fiasco image
    flasher-3.5 -u -F zImage-2.6.28-maemo45.fiasco
  4. Remove u-boot from kernel image (starting read at offset 0x40000 aka 512 blocks)
    dd if=zImage of=zImage_pow45_noUBoot skip=512
  5. Copy u-boot to destination zImage
    cp u-boot.bin.0x38000 zImage_pow45_MatanUBoot
  6. Add power kernel at end of previous file (starting write at offset 0x38000 aka 448 blocks)
    dd if=zImage_pow45_noUBoot of=zImage_pow45_MatanUBoot seek=448
  7. Flash new kernel to device
    sudo flasher-3.5 -f -k zImage_pow45_MatanUBoot -R

ATTENTION: Actual Matan's u-boot can have problems with HW revision different from v2101

How-to add u-boot Matan's version:
  1. Download power kernel deb file from repository and extract fiasco image from it
  2. Download Matan's u-boot from repository (it is named u-boot-for-power-kernel) and extract file image from it
  3. Unpack Fiasco image
    flasher-3.5 -u -F zImage-2.6.28.10-power48.fiasco
  4. Transform zImage in uImage (necessary because u-boot boots Kernel only in uImage file format)
    mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n "Power Kernel v48" -d zImage uImage
  5. Copy u-boot to destination zImage
    cp u-boot.bin.0x38000 zImage_pow48_MatanUBoot
  6. Add power kernel uImage at end of previous file (starting write at offset 0x38000 aka 448 blocks)
    dd if=uImage of=zImage_pow48_MatanUBoot seek=448
  7. Flash new kernel to device
    sudo flasher-3.5 -f -k zImage_pow48_MatanUBoot -R

ATTENTION: Actual Matan's u-boot can have problems with HW revision different from v2101

cfh11 2010-11-17 16:47

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

Fabry 2010-11-19 23:08

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Added guide to add u-boot on power-kernel v46

nux 2010-11-23 16:39

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 :)

Radicalz38 2010-11-23 16:45

Re: HOWTO: Change or remove u-boot on power kernel image
 
Quote:

Originally Posted by cfh11 (Post 876223)
It might be worth mentioning that uninstalling power kernel v45 and installing v42 is also an option.

http://wiki.maemo.org/Kernel_Power#Deinstallation

It might also be worth mentioning that you would miss a couple of patches and fixes other than uboot when downgrading from v45 to v42. :D

Mentalist Traceur 2010-11-23 22:39

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]
You do:
Code:

softupd --local -D
flasher --local -f -k [image name] [-R]

The "-R" is optional in both. It just tells your device to reboot right after flashing. This is somewhat safer because in case your N900 has a battery problem or runs out of power or crashes soon after, it might not be able to actually write the changes to disk. (In Linux, the kernel sometimes waits, keeping changes to disk in memory, instead of writing it to disk immediately. When it reboots, it will write every change not yet made to disk before shutting everything down.) However, if you don't immediately need or want to reboot, you can just run "sync", which does just that - writes all the not-yet-written-to-disc-changes to disk. Then you can rest soundly knowing your flashed kernel is saved, so you can reboot at leisure.

- 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

Matan 2010-11-23 23:33

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Quote:

Originally Posted by Mentalist Traceur (Post 881604)
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.

This patch is included in the u-boot-for-power-kernel package.

Mentalist Traceur 2010-11-23 23:35

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.

Mentalist Traceur 2010-11-24 04:47

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.

Matan 2010-11-24 10:38

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/

cfh11 2010-11-24 15:11

Re: HOWTO: Change or remove u-boot on power kernel image
 
Quote:

Originally Posted by Radicalz38 (Post 881278)
It might also be worth mentioning that you would miss a couple of patches and fixes other than uboot when downgrading from v45 to v42. :D

well, thats what changelogs are for.

Mentalist Traceur 2010-11-25 20:37

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Matan, is that binary for arm? Downloading it to the N900, making executable, and running, results in error:
Code:

line 1: syntax error: word unexpected (expecting ")")
(I moved it to sbin and run it from there, in case it makes any difference.)

Also, the instructions say to use "-a 80008000" and "-e 80008000" options. Is this still valid since your uboot in the u-boot-for-power-kernel package is padded to just 0x38000 instead of 0x40000?

zimon 2010-12-04 13:31

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Does u-boot change the bootloader section of the NAND memory in N900 any way? (/dev/mtd0)

Fabry 2010-12-06 00:35

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Fixed "How-to add u-boot Matan's version:" guide adding the missing step

Fabry 2010-12-06 00:54

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Quote:

Originally Posted by zimon (Post 889102)
Does u-boot change the bootloader section of the NAND memory in N900 any way? (/dev/mtd0)

NoLo bootloader (/dev/mtd0) is not modified in no way.

This is a chainloading method to start u-boot without removing old bootloader.
NoLo loads a fake zImage kernel image which contains u-boot plus a kernel (in uImage format) and runs this image.
So NoLo really starts-up u-boot which then starts-up kernel (already loaded in memory)

Fabry 2010-12-06 18:07

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Quote:

Originally Posted by Fabry (Post 890248)
Fixed "How-to add u-boot Matan's version:" guide adding the missing step

Fixed "How-to remove u-boot:" guide also

Brock 2011-02-25 18:18

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Hi!
I have tested meego 1.2 and for this, i also have installed uboot. now i dont want to test meego anymore, but i dont know how i can remove uboot. can anyone help me with this problem without reflashing? as far as i know i dont have power kernel installed, its still the original kernel.

*edit*
if i try it with apt-get remove uboot-pr13 it tells me that its not installed.

with apt-cache search uboot i found 2 entries: uboot-mkimage and uboot-power-46 with the message below it:
to remove this again, "apt-get install --reinstall kernel-power kernel-power-flasher" and reboot. does it mean that i have the power kernel installed? should i try this command? and whats the power kernel? Sorry for my stupid questions ;)

*edit* if i enter the mentioned command, it tells me that after it 10mb of additional space will be used. sounds strange to me. please help!

Brock 2011-02-25 19:39

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Quote:

Originally Posted by Brock (Post 955407)
Hi!
I have tested meego 1.2 and for this, i also have installed uboot. now i dont want to test meego anymore, but i dont know how i can remove uboot. can anyone help me with this problem without reflashing? as far as i know i dont have power kernel installed, its still the original kernel.

*edit*
if i try it with apt-get remove uboot-pr13 it tells me that its not installed.

with apt-cache search uboot i found 2 entries: uboot-mkimage and uboot-power-46 with the message below it:
to remove this again, "apt-get install --reinstall kernel-power kernel-power-flasher" and reboot. does it mean that i have the power kernel installed? should i try this command? and whats the power kernel? Sorry for my stupid questions ;)

*edit* if i enter the mentioned command, it tells me that after it 10mb of additional space will be used. sounds strange to me. please help!

i found the solution for my problem. it was:
"apt-get install --reinstall kernel kernel-flasher"

now i dont see the penguin anymore.

qwazix 2011-03-07 19:12

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
I've been trying to do this with the power46wl kernel but the device never boots. It shows the little penguin, u-boot times out, the correct kernel is shown, it says linux kernel uncompressed the size and all that but it stays on "loading kernel" forever. I tried both matan's u-boot and one I compiled myself with the instructions here http://elektranox.org/n900/kernel/uboot.html and also the method mentioned in this thread and the builder.py in the link but nothing works. Has anyone made the combined u-boot+power46wl image and can share it?
________
bald ***** Webcam

qwazix 2011-03-28 16:19

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
sorry to bump this but I am trying to build a power46wl with u-boot but I constantly fail. Does anybody have it working and can share it?
________
Depakote pregnancy

blck 2011-05-22 15:19

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Hey there,
do I have to remove the installed power-kernel-version(v47) and install uboot first?

Thanks for any tips, I really want to test meego, but the uboot-version available through the repositories ist only for version46.

Cheers, Blck

J4ZZ 2011-07-14 12:31

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Here's a small guide to add u-boot to power48.

1st: Download and install all packages from here

Code:

dpkg -i kernel-power_1:2.6.28-10power48_armel.deb
dpkg -i kernel-power-modules_1:2.6.28-10power48_armel.deb
dpkg -i kernel-power-flasher_1:2.6.28-10power48_armel.deb
dpkg -i kernel-power-settings_0.12_armel.deb
dpkg -i kernel-power-bootimg_1:2.6.28-10power48_armel.deb

check if it's installed properly with
Code:

uname -r
Is should say 2.6.28.10-power48

Then follow up this little guide ;) (Thx to [DarkGUNMAN] and Fabry's guide of patching power-kernel with u-boot)

Open Terminal:
Code:

sudo gainroot
cd /home/user

# Prerequisites
Code:

apt-get install -y wget flasher mkimage
#1. Download power kernel deb file from repository and extract fiasco image from it
Code:

wget http://atrey.karlin.mff.cuni.cz/~pali/kernel-power_1:2.6.28-10power48_armel.deb -O kernel-power_2.6.28-10power48_armel.deb
dpkg --fsys-tarfile kernel-power_2.6.28-10power48_armel.deb | tar -xf - boot/zImage-2.6.28.10-power48.fiasco
mv boot/zImage-2.6.28.10-power48.fiasco /home/user/
rm -r boot
rm kernel-power_1:2.6.28-10power48_armel.deb

#2. Download Matan's u-boot from repository (it is named u-boot-for-power-kernel) and extract file image from it
Code:

wget http://repository.maemo.org/extras-devel/pool/fremantle/free/u/u-boot-for-power-kernel/u-boot-for-power-kernel_1.0_all.deb -O u-boot-for-power-kernel_1.0_all.deb
dpkg --fsys-tarfile u-boot-for-power-kernel_1.0_all.deb | tar -xf - ./usr/lib/u-boot/u-boot.bin.0x38000/u-boot.bin.0x38000
mv ./usr/lib/u-boot/u-boot.bin.0x38000/u-boot.bin.0x38000 /home/user/vmlinuz-2.6.28.10-power48
rm -r usr
rm u-boot-for-power-kernel_1.0_all.deb

#3. Unpack Fiasco image
Code:

flasher -u -F zImage-2.6.28.10-power48.fiasco
rm zImage-2.6.28.10-power48.fiasco

#4. Transform zImage in uImage (necessary because u-boot boots Kernel only in uImage file format)
Code:

mkimage -A arm -O linux -T kernel -C none -a 80008000 -e 80008000 -n "Power Kernel v48" -d zImage uImage
#5. Add power kernel uImage at end of previous file (starting write at offset 0x38000 aka 448 blocks)
Code:

dd if=uImage of=vmlinuz-2.6.28.10-power48 seek=448
#6. Remove zImage & uImage
Code:

rm zImage
rm uImage

#7.1 Flash the kernel
Code:

softupd -vv -s --local
#7.2 Open a new terminal (Shift+Ctrl+X) leave other xterm open!!!
Code:

flasher --local -f -k /home/user/vmlinuz-2.6.28.10-power48
#8. Optional - Multiboot - backup and replace Power48
Code:

mv /boot/zImage-2.6.28.10-power48 /boot/multiboot/vmlinuz-2.6.28.10-power48-bak
mv /boot/multiboot/vmlinuz-2.6.28.10-power* /boot/multiboot/vmlinuz-2.6.28.10-power48-bak
mv /home/user/vmlinuz-2.6.28.10-power48 /boot/multiboot/vmlinuz-2.6.28.10-power48

#9. Optional - Clean Multiboot Entries
If you have old power47 or double power48 entries
open Filebox and navigate to /etc/multiboot.d to delete the respecting *.item files.

#10. Reboot and watch the http://upload.wikimedia.org/wikipedi...-Fresh_tux.png !!! :D

Edit: I coloured the code for whose who don't know what goes together and what not. So, each colored lines are a complete string where to hit 'Enter' after. I left the obvious ones untouched ;)

Greetz,

J4ZZ

michaaa62 2011-07-14 12:46

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Quote:

Originally Posted by blck (Post 1012763)
Hey there,
do I have to remove the installed power-kernel-version(v47) and install uboot first?

Thanks for any tips, I really want to test meego, but the uboot-version available through the repositories ist only for version46.

Cheers, Blck

What are exactly the benefits of power-kernel v47 for you over v46?
If you just want to try meego, why don't you downgrade your power-kernel to v46, go and see what meego has to offer.

xxxxts 2011-08-31 14:59

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Everytime I run NITDroid (N12 Gingerbread) it breaks my u-boot.

Larswad 2011-09-06 21:03

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
@J4ZZ:
Look, thanks for the guide and all! I know my way around using the command line and even worked with linux for a couple of years. But before using anything like that guide I'd like to have some basic stuff cleared out first.

It's almost unbelievable but I haven't found anywhere anyone that explains what all these boot things are actually doing in detail.

I mean, I was happy to read that if I install kernel power with it's supplied bootimg package, then my guess was that I would be able to multiboot just by doing that. Then I read about this u-boot stuff that I know have been around for a while since the earlier power kernels, that it is obviously needed as well. So what does that provide in comparison with bootimg package? What the hell?

Why do I need the bootimg package, why do I need the u-boot package and why do I need both in order to use multiboot with for instance MeeGo on the SD card.

I know this sounds like like very noob stuff, but I haven't found anywhere here someone explaining the boot process in the N900 and why we need this and that in order to get it to work.
It would be much easier to accept such guides if we understand the reason to what the freaking things are doing that we install.
I have read about the universal bootloader earlier, but not really how it fits into the n900. It's not so strange that some ppl cannot follow simple guides if noone really explains what's going on.

Probably it's explained somewhere, but I sure haven't found it and I'm tired of clicking through +100 pages in threads with unrelated stuff or with guides for dummies that says "do it this way" but not explaining how it is supposed to work in just basic terms.
Where can I read about the darned boot process?

BTW, the search bar here at talk.maemo.org is useless junk.
Rant over.

trlopes1974 2011-09-07 15:13

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
followed instructions (twice) but boot stuck at "Loading kernel..." line.
I've made the procedure with powerk v48.
any thoughts/help?

erendorn 2011-09-07 15:22

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Quote:

Originally Posted by trlopes1974 (Post 1083593)
followed instructions (twice) but boot stuck at "Loading kernel..." line.
I've made the procedure with powerk v48.
any thoughts/help?

does this work? which instructions did you followed, and were did it exactly fail?

trlopes1974 2011-09-07 16:10

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Just followed your link instructions (wich seem to be the same has on this thread) and the same happens.
Uboot is stuck on "Starting kernel ..." and the led light is on (strong blue).

PS. I have to remove bat to reflash the non-uboot kernel again

erendorn 2011-09-07 22:09

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
yes it's based on this thread and another, as referenced. In one of the thread (this one or the other), it's written that some firmware don't work with the verion of u-boot used here, so maybe it's the case for you :/

mistman 2011-09-07 22:13

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
im in exactly the same situation boots meego fine , But freezes at loading kernel after trying to add u-boot to kernel 48.

trlopes1974 2011-09-08 10:32

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
is there any other working uboot version??

EDIT: Just solved it using uboot in http://wiki.meego.com/ARM/N900/Insta...ge_for_flasher (ubooot.bin from link in point 7)

J4ZZ 2011-09-08 10:56

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Quote:

Originally Posted by Larswad (Post 1083088)
@J4ZZ:
Why do I need the bootimg package, why do I need the u-boot package and why do I need both in order to use multiboot with for instance MeeGo on the SD card.

I don't see myself as an expert either regarding those things.
But I would compare it with Windows and Ubuntu for example. Windows has its own bootloader so does Ubuntu and Co...
Windows loads ntldr -> ntdetect.com -> boot.ini and Ubuntu get it's stuff sorted by grub. Booting both systems with just one bootloader doesn't work. Win needs ntldr and Ubuntu needs grub...
So all you can do is to combine these two.
That means you have to have both bootloaders installed and then two possibilities.
First booting Win bootloader and then pointing to grub for starting ubuntu or second booting grub and have it point to ntldr to start windows.

For N900; Meego needs u-boot and multiboot manages maemo, nitdroid and the others. :)
That's it. And because u-boot isn't needed for maemo it's not integrated by default in any kernels.


Sorry for not being able to explain in a more detailed way.

Greetz,

J4ZZ

tetris11_ 2011-09-14 19:10

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
hey J4ZZ - thanks for the quick runthourgh.

Thanks,
Tetris

zylor 2011-09-23 19:19

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Quote:

Originally Posted by trlopes1974 (Post 1084152)
is there any other working uboot version??

EDIT: Just solved it using uboot in http://wiki.meego.com/ARM/N900/Insta...ge_for_flasher (ubooot.bin from link in point 7)

Did this solve the loading issue? ;)

xxxxts 2011-09-25 23:37

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
I would like to use the newest possible version of u-boot (for booting MeeGo off a different partition on my SD card) while keeping Kernel Power 48 (or Power 49 when it is in repos) How would I go about doing that?

zylor 2011-09-28 18:36

Re: HOWTO: Change, remove or add u-boot on power kernel image
 
Quote:

Originally Posted by j4zz (Post 1050864)
here's a small guide to add u-boot to power48.

1st: Download and install all packages from here

Code:

dpkg -i kernel-power_1:2.6.28-10power48_armel.deb
dpkg -i kernel-power-modules_1:2.6.28-10power48_armel.deb
dpkg -i kernel-power-flasher_1:2.6.28-10power48_armel.deb
dpkg -i kernel-power-settings_0.12_armel.deb
dpkg -i kernel-power-bootimg_1:2.6.28-10power48_armel.deb

check if it's installed properly with
Code:

uname -r
is should say 2.6.28.10-power48

then follow up this little guide ;) (thx to [darkgunman] and fabry's guide of patching power-kernel with u-boot)

open terminal:
Code:

sudo gainroot
cd /home/user

# prerequisites
Code:

apt-get install -y wget flasher mkimage
#1. Download power kernel deb file from repository and extract fiasco image from it
Code:

wget http://bigbob.fun.free.fr/maemo-kernel-power/kernel-power_2.6.28-10power48_armel.deb -o kernel-power_2.6.28-10power48_armel.deb
dpkg --fsys-tarfile kernel-power_2.6.28-10power48_armel.deb | tar -xf - boot/zimage-2.6.28.10-power48.fiasco
mv boot/zimage-2.6.28.10-power48.fiasco /home/user/
rm -r boot
rm kernel-power_1:2.6.28-10power48_armel.deb

#2. Download matan's u-boot from repository (it is named u-boot-for-power-kernel) and extract file image from it
Code:

wget http://repository.maemo.org/extras-devel/pool/fremantle/free/u/u-boot-for-power-kernel/u-boot-for-power-kernel_1.0_all.deb -o u-boot-for-power-kernel_1.0_all.deb
dpkg --fsys-tarfile u-boot-for-power-kernel_1.0_all.deb | tar -xf - ./usr/lib/u-boot/u-boot.bin.0x38000/u-boot.bin.0x38000
mv ./usr/lib/u-boot/u-boot.bin.0x38000/u-boot.bin.0x38000 /home/user/vmlinuz-2.6.28.10-power48
rm -r usr
rm u-boot-for-power-kernel_1.0_all.deb

#3. Unpack fiasco image
Code:

flasher -u -f zimage-2.6.28.10-power48.fiasco
rm zimage-2.6.28.10-power48.fiasco

#4. Transform zimage in uimage (necessary because u-boot boots kernel only in uimage file format)
Code:

mkimage -a arm -o linux -t kernel -c none -a 80008000 -e 80008000 -n "power kernel v48" -d zimage uimage
#5. Add power kernel uimage at end of previous file (starting write at offset 0x38000 aka 448 blocks)
Code:

dd if=uimage of=vmlinuz-2.6.28.10-power48 seek=448
#6. Remove zimage & uimage
Code:

rm zimage
rm uimage

#7.1 flash the kernel
Code:

softupd -vv -s --local
#7.2 open a new terminal (shift+ctrl+x) leave other xterm open!!!
Code:

flasher --local -f -k /home/user/vmlinuz-2.6.28.10-power48
#8. Optional - multiboot - backup and replace power48
Code:

mv /boot/zimage-2.6.28.10-power48 /boot/multiboot/vmlinuz-2.6.28.10-power48-bak
mv /boot/multiboot/vmlinuz-2.6.28.10-power* /boot/multiboot/vmlinuz-2.6.28.10-power48-bak
mv /home/user/vmlinuz-2.6.28.10-power48 /boot/multiboot/vmlinuz-2.6.28.10-power48

#9. Optional - clean multiboot entries
if you have old power47 or double power48 entries
open filebox and navigate to /etc/multiboot.d to delete the respecting *.item files.

#10. reboot and watch the http://upload.wikimedia.org/wikipedi...-fresh_tux.png !!! :d

edit: I coloured the code for whose who don't know what goes together and what not. So, each colored lines are a complete string where to hit 'enter' after. I left the obvious ones untouched ;)

greetz,

j4zz

*links updated to v48 link!!!!! Lol* :d


All times are GMT. The time now is 21:56.

vBulletin® Version 3.8.8