Re: java for arm_v7a

2023-03-21 Thread Sebastian Sumpf

Hi Divya,

On 3/21/23 09:02, Divya Sharma wrote:
 

On Tue, Mar 21, 2023 at 12:24 PM Sebastian Sumpf 
mailto:sebastian.su...@genode-labs.com>> wrote:


Hi Divya,

On 3/18/23 18:07, Divya Sharma wrote:
 > Hello Genodians, I am reaching out to you regarding our efforts to build 
a
 > sculpt image that supports Java on arm v7a. During the compilation
process, we
 > encountered the following errors:
 > [init] Error: allocation of read-write segment failed
 > [init] Error: runtime: out of RAM during ELF loading [init -> log_kernel]
Error:
 > ROM-session creation failed (ram_quota=6144, cap_quota=3, label="log")
[init ->
 > log_kernel] Error: Could not open ROM session for "log" [init -> 
log_kernel]
 > Error: Uncaught exception of type
'Genode::Rom_connection::Rom_connection_failed'
 > Also attached log file and please provide some suggestions to solve this.

could you run your scenario with the "LOG=core" option enabled and send the
serial log output here again?

! make KERNEL=hw BOARD= LOG=core SCULPT=default run/sculpt_test



Okay, I see. There is a problem with ELF loading in init (out of RAM). Also this 
has nothing to do with Java, but with Sculpt startup on Qemu. You seem to start 
Sculpt on the "virt_qemu_arm_v7a" in Qemu. This is unsupported on current master 
(sculpt.run says "Platform is unsupported."), which means, either you have 
modified the scenario on your own, or operate on someone else's unsupported 
branch. Either way, I do not know your setup, and  therefore, cannot reproduce 
it. The first step to debug this, would be to find out why "init" does not have 
enough RAM to load an ELF and what ELF it tries to load. Maybe it is already 
enough to increase the RAM quota of the "runtime" in "sculpt.run".


Regards,

Sebastian

--
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
users@lists.genode.org
https://lists.genode.org/listinfo/users


Re: Rockchip USB revisited

2023-03-21 Thread Michael Grunditz
In message 
  Stefan Kalkowski  wrote:

> Hi Michael,

> On Mon, Mar 20, 2023 at 03:29:48PM +0100, Michael Grunditz wrote:
>> Hi again,
>> 
>> How does the dts extraction work? I would like to have a local copy in
>> the repo.. In order to build the driver I needed to do brute force
>> hacks into dde_linux.. can I override files from it in my repo?

> We provide a device tree source extraction tool in `tool/dts/extract`.
> You can see how it is used, e.g., within
> `genode-imx/src/drivers/linux_mnt_reform2_drv_target.inc` at the end
> of the file.

> First you need to preprocess the Linux original device tree source,
> and then use `extract --select XXX --select YYY` to extract the nodes
> and their transitive closure you're interested in.
Ok. I tried my best to get the dts to be included but all I got was empty 
file. I actually injected it to th kernel tree that I have on my vps ( 
tarball)



> Regarding the shadowing of files within dde_linux: I would
> try to avoid that as far as possible to stay update compliant. Maybe
> you can explain in more detail where it doesn't fit your needs?
> But of course it is possible to use or not use whatever shadow file
> exists within dde_linux. In that case you might need to avoid the
> usage of `repos/dde_linux/lib/import/import-lx_emul_common.inc`, and
> define your own stripped version of it defining what file is included
> exactly.

OK. Yes I don't want to hack in dde_linux, but on the other hand, it isn't 
goood to patch the kernel in page handling. I will make a diff next week 
so you can look at it. I added a couple of things to pg_table and page. 
The thing is , I am using a newer kernel than the one you use for 
alwinner.

I can use the public kernel , since it got the required phy driver.
I just got the little task to bring up PCIe on rk3399 -:) So I will be 
occupied with that for a while.


-- 
Best regards,
Michael Grunditz

**  **

___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users


Re: [depot_autoremove] Removing outdated PGKs from the depot

2023-03-21 Thread Alice Domage

Dear Norman,

Or may you give implementing it a try to see which version makes you 
more comfortable in terms of simplicity?


Thank you for your feedback! Sure, I can proceed with the implementation 
following your guidelines :)


Cheers,
Alice

___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users


Re: Rockchip USB revisited

2023-03-21 Thread Stefan Kalkowski
Hi Michael,

On Mon, Mar 20, 2023 at 03:29:48PM +0100, Michael Grunditz wrote:
> Hi again,
> 
> How does the dts extraction work? I would like to have a local copy in
> the repo.. In order to build the driver I needed to do brute force
> hacks into dde_linux.. can I override files from it in my repo?

