Skip to content

pkg/xipfs: add XIPFS as vfs module#21569

Merged
crasbe merged 1 commit intoRIOT-OS:masterfrom
GGuche-2XS-Univ-Lille:xipfs_pr
Jul 23, 2025
Merged

pkg/xipfs: add XIPFS as vfs module#21569
crasbe merged 1 commit intoRIOT-OS:masterfrom
GGuche-2XS-Univ-Lille:xipfs_pr

Conversation

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor

@GGuche-2XS-Univ-Lille GGuche-2XS-Univ-Lille commented Jun 30, 2025

Contribution description

This PR aims at integrating the eXecutable In-Place FileSystem into RIOT operating system.

XIPFS implements regular filesystem storage manipulation capabilities, but also allows
to run code almost directly from the FLASH memory
.
Just a little bit of RAM is used to relocate what's needed for the execution (data and bss).

It is provided like any other vfs module, and can be called through the defined vfs API.
Nonetheless, it can also be called directly through its own API (xipfs_* functions).

No matter the actual file size is, XIPFS deals with boards' Flash pages granularity.
For example, on Qorvo DWM1001, that means that with two files with different sizes less than 4 Kib,
vfs df will display 8 Kib used.

Due to XIPFS design, directories and files are stored in a similar way.
Echoing the remark above, that also means that an empty directory will cost one flashpage of
Flash memory.

This implementation has been developed and tested on a Decawave DW1001 board (Qorvo).
However, the Flash memory handling relies on available periph/flashpage.h, and should thus
run on any platform supporting addressable Flash memory.

A special constructor has been introduced to make XIPFS compatible with AUX slot mechanism.
As showcased in tests/pkg/xipfs, using xipfs_construct_from_flashpage with mtd_flash_aux_slot
will construct a vfs XIPFS mount point within RIOT's AUX slot memory area.

To build your own fae files, please see XIPFS Format.

Testing procedure

A manual advanced example and automated tests are provided.
Both are great resources to showcase XIPFS api and abilities.

To run the automated tests, please open a terminal with a pyterm, listening to the device.
Open another one and move to the tests/pkg/xipfs directory.
Now, please enter the following in this shell :

BOARD=dwm1001 QUIET=0 make flash

The first terminal should display something along the lines of following :

2025-06-30 10:33:13,159 # main(): This is RIOT! (Version: 05b96-xipfs_pr)
2025-06-30 10:33:13,167 # Tests started with vfs_xipfs_mount 0x20000224, awaiting for normal termination or assertion...
2025-06-30 10:33:25,171 # Tests finished.
2025-06-30 10:33:25,176 # Constructing vfs_xipfs_mount from mtd_flash_aux_slot...Done.
2025-06-30 10:33:25,182 # mtd_flash_aux_slot.offset : 120, mtd_flash_aux_slot.base.sector_count : 8
2025-06-30 10:33:25,188 # vfs_xipfs_mount.page_num : 8, vfs_xipfs_mount.page_addr : 0x78000
2025-06-30 10:33:25,196 # Tests started with vfs_xipfs_mount 0x200018c8, awaiting for normal termination or assertion...
2025-06-30 10:33:34,414 # Tests finished.

Tests are performed twice :
- First pass using a mount point created with respect to FLASH_WRITABLE_INIT, landing in section .flash_writable.,
- Second pass using a mount point created with respect to mtd_flash_aux_slot, at the end of Flash memory.
This can take a little while, as one pass consists of 130+ tests.

To run the manual example, please open a terminal with a pyterm, listening to the device.
Open another one and move to the examples/advanced/xipfs directory.
Now, please enter the following in this shell :

BOARD=dwm1001 QUIET=0 make flash

Come back to the pyterm terminal.
The resulting display should be similar to :

2025-06-30 14:03:14,938 # main(): This is RIOT! (Version: 05b96-xipfs_pr)
2025-06-30 14:03:14,942 # vfs_mount: "/dev/nvme0p0": OK
2025-06-30 14:03:14,947 # vfs_mount: "/dev/nvme0p1": OK

when XIPFS has already be run and has initialized the two mount points of the filesystem.

Now, please enter help

