damien-lemoal / riscv64-nommu-buildroot

Other
42 stars 11 forks source link

Maix-linux with SD card support #7

Closed rogeriocassares closed 3 years ago

rogeriocassares commented 4 years ago

Hi @damien-lemoal ! Thanks for excelent job and all team that work together.

In my application, beyond the minimal, I need to mount and access SD card partition at Maix M1 Board.

I was able to run pre-compiled and it is ok, but i could not found SD card partition. And I am stucked some days at this point. :(

Please, how can I mount SD card, since I can be able to run the commands from it?

Thanks and Best Regards! Rogério Cassares

damien-lemoal commented 4 years ago

@roger10cassares Currently, the kernel does not have support for the SD card on the Kendryte platform. So it is not yet possible to use it. I believe that most of the work needed to enable the SD card is simply centered around better initialization of the clocks for the different devices and modifications to the device tree file. It should not be too hard. I think the U-boot project is actually more advanced in this area for the Kendryte SoC and code could be ported from there into the kernel.

This has been on my to-do list for a while, but I am currently overloaded with other projects and have no time right now to spend on this. If you can, help is welcome :)

rogeriocassares commented 4 years ago

Hi @damien-lemoal ! Thanks so much!

Do you think the new kernel linux-5.8 gets the correct support for SD Card mount since it got now an official make config for buildroot and support at nommu_k210_defconfig?

Thanks for your time! Cheers! Rogério Cassares

damien-lemoal commented 4 years ago

@roger10cassares The problem is not the SD card mount itself. The problem is that the kendryte platform support in the kernel lacks the SD card driver. Or rather, lacks the clocks to be used for the device (since I think the actual driver is already in the kernel, but need to check). Basically, nothing is wired up in the kernel for the SD card to be usable. And I have not seen any patch to the 5.8 kernel enabling that on Kendryte.

I was not aware of the official buildroot addition. I was actually planning to do that first, but it looks like someone did that already (nice !). Will check that.