kendryte / k230_sdk

Kendryte K230 SDK
BSD 2-Clause "Simplified" License
170 stars 38 forks source link

[Bug]: 如果大核要在开机的时候, 马上在\sharefs根目录创建文件/文件夹,那么会导致小核无法启动 #33

Closed roingbu closed 9 months ago

roingbu commented 11 months ago

What happened

如果大核要在开机的时候, 在\sharefs根目录创建文件/文件夹,那么会导致小核无法启动

Reproduction steps

Hardware board

k230 evb board

Software version

No response

Bug frequency

No response

Anything else

No response

LearnigF commented 11 months ago

参考门锁应用,在完成上层的核间通讯建立后,开始使用sharefs

wangjianxin-canaan commented 10 months ago

可以通过stat函数判断共享文件系统是否正常,比如如下代码可以实现等待共享文件系统正常后后再执行自启动程序。

src/big/rt-smart/kernel/rt-thread/components/finsh/shell.c  第456行参考修改为如下:

if(shell_thread_first_run) {
    // shell_thread_first_run = 0;
    // msh_exec("/bin/init.sh", 13);
    struct stat stat_buf
    if(0 == stat("/sharefs/app/micropython",&stat_buf)){
        shell_thread_first_run = 0;
        rt_kprintf(FINSH_PROMPT);
        msh_exec("/bin/init.sh", 13);
    }
    continue;
}
wuwentao commented 9 months ago

未收到当前issue的任何反馈或回复,先close了,如后续仍有问题,可以reopen并继续反馈最新的进展