2025-06-30 14:04:25,124 # help
2025-06-30 14:04:25,127 # Command              Description
2025-06-30 14:04:25,130 # ---------------------------------------
2025-06-30 14:04:25,134 # exec                 Execute Hello World
2025-06-30 14:04:25,139 # pm                   interact with layered PM subsystem
2025-06-30 14:04:25,144 # ps                   Prints information about running threads.
2025-06-30 14:04:25,150 # saul                 interact with sensors and actuators using SAUL
2025-06-30 14:04:25,154 # version              Prints current RIOT_VERSION
2025-06-30 14:04:25,158 # reboot               Reboot the node
2025-06-30 14:04:25,162 # vfs                  virtual file system operations
2025-06-30 14:04:25,165 # ls                   list files
2025-06-30 14:04:25,170 # create_executable    Create an XIPFS executable file
2025-06-30 14:04:25,173 # execute              Execute an XIPFS file

exec is a more a demonstration than a regular shell command.
However it will dump an executable file named hello-world.fae, when none is stored onto /dev/nvme0p0;
and run hello-world.fae then.
The embedded file has been compiled for Qorvo dwm1001 board.
Please, use XIPFS Format to compile and build you own FAE file.
Display :

2025-06-30 14:11:57,608 # exec
2025-06-30 14:11:57,775 # Hello World!

execute is the XIPFS execution shell command to run an executable file.

2025-06-30 14:14:37,888 # execute /dev/nvme0p0/hello-world.fae One two three four five
2025-06-30 14:14:37,890 # Hello World!
2025-06-30 14:14:37,890 # One
2025-06-30 14:14:37,891 # two
2025-06-30 14:14:37,891 # three
2025-06-30 14:14:37,892 # four
2025-06-30 14:14:37,892 # five

create_executable is the shell command to create an executable_file.
Though create_executable takes a name and a bytesize, please remember that it will contain no code until filled by a write command.

 > create_executable /dev/nvme0p0/titi_exec 256
2025-06-30 14:28:23,104 # create_executable /dev/nvme0p0/titi_exec 256
ls /dev/nvme0p056
2025-06-30 14:28:30,733 # ls /dev/nvme0p0
2025-06-30 14:28:30,736 # hello-world.fae       1056 B
2025-06-30 14:28:30,737 # titi_exec
2025-06-30 14:28:30,738 # total 2 files
> vfs df
2025-06-30 14:28:42,101 # vfs df
2025-06-30 14:28:42,106 # Mountpoint              Total         Used    Available     Use%
2025-06-30 14:28:42,112 # /dev/nvme0p0           40 KiB        8 KiB       32 KiB      20%
2025-06-30 14:28:42,118 # /dev/nvme0p1           60 KiB          0 B       60 KiB       0%

This is continued from #21197.

@github-actions github-actions bot added Area: doc Area: Documentation Area: tests Area: tests and testing framework Area: build system Area: Build system Area: pkg Area: External package ports Area: sys Area: System Area: examples Area: Example Applications labels Jun 30, 2025
@crasbe crasbe self-assigned this Jul 1, 2025
@crasbe crasbe added Type: new feature The issue requests / The PR implemements a new feature for RIOT CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR labels Jul 1, 2025
@riot-ci
Copy link
Copy Markdown

riot-ci commented Jul 1, 2025

Murdock results

✔️ PASSED

8dc5007 pkg/xipfs: add XIPFS as vfs module

Success Failures Total Runtime
10525 0 10525 10m:28s

Artifacts

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

Am I wrong thinking that Clang specific command line options are passed to GCC toolchain ?
Excerpt :

arm-none-eabi-gcc: error: arm-none-eabi: No such file or directory
arm-none-eabi-gcc: error: arm-none-eabi: No such file or directory
arm-none-eabi-gcc: error: arm-none-eabi: No such file or directory
arm-none-eabi-gcc: error: unrecognized command-line option '-target'
arm-none-eabi-gcc: error: unrecognized command-line option '-target'
arm-none-eabi-gcc: error: unrecognized command-line option '-target'
arm-none-eabi-gcc: error: unrecognized command-line option '-target'
arm-none-eabi-gcc: error: unrecognized command-line option '-Wdocumentation'

