Hello Pranab,

since I think by now that this topic is a little too complicated, for various reasons, for someone outside of Genode Labs and also because of my own interest in RISC-V, I have ported dde_rump to Genode. As said before, it is not much work in case one knows what has to be done, but for new people there a too many hurdles to take, I guess.

Anyway, you can find the issue under [1] and the commit you would need to cherry pick from my "issue4800_rump_riscv" branch under [2].

[1] https://github.com/genodelabs/genode/issues/4800
[2] 
https://github.com/ssumpf/genode/commit/471227cabb32b6412ad5366c2092e1007e19e845

Cheers,

Sebastian

On 3/28/23 07:44, Pranab Kumar Rout cs21m045 wrote:
Hi genodians,
I tried to proceed with Sebastian's suggestions.
When I fetched dde_rump from [ https://github.com/justincormack/netbsd-src <https://github.com/justincormack/netbsd-src> ] while preparing port for riscv, I received an error message as patch could not be applied.
Here is the error message:

    dde_rump  download https://github.com/justincormack/netbsd-src
    <https://github.com/justincormack/netbsd-src>
    dde_rump  git Cloning into 'src/lib/dde_rump'...
    Updating files: 100% (31930/31930), done./31930)
    dde_rump  update src/lib/dde_rump
    dde_rump  download
    https://github.com/justincormack/netbsd-src/trunk/src/sys/arch
    <https://github.com/justincormack/netbsd-src/trunk/src/sys/arch>
    dde_rump  download
    
https://github.com/justincormack/netbsd-src/trunk/src/common/lib/libc/arch/riscv/atomic
 
