Skip to content

Commit

Permalink
kos/image_builder/einit/CMakeLists.txt: add extra mount options for p…
Browse files Browse the repository at this point in the history
…recompiled_vfsVfsNet

While working with NodeJS tests it was found that some of them (tests)
requires access to /etc/hosts file and so the getaddrinfo() call falls
to error.

The quote from developers:
> The issue was nailed down to the ramdisk access for the entity which
> implements network access (precompiled_vfsVfsNet). As appropriated
> partition hasn't been mounted for it (so it is not exists for it). The
> access to the ramdisk is covered by another entity, called
> precompiled_vfsVfsRamFs. So it is required to configure (allow) access
> for the precompiled_vfsVfsNet to the ramdisk over explicit properties.
>
> Besides of that it is required to add the 'hosts' file to the romfs
> image, to make it accessible by application over /etc mount from romfs.

TFS: nodejs#82

Signed-off-by: Vadim Lomovtsev <vadim.lomovtsev@auriga.com>
  • Loading branch information
Vadim Lomovtsev committed Feb 14, 2023
1 parent f8733c4 commit a503da2
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions kos/image_builder/einit/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,16 @@ set_target_properties (${certificate_storage_ENTITY} PROPERTIES
EXTRA_ENV "\
VFS_FILESYSTEM_BACKEND: client:${ROOTFS_ENTITY}")

set_target_properties (${precompiled_vfsVfsNet} PROPERTIES
EXTRA_ARGS "\
- -l
- devfs /dev devfs 0
- -l
- romfs /etc romfs 0")

# add hosts file to romfs image, to be used by application
list (APPEND FILES $ENV{BUILD_ROOT}/image_builder/resources/rootfs/etc/hosts)

set_target_properties (${FS_BACKEND} PROPERTIES
EXTRA_ARGS "\
- -l
Expand Down

0 comments on commit a503da2

Please sign in to comment.