![]() |
Re: u-boot for the RX-51 (N900)
Quote:
My example was for a BYTE datatype, if you use an INT it is normal that it works as you expected because my numbers are too little to generate an overflow during left shift. But please try with correct numbers Code:
printf("%#x %#x\n", 4*1073741824>> 2, 1073741824); Code:
0x0 0x40000000 I reapet that C code like n<<VAR>>n (or (2^n)*VAR>>n) is usually used to clear the n most significative bits of VAR (if VAR is unsigned) |
Re: u-boot for the RX-51 (N900)
Quote:
So compiler can optimize (and remove useless operations) only if it is a constant and the fixed value assigned is less then 2^(n-2) alias 1,073,741,824 for an integer costant |
Re: u-boot for the RX-51 (N900)
@Fabry: ok, now I know this, but in U-Boot our number was not very big (so no change)
|
Re: u-boot for the RX-51 (N900)
Now I published new version of U-Boot. It has fixed eMMC support and runtime configurable bootmenu.
Source code is now in branch pali on u-boot-shr: https://gitorious.org/u-boot-shr/u-boot/commits/pali |
Re: u-boot for the RX-51 (N900)
Good job.
Now when this problems:
|
Re: u-boot for the RX-51 (N900)
For compatibility with other HW revisions, see http://talk.maemo.org/showpost.php?p...&postcount=120
Should work on 2101, 2204 and 2104... And power problem. Now we have in u-boot code for twl4030 regulator, so we have tool for power control. Also code for control GPIO and MUX is in u-boot too... |
Re: u-boot for the RX-51 (N900)
So the two problems have been already fixed ?
I have a rev 2101 and I can check eventually only power consumption. |
Re: u-boot for the RX-51 (N900)
Holy ****, Pali! This is better than Multiboot! ;)
I'm going to measure power consumption before/after u-boot when I have time (probably this Saturday). Can we have this by default in power50? |
Re: u-boot for the RX-51 (N900)
I made an attempt with the new kp48 image.
These are the problems found:
|
Re: u-boot for the RX-51 (N900)
@fabry
comparing uboot+kp48 with pr13kernel seems wrong to see power consumption differences. You should use kp48 with and without u-boot to do valid comparison tests. |
Re: u-boot for the RX-51 (N900)
Quote:
|
Re: u-boot for the RX-51 (N900)
And for battery capacity. If you used BME for value, nobody know how BME calculate it - so it may be good or bad. So for capacity please use calibrated battery and report value from bq27200.sh script (or from bq27x00_battery kernel module)
|
Re: u-boot for the RX-51 (N900)
Quote:
* Create uboot package which contains: uboot with pr1.3 kernel image (will be flashed); mkimage tool; new my tool/script for generating bootmenu.scr (to MyDocs) from /etc/bootmenu.d entries * Kernel power will be installed by -bootimg package which call my new script which update bootmenu.scr (so no flashing kernel power image, will be loaded by uboot) * Use same/similar configuration for fanoush bootmenu script (for /sbin/preinit) and script which generate bootmenu.scr |
Re: u-boot for the RX-51 (N900)
Quote:
Also, any idea why I'm getting zero mtd devices found when booting the Nitdroid kernel? I see that the N900 u-boot configuration doesn't enable MTD at all, so would this be required for any booted kernels to access the MTD/UBI devices? I was planning on looking at this later today anyway and seeing what the other boards are doing to configure this. |
Re: u-boot for the RX-51 (N900)
Quote:
setenv atagaddr ${init_atagaddr}; . I have the same problem with starting the nitdroid kernel without the atags. This is tricky cause I want to boot nitrdoid without touching the maemo root fs. I created an initramfs for nitroid and put that (and the u-boot nitdroid kernel) on the nitroid partition and can boot this. the whole kernel startup and switch to the nitroid root fs works fine but then the kernel hangs with panics about devices. When I use above command before starting the nitdroid kernel all is well, but it still uses the maemo rootfs as an initrd. I'm busy to update u-boot to the melt the nolo atags into a the ones u-boot creates itself(e.g. kernel commandline) and pass that to the kernel to boot... |
Re: u-boot for the RX-51 (N900)
Quote:
Quote:
|
Re: u-boot for the RX-51 (N900)
As far as I know, to use Nitdroid with Uboot, changes on Nitdroid boot process would be needed.
|
Re: u-boot for the RX-51 (N900)
Quote:
I now start nitdroid via the maemo rootfs and pivot_root to the nitdroid partition. So: u-boot loads the uImage from the nitdroid partitition. setup atags, and run bootm. I adapted /sbin/preinit in maemo to recognise the kernel that is running (ala multiboot config files) and switch to the nitdroid partiton. This is pretty straight forward and runs fine. Thanks though for pointing out about the firmware downloads. When skipping the maemo/ubi rootfs and using my own initramfs I indeed saw one minute delays for downloading firmwares! What is that about post-boot? Can you elaborate? |
Re: u-boot for the RX-51 (N900)
Quote:
load the uImage noitdroid kernel version from the nitdroi partition using u-boot and then go on like multiboot. That wayat least does not need constant reflashing of kernels! |
Re: u-boot for the RX-51 (N900)
Quote:
This image reports (on boot) the date "Oct 12 2011 - 20:32:32" Now I have redownloaded the image from your site and its md5sum has changed. As date now it reports "Oct 12 2011 - 21:49:29" So yesterday you have published two images |
Re: u-boot for the RX-51 (N900)
Quote:
Quote:
|
Re: u-boot for the RX-51 (N900)
Quote:
|
Re: u-boot for the RX-51 (N900)
Quote:
|
Re: u-boot for the RX-51 (N900)
Quote:
|
Re: u-boot for the RX-51 (N900)
Quote:
|
Re: u-boot for the RX-51 (N900)
Quote:
Furthermore I have noticed that first boot (noloboot) after a flash always fails (watchdog and then power off). At least this happens with multiboot (i.e when from a PR1.3 kernel I switch to KP48+u-boot using multiboot the first maemo's boot always fails). But I don't remember if this happens also with Matan's version |
Re: u-boot for the RX-51 (N900)
Quote:
But I found something peculiar. The atags do not contain any linux 'cmdline' information. but somehow the maemo kernel is booted with several boot settings. The atags on my devices are: Code:
0000 - 0005:54410001 ATAG CORE flags=00000000 pagesize=00001000 rootdev=00000000 Code:
init=/sbin/preinit ubi.mtd=rootfs root=ubi0:rootfs rootfstype=ubifs rootflags=bulk_read,no_chk_data_crc rw console=ttyMTD,log console=tty0 snd-soc-rx51.hp_lim=42 snd-soc-tlv320aic3x.hp_dac_lim=6 |
Re: u-boot for the RX-51 (N900)
Quote:
also flasher-3.5 can send cmdline via param -b |
Re: u-boot for the RX-51 (N900)
Quote:
But if I have read correctly, he tells that the cmdline sent is ignored if atag is used |
Re: u-boot for the RX-51 (N900)
Ah, ok. so apperantly the kernel uses the compiled-in as default when no other is passed. The default atags passed by nolo do not contain a cmdline tag so the kernel uses this default.
When you tell uboot to use the atags from nolo it does not pass any other atags so bootarg settings will be ignored. |
Re: u-boot for the RX-51 (N900)
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)
|
Re: u-boot for the RX-51 (N900)
But atagaddr is not empty as default ?
Only if it is executed the script "noloboot" atagaddr is filled with ${init_atagaddr}; |
Re: u-boot for the RX-51 (N900)
Quote:
|
Re: u-boot for the RX-51 (N900)
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. |
Re: u-boot for the RX-51 (N900)
1 Attachment(s)
Quote:
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. |
Re: u-boot for the RX-51 (N900)
1 Attachment(s)
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 |
Re: u-boot for the RX-51 (N900)
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?)
|
Re: u-boot for the RX-51 (N900)
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/ ? |
Re: u-boot for the RX-51 (N900)
Quote:
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 |
Re: u-boot for the RX-51 (N900)
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: Code:
adr r0, relocaddr @real address of section |
All times are GMT. The time now is 16:21. |
vBulletin® Version 3.8.8