<https://github.com/justincormack/netbsd-src/trunk/src/common/lib/libc/arch/riscv/atomic>
    dde_rump  apply patches/rump.patch
    1 out of 1 hunk FAILED -- saving rejects to file
    src/lib/dde_rump/src/sys/sys/module.h.rej
    make[2]: *** [/genode/tool/ports/mk/install.mk:128 <http://install.mk:128>:
    phony/patches/patches/rump.patch] Error 1
    make[1]: *** [/genode/tool/ports/mk/prepare_single_port.mk:43
    <http://prepare_single_port.mk:43>: _install_in_port_dir] Error 2
    make: *** [tool/ports/prepare_port:47: dde_rump] Error 2


I didn't know, if am supposed to modify the patch file or the file (module.h). So I decided to move on with the previous repo (https://github.com/ssumpf/rump.git <https://github.com/ssumpf/rump.git>) and I manually added the missing header files in [ /genode/contrib/dde_rump-<hash>/src/lib/dde_rump/src/sys/sys ] that were required to build sculpt for virt riscv. The fatal error problem was gone but now while building sculpt I am getting the following error.

    COMPILE  vnode_if.o
         COMPILE  xlat_mbr_fstype.o
    make[7]: *** No rule to make target 'atomic_add_16.S', needed by
    'atomic_add_16.o'.  Stop.
    make[6]: *** [var/libdeps:184: rump.lib] Error 2
    make[5]: *** [Makefile:336: gen_deps_and_build_targets] Error 2
    make[4]: *** [/genode/tool/depot/mk/build_bin_archive:208:
    /genode/depot/genodelabs/bin/riscv/rump/2023-03-28-b.build/bin] Error 1
    make[3]: *** [/genode/depot/var/build.mk:264 <http://build.mk:264>:
    genodelabs/bin/riscv/rump/2023-03-28-b] Error 2
    make[2]: *** [/genode/tool/depot/build:136: execute_generated_build_mk_file]
    Error 2
    make[1]: *** [/genode/tool/depot/create:59: build] Error 2
    make[1]: Leaving directory '/genode/build/riscv'
    child process exited abnormally


I have found out that, there is no 'atomic_add_16.S' in (https://github.com/justincormack/netbsd-src/trunk/src/common/lib/libc/arch/riscv/atomic <https://github.com/justincormack/netbsd-src/trunk/src/common/lib/libc/arch/riscv/atomic>)
but its there for aarch64 which is not working for me as I am working on riscv.

These were the two problems I have faced, please give some comments on it and kindly suggest something through which I can proceed further.

thanks & regards
Pranab

On Fri, Mar 17, 2023 at 1:22 PM Sebastian Sumpf <[email protected] <mailto:[email protected]>> wrote:

    On 3/15/23 15:23, Pranab Kumar Rout cs21m045 wrote:
     > Hi all,
     > As I see in [1], when we prepare port for dde_rump, it fetches from [2]
    and not
     > from [3]. And I found that the "src/sys/sys/common_ansi.h" is not 
present in
     > [2]. May be for this reason while building sculpt the error came up. Also
    in [1]
     > I can see that its fetching libc files from
     > "/src/common/lib/libc/arch/aarch64/atomic" and not from
     > "/src/common/lib/libc/arch/riscv/atomic". Is it okay or should I update
    this in
     > [1] ?

    Yes.

    Cheers,

    Sebastian

     > [1] repos/dde_rump/ports/dde_rump.port
     >
    <https://github.com/genodelabs/genode/blob/master/repos/dde_rump/ports/dde_rump.port 
<https://github.com/genodelabs/genode/blob/master/repos/dde_rump/ports/dde_rump.port>>
     > [2] https://github.com/ssumpf/rump.git
    <https://github.com/ssumpf/rump.git> <https://github.com/ssumpf/rump.git
    <https://github.com/ssumpf/rump.git>>
     > [3] https://github.com/justincormack/netbsd-src
    <https://github.com/justincormack/netbsd-src>
     > <https://github.com/justincormack/netbsd-src
    <https://github.com/justincormack/netbsd-src>>
     >
     > Were you suggesting to update this thing ? Please have a look and suggest
    steps
     > I need to take.
     > I think this must be the reason for that fatal error. Kindly acknowledge.
     >
     > Regards,
     > Pranab
     >
     > On Mon, Mar 13, 2023 at 4:07 PM Sebastian Sumpf
    <[email protected] <mailto:[email protected]>
     > <mailto:[email protected]
    <mailto:[email protected]>>> wrote:
     >
     >     Hello Pranab,
     >
     >     On 3/13/23 07:47, Pranab Kumar Rout cs21m045 wrote:
     >      > Hello genodians,
     >      > While building sculpt for virt_qemu_riscv, I found that dde_rump
    port is not
     >      > prepared for RISCV. Taking help from the community, I used the 
same
     >     approach as
     >      > for arm_v8a (aarch64) as found under
     >     "repos/dde_rump/lib/mk/spec/arm_64/*" just
     >      > for "spec/riscv" in order to enable rump support for RISC-V.
     >      > I am getting this error. If you find it familiar, kindly help me
     >      > checking library dependencies...
     >      >    Library ldso_so_support
     >      >      COMPILE  so_support.o
     >      >      MERGE    ldso_so_support.lib.a
     >      >    Library ld
     >      >      CONVERT  ld.symbols.s
     >      >      ASSEMBLE ld.symbols.o
     >      >      MERGE ld.abi.so <http://ld.abi.so> <http://ld.abi.so
    <http://ld.abi.so>> <http://ld.abi.so <http://ld.abi.so> <http://ld.abi.so
    <http://ld.abi.so>>>
     >      >    Library base
     >      >      MERGE    base.lib.a
     >      >    Library block_session
     >      >      MERGE    block_session.lib.a
     >      >    Library config
     >      >      MERGE    config.lib.a
     >      >    Library file_system
     >      >      MERGE    file_system.lib.a
     >      >    Library file_system_session
     >      >      MERGE    file_system_session.lib.a
     >      >    Library os
     >      >      MERGE    os.lib.a
     >      >    Library rump_include
     >      >      MERGE    rump_include.lib.a
     >      >    Library rump
     >      >      COMPILE  __main.o
     >      > In file included from
     >      >
>  /genode/depot/genodelabs/src/rump/2023-03-07-b/src/lib/dde_rump/src/sys/sys/types.h:47,
     >      >                   from
     >      >
>  /genode/depot/genodelabs/src/rump/2023-03-07-b/src/lib/dde_rump/src/sys/lib/libkern/__main.c:33:
     >      >
>  /genode/depot/genodelabs/bin/riscv/rump/2023-03-07-b.build/var/libcache/rump/include/machine/ansi.h:3:10: fatal error: sys/common_ansi.h: No such file or directory
     >      >      3 | #include <sys/common_ansi.h>
     >      >        |  ^~~~~~~~~~~~~~~~~~~
     >
     >     When looking at
    "contrib/dde_rump-<hash>/src/lib/dde_rump_aarch64_backport" I
     >     can see that only "src/sys/arch" [1] is checked out from [2] while
     >     "common_ansi.h" resides under "src/sys/sys/common_ansi.h" [3].
    Therefore, you
     >     could adjust [1] to also checkout "src/sys" or "src/sys/sys" and
    update the
     >     "INC_DIR" and/or symlinks under "dde_rump/lib/mk/spec/riscv" 
accordingly.
     >
     >     [1] repos/dde_rump/ports/dde_rump.port
     >     [2] https://github.com/justincormack/netbsd-src
    <https://github.com/justincormack/netbsd-src>
     >     <https://github.com/justincormack/netbsd-src
    <https://github.com/justincormack/netbsd-src>>
     >     [3]
     >
    https://github.com/justincormack/netbsd-src/blob/master/src/sys/sys/common_ansi.h 
<https://github.com/justincormack/netbsd-src/blob/master/src/sys/sys/common_ansi.h> 
<https://github.com/justincormack/netbsd-src/blob/master/src/sys/sys/common_ansi.h 
<https://github.com/justincormack/netbsd-src/blob/master/src/sys/sys/common_ansi.h>>
     >
     >     *Note: When adjusting "dde_rump.port" you need to execute
     >
     >     ! ./tool/ports/update_hash dde_rump
     >
     >     in order to create a new hash for the port.
     >
     >     Regards,
     >
     >     Sebastian
     >
     >     --
     >     Sebastian Sumpf
     >     Genode Labs
     >
     > http://www.genode-labs.com <http://www.genode-labs.com>
    <http://www.genode-labs.com <http://www.genode-labs.com>> ·
    http://genode.org <http://genode.org>
     >     <http://genode.org <http://genode.org>>
     >
     >     Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
     >     Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth
     >
     >
     >
     >
     >
     >     _______________________________________________
     >     Genode users mailing list
     > [email protected] <mailto:[email protected]>
    <mailto:[email protected] <mailto:[email protected]>>
     > https://lists.genode.org/listinfo/users
    <https://lists.genode.org/listinfo/users>
     >     <https://lists.genode.org/listinfo/users
    <https://lists.genode.org/listinfo/users>>
     >
     >
     > _______________________________________________
     > Genode users mailing list
     > [email protected] <mailto:[email protected]>
     > https://lists.genode.org/listinfo/users
    <https://lists.genode.org/listinfo/users>

-- Sebastian Sumpf
    Genode Labs

    http://www.genode-labs.com <http://www.genode-labs.com> · http://genode.org
    <http://genode.org>

    Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
    Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth





    _______________________________________________
    Genode users mailing list
    [email protected] <mailto:[email protected]>
    https://lists.genode.org/listinfo/users
    <https://lists.genode.org/listinfo/users>


_______________________________________________
Genode users mailing list
[email protected]
https://lists.genode.org/listinfo/users

--
Sebastian Sumpf
Genode Labs

http://www.genode-labs.com · http://genode.org

Genode Labs GmbH · Amtsgericht Dresden · HRB 28424 · Sitz Dresden
Geschäftsführer: Dr.-Ing. Norman Feske, Christian Helmuth





_______________________________________________
Genode users mailing list
[email protected]
https://lists.genode.org/listinfo/users

Reply via email to