Reply
Thread Tools
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#831
I think u-boot requires you to then run "u-boot-update-bootmenu", which will actually re-create the bootmenu.scr.

The best option would be to replace maemo's u-boot with a newer one directly on the NAND kernel partition. Should kill fremantle (its kernel), but should also allow u-boot to take whatever u-boot script is placed on the SD card, so on the long term, it's a better option.

I'm planning to do that, but I still have to find the b*lls to actually flash the newer u-boot (I know, it can be tested without flashing, but just need to get around to doing that..

Ref: https://leste.maemo.org/Nokia_N900
 

The Following 2 Users Say Thank You to reinob For This Useful Post:
Posts: 253 | Thanked: 1,007 times | Joined on May 2010 @ Near Munich
#832
Originally Posted by dredlok706 View Post
So, you don't have access to Maemo 5, right? Maybe try to mount rootfs via Leste, or even chroot to it.
You should just run command like that:
Code:
ln -s /etc/bootmenu.d/40-maemo-leste.item /etc/default/bootmenu.item
...
chroot! Should have thought of that.

Here my chroot script:
Code:
#!/bin/bash
modprobe ubi mtd=5
ubiattach /dev/ubi_ctrl -m 5
mount -t ubifs /dev/ubi0_0 /mnt/
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc
after that just run
Code:
chroot /mnt/ /bin/ash
I tried linking the file as suggested, but to no effect.

The u-boot-update-bootmenu returned
Code:
First eMMC partition /home/user/MyDocs/ is not mounted!
So I mounted the first SD Partition there. After that the script ran successfully and generated a bootmenu.scr.
I also noticed /boot/zImage-2.6.28.10-power53 is a symlink to /opt, so no wonder the original maemo system can't boot without EMMC available

However it still reports the same errors on boot, so U-Boot seems to be unable to pick up the file from the SD.

@reinob: If I flash a new u-boot I think I will have the same problems. It will also try to mount the EMMC and then attempt to boot from NAND.
 

The Following 2 Users Say Thank You to Macros For This Useful Post:
Posts: 252 | Thanked: 282 times | Joined on Oct 2021 @ Poland
#833
So, finally, it helped you or not?
Sorry, but I don't understand
I am not expert at Linux, just thought about chroot it can be solution
__________________
My Telegram group (Maemo / MeeGo / Sailfish):
https://t.me/linuxmobile_world
Channel for Maemo/MeeGo:
https://t.me/maemomeegoapps
 

The Following 2 Users Say Thank You to dredlok706 For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#834
Originally Posted by Macros View Post
@reinob: If I flash a new u-boot I think I will have the same problems. It will also try to mount the EMMC and then attempt to boot from NAND.
Yes.. you would need to delete the bootmenu.scr in MyDocs (the real one, in the eMMC) so that it can proceed to the "next" one, i.e. your SD card.

So much for the theory

Yesterday I could verify that "0xFFFF -m u-boot-2020.12-pali.bin -l" followed by "0xFFFF -b" could boot me into Leste (but using the bootmenu.scr found in the eMMC).

Note the u-boot-2020.12-pali and not the (older) u-boot-2013.04-2.bin.

That means that in theory I could now wipe my MyDocs partition and use the newer u-boot to boot Leste.

Maybe I'll do it this weekend (I hate it when you just want to try "one thing quickly" and hours later you're still feeling miserable for the snafu you just created .

I'll certainly report back if/when I've done it
 

The Following 2 Users Say Thank You to reinob For This Useful Post:
Posts: 253 | Thanked: 1,007 times | Joined on May 2010 @ Near Munich
#835
@dredlok706: I still have the issue, but your answer helped me greatly in diagnosing the problem

I have now also tried u-boot-2020.12-pali.bin.
But without surprise it shows similar behaviour (except that after failing to boot it somehow receives input which looks like AT-commands for the modem)

So no solution here, but thanks for the suggestions!

I guess my only option would be to dive into the source of U-Boot and compile a version for myself which prefers booting from SD, or even improve it to handle a damaged eMMC well by searching for the scr file on the SD.

Or maybe I could bribe pali to do it
 

The Following 2 Users Say Thank You to Macros For This Useful Post:
Posts: 1,808 | Thanked: 4,272 times | Joined on Feb 2011 @ Germany
#836
@Macros,

How about patching the u-boot binary to replace "bootmenu.scr" with, say, "bootmenu.xcr", so that it will not find the expected file in your eMMC?

It's just one byte, at position 0x0002e380 of u-boot-2020.12-pali.bin, or 0x000233c6 of u-boot-2013.04-2.bin (replace "s" with "x")...
 

The Following 3 Users Say Thank You to reinob For This Useful Post:
Posts: 253 | Thanked: 1,007 times | Joined on May 2010 @ Near Munich
#837
Thanks reinob!

The existance of a plaintext script in the binary was the hint I needed.
Your suggestion didn't work, but at offset 0x00023394 there is
setenv mmcnum 1
And with the limited understanding I have of it, 1 stands for the internal EMMC. So I changed the byte to an ASCII zero.

And it works

U-Boot now picks up the scr file from the first SD partion and boots Leste from there, or shows me the menu when the slider is open.

I attached the file here in case anybody needs it.

Search keywords: U-boot patched N900 SD card SDcard first card did not respond to voltage select change boot order

Last edited by Macros; 2022-01-27 at 12:10.
 

The Following 5 Users Say Thank You to Macros For This Useful Post:
Russanandres's Avatar
Posts: 5 | Thanked: 9 times | Joined on May 2022 @ Russia
#838
hello. What is the problem. The 2013 version does not show the menu with my item files and shows the standard one. Version 2021 shows, but constantly writes to the terminal (example AT%IPSYS? or AT+CPIN?). I reinstalled the 2013 version and nothing worked. How can i fix it?

Last edited by Russanandres; 2022-07-15 at 17:45. Reason: 2013 problem
 

The Following User Says Thank You to Russanandres For This Useful Post:
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#839
Upstream U-Boot version for N900 already first tries to load bootmenu.src from uSD and then from eMMC. So if you use new U-Boot version (e.g. newly released 2022.07) then it should work without need to patch it.
 

The Following 3 Users Say Thank You to pali For This Useful Post:
Posts: 2,153 | Thanked: 8,462 times | Joined on May 2010
#840
Originally Posted by Russanandres View Post
hello. What is the problem. The 2013 version does not show the menu with my item files and shows the standard one. Version 2021 shows, but constantly writes to the terminal (example AT%IPSYS? or AT+CPIN?). I reinstalled the 2013 version and nothing worked. How can i fix it?
Those AT commands are sent by your computer, probably by NetworkManager or ModemManager or similar software. Report bug to that sofware.
 

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

Tags
bootmenu, u-boot


 
Forum Jump


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