We provide a device tree source extraction tool in `tool/dts/extract`.
You can see how it is used, e.g., within
`genode-imx/src/drivers/linux_mnt_reform2_drv_target.inc` at the end
of the file.

First you need to preprocess the Linux original device tree source,
and then use `extract --select XXX --select YYY` to extract the nodes
and their transitive closure you're interested in.

Regarding the shadowing of files within dde_linux: I would
try to avoid that as far as possible to stay update compliant. Maybe
you can explain in more detail where it doesn't fit your needs?
But of course it is possible to use or not use whatever shadow file
exists within dde_linux. In that case you might need to avoid the
usage of `repos/dde_linux/lib/import/import-lx_emul_common.inc`, and
define your own stripped version of it defining what file is included
exactly.

Regards
Stefan

> 
> Thanks,
> 
> Michael
> 
> ___
> Genode users mailing list
> users@lists.genode.org
> https://lists.genode.org/listinfo/users

-- 
Stefan Kalkowski
Genode labs

https://github.com/skalk | https://genode.org

___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users


Re: Rockchip USB revisited

2023-03-21 Thread Stefan Kalkowski
Hi Michael,

On Fri, Mar 17, 2023 at 09:35:08PM +0100, Michael Grunditz wrote:
> I got it to build with Rockchip kernel ,but the dts files are
> incomplete from the only public repo I know about. I will try BSP ,
> but I can't share that. The dts I have now , doesn't make any sense at
> all comparing the TRMs,

indeed re-using the vendor kernel and DTS makes a lot of sense. We
also went that way for MNT Reform 2, and the Pinephone. It is crucial,
following the Linux driver porting approach to be able to easily test
a downstripped variant of the Linux kernel on your target hardware to
be able to correlate runtime issues in between original driver and
ported version.

However, if it is not possible to reference the original sources, this
is quite unfortunate.

Regards
Stefan

> 
> ___
> Genode users mailing list
> users@lists.genode.org
> https://lists.genode.org/listinfo/users

-- 
Stefan Kalkowski
Genode labs

https://github.com/skalk | https://genode.org

___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users


Re: [depot_autoremove] Removing outdated PGKs from the depot

2023-03-21 Thread Norman Feske

Hello Alice,

I have a first implementation on the 'depot_remove' [1] branch. It can 
be improved or changed. Please note that this is a partial 
implementation. There are some TODOs comments. I also commented on it as 
much as possible for clarity.



[1] https://github.com/a-dmg/genode/tree/depot_remove


thanks a lot for sharing!

As I'm short of time until the end of this month, I only had a cursory 
glance. I may miss parts of the picture but the solution looks more 
complex than I thought. For example, I'm unable to quickly assess if 
cyclic dependencies (two bad pkgs that refer to each other in their 
archives files) may pose a risk.


In my perception, the complexity comes from the approach of building up 
an internal representation (introducing notions of graph, vertex, edges, 
neighbor along the way) instead of working with the plain file system 
directly.
  - Collect orphan archive reference by no PKG. Make that last step 
optional? As it requires traversing the depot for any other archive 
types. I am questioning myself if this is necessary.


That's what I had in mind in the first place - operating like a garbage 
collector. If we find that we ultimately need to traverse the depot 
anyway to implement this, I wonder what is gained by building up a 
cached internal representation of the depot structure beforehand. I 
foresee that we'd end up at a much more straight-forward solution by 
simply traversing the depot, and iterating this process until no further 
work can be done (no orphaned content remains in the depot), like I 
described in my previous posting.


If you don't find the idea worth pursuing, can you share why? Or may you 
give implementing it a try to see which version makes you more 
comfortable in terms of simplicity?


Cheers
Norman

--
Dr.-Ing. Norman Feske
Genode Labs

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

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


___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users


Re: java for arm_v7a

2023-03-21 Thread Divya Sharma
On Tue, Mar 21, 2023 at 12:24 PM Sebastian Sumpf <
sebastian.su...@genode-labs.com> wrote:

> Hi Divya,
>
> On 3/18/23 18:07, Divya Sharma wrote:
> > Hello Genodians, I am reaching out to you regarding our efforts to build
> a
> > sculpt image that supports Java on arm v7a. During the compilation
> process, we
> > encountered the following errors:
> > [init] Error: allocation of read-write segment failed
> > [init] Error: runtime: out of RAM during ELF loading [init ->
> log_kernel] Error:
> > ROM-session creation failed (ram_quota=6144, cap_quota=3, label="log")
> [init ->
> > log_kernel] Error: Could not open ROM session for "log" [init ->
> log_kernel]
> > Error: Uncaught exception of type
> 'Genode::Rom_connection::Rom_connection_failed'
> > Also attached log file and please provide some suggestions to solve this.
>
> could you run your scenario with the "LOG=core" option enabled and send
> the
> serial log output here again?
>
> ! make KERNEL=hw BOARD= LOG=core SCULPT=default run/sculpt_test
>
> Thanks,
>