After a bit of research, -target (here) and documentation related options (here) seem to be Clang-only compilation flags, as they don't appear in GCC command line options.

Is this a build system behavior triggered by our tests/pkg/xipfs Makefile, that we need to fix in some way ?

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

GGuche-2XS-Univ-Lille commented Jul 4, 2025

@crasbe Hi, could you please tell me if my last assumption is correct and what should I do to fix the build ?

@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented Jul 4, 2025

I'm not really sure at which point the arm-none-eabi-gcc is called, but yes, this is not suitable when using the LLVM toolchain.

As a quickfix, you could add TOOLCHAINS_BLACKLIST += llvm to the tests/pkg/xipfs/Makefile.

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

@crasbe Thanks for your quick reply, much appreciated. I followed your advice; we'll see how it goes.

@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented Jul 4, 2025

That looks better now. Some boards will not have enough memory to run the test code, which is what the Makefile.ci file is for that you find in many other tests and examples.

You can create it with make -C tests/pkg/xipfs generate-Makefile.ci on a powerful machine. Just be warned that this can take some time as the compilation runs in Docker. It also takes around 20GB or so of storage space.

I just ran it on our server and a lot of builds are failing with errors like this:

nucleo-l152re                           build failed
make[1]: Entering directory '/home/chris/RIOTstuff/riot-xipfs/RIOT/tests/pkg/xipfs'
/home/chris/RIOTstuff/riot-xipfs/RIOT/makefiles/toolchain/gnu.inc.mk:19: objcopy not found. Hex file will not be created.
rm -rf /home/chris/RIOTstuff/riot-xipfs/RIOT/tests/pkg/xipfs/bin/native64/pkg-build/cmsis
rm -rf /home/chris/RIOTstuff/riot-xipfs/RIOT/tests/pkg/xipfs/bin/native64/pkg-build/xipfs
Launching build container using image "docker.io/riot/riotbuild@sha256:21c416fbbb94a99c3d9c76341baf5a9740608b1d1af89967127c7a171248fd7b".
docker run --rm --tty --user $(id -u) --platform linux/amd64 -v '/usr/share/zoneinfo/Europe/Berlin:/etc/localtime:ro' -v '/home/chris/RIOTstuff/riot-xipfs/RIOT:/data/riotbuild/riotbase:delegated' -v '/home/chris/.cargo/registry:/data/riotbuild/.cargo/registry:delegated' -v '/home/chris/.cargo/git:/data/riotbuild/.cargo/git:delegated' -e 'RIOTBASE=/data/riotbuild/riotbase' -e 'CCACHE_BASEDIR=/data/riotbuild/riotbase' -e 'BUILD_DIR=/data/riotbuild/riotbase/build' -e 'BUILD_IN_DOCKER=/data/riotbuild/riotbase/tests/pkg/xipfs/1' -e 'RIOTPROJECT=/data/riotbuild/riotbase' -e 'RIOTCPU=/data/riotbuild/riotbase/cpu' -e 'RIOTBOARD=/data/riotbuild/riotbase/boards' -e 'RIOTMAKE=/data/riotbuild/riotbase/makefiles'      -e 'BOARD=nucleo-l152re' -e 'RIOT_CI_BUILD=1' -e 'BOARD=nucleo-l152re' -e 'RIOT_CI_BUILD=1' -e 'DISABLE_MODULE=' -e 'DEFAULT_MODULE=' -e 'FEATURES_REQUIRED=' -e 'FEATURES_BLACKLIST=' -e 'FEATURES_OPTIONAL=' -e 'USEMODULE=saul_default xipfs' -e 'USEPKG=xipfs' -e 'DISABLE_MODULE=' -e 'DEFAULT_MODULE=' -e 'FEATURES_REQUIRED=' -e 'FEATURES_BLACKLIST=' -e 'FEATURES_OPTIONAL=' -e 'USEMODULE=saul_default xipfs' -e 'USEPKG=xipfs'  -w '/data/riotbuild/riotbase/tests/pkg/xipfs/' 'docker.io/riot/riotbuild@sha256:21c416fbbb94a99c3d9c76341baf5a9740608b1d1af89967127c7a171248fd7b' make 'BOARD=nucleo-l152re' 'BOARD=nucleo-l152re'   -j64  all
Building application "tests_xipfs" for "nucleo-l152re" with CPU "stm32".

