Quallenauge / Easybox-904-XDSL

Fork of openwrt with vendor specific changes from open sourced firmware 3.10.
GNU General Public License v2.0
20 stars 8 forks source link

Questions about resetting U-Boot environment variable 'bootnum' #15

Closed arnysch closed 5 years ago

arnysch commented 5 years ago

Hi everyone, there is this capability to reset U-Boot's 'bootnum' environment variable. I have the impression that it does not work out of the box in the current Easybox-904-XDSL Head version, because the ubootconfig partition is encrypted. But I know, I once saw it working correctly. Maybe it was used in some "fullimage.img" revovery image? I think the kernel's nand simulator was used for this. I searched for it, but failed to find it again.

So here my questions, maybe someone can enlighten me:

  1. Is it supposed to work?

  2. If no: where can I find this working stuff for the eb904 which resets the bootnum?

  3. What do you think: is it highly important, of minor relevance, or not important at all that we support this bootnum resetting feature?

Quallenauge commented 5 years ago

What do you mean with encrypted? I'm able to perform a

fw_printenv bootnum

without problems. Also setting the value does work here. It is supposed to work, but it does not reset the bootnum on each boot to extend the life of the nand partition. It is reset only greater/equals than 4 at this point: https://github.com/Quallenauge/Easybox-904-XDSL/commit/1a2285ee614e39ff65142dd094692e3f203b9947#diff-0fcd851e0bd168a6243282078d3abc56R21 I saw this working on a test box.

arnysch commented 5 years ago

Uff, you are right. Probably it was my BT Homehub 5A where I saw this nand simulator and the encrypted boot partition, and then profoundly mixed up things. With this fw_printenv I get a message when booting which looks strange to me, and I naivly thought that was related to an encrypted env partition.

Quallenauge commented 5 years ago

Alright. Better to ask to clarify things than not doing it =)