Rootfs folder in kernel files

Hello,all
I find in linux for tegra folder there’s a rootfs folder. it should represent the file system folder, but I don’t know when it works?
I know when we flash the kernel and file system. Use the system.img file in the bootloader directory. The system.img is obtained from the sparse file system.img.raw through the mksparse command. But what does this have to do with rootfs folder.

When I compile the kernel, the generated module folder should be updated to rootfs. So how can I integrate it into system. Img? Thank you

Hi,

system.img contains the rootfs. So when you build the kernel module, you need to put the binary to rootfs and the next flash would generate new system.img. In this step, please do not use “-r” for flash.sh.

Thanks。
I suggest that,
when i finished compile the kernel.
run apply_binaries.sh。so it can auto update the rootfs folder with new output of kernel compiles.
when I use flash.sh to flash kernel and fs, without -r , I with generate new system.img。

is above right ??

run apply_binaries.sh。so it can auto update the rootfs folder with new output of kernel compiles.

This line is not correct. apply_binaries.sh is not that smart to understand where you compiled your kernel.

when I use flash.sh to flash kernel and fs, without -r , I with generate new system.img。

This is correct.

you mean that I just need to ctrl+c, ctrl+v to finish the rootfs update?

No, I meant you need to copy&paste it to rootfs and also run apply_binaries.sh too.

ok,thanks