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.
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 <user>/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
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.
Regards Divya
On Fri, Mar 17, 2023 at 2:00 PM Sebastian Sumpf < Sebastian.Sumpf@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 <user>/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
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=<board> LOG=core SCULPT=default run/sculpt_test
Thanks,
Sebastian
Regards Divya
On Fri, Mar 17, 2023 at 2:00 PM Sebastian Sumpf <Sebastian.Sumpf@genode-labs.com mailto:Sebastian.Sumpf@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 <user>/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://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 users@lists.genode.org <mailto:users@lists.genode.org> https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
On Tue, Mar 21, 2023 at 12:24 PM Sebastian Sumpf < Sebastian.Sumpf@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=<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.Sumpf@genode-labs.com
mailto:Sebastian.Sumpf@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 <user>/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%3E
[2]
https://genode.org/documentation/developer-resources/package_management
<
https://genode.org/documentation/developer-resources/package_management%3E
Regards, Sebastian -- Sebastian Sumpf Genode Labs http://www.genode-labs.com <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 <mailto:users@lists.genode.org> https://lists.genode.org/listinfo/users <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
Hi Divya,
On 3/21/23 09:02, Divya Sharma wrote:
On Tue, Mar 21, 2023 at 12:24 PM Sebastian Sumpf <Sebastian.Sumpf@genode-labs.com mailto:Sebastian.Sumpf@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=<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
Hello Genodians,
I am able to run java.run in virt_qemu-arm_v7a. The output is directed to log [ stdout="/dev/log" ], is there a way to redirect the sdtout to terminal [ stdout="/dev/terminal" ] instead of log?
On Tue, Mar 21, 2023 at 5:16 PM Sebastian Sumpf < Sebastian.Sumpf@genode-labs.com> wrote:
Hi Divya,
On 3/21/23 09:02, Divya Sharma wrote:
On Tue, Mar 21, 2023 at 12:24 PM Sebastian Sumpf <Sebastian.Sumpf@genode-labs.com mailto:Sebastian.Sumpf@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=<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
Hello Genodians,
I am able to run java.run in virt_qemu-arm_v7a. The output is directed to log [ stdout="/dev/log" ], is there a way to redirect the sdtout to terminal [ stdout="/dev/terminal" ] instead of log?
My two cents : the way I do it here is to modify the "config" scenario file this way:
- keep stdout set to "/dev/log"
- modify the routing to : <route> <service name="LOG"> <child name="terminal_log"> ...
- add a terminal_log component
- add a terminal component.
It works for me... But if there is a way to specify stdout="/dev/terminal" instead, that might be of interest to me as well.
Cedric
While running the java.run script I got the following error [1]showing out of memory allocation. Kindly suggest the way to remove it rather than build all the required dependencies and packages from scratch.
[1]/usr/local/genode/tool/21.05/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/as: out of memory allocating 9223372036854841471 bytes after a total of 696320 bytes
Best Regards, DIvya,
On Wed, Apr 5, 2023 at 11:02 PM ttcoder@netcourrier.com wrote:
Hello Genodians,
I am able to run java.run in virt_qemu-arm_v7a. The output is directed to log [ stdout="/dev/log" ], is there a way to redirect the sdtout to terminal [ stdout="/dev/terminal" ] instead of log?
My two cents : the way I do it here is to modify the "config" scenario file this way:
- keep stdout set to "/dev/log"
- modify the routing to : <route> <service name="LOG"> <child
name="terminal_log"> ...
- add a terminal_log component
- add a terminal component.
It works for me... But if there is a way to specify stdout="/dev/terminal" instead, that might be of interest to me as well.
Cedric
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Hello Divya,
On 4/8/23 07:45, Divya Sharma wrote:
While running the java.run script I got the following error [1]showing out of memory allocation. Kindly suggest the way to remove it rather than build all the required dependencies and packages from scratch.
[1]/usr/local/genode/tool/21.05/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/as: out of memory allocating 9223372036854841471 bytes after a total of 696320 bytes
This looks like as if it happens when linking the boot modules of the image together. Maybe there are too many modules and something got too big? By the size of the allocation clearly something did overflow, but it's hard to tell without the actual scenario. What did you change in the "java.run" script?
Regards,
Sebastian
On Wed, Apr 5, 2023 at 11:02 PM <ttcoder@netcourrier.com mailto:ttcoder@netcourrier.com> wrote:
Hello Genodians, I am able to run java.run in virt_qemu-arm_v7a. The output is directed to log [ stdout="/dev/log" ], is there a way to redirect the sdtout to terminal [ stdout="/dev/terminal" ] instead of log?
My two cents : the way I do it here is to modify the "config" scenario file this way: - keep stdout set to "/dev/log" - modify the routing to : <route> <service name="LOG"> <child name="terminal_log"> ... - add a terminal_log component - add a terminal component. It works for me... But if there is a way to specify stdout="/dev/terminal" instead, that might be of interest to me as well. Cedric _______________________________________________ Genode users mailing list users@lists.genode.org <mailto:users@lists.genode.org> https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Thanks, Sebastian issue is resolved.
I want to run simple java code using java binary into bash shell. To achieve it I figured out some modification to the separate run script user_shell_dev.run from bash.run script .But those did not work load java vm in shell. While booting in Qemu i got the error [1] ,[3] also i am able to spawn a shell into the terminal but while running java in it got [2]. It is not able to initialize the vm to run java. Kindly suggest a way to achieve this .
[1][init -> java] Error occurred during initialization of VM init -> java] java.lang.UnsatisfiedLinkError: no zip in java.library.path [2]Error occurred during the initialization of vm. Unable to load zip lib "zip.lib.so"
[3][init -> /bin/bash -> 1] Error: ROM-session creation failed (ram_quota=6144, cap_quota=3, label="zip.lib.so")
Thanks, DIvya.
On Mon, Apr 10, 2023 at 3:52 PM Sebastian Sumpf < Sebastian.Sumpf@genode-labs.com> wrote:
Hello Divya,
On 4/8/23 07:45, Divya Sharma wrote:
While running the java.run script I got the following error [1]showing
out of
memory allocation. Kindly suggest the way to remove it rather than build all the required dependencies and packages from scratch.
[1]/usr/local/genode/tool/21.05/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/as: out of memory allocating 9223372036854841471 bytes after a total of 696320 bytes
This looks like as if it happens when linking the boot modules of the image together. Maybe there are too many modules and something got too big? By the size of the allocation clearly something did overflow, but it's hard to tell without the actual scenario. What did you change in the "java.run" script?
Regards,
Sebastian
On Wed, Apr 5, 2023 at 11:02 PM <ttcoder@netcourrier.com mailto:ttcoder@netcourrier.com> wrote:
Hello Genodians, I am able to run java.run in virt_qemu-arm_v7a. The output is
directed to
log [ stdout="/dev/log" ], is there a way to redirect the sdtout to terminal [ stdout="/dev/terminal" ] instead of log?
My two cents : the way I do it here is to modify the "config"
scenario file
this way: - keep stdout set to "/dev/log" - modify the routing to : <route> <service name="LOG"> <child name="terminal_log"> ... - add a terminal_log component - add a terminal component. It works for me... But if there is a way to specify
stdout="/dev/terminal"
instead, that might be of interest to me as well. Cedric _______________________________________________ Genode users mailing list users@lists.genode.org <mailto:users@lists.genode.org> https://lists.genode.org/listinfo/users <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
While using the *javax.crypto.** library in a Java application,I got the following error [1] ,[2]saying that "Can not initialize the cryptographic mechanism". While inspecting the default policies got to know that permissions are already granted for all algorithms. We also set those to unlimited in java code itself using the [3] and [4]. Still could not resolve the issue.Is there anything that we are missing out on? kindly give some suggestions on it .
[1]java.lang.SecurityException: Can not initialize cryptographic mechanism [2]java.lang.SecurityException: Can't read cryptographic policy directory: unlimited [3] Security.setProperty("crypto.policy", "unlimited"); [4] System.setProperty("java.security.properties","unlimited");
Best , DIvya.
On Mon, Apr 10, 2023 at 6:49 PM Divya Sharma divyasharma26546@gmail.com wrote:
Thanks, Sebastian issue is resolved.
I want to run simple java code using java binary into bash shell. To achieve it I figured out some modification to the separate run script user_shell_dev.run from bash.run script .But those did not work load java vm in shell. While booting in Qemu i got the error [1] ,[3] also i am able to spawn a shell into the terminal but while running java in it got [2]. It is not able to initialize the vm to run java. Kindly suggest a way to achieve this .
[1][init -> java] Error occurred during initialization of VM init -> java] java.lang.UnsatisfiedLinkError: no zip in java.library.path [2]Error occurred during the initialization of vm. Unable to load zip lib "zip.lib.so"
[3][init -> /bin/bash -> 1] Error: ROM-session creation failed (ram_quota=6144, cap_quota=3, label="zip.lib.so")
Thanks, DIvya.
On Mon, Apr 10, 2023 at 3:52 PM Sebastian Sumpf < Sebastian.Sumpf@genode-labs.com> wrote:
Hello Divya,
On 4/8/23 07:45, Divya Sharma wrote:
While running the java.run script I got the following error [1]showing
out of
memory allocation. Kindly suggest the way to remove it rather than build all the required dependencies and packages from scratch.
[1]/usr/local/genode/tool/21.05/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/as: out of memory allocating 9223372036854841471 bytes after a total of 696320 bytes
This looks like as if it happens when linking the boot modules of the image together. Maybe there are too many modules and something got too big? By the size of the allocation clearly something did overflow, but it's hard to tell without the actual scenario. What did you change in the "java.run" script?
Regards,
Sebastian
On Wed, Apr 5, 2023 at 11:02 PM <ttcoder@netcourrier.com mailto:ttcoder@netcourrier.com> wrote:
Hello Genodians, I am able to run java.run in virt_qemu-arm_v7a. The output is
directed to
log [ stdout="/dev/log" ], is there a way to redirect the sdtout to terminal [ stdout="/dev/terminal" ] instead of log?
My two cents : the way I do it here is to modify the "config"
scenario file
this way: - keep stdout set to "/dev/log" - modify the routing to : <route> <service name="LOG"> <child name="terminal_log"> ... - add a terminal_log component - add a terminal component. It works for me... But if there is a way to specify
stdout="/dev/terminal"
instead, that might be of interest to me as well. Cedric _______________________________________________ Genode users mailing list users@lists.genode.org <mailto:users@lists.genode.org> https://lists.genode.org/listinfo/users <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
Hello Divya,
On 4/13/23 05:55, Divya Sharma wrote:
While using the *javax.crypto.** library in a Java application,I got the following error [1] ,[2]saying that "Can not initialize the cryptographic mechanism". While inspecting the default policies got to know that permissions are already granted for all algorithms. We also set those to unlimited in java code itself using the [3] and [4]. Still could not resolve the issue.Is there anything that we are missing out on? kindly give some suggestions on it .
[1]java.lang.SecurityException: Can not initialize cryptographic mechanism [2]java.lang.SecurityException: Can't read cryptographic policy directory: unlimited [3] Security.setProperty("crypto.policy", "unlimited"); [4] System.setProperty("java.security.properties","unlimited");
In [1] I see the following code:
! if (!Files.isDirectory(cryptoPolicyPath) ! || !Files.isReadable(cryptoPolicyPath)) { ! throw new SecurityException( ! "Can't read cryptographic policy directory: " + ! cryptoPolicyProperty); ! }
I would try to find out what "cryptoPolicyPath" is, what file is expected, and put the expected file at the right place in the run script (in the <vfs> node + boot modules).
[1] jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java.template
Regards,
Sebastian
On Mon, Apr 10, 2023 at 6:49 PM Divya Sharma <divyasharma26546@gmail.com mailto:divyasharma26546@gmail.com> wrote:
Thanks, Sebastian issue is resolved. I want to run simple java code using java binary into bash shell. To achieve it I figured out some modification to the separate run script user_shell_dev.run from bash.run script .But those did not work load java vm in shell. While booting in Qemu i got the error [1] ,[3] also i am able to spawn a shell into the terminal but while running java in it got [2]. It is not able to initialize the vm to run java. Kindly suggest a way to achieve this . [1][init -> java] Error occurred during initialization of VM init -> java] java.lang.UnsatisfiedLinkError: no zip in java.library.path [2]Error occurred during the initialization of vm. Unable to load zip lib "zip.lib.so <http://zip.lib.so>" [3][init -> /bin/bash -> 1] Error: ROM-session creation failed (ram_quota=6144, cap_quota=3, label="zip.lib.so <http://zip.lib.so>") Thanks, DIvya. On Mon, Apr 10, 2023 at 3:52 PM Sebastian Sumpf <Sebastian.Sumpf@genode-labs.com <mailto:Sebastian.Sumpf@genode-labs.com>> wrote: Hello Divya, On 4/8/23 07:45, Divya Sharma wrote: > While running the java.run script I got the following error [1]showing out of > memory allocation. > Kindly suggest the way to remove it rather than build all the required > dependencies and packages from scratch. > > > [1]/usr/local/genode/tool/21.05/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/as: out of memory allocating 9223372036854841471 bytes after a total of 696320 bytes > This looks like as if it happens when linking the boot modules of the image together. Maybe there are too many modules and something got too big? By the size of the allocation clearly something did overflow, but it's hard to tell without the actual scenario. What did you change in the "java.run" script? Regards, Sebastian > > > > On Wed, Apr 5, 2023 at 11:02 PM <ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com> > <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com>>> wrote: > > >> >> Hello Genodians, >> >> I am able to run java.run in virt_qemu-arm_v7a. The output is directed to >> log [ stdout="/dev/log" ], is there a way to redirect the sdtout to >> terminal [ stdout="/dev/terminal" ] instead of log? >> >> > > My two cents : the way I do it here is to modify the "config" scenario file > this way: > - keep stdout set to "/dev/log" > - modify the routing to : <route> <service name="LOG"> <child > name="terminal_log"> ... > - add a terminal_log component > - add a terminal component. > > It works for me... But if there is a way to specify stdout="/dev/terminal" > instead, that might be of interest to me as well. > > Cedric > > > _______________________________________________ > Genode users mailing list > users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > 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 > users@lists.genode.org <mailto:users@lists.genode.org> > 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 users@lists.genode.org <mailto:users@lists.genode.org> https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Thanks Sebastain. I found the "cryptoPolicyPath" [1] and the .policy file which grants the permission to use the algorithm. But I could not figure out how to add it in the VFS and boot module as you suggested . So the runtime scenario of java can have access to that policy file.
Also I tried to add that path [3] in INC_DIR+= of jvm.inc and java.inc but could not provide the access policy. Also during the booting of java i got the error [2] indicating the page fault occurs due to thread='pthread.0.
[1]GENODE_DIR]/contrib/jdk_generated-afb22ed3b35d8700b821722d2df871e6e2c53717/src/app/jdk/bin/conf/security/policy/unlimited/default_local.policy. [2]no RM attachment (READ pf_addr=0x0 pf_ip=0x2001ad90 from pager_object: pd='init -> java' thread='pthread.0') Warning: page fault, pager_object: pd='init -> java' thread='pthread.0' ip=0x2001ad90 fault-addr=0x0 type=no-page [3]$(JDK_GENERATED)/bin/conf/security/policy/unlimited \
DIvya.
On Thu, Apr 13, 2023 at 12:38 PM Sebastian Sumpf < Sebastian.Sumpf@genode-labs.com> wrote:
Hello Divya,
On 4/13/23 05:55, Divya Sharma wrote:
While using the *javax.crypto.** library in a Java application,I got the following error [1] ,[2]saying that "Can not initialize the
cryptographic
mechanism". While inspecting the default policies got to know that permissions are
already
granted for all algorithms. We also set those to unlimited in java code itself using the [3] and [4]. Still could not resolve the issue.Is there anything that we are missing
out on?
kindly give some suggestions on it .
[1]java.lang.SecurityException: Can not initialize cryptographic
mechanism
[2]java.lang.SecurityException: Can't read cryptographic policy
directory: unlimited
[3] Security.setProperty("crypto.policy", "unlimited"); [4] System.setProperty("java.security.properties","unlimited");
In [1] I see the following code:
! if (!Files.isDirectory(cryptoPolicyPath) ! || !Files.isReadable(cryptoPolicyPath)) { ! throw new SecurityException( ! "Can't read cryptographic policy directory: " + ! cryptoPolicyProperty); ! }
I would try to find out what "cryptoPolicyPath" is, what file is expected, and put the expected file at the right place in the run script (in the <vfs> node + boot modules).
[1] jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java.template
Regards,
Sebastian
On Mon, Apr 10, 2023 at 6:49 PM Divya Sharma <divyasharma26546@gmail.com mailto:divyasharma26546@gmail.com> wrote:
Thanks, Sebastian issue is resolved. I want to run simple java code using java binary into bash shell. To
achieve
it I figured out some modification to the separate run script user_shell_dev.run from bash.run script .But those did not work
load java
vm in shell. While booting in Qemu i got the error [1] ,[3] also i am able to
spawn a
shell into the terminal but while running java in it got [2]. It is not able to initialize the vm to run java. Kindly suggest a way to achieve this . [1][init -> java] Error occurred during initialization of VM init -> java] java.lang.UnsatisfiedLinkError: no zip in
java.library.path
[2]Error occurred during the initialization of vm. Unable to load zip lib "zip.lib.so <http://zip.lib.so>" [3][init -> /bin/bash -> 1] Error: ROM-session creation failed (ram_quota=6144, cap_quota=3, label="zip.lib.so <http://zip.lib.so
")
Thanks, DIvya. On Mon, Apr 10, 2023 at 3:52 PM Sebastian Sumpf <Sebastian.Sumpf@genode-labs.com <mailto:
Sebastian.Sumpf@genode-labs.com>>
wrote: Hello Divya, On 4/8/23 07:45, Divya Sharma wrote: > While running the java.run script I got the following error [1]showing out of > memory allocation. > Kindly suggest the way to remove it rather than build all the
required
> dependencies and packages from scratch. > > >
[1]/usr/local/genode/tool/21.05/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/as: out of memory allocating 9223372036854841471 bytes after a total of 696320 bytes
> This looks like as if it happens when linking the boot modules
of the image
together. Maybe there are too many modules and something got too
big? By
the size of the allocation clearly something did overflow, but it's
hard to
tell without the actual scenario. What did you change in the
"java.run" script?
Regards, Sebastian > > > > On Wed, Apr 5, 2023 at 11:02 PM <ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com> > <mailto:ttcoder@netcourrier.com <mailto:
ttcoder@netcourrier.com>>> wrote:
> > >> >> Hello Genodians, >> >> I am able to run java.run in virt_qemu-arm_v7a. The
output is
directed to >> log [ stdout="/dev/log" ], is there a way to redirect
the sdtout to
>> terminal [ stdout="/dev/terminal" ] instead of log? >> >> > > My two cents : the way I do it here is to modify the
"config"
scenario file > this way: > - keep stdout set to "/dev/log" > - modify the routing to : <route> <service name="LOG">
<child
> name="terminal_log"> ... > - add a terminal_log component > - add a terminal component. > > It works for me... But if there is a way to specify stdout="/dev/terminal" > instead, that might be of interest to me as well. > > Cedric > > > _______________________________________________ > Genode users mailing list > users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > 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 > users@lists.genode.org <mailto:users@lists.genode.org> > 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 users@lists.genode.org <mailto:users@lists.genode.org> https://lists.genode.org/listinfo/users <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
Hi Divya,
On 4/22/23 07:35, Divya Sharma wrote:
Thanks Sebastain. I found the "cryptoPolicyPath" [1] and the .policy file which grants the permission to use the algorithm. But I could not figure out how to add it in the VFS and boot module as you suggested . So the runtime scenario of java can have access to that policy file.
Also I tried to add that path [3] in INC_DIR+= of jvm.inc and java.inc but could not provide the access policy. Also during the booting of java i got the error [2] indicating the page fault occurs due to thread='pthread.0.
[1]GENODE_DIR]/contrib/jdk_generated-afb22ed3b35d8700b821722d2df871e6e2c53717/src/app/jdk/bin/conf/security/policy/unlimited/default_local.policy. [2]no RM attachment (READ pf_addr=0x0 pf_ip=0x2001ad90 from pager_object: pd='init -> java' thread='pthread.0') Warning: page fault, pager_object: pd='init -> java' thread='pthread.0' ip=0x2001ad90 fault-addr=0x0 type=no-page [3]$(JDK_GENERATED)/bin/conf/security/policy/unlimited \
Under the assumption that Java is looking for the path "/conf/security/policy/unlimited" and because the policy file is very small you could as a first step try to inline the contents of the file in the <vfs> node of the run script:
! <vfs> ! .... ! <dir name="conf"> ! <dir name="security"> ! <dir name="policy"> ! <dir name="unlimited"> ! <inline name="default_local.policy"> ! grant { ! // There is no restriction to any algorithms. ! permission javax.crypto.CryptoAllPermission; ! }; ! </inline> ! </dir> ! </dir> ! </dir> ! </dir> ! ! ... ! </vfs>
Once this is working you can later add it as a ROM module by modifying [1] and copy the file into the Java packet from which it can be accessed by the run script via.
! <rom name="default_local.policy"/>
which would replace the <inline> node above.
[1] repos/world/recipes/raw/jdk/content.mk
Good luck,
Sebastian
DIvya.
On Thu, Apr 13, 2023 at 12:38 PM Sebastian Sumpf <Sebastian.Sumpf@genode-labs.com mailto:Sebastian.Sumpf@genode-labs.com> wrote:
Hello Divya, On 4/13/23 05:55, Divya Sharma wrote: > While using the *javax.crypto.** library in a Java application,I got the > following error [1] ,[2]saying that "Can not initialize the cryptographic > mechanism". > While inspecting the default policies got to know that permissions are already > granted for all algorithms. > We also set those to unlimited in java code itself using the [3] and [4]. > Still could not resolve the issue.Is there anything that we are missing out on? > kindly give some suggestions on it . > > > [1]java.lang.SecurityException: Can not initialize cryptographic mechanism > [2]java.lang.SecurityException: Can't read cryptographic policy directory: unlimited > [3] Security.setProperty("crypto.policy", "unlimited"); > [4] System.setProperty("java.security.properties","unlimited"); > In [1] I see the following code: ! if (!Files.isDirectory(cryptoPolicyPath) ! || !Files.isReadable(cryptoPolicyPath)) { ! throw new SecurityException( ! "Can't read cryptographic policy directory: " + ! cryptoPolicyProperty); ! } I would try to find out what "cryptoPolicyPath" is, what file is expected, and put the expected file at the right place in the run script (in the <vfs> node + boot modules). [1] jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java.template Regards, Sebastian > > On Mon, Apr 10, 2023 at 6:49 PM Divya Sharma <divyasharma26546@gmail.com <mailto:divyasharma26546@gmail.com> > <mailto:divyasharma26546@gmail.com <mailto:divyasharma26546@gmail.com>>> wrote: > > Thanks, Sebastian issue is resolved. > > I want to run simple java code using java binary into bash shell. To achieve > it I figured out some modification to the separate run script > user_shell_dev.run from bash.run script .But those did not work load java > vm in shell. > While booting in Qemu i got the error [1] ,[3] also i am able to spawn a > shell into the terminal but while running java in it got [2]. > It is not able to initialize the vm to run java. > Kindly suggest a way to achieve this . > > > [1][init -> java] Error occurred during initialization of VM > init -> java] java.lang.UnsatisfiedLinkError: no zip in java.library.path > [2]Error occurred during the initialization of vm. > Unable to load zip lib "zip.lib.so <http://zip.lib.so> <http://zip.lib.so <http://zip.lib.so>>" > > [3][init -> /bin/bash -> 1] Error: ROM-session creation failed > (ram_quota=6144, cap_quota=3, label="zip.lib.so <http://zip.lib.so> <http://zip.lib.so <http://zip.lib.so>>") > > > Thanks, > DIvya. > > > On Mon, Apr 10, 2023 at 3:52 PM Sebastian Sumpf > <Sebastian.Sumpf@genode-labs.com <mailto:Sebastian.Sumpf@genode-labs.com> <mailto:Sebastian.Sumpf@genode-labs.com <mailto:Sebastian.Sumpf@genode-labs.com>>> > wrote: > > Hello Divya, > > On 4/8/23 07:45, Divya Sharma wrote: > > While running the java.run script I got the following error > [1]showing out of > > memory allocation. > > Kindly suggest the way to remove it rather than build all the required > > dependencies and packages from scratch. > > > > > > > [1]/usr/local/genode/tool/21.05/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/as: out of memory allocating 9223372036854841471 bytes after a total of 696320 bytes > > > > This looks like as if it happens when linking the boot modules of the image > together. Maybe there are too many modules and something got too big? By > the > size of the allocation clearly something did overflow, but it's hard to > tell > without the actual scenario. What did you change in the "java.run" script? > > Regards, > > Sebastian > > > > > > > > > On Wed, Apr 5, 2023 at 11:02 PM <ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com> > <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com>> > > <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com> <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com>>>> wrote: > > > > > >> > >> Hello Genodians, > >> > >> I am able to run java.run in virt_qemu-arm_v7a. The output is > directed to > >> log [ stdout="/dev/log" ], is there a way to redirect the sdtout to > >> terminal [ stdout="/dev/terminal" ] instead of log? > >> > >> > > > > My two cents : the way I do it here is to modify the "config" > scenario file > > this way: > > - keep stdout set to "/dev/log" > > - modify the routing to : <route> <service name="LOG"> <child > > name="terminal_log"> ... > > - add a terminal_log component > > - add a terminal component. > > > > It works for me... But if there is a way to specify > stdout="/dev/terminal" > > instead, that might be of interest to me as well. > > > > Cedric > > > > > > _______________________________________________ > > Genode users mailing list > > users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > <mailto:users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>>> > > https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users> > <https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>> > > <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 > > users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > > https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users> > <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://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 > users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > 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 > users@lists.genode.org <mailto:users@lists.genode.org> > 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 users@lists.genode.org <mailto:users@lists.genode.org> https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users
Thanks Sebastian, It worked.
DIvya.
On Sat, Apr 22, 2023 at 12:38 PM Sebastian Sumpf < Sebastian.Sumpf@genode-labs.com> wrote:
Hi Divya,
On 4/22/23 07:35, Divya Sharma wrote:
Thanks Sebastain. I found the "cryptoPolicyPath" [1] and the .policy file which grants
the
permission to use the algorithm. But I could not figure out how to add it in the VFS and boot module as
you
suggested . So the runtime scenario of java can have access to that policy file.
Also I tried to add that path [3] in INC_DIR+= of jvm.inc and java.inc
but
could not provide the access policy. Also during the booting of java i got the error [2] indicating the page
fault
occurs due to thread='pthread.0.
[1]GENODE_DIR]/contrib/jdk_generated-afb22ed3b35d8700b821722d2df871e6e2c53717/src/app/jdk/bin/conf/security/policy/unlimited/default_local.policy.
[2]no RM attachment (READ pf_addr=0x0 pf_ip=0x2001ad90 from
pager_object:
pd='init -> java' thread='pthread.0') Warning: page fault, pager_object: pd='init -> java' thread='pthread.0' ip=0x2001ad90 fault-addr=0x0 type=no-page [3]$(JDK_GENERATED)/bin/conf/security/policy/unlimited \
Under the assumption that Java is looking for the path "/conf/security/policy/unlimited" and because the policy file is very small you could as a first step try to inline the contents of the file in the <vfs> node of the run script:
! <vfs> ! .... ! <dir name="conf"> ! <dir name="security"> ! <dir name="policy"> ! <dir name="unlimited"> ! <inline name="default_local.policy"> ! grant { ! // There is no restriction to any algorithms. ! permission javax.crypto.CryptoAllPermission; ! }; ! </inline> ! </dir> ! </dir> ! </dir> ! </dir> ! ! ... ! </vfs>
Once this is working you can later add it as a ROM module by modifying [1] and copy the file into the Java packet from which it can be accessed by the run script via.
! <rom name="default_local.policy"/>
which would replace the <inline> node above.
[1] repos/world/recipes/raw/jdk/content.mk
Good luck,
Sebastian
DIvya.
On Thu, Apr 13, 2023 at 12:38 PM Sebastian Sumpf <Sebastian.Sumpf@genode-labs.com mailto:Sebastian.Sumpf@genode-labs.com>
wrote:
Hello Divya, On 4/13/23 05:55, Divya Sharma wrote: > While using the *javax.crypto.** library in a Java application,I
got the
> following error [1] ,[2]saying that "Can not initialize the
cryptographic
> mechanism". > While inspecting the default policies got to know that
permissions are
already > granted for all algorithms. > We also set those to unlimited in java code itself using the [3]
and [4].
> Still could not resolve the issue.Is there anything that we are
missing
out on? > kindly give some suggestions on it . > > > [1]java.lang.SecurityException: Can not initialize cryptographic
mechanism
> [2]java.lang.SecurityException: Can't read cryptographic policy directory: unlimited > [3] Security.setProperty("crypto.policy", "unlimited"); > [4] System.setProperty("java.security.properties","unlimited"); > In [1] I see the following code: ! if (!Files.isDirectory(cryptoPolicyPath) ! || !Files.isReadable(cryptoPolicyPath)) { ! throw new SecurityException( ! "Can't read cryptographic policy directory: " + ! cryptoPolicyProperty); ! } I would try to find out what "cryptoPolicyPath" is, what file is
expected, and
put the expected file at the right place in the run script (in the
<vfs> > node + > boot modules). > > [1] jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java.template > > Regards, > > Sebastian > > > > > On Mon, Apr 10, 2023 at 6:49 PM Divya Sharma < divyasharma26546@gmail.com > <mailto:divyasharma26546@gmail.com> > > <mailto:divyasharma26546@gmail.com <mailto: divyasharma26546@gmail.com>>> > wrote: > > > > Thanks, Sebastian issue is resolved. > > > > I want to run simple java code using java binary into bash shell. To > achieve > > it I figured out some modification to the separate run script > > user_shell_dev.run from bash.run script .But those did not work load > java > > vm in shell. > > While booting in Qemu i got the error [1] ,[3] also i am able to spawn a > > shell into the terminal but while running java in it got [2]. > > It is not able to initialize the vm to run java. > > Kindly suggest a way to achieve this . > > > > > > [1][init -> java] Error occurred during initialization of VM > > init -> java] java.lang.UnsatisfiedLinkError: no zip in > java.library.path > > [2]Error occurred during the initialization of vm. > > Unable to load zip lib "zip.lib.so <http://zip.lib.so> > <http://zip.lib.so <http://zip.lib.so>>" > > > > [3][init -> /bin/bash -> 1] Error: ROM-session creation failed > > (ram_quota=6144, cap_quota=3, label="zip.lib.so < http://zip.lib.so> > <http://zip.lib.so <http://zip.lib.so>>") > > > > > > Thanks, > > DIvya. > > > > > > On Mon, Apr 10, 2023 at 3:52 PM Sebastian Sumpf > > <Sebastian.Sumpf@genode-labs.com > <mailto:Sebastian.Sumpf@genode-labs.com> > <mailto:Sebastian.Sumpf@genode-labs.com > <mailto:Sebastian.Sumpf@genode-labs.com>>> > > wrote: > > > > Hello Divya, > > > > On 4/8/23 07:45, Divya Sharma wrote: > > > While running the java.run script I got the following error > > [1]showing out of > > > memory allocation. > > > Kindly suggest the way to remove it rather than build all the > required > > > dependencies and packages from scratch. > > > > > > > > > > > > [1]/usr/local/genode/tool/21.05/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/as: out of memory allocating 9223372036854841471 bytes after a total of 696320 bytes > > > > > > > This looks like as if it happens when linking the boot modules of > the image > > together. Maybe there are too many modules and something got too > big? By > > the > > size of the allocation clearly something did overflow, but it's > hard to > > tell > > without the actual scenario. What did you change in the > "java.run" script? > > > > Regards, > > > > Sebastian > > > > > > > > > > > > > > On Wed, Apr 5, 2023 at 11:02 PM < ttcoder@netcourrier.com > <mailto:ttcoder@netcourrier.com> > > <mailto:ttcoder@netcourrier.com <mailto: ttcoder@netcourrier.com>> > > > <mailto:ttcoder@netcourrier.com > <mailto:ttcoder@netcourrier.com> <mailto:ttcoder@netcourrier.com > <mailto:ttcoder@netcourrier.com>>>> wrote: > > > > > > > > >> > > >> Hello Genodians, > > >> > > >> I am able to run java.run in virt_qemu-arm_v7a. The output is > > directed to > > >> log [ stdout="/dev/log" ], is there a way to redirect the > sdtout to > > >> terminal [ stdout="/dev/terminal" ] instead of log? > > >> > > >> > > > > > > My two cents : the way I do it here is to modify the "config" > > scenario file > > > this way: > > > - keep stdout set to "/dev/log" > > > - modify the routing to : <route> <service name="LOG"> <child > > > name="terminal_log"> ... > > > - add a terminal_log component > > > - add a terminal component. > > > > > > It works for me... But if there is a way to specify > > stdout="/dev/terminal" > > > instead, that might be of interest to me as well. > > > > > > Cedric > > > > > > > > > _______________________________________________ > > > Genode users mailing list > > > users@lists.genode.org <mailto:users@lists.genode.org> > <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > > <mailto:users@lists.genode.org <mailto: users@lists.genode.org> > <mailto:users@lists.genode.org <mailto:users@lists.genode.org>>> > > > https://lists.genode.org/listinfo/users > <https://lists.genode.org/listinfo/users> > > <https://lists.genode.org/listinfo/users > <https://lists.genode.org/listinfo/users>> > > > <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 > > > users@lists.genode.org <mailto:users@lists.genode.org> > <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > > > https://lists.genode.org/listinfo/users > <https://lists.genode.org/listinfo/users> > > <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://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 > > users@lists.genode.org <mailto:users@lists.genode.org> > <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > > 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 > > users@lists.genode.org <mailto:users@lists.genode.org> > > 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 > users@lists.genode.org <mailto:users@lists.genode.org> > https://lists.genode.org/listinfo/users > <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
On 4/22/23 11:20, Divya Sharma wrote:
Thanks Sebastian, It worked.
I am glad it worked and thanks for the feedback!
Sebastian
DIvya.
On Sat, Apr 22, 2023 at 12:38 PM Sebastian Sumpf <Sebastian.Sumpf@genode-labs.com mailto:Sebastian.Sumpf@genode-labs.com> wrote:
Hi Divya, On 4/22/23 07:35, Divya Sharma wrote: > Thanks Sebastain. > I found the "cryptoPolicyPath" [1] and the .policy file which grants the > permission to use the algorithm. > But I could not figure out how to add it in the VFS and boot module as you > suggested . > So the runtime scenario of java can have access to that policy file. > > Also I tried to add that path [3] in INC_DIR+= of jvm.inc and java.inc but > could not provide the access policy. > Also during the booting of java i got the error [2] indicating the page fault > occurs due to thread='pthread.0. > > [1]GENODE_DIR]/contrib/jdk_generated-afb22ed3b35d8700b821722d2df871e6e2c53717/src/app/jdk/bin/conf/security/policy/unlimited/default_local.policy. > [2]no RM attachment (READ pf_addr=0x0 pf_ip=0x2001ad90 from pager_object: > pd='init -> java' thread='pthread.0') > Warning: page fault, pager_object: pd='init -> java' thread='pthread.0' > ip=0x2001ad90 fault-addr=0x0 type=no-page > [3]$(JDK_GENERATED)/bin/conf/security/policy/unlimited \ Under the assumption that Java is looking for the path "/conf/security/policy/unlimited" and because the policy file is very small you could as a first step try to inline the contents of the file in the <vfs> node of the run script: ! <vfs> ! .... ! <dir name="conf"> ! <dir name="security"> ! <dir name="policy"> ! <dir name="unlimited"> ! <inline name="default_local.policy"> ! grant { ! // There is no restriction to any algorithms. ! permission javax.crypto.CryptoAllPermission; ! }; ! </inline> ! </dir> ! </dir> ! </dir> ! </dir> ! ! ... ! </vfs> Once this is working you can later add it as a ROM module by modifying [1] and copy the file into the Java packet from which it can be accessed by the run script via. ! <rom name="default_local.policy"/> which would replace the <inline> node above. [1] repos/world/recipes/raw/jdk/content.mk <http://content.mk> Good luck, Sebastian > DIvya. > > On Thu, Apr 13, 2023 at 12:38 PM Sebastian Sumpf > <Sebastian.Sumpf@genode-labs.com <mailto:Sebastian.Sumpf@genode-labs.com> <mailto:Sebastian.Sumpf@genode-labs.com <mailto:Sebastian.Sumpf@genode-labs.com>>> wrote: > > Hello Divya, > > On 4/13/23 05:55, Divya Sharma wrote: > > While using the *javax.crypto.** library in a Java application,I got the > > following error [1] ,[2]saying that "Can not initialize the cryptographic > > mechanism". > > While inspecting the default policies got to know that permissions are > already > > granted for all algorithms. > > We also set those to unlimited in java code itself using the [3] and [4]. > > Still could not resolve the issue.Is there anything that we are missing > out on? > > kindly give some suggestions on it . > > > > > > [1]java.lang.SecurityException: Can not initialize cryptographic mechanism > > [2]java.lang.SecurityException: Can't read cryptographic policy > directory: unlimited > > [3] Security.setProperty("crypto.policy", "unlimited"); > > [4] System.setProperty("java.security.properties","unlimited"); > > > > In [1] I see the following code: > > ! if (!Files.isDirectory(cryptoPolicyPath) > ! || !Files.isReadable(cryptoPolicyPath)) { > ! throw new SecurityException( > ! "Can't read cryptographic policy directory: " + > ! cryptoPolicyProperty); > ! } > > I would try to find out what "cryptoPolicyPath" is, what file is expected, and > put the expected file at the right place in the run script (in the <vfs> > node + > boot modules). > > [1] jdk/src/java.base/share/classes/javax/crypto/JceSecurity.java.template > > Regards, > > Sebastian > > > > > On Mon, Apr 10, 2023 at 6:49 PM Divya Sharma <divyasharma26546@gmail.com <mailto:divyasharma26546@gmail.com> > <mailto:divyasharma26546@gmail.com <mailto:divyasharma26546@gmail.com>> > > <mailto:divyasharma26546@gmail.com <mailto:divyasharma26546@gmail.com> <mailto:divyasharma26546@gmail.com <mailto:divyasharma26546@gmail.com>>>> > wrote: > > > > Thanks, Sebastian issue is resolved. > > > > I want to run simple java code using java binary into bash shell. To > achieve > > it I figured out some modification to the separate run script > > user_shell_dev.run from bash.run script .But those did not work load > java > > vm in shell. > > While booting in Qemu i got the error [1] ,[3] also i am able to spawn a > > shell into the terminal but while running java in it got [2]. > > It is not able to initialize the vm to run java. > > Kindly suggest a way to achieve this . > > > > > > [1][init -> java] Error occurred during initialization of VM > > init -> java] java.lang.UnsatisfiedLinkError: no zip in > java.library.path > > [2]Error occurred during the initialization of vm. > > Unable to load zip lib "zip.lib.so <http://zip.lib.so> <http://zip.lib.so <http://zip.lib.so>> > <http://zip.lib.so <http://zip.lib.so> <http://zip.lib.so <http://zip.lib.so>>>" > > > > [3][init -> /bin/bash -> 1] Error: ROM-session creation failed > > (ram_quota=6144, cap_quota=3, label="zip.lib.so <http://zip.lib.so> <http://zip.lib.so <http://zip.lib.so>> > <http://zip.lib.so <http://zip.lib.so> <http://zip.lib.so <http://zip.lib.so>>>") > > > > > > Thanks, > > DIvya. > > > > > > On Mon, Apr 10, 2023 at 3:52 PM Sebastian Sumpf > > <Sebastian.Sumpf@genode-labs.com <mailto:Sebastian.Sumpf@genode-labs.com> > <mailto:Sebastian.Sumpf@genode-labs.com <mailto:Sebastian.Sumpf@genode-labs.com>> > <mailto:Sebastian.Sumpf@genode-labs.com <mailto:Sebastian.Sumpf@genode-labs.com> > <mailto:Sebastian.Sumpf@genode-labs.com <mailto:Sebastian.Sumpf@genode-labs.com>>>> > > wrote: > > > > Hello Divya, > > > > On 4/8/23 07:45, Divya Sharma wrote: > > > While running the java.run script I got the following error > > [1]showing out of > > > memory allocation. > > > Kindly suggest the way to remove it rather than build all the > required > > > dependencies and packages from scratch. > > > > > > > > > > > > [1]/usr/local/genode/tool/21.05/bin/../lib/gcc/arm-none-eabi/10.3.0/../../../../arm-none-eabi/bin/as: out of memory allocating 9223372036854841471 bytes after a total of 696320 bytes > > > > > > > This looks like as if it happens when linking the boot modules of > the image > > together. Maybe there are too many modules and something got too > big? By > > the > > size of the allocation clearly something did overflow, but it's > hard to > > tell > > without the actual scenario. What did you change in the > "java.run" script? > > > > Regards, > > > > Sebastian > > > > > > > > > > > > > > On Wed, Apr 5, 2023 at 11:02 PM <ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com> > <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com>> > > <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com> <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com>>> > > > <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com> > <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com>> <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com> > <mailto:ttcoder@netcourrier.com <mailto:ttcoder@netcourrier.com>>>>> wrote: > > > > > > > > >> > > >> Hello Genodians, > > >> > > >> I am able to run java.run in virt_qemu-arm_v7a. The output is > > directed to > > >> log [ stdout="/dev/log" ], is there a way to redirect the > sdtout to > > >> terminal [ stdout="/dev/terminal" ] instead of log? > > >> > > >> > > > > > > My two cents : the way I do it here is to modify the "config" > > scenario file > > > this way: > > > - keep stdout set to "/dev/log" > > > - modify the routing to : <route> <service name="LOG"> <child > > > name="terminal_log"> ... > > > - add a terminal_log component > > > - add a terminal component. > > > > > > It works for me... But if there is a way to specify > > stdout="/dev/terminal" > > > instead, that might be of interest to me as well. > > > > > > Cedric > > > > > > > > > _______________________________________________ > > > Genode users mailing list > > > users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > <mailto:users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>>> > > <mailto:users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > <mailto:users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>>>> > > > https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users> > <https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>> > > <https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users> > <https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>>> > > > <https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users> > <https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>> > > <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 > > > users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > <mailto:users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>>> > > > https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users> > <https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>> > > <https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users> > <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://www.genode-labs.com <http://www.genode-labs.com>> > <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>> <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 > > users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > <mailto:users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>>> > > https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users> > <https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>> > > <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 > > users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > > https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users> > <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://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 > users@lists.genode.org <mailto:users@lists.genode.org> <mailto:users@lists.genode.org <mailto:users@lists.genode.org>> > 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 > users@lists.genode.org <mailto:users@lists.genode.org> > 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 users@lists.genode.org <mailto:users@lists.genode.org> https://lists.genode.org/listinfo/users <https://lists.genode.org/listinfo/users>
Genode users mailing list users@lists.genode.org https://lists.genode.org/listinfo/users