3F / aml_s905_uboot

u-boot DDR mods ~
MIT License
66 stars 17 forks source link

u-boot on specific board #2

Open 3F opened 5 years ago

3F commented 5 years ago

copy/paste from my old reply for John via email (07.02.2019). Just for future questions. Enjoy.

... The build of u-boot really depends on specific board. Some manufacturer even loves adding some strange or even incompatible components for their boards. Especially lot of devices on Aliexpress.

This is why I started inspecting of my M9S-PRO that really has a 3G / 32G modules in datasheet (kmr21000bm-b809 & thgbmbg8d4kbair).

However, architecture of ARM 64bit s905(not s905x) officially does not provide support for addressing more than 2G! And for that period I just started searching why is so because I was looking an 16-bit DRAM bus width which meant multiplexing anyway for this 2G. My thoughts was like ~ can I programmatically avoid some restriction. Or what's going here.

One of the problems I got incompatible u-boot for my device from any compatible configuration when compiling from src that I presented in github/3F

I already mentioned in Readme about ddrpara and executable sequence for AML. Maybe this board just requires some specific key/sequence. But any attempts were failed to execute my compiled u-boot :( About how to build I wrote in Build section (toolset and commands there).

Some changing of some params also failed. But the one BL2 pass was only for enabled .pxp emulator(same instruction from the s905 processor). So I'm still confused. Thus, I just modified directly binary u-boot from my device with changed executable sequence for AML.

For my case it was enough, because I inspected binary structure for changing some params for only RAM initialization. As result, I mapped 3Gb that I can finally write now and correctly read even for s905! See readme.

However, I'm still not sure because of strangeness with speed. Moreover, I also need to patch kernel after this changes.

But I have no time and plans to continue this for today, thus I just dropped some notes about some moments, as you can see in https://github.com/3F/aml_s905_uboot ...