>
> Sebastian
>
> > Regards
> > Divya
> >

I am attaching the log output generated by following your suggested option.

Best,
Divya.

>
> > On Fri, Mar 17, 2023 at 2:00 PM Sebastian Sumpf <
> sebastian.su...@genode-labs.com
> > > wrote:
> >
> > Hello Devashish,
> >
> > On 3/17/23 07:53, Devashish Dewangan cs21m017 wrote:
> >  >
> >  > Dear Genodians,
> >  >
> >  > The java.run for arm_v7a script was executed successfully and the
> log
> > output is
> >  > attached below.
> >  >
> >  > I have java program,
> >  >
> >  > // This is a simple Java program.
> >  > // FileName : "HelloWorld.java".
> >  >
> >  > class HelloWorld
> >  > {
> >  >// Your program begins with a call to main().
> >  >// Prints "Hello, World" to the terminal window.
> >  >public static void main(String args[])
> >  >{
> >  >  System.out.println("Hello, World");
> >  >}
> >  > }
> >  >
> >  >
> >  > I want to run the above code on genode sculpt, can you guide us to
> > execute it.
> >
> > There exists a package [1]. You would need to build and publish this
> in
> > order to
> > use it on Sculpt, e.g.,
> >
> > ! ./tool/depot/create /pkg/arm_v7a/jdk UPDATE_VERSIONS=1
> FORCE=1 -j6
> >
> > For a general description of Genode's package management please
> refer to [2].
> >
> > [1]
> https://github.com/genodelabs/genode-world/tree/master/recipes/pkg/jdk
> > <
> https://github.com/genodelabs/genode-world/tree/master/recipes/pkg/jdk>
> > [2]
> https://genode.org/documentation/developer-resources/package_management
> > <
> https://genode.org/documentation/developer-resources/package_management>
> >
> > Regards,
> >
> > Sebastian
> >
> > --
> > 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
> > users@lists.genode.org 
> > https://lists.genode.org/listinfo/users
> > 
> >
> >
> > ___
> > Genode users mailing list
> > users@lists.genode.org
> > 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
> users@lists.genode.org
> https://lists.genode.org/listinfo/users
>


armv7aLOG
Description: Binary data
___
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users


Re: java for arm_v7a

2023-03-21 Thread Sebastian Sumpf

Hi Divya,

On 3/18/23 18:07, Divya Sharma wrote:
Hello Genodians, I am reaching out to you regarding our efforts to build a 
sculpt image that supports Java on arm v7a. During the compilation process, we 
encountered the following errors:

[init] Error: allocation of read-write segment failed
[init] Error: runtime: out of RAM during ELF loading [init -> log_kernel] Error: 
ROM-session creation failed (ram_quota=6144, cap_quota=3, label="log") [init -> 
log_kernel] Error: Could not open ROM session for "log" [init -> log_kernel] 
Error: Uncaught exception of type 'Genode::Rom_connection::Rom_connection_failed'

Also attached log file and please provide some suggestions to solve this.


could you run your scenario with the "LOG=core" option enabled and send the 
serial log output here again?


! make KERNEL=hw BOARD= LOG=core SCULPT=default run/sculpt_test

Thanks,

Sebastian


Regards
Divya

On Fri, Mar 17, 2023 at 2:00 PM Sebastian Sumpf > wrote:


Hello Devashish,

On 3/17/23 07:53, Devashish Dewangan cs21m017 wrote:
 >
 > Dear Genodians,
 >
 > The java.run for arm_v7a script was executed successfully and the log
output is
 > attached below.
 >
 > I have java program,
 >
 > // This is a simple Java program.
 > // FileName : "HelloWorld.java".
 >
 > class HelloWorld
 > {
 >    // Your program begins with a call to main().
 >    // Prints "Hello, World" to the terminal window.
 >    public static void main(String args[])
 >    {
 >      System.out.println("Hello, World");
 >    }
 > }
 >
 >
 > I want to run the above code on genode sculpt, can you guide us to
execute it.

There exists a package [1]. You would need to build and publish this in
order to
use it on Sculpt, e.g.,

! ./tool/depot/create /pkg/arm_v7a/jdk UPDATE_VERSIONS=1 FORCE=1 -j6

For a general description of Genode's package management please refer to 
[2].

[1] https://github.com/genodelabs/genode-world/tree/master/recipes/pkg/jdk

[2] https://genode.org/documentation/developer-resources/package_management


Regards,

Sebastian

-- 
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
users@lists.genode.org 
https://lists.genode.org/listinfo/users



___
Genode users mailing list
users@lists.genode.org
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
users@lists.genode.org
https://lists.genode.org/listinfo/users