Author Topic: kexecboot-size, max-size?  (Read 1029 times)

DiTBho

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
kexecboot-size, max-size?
« on: April 28, 2025, 07:47:23 am »
I'm a bit confused by what I read online.
I wonder:
1) what is the maximum size of the kexecboot executable? < 2Mbyte? or <1.2 Mbyte? Different things are read online.
2) isn't it possible to repartition the flash and use the entire flash to contain kexecboot or something similar?
3) why is there no interest in u-boot?

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 455
    • View Profile
    • http://github.com/greguu
Re: kexecboot-size, max-size?
« Reply #1 on: May 02, 2025, 04:57:54 am »
There is a fixed size of this partition due the sharp bootloader. Its not changable as far as I know.
The sharp boot loader can load any kernel placed into this partition so its not too bad :)
1.2MB is about right, but if you have bad sectors on the NAND it can become less.
Issues are reported that some kexecboot kernels that are very close to 1.2MB would fit certain devices but not others..
Gemini-PDA (Sailfish X and Android) / LG Nexus 5 (Android 11) / Nokia N9 (MeeGo/Harmattan)
Sharp Zaurus C3100 (Borzoi) - Void Linux (voidz) Kernel 5.0.0 - Hardware (Buffalo CF LAN, DLink 660 CF WiFi, ASIX AX88772 USB Ethernet)

greguu

  • Global Moderator
  • Sr. Member
  • *****
  • Posts: 455
    • View Profile
    • http://github.com/greguu
Re: kexecboot-size, max-size?
« Reply #2 on: May 02, 2025, 05:01:32 am »
uboot ? yes, you can build a uboot to fit as a replacement for kexecboot kernel, but you have to port it yourself :) pxa support in uboot is not that recent I believe for pxa270 or any pxa.
kexecboot was a sensible choice back then...and still is
Gemini-PDA (Sailfish X and Android) / LG Nexus 5 (Android 11) / Nokia N9 (MeeGo/Harmattan)
Sharp Zaurus C3100 (Borzoi) - Void Linux (voidz) Kernel 5.0.0 - Hardware (Buffalo CF LAN, DLink 660 CF WiFi, ASIX AX88772 USB Ethernet)

DiTBho

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: kexecboot-size, max-size?
« Reply #3 on: May 02, 2025, 10:31:07 am »
Ok, so it's 1.2Mbyte max.

uboot ? yes, you can build a uboot to fit as a replacement for kexecboot kernel, but you have to port it yourself :) pxa support in uboot is not that recent I believe for pxa270 or any pxa.
kexecboot was a sensible choice back then...and still is

modern kernel (v5, v6) just don't fit into 1.2Mbyte
uboot is much smaller in size (<800Kbyte) and has much more potential
- tftpboot both kernel and ramrootfs
- ability to script warm boot, or cold boot

it is not a problem for me to support u-boot, even from scratch.
I will look into this.

DiTBho

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: kexecboot-size, max-size?
« Reply #4 on: May 02, 2025, 10:49:16 am »
If there was a documented jtag port, I would like to erase the entire flash, and reprogram it from scratch, in a more intelligent way.

strange that no one has ever thought of this ...

... another alternative, physically unsolder the flash chip, reprogram it in the lab, re-solder it.

we'll see.