Reply
Thread Tools
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#151
if env atagaddr is defined (by default address from NOLO - register r2) then cmdline argument configured by uboot is ignored. If you want to pass your own cmdline from uboot, first clear env atagaddr (setenv atagaddr)
 
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#152
But atagaddr is not empty as default ?

Only if it is executed the script "noloboot" atagaddr is filled with ${init_atagaddr};
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#153
Originally Posted by Fabry View Post
But atagaddr is not empty as default ?

Only if it is executed the script "noloboot" atagaddr is filled with ${init_atagaddr};
I check this and yes, you are right. uboot has two variables: atagaddr and init_atagaddr. atagaddr is used for booting and init_atagaddr is filled when uboot is loading. script noloboot set atagaddr from init_atagaddr
 
Posts: 197 | Thanked: 101 times | Joined on Dec 2009 @ Netherlands
#154
my u-boot now allows to copy the initial atags and append cmdline and ramdisk images to it.
Nitdroid now comes up without panics, completely ignoring the maemo rootfs.
Only thing still is the firmware. I'll probably just copy the firmware files tot hte nitdroid partition. Will test later tonight.
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#155
Originally Posted by mirakels View Post
my u-boot now allows to copy the initial atags and append cmdline and ramdisk images to it.
Nitdroid now comes up without panics, completely ignoring the maemo rootfs.
Only thing still is the firmware. I'll probably just copy the firmware files tot hte nitdroid partition. Will test later tonight.
Finally got it all working I can now boot into Maemo, Meego or Nitdroid without needing to reflash or change cards. I've attached the patch to u-boot I'm using - it appends the initrd and command line (if set) to the atags instead of just ignoring them when atagaddr is set.

For Nitdroid, I'm using multiboot as normal, but fooling it into thinking it's already done the reflash, so it just loads Nitdroid straight away. If anyone's interested, I can also post my initramfs and u-boot scripts.
Attached Files
File Type: gz u-boot.diff.gz (481 Bytes, 131 views)
 

The Following 7 Users Say Thank You to Rob1n For This Useful Post:
Posts: 197 | Thanked: 101 times | Joined on Dec 2009 @ Netherlands
#156
same here.

But my attempts to boot without using the maemo rootfs fail.Nitdroid needs the maemo rootfs to start all kinds of daemons for 'propriety' functions like bme and also starts things like dbus from the maemo partition.
I guess this can all be fixed by copying a couple of maemo files to the nitdroid partition, but it needs lots of changes to the nitdroid startup code.

So the nitdorid port is not really an native port... Pitty.
But the important things is we can boot nitdroid (and others) without reflashing!

anyway here is my version of the u-boot update. It uses an environment variable "atagcopy" to indicate you want to copy the existing atags and append new ones to it. e.g. something like:

setenv atagcopy $init_atagaddr
setenv bootargs root=/dev/mmcblk0p5
loadext2 .... $loadaddr uImage
loadext2 .... $ramfsaddr uInitramfs
bootm $loadaddr $ramfsaddr
 

The Following 3 Users Say Thank You to mirakels For This Useful Post:
Posts: 1,225 | Thanked: 1,905 times | Joined on Feb 2011 @ Quezon City, Philippines
#157
I can't seem to see anything weird in powertop before and after installing u-boot, but the battery applet's been acting weird. No idea where the power consumption's going (shouldn't Linux take control of all the devices when it starts?)
__________________
N9 PR 1.3 Open Mode + kernel-plus for Harmattan
@kenweknot, working on Glacier for Nemo.
 
Posts: 20 | Thanked: 14 times | Joined on Oct 2011
#158
u-boot is a nice piece of software.
I just stuck with
1. loading initramfs. Could you please show a command for that?
2. I've seen fatload working (once). How can I do the same for ext2. Example?
3. Most recent u-boot+PR1.3 kernel -? At http://al.robotfuzz.com/~al/maemo/u-boot/ ?
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#159
Originally Posted by ildar View Post
u-boot is a nice piece of software.
I just stuck with
1. loading initramfs. Could you please show a command for that?
2. I've seen fatload working (once). How can I do the same for ext2. Example?
3. Most recent u-boot+PR1.3 kernel -? At http://al.robotfuzz.com/~al/maemo/u-boot/ ?
1. You can load the initramfs by doing "fatload mmc 0:3 0x83000000 initrd.img" and then boot it by doing "bootm 0x82000000 0x83000000".
2. As well as fatload, there's a corresponding ext2load which you can use in the same way.
3. The latest u-boot (AFAIK) is at http://atrey.karlin.mff.cuni.cz/~pali
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#160
Good news

I found a way how to get address where was u-boot loaded by NOLO and where u-boot expect start address in any C or ASM code (not only in start.S). So relocation of u-boot binary to correct address is possible in any source file.

It is very tricky. In one section will be stored address of that section generated by compiler (this address will correct after reloacation). And also it is possible to get address where is really that section stored.

assembler code:
Code:
relocaddr:
.word .
and in same file will be calculating offset (saved in r0):
Code:
adr	r0, relocaddr @real address of section
ldr	r1, relocaddr @correct address of section after relocation
sub	r0, r0, r1 @calculate offset
after that it is possible to move relocation code from armv7/start.S to rx51 board code and maybe this solution can be accepted in upstream.
 

The Following 6 Users Say Thank You to pali For This Useful Post:
Reply


 
Forum Jump


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