Ext4 write functionality in cboot is not implemented.Any option to add support?

Hi ,
I’m using Jetson NX with L4T 32.4.3. I have created a small partition and I am mounting it in cboot and reading the file contents.The read call succeeds.But I am unable to write to it .The read call is using fs_read_file() call. Similarly I try to write from cboot using fs_write_file() call. But that fails. Also it seems that the write call is not implemented.

if (!handle->mount->api->write)
return ERR_NOT_SUPPORTED;

I get ERR_NOT_SUPPORTED on calling that function.
Also It seems for the ext4 filesystem the write function is not implemented,
static const struct fs_api ext4_api = {
.mount = ext4_mount,
.unmount = ext2_unmount,
.open = ext4_open_file,
.stat = ext2_stat_file,
.read = ext4_read_file,
.close = ext2_close_file,
};

Is there any other alternative way I could save a state of variable in cboot and get it back in next boot. Please provide some pointers if there are any.

There are a few options depending on how often you need to write and how much storage you need…

  • If you don’t use the a/b boot process, you could use the BMP_b partition on the emmc. It’s 192k. Don’t format it. Just use it raw.
  • If you have a tiny amount of data and don’t write it often, you could use the module eeprom. There are a few bytes available there.
  • Don’t format your small partition with a filesystem and just read/write to it raw.