I have 8GB flash memory on device. I'd like to mount root partition as read/write without overlay. Currently I use squashfs and overlay (I think it is by default). How can I do that?
My target is mediatek-mt7623.
I want to install the system on SD card then I'd like to move it on internal flash.
Using flash as r/w "disk" is not a great idea by itself. Flash has a very limited number of erase cycles, and you're likely to burn through those pretty quickly. I also suspect that you won't have enough flash to be able to install OpenWrt without the compression afforded by squashfs. I'd guess that if you execute
du -h -d 0 /rom that you'll end up finding out there there is more than 8 MB of flash.
Assuming that "8GB" is not a typo, you should consider a flash-based file system if it is truly "flash memory". If it is SSD (which generally handle wear leveling and bad-block replacement internally), then something like ext4 would be my choice on a Linux-based system that didn't support ZFS.
My internal memory is https://www.samsung.com/semiconductor/estorage/emmc/KLM8G1GEME-B041/.
I don't know much about memories, but do you still think that it is not wise to run system on it?
That command gave me
I think it is because I put over 100MB files into /root during build.
That overlay partition really messes with greengrass containerization. My guess is that you can't nest overlay in another one so this is why I search for other options. I also trying to run docker, but have problems with that too..
I'm not sure if that is 8 G bit or byte, but it does look as though you've got more than a few megabytes of storage available. I'd definitely recommend looking into "flash-friendly" file systems, rather than just laying a disk-intended file system on the raw media. https://www.google.com/search?q=emmc+file+system looks to lead to some good articles.
Personally, I'd not be trying to run containers under OpenWrt as it is very much a purpose-built OS for routers and wireless on resource-constrained systems. Building on OpenWrt can be quite a challenge, especially as it used a version of libc intended for embedded systems which can be quite limited for general purpose systems. You might want to consider running OpenWrt in a container under a general-purpose Linux distribution instead.
Ok. I'll look into other filesystems, but I have one question related to the build. In make menuconfig you have that Target images option. I have ext4, squshfs and ubifs, but switching something on here doesn't mean that I will get that. My target needs to support that filesystem. Am I right?
Building on OpenWrt can be quite a challenge, especially as it used a version of libc intended for embedded systems which can be quite limited for general purpose systems
I understand that. I compiled kernel by myself and enabled a lot of features to start docker daemon (also using glibc), but it seems that something is still missing. But the question is not about that.
The boot loader needs to be able to read what ever file system the kernel is placed on and the compression used for the kernel. This may necessitate putting the kernel somewhere other than on a "fancy" file system.
The kernel needs to be able to read and write all the file systems in use.