Hi Rumen,
> I want to test out lwext4, however when I try to compile it, I get an error that ext4.h was not found. I have attached my main.cc, target.mk and squid.run files below. The platform I am using is x86_64 linux. If anyone knows has any idea how to link the lwext4
library please let me know, as I could not find much information online.
> […]
> TARGET = squid
> SRC_CC = main.cc
> LIBS = posix vfs_lwext4
you have to use the 'lwext4' library rather than 'vfs_lwext4', which
itself is a user of the library and a VFS plugin dynamically loaded at
run-time. The plugin may illustrate how to interact with the library,
you have to provide your own block backend though.
That being said, if you only want to access an Ext4 file-system from
your component adapting the configuration to use of the existing
VFS lwext4 plugin is easier. The run-script you have shown is actually
configured in this way and the VFS fs plugin (instantiated via the '<fs/>'
node) should already allow for accssing the file-system via the pre
configured 'vfs' server utilizing the VFS lwext4 plugin.
Your squid component, one the other hand, has to be adapted. I noticed
that you reference the 'posix' library in your target.mk. This, however,
implies using a component making use of the 'libc' and requiring the
common 'main()' function as entry-point for the component. So, depending
on what you want to achieve, building a POSIX component entails solely
linking against 'posix' and 'libc' and only utilize the POSIX API.
If you want to go down the road of building a native Genode component
I suggest to take a look at the 'fs_tool' (repos/gems/src/app/fs_tool)
component that excercises Genode's native API and also makes use of the
VFS still allowing for using 'vfs_lwext4'.
Of course you are still free to use 'lwext4' directly but that is more
involved and subtly advised against that.
Regards
Josef
--
Josef Söntgen
Genode Labs
http://www.genode-labs.com/ ·
http://genode.org/