make[2]: Nothing to be done for 'all'.
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: error: /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(driver.o) uses VFP register arguments, /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/tests_xipfs.elf does not
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(driver.o)
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: error: /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(errno.o) uses VFP register arguments, /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/tests_xipfs.elf does not
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(errno.o)
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: error: /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(file.o) uses VFP register arguments, /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/tests_xipfs.elf does not
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(file.o)
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: error: /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(flash.o) uses VFP register arguments, /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/tests_xipfs.elf does not
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(flash.o)
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: error: /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(fs.o) uses VFP register arguments, /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/tests_xipfs.elf does not
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(fs.o)
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: error: /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(path.o) uses VFP register arguments, /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/tests_xipfs.elf does not
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(path.o)
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: error: /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(buffer.o) uses VFP register arguments, /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/tests_xipfs.elf does not
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(buffer.o)
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: error: /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(desc.o) uses VFP register arguments, /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/tests_xipfs.elf does not
/opt/gcc-arm-none-eabi-10.3-2021.10/bin/../lib/gcc/arm-none-eabi/10.3.1/../../../../arm-none-eabi/bin/ld: failed to merge target specific data of file /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/xipfs.a(desc.o)
collect2: error: ld returned 1 exit status
make: *** [/data/riotbuild/riotbase/Makefile.include:754: /data/riotbuild/riotbase/tests/pkg/xipfs/bin/nucleo-l152re/tests_xipfs.elf] Error 1
make[1]: *** [/home/chris/RIOTstuff/riot-xipfs/RIOT/makefiles/docker.inc.mk:386: ..in-docker-container] Error 2
make[1]: Leaving directory '/home/chris/RIOTstuff/riot-xipfs/RIOT/tests/pkg/xipfs'

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

@crasbe Thanks for the report.
I installed Docker and ran your command to generate the Makefile.ci file.

It also allowed to track the link time bug you reported.
I will re-run the Makefile.ci generation when this bug is fixed.

At first glance, it could be that the xipfs library would be compiled with different floating point options (-mfloat-abiand -mfpu, VFP) that the ones used to compile xipfs_tests.

I have not yet found the culprit, but xipfs library makefile seems to be a good candidate for deeper investigations.
There is definitely some odd thing happening since dwm1001 compilation failed with the CI, but I am able to build it locally.

More soon.

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

@crasbe I fixed the build and ran make -C tests/pkg/xipfs generate-Makefile.ci to generate the boards list when the footprint is too big.

For the record, xipfs built its library in build/ and then copy it in build/boardname/.
On successive calls to make in order to build for other boards, the build/xipfs.a was not rebuilt accordingly with appropriate compilation flags.
Then when compilation flags differ from one board to another, the build failed with the VFP message.

@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented Jul 9, 2025

And I guess you'll have to add a Makefile.ci for examples/advanced/xipfs as well 😅

The run on skyleaf suggests this:

BOARD_INSUFFICIENT_MEMORY := \
    blackpill-stm32f103c8 \
    bluepill-stm32f030c8 \
    bluepill-stm32f103c8 \
    i-nucleo-lrwan1 \
    nucleo-c031c6 \
    nucleo-f030r8 \
    nucleo-f031k6 \
    nucleo-f042k6 \
    nucleo-f302r8 \
    nucleo-f303k8 \
    nucleo-f334r8 \
    nucleo-l011k4 \
    nucleo-l031k6 \
    nucleo-l053r8 \
    samd10-xmini \
    slstk3400a \
    stk3200 \
    stm32f030f4-demo \
    stm32f0discovery \
    stm32g0316-disco \
    stm32l0538-disco \
    weact-g030f6 \
    #

Also it ran without errors, so that's good :)

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

GGuche-2XS-Univ-Lille commented Jul 10, 2025

@crasbe Thank you ! I've run the generation script and added the Makefile.ci to the xipfs example.

Copy link
Copy Markdown
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I tried it out on the DWM1001 and found a bug too. When you execute the tests/pkg/xipfs test first and then flash and run the examples/advanced/xipfs application, there is no file listed in the file system. After you execute exec, the file is known to the file system 🤔

2025-07-10 11:25:02,839 # Connect to serial port /dev/ttyACM0
Welcome to pyterm!
Type '/exit' to exit.
vfs df
2025-07-10 11:25:05,464 # vfs df
2025-07-10 11:25:05,469 # Mountpoint              Total         Used    Available     Use%
2025-07-10 11:25:05,475 # /dev/nvme0p0           40 KiB          0 B       40 KiB       0%
2025-07-10 11:25:05,481 # /dev/nvme0p1           60 KiB          0 B       60 KiB       0%
> exec
2025-07-10 11:25:23,349 # exec
2025-07-10 11:25:23,517 # Hello World!
> vfs df
2025-07-10 11:25:49,734 # vfs df
2025-07-10 11:25:49,740 # Mountpoint              Total         Used    Available     Use%
2025-07-10 11:25:49,746 # /dev/nvme0p0           40 KiB        4 KiB       36 KiB      10%
2025-07-10 11:25:49,752 # /dev/nvme0p1           60 KiB          0 B       60 KiB       0%

Attached you find some review comments. I did not really have time to go through everything as thoroughly as I'd like to.

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

@crasbe Thanks for your review.

The behavior you depict is not that a bug, but more a limitation of the implementation.

TL; DR : To sum it up, for now, XIPFS is not firmware upgrade resilient.

XIPFS relies on flashpage API.
When declaring a mountpoint, the code uses FLASH_WRITABLE_INIT.
This macro reserves the needed space in a section of the ELF (.flash_writable).

So when RIOTS OS gets flashed on the board, this section gets flashed too; and then, former mountpoints are lost.

You can trace the mountpoints reservation in *.map files.
In ./examples/advanced/xipfs/bin/dwm1001/xipfs.map :

.flash_writable
                0x0000c000    0x19000
 *(SORT_BY_NAME(.flash_writable.*))
 .flash_writable.xipfs_part_nvme0p0
                0x0000c000     0xa000 /home/greg/RIOT/examples/advanced/xipfs/bin/dwm1001/application_xipfs/main.o
 .flash_writable.xipfs_part_nvme0p1
                0x00016000     0xf000 /home/greg/RIOT/examples/advanced/xipfs/bin/dwm1001/application_xipfs/main.o

In ./tests/pkg/xipfs/bin/dwm1001/tests_xipfs.map :

.flash_writable
                0x0000a000    0x14000
 *(SORT_BY_NAME(.flash_writable.*))
 .flash_writable.xipfs_part_nvme0p0
                0x0000a000    0x14000 /home/greg/RIOT/tests/pkg/xipfs/bin/dwm1001/application_tests_xipfs/main.o

Note : if XIPFS mountpoints data are not persistent on boards flashing, they are regarding to power on/off cycle.
Just remove your usb cable from the board and put it back; mountpoints' contents will be still there.

@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented Jul 11, 2025

You are right, it even describes the behavior in the function documentation. I assumed that the file was automatically part of the file system after compilation, but of course, it has to be created first.

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

Is there someone for a code review please ?

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

@leandrolanzieri @aabadie @MichelRottleuthner @jia200x
Would it be possible for you please to have a look at this PR ?
Thank you.

@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented Jul 22, 2025

I already ping'ed the maintainers in our Matrix chat. Personally I have to allocate some time to give this an actual, thorough review and I did not have the time yet unfortunately :(

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

@crasbe thank you !

Copy link
Copy Markdown
Contributor

@crasbe crasbe left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think there is anything relevant to change here. The impact on the rest of the RIOT code is limited, so even if something slipped through, it wouldn't cause major issues.

Thanks for addressing all the review points and your patience.

@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented Jul 22, 2025

Please squash :)

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

GGuche-2XS-Univ-Lille commented Jul 23, 2025

@crasbe Thanks for the review and the approval !

I'm facing a Git issue right now.
I've synced this PR branch of my fork thanks to Github GUI (Sync fork button).
Then I've performed git rebase --autosquash with success, according to git.
Trying to push on my remote makes git reply with Everything up-to-date.

From what I understand, the autosquash were not properly applied.
The history of the local branch being the same than the remote one.

Would you have any tips to perform squashing ?
git rebase -i --autosquash does not work neither, because the list is empty (noop).

@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented Jul 23, 2025

This is a little bit more complicated unfortunately, because you have a lot of merge commits and you did the fixup commits relative to the merge commits and not to your initial commit.

What I did to get around this:

  1. Start from the master branch:
git checkout master
  1. Create a new, "empty" branch to work in:
git checkout -b xipfs_pr_tmp
  1. Cherry-pick only the six commits that are not merge messages:
git cherry-pick f7a4bc4bdb77fb5fd60c962b4215024eeac00931 5bd5d175633c112f6ab69f30041a20e1039c2b89 96c3409b2f7d4f2a22f3c0244a922e9a74cbcd0a b16322f12bc8b344dd380d6874ac9095b702ada1 b16322f12bc8b344dd380d6874ac9095b702ada1 a0c4983c96669f9f338535349560c43125143b1d d84cfd05d8846649f2011d4aee927828ab5c6cfe
  1. Check that the commits were all selected:
git log --oneline -n6

This is what the output looks like:

buechse@skyleaf:~/RIOTstuff/riot-xipfs/RIOT$ git log --oneline -n6
7295865a12 (HEAD -> xipfs_pr_tmp) fixup! Merge branch 'RIOT-OS:master' into xipfs_pr
fe509f3fd8 fixup! Merge branch 'RIOT-OS:master' into xipfs_pr
e169a0c3bc fixup! Merge branch 'RIOT-OS:master' into xipfs_pr
39d1e84948 fixup! fixup! Merge branch 'RIOT-OS:master' into xipfs_pr
15b67f5625 fixup! Merge branch 'RIOT-OS:master' into xipfs_pr
8123f0a30c pkg/xipfs: add XIPFS as vfs module
  1. Manually rebase and squash the commits: Replace the pick in the text editor with fixup for the fixup-commits:
git rebase -i HEAD~6
Screenshot 2025-07-23 112227
  1. Check that everything worked as expected:
git log --oneline -n1
buechse@skyleaf:~/RIOTstuff/riot-xipfs/RIOT$ git log --oneline -n1
5578f29a79 (HEAD -> xipfs_pr_tmp) pkg/xipfs: add XIPFS as vfs module
  1. Rename the original branch to xipfs_pr_old:
git branch -m xipfs_pr xipfs_pr_old
  1. Rename the working branch to xipfs_pr:
git branch -m xipfs_pr_tmp xipfs_pr
  1. Force-push the new branch to the remote Github repository:
git push origin xipfs_pr --force-with-lease
  1. When everything worked, you can delete the old branch:
git branch -D xipfs_pr_old

@crasbe
Copy link
Copy Markdown
Contributor

crasbe commented Jul 23, 2025

For the future I would recommend you to avoid adding Merge commits by not using the Github Sync button for the PR branch, but only for the master branch.

Then you can manually rebase the PR branch on the console with:

git checkout master

git pull

git checkout xipfs_pr

git rebase master

However in general you don't have to sync the branches at all if no merge conflict arises due to other PRs that were merged.

@GGuche-2XS-Univ-Lille
Copy link
Copy Markdown
Contributor Author

@crasbe Thank you a bunch for taking time and coming with this solution. I owe you one.

I've followed your procedure and I'll be sticking to your workflow in the future.
Now let's see how it goes.

You saved my day 👍

@crasbe crasbe added this pull request to the merge queue Jul 23, 2025
Merged via the queue into RIOT-OS:master with commit 8465107 Jul 23, 2025
25 checks passed
@benpicco benpicco added this to the Release 2025.10 milestone Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Area: build system Area: Build system Area: doc Area: Documentation Area: examples Area: Example Applications Area: pkg Area: External package ports Area: sys Area: System Area: tests Area: tests and testing framework CI: ready for build If set, CI server will compile all applications for all available boards for the labeled PR Type: new feature The issue requests / The PR implemements a new feature for RIOT

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants