Closed yf13 closed 1 year ago
using latest, do not use tag 5.0.1
git clone https://github.com/RT-Thread/rt-thread
cd bsp/qemu-virt64-aarch64
scons --menuconfig
RT-Thread Kernel --->
[*] Enable RT-Thread Smart (microkernel on kernel/userland)
RT-Thread online packages --->
system packages --->
[*] lwext4: an excellent choice of ext2/3/4 filesystem for microcontrol
source ~/.env/env.sh
pkgs --update
scons -c; scons
# scons --dist
@ziyouchutuwenwu
Thanks for the information. I noticed that you were using qemu-virt64-aarch64
while I am using qemu-virt64-riscv
. I then tried the latest version of RT-Thread/rt-thread
following your suggestion, but it still doesn't build for qemu-virt64-riscv
here:
CC build/packages/lwext4-latest/src/ext4.o
In file included from /opt/rv64/10.1/riscv64-unknown-linux-musl/include/signal.h:48,
from /home/yf/Projects/rt-thread-master/components/libc/compilers/common/include/sys/signal.h:23,
from /home/yf/Projects/rt-thread-master/components/libc/compilers/common/include/sys/time.h:211,
from /home/yf/Projects/rt-thread-master/components/libc/compilers/common/include/sys/select.h:17,
from /opt/rv64/10.1/riscv64-unknown-linux-musl/include/sys/types.h:71,
from /home/yf/Projects/rt-thread-master/components/libc/compilers/common/include/sys/unistd.h:16,
from /home/yf/Projects/rt-thread-master/components/libc/compilers/common/include/unistd.h:14,
from packages/lwext4-latest/include/ext4_oflags.h:91,
from packages/lwext4-latest/src/ext4.c:41:
/opt/rv64/10.1/riscv64-unknown-linux-musl/include/bits/signal.h:63:15: error: expected identifier or '(' before '[' token
63 | char __unused[1024 / 8 - sizeof(sigset_t)];
| ^
scons: *** [build/packages/lwext4-latest/src/ext4.o] Error 1
scons: building terminated because of errors.
As I can't clone the RT-Thread/rt-thread
from github directly, I cloned it to gitee first then grabbed the latest code to my PC for test.
Would you mind check with qemu-virt64-riscv
target?
Regards, yf
failed for qemu-virt64-riscv
packages/lwext4-latest/ports/rtthread/dfs_ext.c:569:5: warning: initialization of 'ssize_t (*)(struct dfs_file *, void *, size_t)' {aka 'long int (*)(struct dfs_file *, void *, long unsigned int)'} from incompatible pointer type 'int (*)(struct dfs_file *, void *, size_t)' {aka 'int (*)(struct dfs_file *, void *, long unsigned int)'} [-Wincompatible-pointer-types]
569 | dfs_ext_read,
| ^~~~~~~~~~~~
packages/lwext4-latest/ports/rtthread/dfs_ext.c:569:5: note: (near initialization for '_ext_fops.read')
packages/lwext4-latest/ports/rtthread/dfs_ext.c:570:5: warning: initialization of 'ssize_t (*)(struct dfs_file *, const void *, size_t)' {aka 'long int (*)(struct dfs_file *, const void *, long unsigned int)'} from incompatible pointer type 'int (*)(struct dfs_file *, const void *, size_t)' {aka 'int (*)(struct dfs_file *, const void *, long unsigned int)'} [-Wincompatible-pointer-types]
570 | dfs_ext_write,
| ^~~~~~~~~~~~~
packages/lwext4-latest/ports/rtthread/dfs_ext.c:570:5: note: (near initialization for '_ext_fops.write')
packages/lwext4-latest/ports/rtthread/dfs_ext.c:572:5: warning: initialization of 'off_t (*)(struct dfs_file *, off_t)' {aka 'long int (*)(struct dfs_file *, long int)'} from incompatible pointer type 'int (*)(struct dfs_file *, off_t)' {aka 'int (*)(struct dfs_file *, long int)'} [-Wincompatible-pointer-types]
572 | dfs_ext_lseek,
| ^~~~~~~~~~~~~
packages/lwext4-latest/ports/rtthread/dfs_ext.c:572:5: note: (near initialization for '_ext_fops.lseek')
CC build/packages/lwext4-latest/ports/rtthread/dfs_ext_blockdev.o
CC build/packages/lwext4-latest/src/ext4.o
In file included from /home/mmc/downloads/rtt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/riscv64-unknown-linux-musl/include/signal.h:48,
from /home/mmc/downloads/rtt/rt-thread-master/components/libc/compilers/common/include/sys/signal.h:23,
from /home/mmc/downloads/rtt/rt-thread-master/components/libc/compilers/common/include/sys/time.h:211,
from /home/mmc/downloads/rtt/rt-thread-master/components/libc/compilers/common/include/sys/select.h:17,
from /home/mmc/downloads/rtt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/riscv64-unknown-linux-musl/include/sys/types.h:71,
from /home/mmc/downloads/rtt/rt-thread-master/components/libc/compilers/common/include/sys/unistd.h:16,
from /home/mmc/downloads/rtt/rt-thread-master/components/libc/compilers/common/include/unistd.h:14,
from packages/lwext4-latest/include/ext4_oflags.h:91,
from packages/lwext4-latest/src/ext4.c:41:
/home/mmc/downloads/rtt/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu/riscv64-unknown-linux-musl/include/bits/signal.h:63:15: error: expected identifier or '(' before '[' token
63 | char __unused[1024 / 8 - sizeof(sigset_t)];
| ^
scons: *** [build/packages/lwext4-latest/src/ext4.o] Error 1
scons: building terminated because of errors.
please use fatfs for rootfs or use dfsv1 for ext4.
@BernardXiong
Thanks for the suggestions. It seems that I have been using dfvs1 with ext4. I confirmed this error using toolchain from https://github.com/RT-Thread/toolchains-ci/releases/download/v1.7/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_latest.tar.bz2 as I can't download the original one.
Since the prebuilt kernel uses ext4, I am wondering how it was built from RT-Thread v5.0.1?
I will see if I can use FATFS later, still searching for it in menuconfig.
The reasons for the conflict are as follows
Hi,
May I ask how to built the prebuilt kernel such as
prebuilt/qemu-virt64-riscv/rtthread.bin
?I download the v5.0.1 release of RT-Thread and built a
bsp/qemu-virt64-riscv/rtthread.bin
successfuly, but when I replaced the prebuilt kernel with mine and runs the demo, it complains that:[E/DBG] virtio-blk0 mount failed
.I guess the ext4 file system driver is absent from my kernel, so I turned on CONFIG_PKG_USING_LWEXT4 and rebuild, but got the following error:
My toolchain is from
https://download.rt-thread.org/rt-smart/riscv64/riscv64-linux-musleabi_for_x86_64-pc-linux-gnu_180881.tar.bz2
:Regards, yf