Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount SD Card Partition #6

Open
rogeriocassares opened this issue Aug 5, 2020 · 4 comments
Open

Mount SD Card Partition #6

rogeriocassares opened this issue Aug 5, 2020 · 4 comments

Comments

@rogeriocassares
Copy link

Hi @vowstar ! Thanks for the step-by-step tutorial. Yes, I could reach the minimal Linux Instalation in k210 board ! Very Thanks!

However, the mission is read the SD Card of this board with minimal installation also. I have tried check some tools at busybox menu and buildroot menu, but it gave me some errors to compile.

Please, how can I set the correct parts at buildroot and/or busybox to mount the SD Card, properly?

Very Thanks and Best Regards!

@vowstar
Copy link
Owner

vowstar commented Oct 21, 2020

Sorry for late reply, the card need compile filesystem in kernel, and write a dts to mapping sd card gpio to spi/sdcard driver, it is possible, but need time to debug

@lypanov
Copy link

lypanov commented Jul 11, 2021

Seems the sdcard GPIO's are mapped now with kernel 5.13 but still I'm not seeing a block device for some reason. Any ideas? Was hoping to eventually get something cross compiled and uploaded to the sdcard vs wearing out the internal flash each time (and my patience).

@JAicewizard
Copy link
Contributor

I got it working with kernel 6.3, with a slightly modified configuration. I also used u-boot, but this is probably irrelevant.

First I modified the sdcard config to specify the board so linux includes the DTB by itself.
I have 2 partitions on the SD, cant remember what the first one is on the top of my head but probably FAT32, and the second one ext2 (dont forget to update the sd-card config to point to partition 2).
Put the linux kernel + DTB (not sure why this is neccesary, u-boot wont boot linux without it but it doesnt help linux detect the SD card) on the first partition according to u-boots instructions.
Then you can boot u-boot, it will load linux which should now detect the SD card. You can probably skip u-boot, but this is how I did it.

I made a fork which updated linux to 6.3, I'll also be putting the SD config on there so it should be easy to follow.

@JAicewizard
Copy link
Contributor

@lypanov If you still need this, checkout https://github.com/JAicewizard/k210-linux-nommu/tree/master

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants