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

U-Boot for the eb904 cannot be selected in "make menuconfig" #9

Closed arnysch closed 5 years ago

arnysch commented 5 years ago

Hi Qauge, hi everyone

The issue is shown in this textual screen copy: the eb904 U-Boot is listed, but it cannot be selected.

I understand that your EasyBox 904 repos are the leading repos, so I would like to contribute.

At the moment I can offer to create pull requests for the things listed below for inclusion in your repo(s). However I need feedback about what you find acceptable:

All this is already implemented and tried out. My version can be found here. I copied it to "lede-feeds-easybox904", because I feel this is a better place (there also is the wifi driver), but this is just a suggestion.

There already exists a pull request for your "lede-feeds-easybox904" repo which contains all of the changes. Maybe you find this too much. Again: please consider this to only be a suggestion to trigger a discussion.

I would be glad to hear from OpenWrt/EasyBox904 developers. Either as response to this issue, or at these locations: https://forum.openwrt.org/t/support-for-easybox-904-lte/14478 email an arnysch bei gmx.net

Quallenauge commented 5 years ago

I never have dumped to much into the uboot sources for review and cleanup. I don't have experience in this area, too :-/ So thanks to your effort this is getting better!

I personally like the idea of moving the uboot sources to a specific repository. The only drawback is, that the official lede components provide their bootloaders within the repository. So I don't know if this would make a possible merge into the official sources more difficult or not. ATM, I think we can use your approach and move the sources to the repository. Can you please make a pull request for this repository also?

arnysch commented 5 years ago

BTW I withdraw my proposal to move the existing U-Boot package to lede-feeds-easybox904. That was premature. In my comment within the obsolete request I tell the reason.

Quallenauge commented 5 years ago

A little bit offtopic: I have two boxes; one of them running fine with the self compiled uboot version but the other one drives crazy with it. It boots but immediately after init it crashes with random errors. I was not able to get the culprit of this. I suspect some DDR timings or clock issues? After flashing back the original u-boot version the box calm down and works as expected. So I suspect the modified U-Boot isn't usable for everybody....(?)

arnysch commented 5 years ago

I had this effect with O2 6431 boxes which I got from Ebay for a few bucks. Some boxes seemed to run unstable. Reason: some boxes came with incorrect power supply. The connector fitted, but the voltage as declared on their power supply labels was too low. One was for a SpeedPort, I guess the seller mixed it up. But another problematic one looked exactly like the original correct O2 one. Took me a long time until I realized the reason, und then I could not tell which supply I got from which seller. Wondering if they were already shipped incorrectly by O2...

Does "self compiled uboot version" mean the one you offer at mega.nz? Or did you try an U-Boot built with my recent patches?

Probably this info won't help and probably you already know: I learnt that after flashing 'our' U-Boot, the first time U-Boot is run, it measures (tries out :-) ?) reasonable DDR2 timing and saves the values within the u-boot partition. Called "autotuning". I think it stores an introducing 0x88888888, four DDR timing params, and a checksum at the end of a 16kB first stage part in mtd0. So u-boot overwrites itself on the first start.

arnysch commented 5 years ago

Hi Qauge, just an idea: maybe something went wrong with "autotuning".

After flashing a new U-Boot, on its first run, U-Boot determines four DDR parameters and saves them in NAND (U-Boot overwrites itself!). They call this "autotuning". I describe this here in section "DDR tuning".

If you watch closely the first run after a new U-Boot flash, it will output four extra lines showing the determined values.

I guess you saved the original U-Boot from mtd0. That one already contained a valid DDR parameter block at offset 0x3FE8. So when you restored the original U-Boot, no autotuning was performed.

It should be possible to force certain known parameters into a self built U-Boot binary file by using a hex editor or by clever usage of dd (copy parts from within a file) and cat (reassembling parts), so after flashing no autotuning is performed.

arnysch commented 5 years ago

Guess it is ok I close this issue, because this is fixed.