Reply
Thread Tools
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#141
Originally Posted by mirakels View Post
In that case your method seems complex.
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.
Yes, my way is rather complex, but I want to avoid modifying the normal maemo boot process. I also know that the nitdroid boot process works with multiboot, so this should ensure everything required is run.

Originally Posted by mirakels View Post
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?
If you look at the multiboot script, it ends by using pivot_root to swap the nitdroid rootfs and the maemo rootfs, leaving the maemo rootfs mounted at /initrd. This is then used for loading firmware later (and possibly for other things, though I've not found any other references yet).
 
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#142
Originally Posted by mirakels View Post
@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.
PR1.3 was the only fast solution to flash another kernel without u-boot and see if reported battery's charge was wrong (and it was)
 
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#143
Originally Posted by pali View Post
Yesterday I published new version which fixed problem with brightness and bootmenu with closed keyborad. Try again.
I mean that I yesterday released second fixed version
 
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#144
Originally Posted by pali View Post
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)
Values has been taken from BatteryGraph application (but the standard Maemo's battery widget on status bar showed the same false low battery state)
 
Posts: 3,617 | Thanked: 2,412 times | Joined on Nov 2009 @ Cambridge, UK
#145
Originally Posted by Rob1n View Post
Does this work for you? I'm unable to get kernel-power (or PR1.3) loaded via u-boot (other than via noloboot). It loads it in fine, but then looks to just hang at the start of the boot, before the watchdog eventually powers it off. The MeeGo and Nitdroid kernels work fine though - I've got MeeGo booting fully, but am still working on Nitdroid.

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.
I think I'm getting somewhere anyway. The MTD config is all defined in the atags, but using the default ones prevents you from adding any boot parameters, initrd, etc (as these are also encoded as atags). I think I'll need to copy the existing set and add the new ones to the end. This should be doable via scripts as a quick hack, but I think will need some modifications to u-boot for a proper solution.
 
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#146
Originally Posted by Fabry View Post
I made an attempt with the new kp48 image.

These are the problems found:
  • Power consumption problem is still present.
    Initially it seems that p. consumption is normal (discharge rate on idle = 1-3% / hour) but after 1-2 hours of continuos idle the situation changes and becomes "discharge rate on idle greater than 10% / hour"
  • Lcd screen is always powered on.
    Maemo never turns off it, it only shows a black screen (with backlight on, this is evident on a dark room)
  • There is problem with battery's charge measurement.
    I had 50% of reported battery's charge and I have rebooted the phone.
    After reboot reported battery's charge was only 7% and some mins after it was still 7%.
    I doubted that a boot process can really consume over 40% of battery's charge, so I have flashed, by multiboot, a PR1.3 kernel (with no u-boot).
    After reboot the reported battery's charge was 10% (greater than before) and some mins after it has raised to 39%
  • It seems that bootmenu appears even with closed keyboard
Problems on bold are still present on last image.
  • Power consumption is near 10% / hour on idle.
  • I have rebooted and from 79% battery level before reboot I have obtained a 59% battery level after reboot.
    Some mins after battery level was 58%.
    I don't know if it is a problem related to u-boot or a problem related to KP48

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

Last edited by Fabry; 2011-10-13 at 16:53.
 
Posts: 197 | Thanked: 101 times | Joined on Dec 2009 @ Netherlands
#147
Originally Posted by Rob1n View Post
I think I'm getting somewhere anyway. The MTD config is all defined in the atags, but using the default ones prevents you from adding any boot parameters, initrd, etc (as these are also encoded as atags). I think I'll need to copy the existing set and add the new ones to the end. This should be doable via scripts as a quick hack, but I think will need some modifications to u-boot for a proper solution.
Yes, this is what I was planning to do by. I already added a command to u-boot to display the atags. Next thing I was planning to allow ading to the existing atags.

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
0020 - 0004:54410002 ATAG MEM size=10000000 start=80000000
0036 - 0003:54410007 ATAG REVISION revision=00002204
0048 - 0181:414f4d50 OMAP table
       0056 - 0004:4f07 UART: enabled ones (bitmask) 00000000
       0064 - 0036:4f05 LCD:          panel=acx565akm controller=internal nreset_gpio=005a data_lines=0018
       0104 - 0020:4f06 GPIO SWITCH:  cam_focus    : gpio=0044 flags=21 type=00 keycode=00000000
       0128 - 0020:4f06 GPIO SWITCH:  cam_launch   : gpio=0045 flags=21 type=00 keycode=00000000
       0152 - 0020:4f06 GPIO SWITCH:  cam_shutter  : gpio=006e flags=01 type=00 keycode=00000000
       0176 - 0020:4f06 GPIO SWITCH:  cmt_apeslpx  : gpio=0046 flags=22 type=00 keycode=00000000
       0200 - 0020:4f06 GPIO SWITCH:  cmt_bsi      : gpio=009d flags=22 type=00 keycode=00000000
       0224 - 0020:4f06 GPIO SWITCH:  cmt_en       : gpio=004a flags=22 type=00 keycode=00000000
       0248 - 0020:4f06 GPIO SWITCH:  cmt_rst      : gpio=004b flags=26 type=00 keycode=00000000
       0272 - 0020:4f06 GPIO SWITCH:  cmt_rst_rq   : gpio=0049 flags=26 type=00 keycode=00000000
       0296 - 0020:4f06 GPIO SWITCH:  cmt_wddis    : gpio=000d flags=22 type=00 keycode=00000000
       0320 - 0020:4f06 GPIO SWITCH:  headphone    : gpio=00b1 flags=11 type=00 keycode=00000000
       0344 - 0020:4f06 GPIO SWITCH:  kb_lock      : gpio=0071 flags=01 type=00 keycode=00000000
       0368 - 0020:4f06 GPIO SWITCH:  proximity    : gpio=0059 flags=00 type=00 keycode=00000000
       0392 - 0020:4f06 GPIO SWITCH:  sleep_ind    : gpio=00a2 flags=22 type=00 keycode=00000000
       0416 - 0020:4f06 GPIO SWITCH:  slide        : gpio=0047 flags=00 type=00 keycode=00000000
       0440 - 0008:4e02 WLAN CX3110X:  chip_type=25 power_gpio=5700 irq_gpio=2a00 spi_cs_gpio=ff00
       0452 - 0028:4f0b PARTITION:    bootloader       : size=00020000 offset=00000000 mask=00000003
       0484 - 0028:4f0b PARTITION:    config           : size=00060000 offset=00020000 mask=00000000
       0516 - 0028:4f0b PARTITION:    log              : size=00040000 offset=00080000 mask=00000000
       0548 - 0028:4f0b PARTITION:    kernel           : size=00200000 offset=000c0000 mask=00000000
       0580 - 0028:4f0b PARTITION:    initfs           : size=00200000 offset=002c0000 mask=00000000
       0612 - 0028:4f0b PARTITION:    rootfs           : size=0fb40000 offset=004c0000 mask=00000000
       0644 - 0012:4f80 BOOTREASON:   pwr_key     
       0660 - 0024:4f82 VERSION:      product      = RX-51       
       0688 - 0024:4f82 VERSION:      hw-build     = 2204        
       0716 - 0024:4f82 VERSION:      nolo         = 1.4.14      
       0744 - 0024:4f82 VERSION:      boot-mode    = normal      
       0772 - 0000:000 OMAP TABLE END
0772 - 0000:00000000 END ATAG
/proc/cmdline contains:

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
So I wonder where does the cmdline info come from...
 

The Following User Says Thank You to mirakels For This Useful Post:
Posts: 2,154 | Thanked: 8,464 times | Joined on May 2010
#148
Originally Posted by mirakels View Post
So I wonder where does the cmdline info come from...
default cmdline can be compiled into kernel image (see CONFIG_CMDLINE in arch/arm/configs/rx51_defconfig in linux kernel)

also flasher-3.5 can send cmdline via param -b
 
Posts: 362 | Thanked: 426 times | Joined on Nov 2010 @ Italy, Lombardia
#149
Originally Posted by pali View Post
also flasher-3.5 can send cmdline via param -b
And of course u-boot also with setenv bootargs

But if I have read correctly, he tells that the cmdline sent is ignored if atag is used

Last edited by Fabry; 2011-10-14 at 16:12.
 
Posts: 197 | Thanked: 101 times | Joined on Dec 2009 @ Netherlands
#150
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.
 
Reply

Thread Tools

 
Forum Jump


All times are GMT. The time now is 16:50.