Hello,
On 02/28/2015 07:44 AM, Zachary wrote:
Hi Stefan, Thanks for your help. I write my own two_linux_panda run script, but still have some problem when run the image created by this script: there is only one grey enmpty window on top-left of the screen.
This is my run script:
assert_spec foc assert_spec platform_panda
# # Build # build { core init drivers/timer drivers/framebuffer drivers/sd_card drivers/usb drivers/gpio server/nic_bridge server/part_blk server/nitpicker server/nit_fb l4linux }
create_boot_directory
# # Config # set config {
<config prio_levels="2"> <parent-provides> <service name="ROM"/> <service name="RAM"/> <service name="IRQ"/> <service name="IO_MEM"/> <service name="IO_PORT"/> <service name="CAP"/> <service name="PD"/> <service name="RM"/> <service name="CPU"/> <service name="LOG"/> <service name="SIGNAL"/> </parent-provides> <default-route> <any-service> <parent/> <any-child/> </any-service> </default-route> <start name="timer" priority="0"> <resource name="RAM" quantum="1M"/> <provides><service name="Timer"/></provides> </start> <start name="fb_drv" priority="-1"> <resource name="RAM" quantum="4M"/> <provides><service name="Framebuffer"/></provides> </start> <start name="sd_card_drv" priority="0"> <resource name="RAM" quantum="4M"/> <provides><service name="Block"/></provides> </start> <start name="gpio_drv"> <resource name="RAM" quantum="4M"/> <provides><service name="Gpio"/></provides> <config/> </start> <start name="usb_drv" priority="-1"> <resource name="RAM" quantum="12M"/> <provides> <service name="Input"/> <service name="Nic"/> </provides> <config ehci="yes"> <hid/> <nic mac="02:00:00:00:01:01" /> </config> </start> <!--<start name="part_blk"> <resource name="RAM" quantum="2M"/> <provides><service name="Block"/></provides> <config> <policy label="vmlinux.1 -> sda" partition="1" /> <policy label="vmlinux.2 -> sda" partition="2" /> <policy label="test-libc_ffat" partition="3" /> </config> <route> <service name="Block"> <child name="sd_card_drv"/> </service> <any-service> <parent/> <any-child/> </any-service> </route> </start>--> <!--<start name="nic_bridge" priority="-1"> <resource name="RAM" quantum="2M"/> <provides><service name="Nic"/></provides> <route> <service name="Nic"> <child name="usb_drv"/> </service> <any-service> <parent/> <any-child/> </any-service> </route> </start>-->
<start name="nitpicker"> <resource name="RAM" quantum="2M"/> <provides><service name="Nitpicker"/></provides> <route> <service name="Input"> <child name="usb_drv"/> </service> <service name="Framebuffer"> <child name="fb_drv"/> </service> <any-service> <parent/> <any-child/> </any-service> </route> </start>
<start name="linux.1"> <binary name="nit_fb"/> <resource name="RAM" quantum="4M"/> <provides> <service name="Framebuffer"/> <service name="Input"/> </provides> <config xpos="1" ypos="0" width="510" height="382"/> </start> <start name="linux.2"> <binary name="nit_fb"/> <resource name="RAM" quantum="4M"/> <provides> <service name="Framebuffer"/> <service name="Input"/> </provides> <config xpos="513" ypos="0" width="510" height="382"/> </start>
<start name="vmlinux.1" priority="-1"> <binary name="l4linux"/> <resource name="RAM" quantum="296M"/> <config args="mem=254M l4x_rd=initrd.gz"> <block label="sda" /> </config> <route> <service name="Block"> <child name="sd_card_drv"/> </service> <service name="Input"> <child name="linux.1"/> </service> <service name="Framebuffer"> <child name="linux.1"/> </service> <!--<service name="Nic"> <child name="nic_bridge"/> </service>--> <any-service> <any-child/> <parent/> </any-service> </route> </start> <start name="vmlinux.2" priority="-1"> <binary name="l4linux"/> <resource name="RAM" quantum="296M"/> <config args="mem=254M l4x_rd=initrd.gz"> <block label="sda" /> </config> <route> <service name="Block"> <child name="sd_card_drv"/> </service> <service name="Input"> <child name="linux.2"/> </service> <service name="Framebuffer"> <child name="linux.2"/> </service> <!--<service name="Nic"> <child name="nic_bridge"/> </service>--> <any-service> <any-child/> <parent/> </any-service> </route> </start> </config>}
install_config $config
# # Boot modules # set boot_modules { core init timer nic_bridge nitpicker nit_fb part_blk l4linux initrd.gz fb_drv sd_card_drv gpio_drv usb_drv }
set uri "http://genode.org/files/l4linux/busybox-initrd-arm-20120710.gz" if {![file exists bin/initrd.gz]} { puts "Download initramfs ..." exec >& /dev/null wget -c -O bin/initrd.gz $uri } exec >& /dev/null wget -O bin/initrd.gz.md5 $uri.md5 cd bin exec md5sum -c initrd.gz.md5 cd ..
build_boot_image [join $boot_modules " "]
There is one obvious problem in your current configuration: that you use one SD-card driver for both Linux instances. That will not work, as one block driver can serve exactly one client. Either re-enable the part_blk multiplexer again, or leave out block drivers in general. Linux can also boot just into an initramfs without any block device. The same applies for network. A NIC driver, in this case the usb_drv cannot serve more than one client. If you want to share one network device, you have to use the nic_bridge here.
Nevertheless, both configuration issues are not the main issue that prevent both linux instances from booting. For the main issue, please see below.
This is the log:
... Genode 14.11 int main(): --- create local services --- int main(): --- start init --- int main(): transferred 992 MB to init int main(): --- init created, waiting for exit condition --- [init] Could not open file "ld.lib.so" Quota exceeded! amount=28672, size=4096, consumed=28672 [init] upgrading quota donation for Env::CPU (8192 bytes) [init -> gpio_drv] --- omap4 gpio driver --- [init -> sd_card_drv] --- OMAP4 SD card driver --- [init -> gpio_drv] No GPIO config [init -> fb_drv] Could not open file "config" [init -> fb_drv] Could not obtain config file [init -> fb_drv] int main(int, char**): using default configuration: HDMI@...305... [init -> vmlinux.2] Booting L4Linux ... [init -> vmlinux.1] Booting L4Linux ... [init -> usb_drv] Services::Services(): Could not read screen resolution in cone [init -> usb_drv] Services::Services(): No <storage> config node found - not ste [init -> usb_drv] Services::Services(): No <raw> config node found - not startie [init -> usb_drv] Enabled EHCI (USB 2.0) support [init -> vmlinux.1] ======> L4Linux starting... <======== [init -> vmlinux.2] ======> L4Linux starting... <======== [init -> vmlinux.1] Linux version 3.9.0-l4-gf2eebae (czzcz@...306...) (gcc5 [init -> vmlinux.2] Linux version 3.9.0-l4-gf2eebae (czzcz@...306...) (gcc5 [init -> vmlinux.1] Binary name: vmlinux [init -> vmlinux.1] This is an AEABI build. [init -> vmlinux.2] Binary name: vmlinux [init -> vmlinux.2] This is an AEABI build. [init -> vmlinux.1] Linux kernel command line (2 args): mem=254M l4x_rd=initrd.z [init -> vmlinux.2] Linux kernel command line (2 args): mem=254M l4x_rd=initrd.z [init -> vmlinux.1] CPU mapping (l:p)[0]: Image: 02000000 - 02500000 [5120 KiB]. [init -> vmlinux.1] Areas: Text: 02000000 - 023dc000 [3952kB] (a bit longer) [init -> vmlinux.1] Data: 023dc000 - 024091b8 [180kB] [init -> vmlinux.1] Initdata: 023b4000 - 023da9c0 [154kB] [init -> vmlinux.1] BSS: 0240a000 - 02446de8 [243kB] [init -> vmlinux.2] CPU mapping (l:p)[0]: Image: 02000000 - 02500000 [5120 KiB]. [init -> vmlinux.2] Areas: Text: 02000000 - 023dc000 [3952kB] (a bit longer) [init -> vmlinux.2] Data: 023dc000 - 024091b8 [180kB] [init -> vmlinux.2] Initdata: 023b4000 - 023da9c0 [154kB] [init -> vmlinux.2] BSS: 0240a000 - 02446de8 [243kB] [init -> usb_drv] Using configured mac: 02:00:00:00:01:01 [init -> usb_drv] void platform_hcd_init(Services*): register platform device [init -> usb_drv] dev_info: EHCI Host Controller [init -> usb_drv] dev_info: new USB bus registered, assigned bus number 1 [init -> usb_drv] dev_info: irq 109, io mem 0x4a064c00 [init -> usb_drv] dev_info: USB 2.0 started, EHCI 1.00 [init -> usb_drv] dev_info: USB hub found [init -> usb_drv] dev_info: 3 ports detected [init -> nitpicker] Could not open file "config" [init -> nitpicker] Could not obtain config file [init -> nitpicker] create session with args: label="linux.1", ram_quota=28672 [init -> nitpicker] create session with args: label="linux.2", ram_quota=28672 [init -> vmlinux.1] l4io_get_root_device: Not implemented yet! [init -> vmlinux.1] Device scan: [init -> vmlinux.1] l4io_iterate_devices: Not implemented yet! [init -> vmlinux.1] Device scan done. [init -> vmlinux.2] l4io_get_root_device: Not implemented yet! [init -> vmlinux.2] Device scan: [init -> vmlinux.2] l4io_iterate_devices: Not implemented yet! [init -> vmlinux.2] Device scan done. [init -> usb_drv] dev_info: new high-speed USB device number 2 using ehci-omap [init -> linux.1] using xywh=(1,1,510,382) [init -> linux.2] using xywh=(513,513,510,382) [init -> vmlinux.1] main thread will be c [init -> vmlinux.1] l4x_register_pointer_section: addr = 02000000 size = 5242880 [init -> vmlinux.1] section-with-init: virt: 2000000 to 24fffff [5120 KiB] [init -> vmlinux.1] Cannot determine physical address for dataspace Binary! [init -> vmlinux.1] error: failed to get physical address for 2000000. [init -> vmlinux.1] thread=c000 cpu=0 [init -> vmlinux.1] L4x: Setting superpages for main memory [init -> vmlinux.1] Main memory size: 254MB [init -> vmlinux.1] Adjusted memory start: 02000000 [init -> vmlinux.1] Main thread running, waiting... [init -> vmlinux.2] main thread will be c [init -> vmlinux.2] l4x_register_pointer_section: addr = 02000000 size = 5242880 [init -> vmlinux.2] section-with-init: virt: 2000000 to 24fffff [5120 KiB] [init -> vmlinux.2] Cannot determine physical address for dataspace Binary! [init -> vmlinux.2] error: failed to get physical address for 2000000. [init -> vmlinux.2] thread=c000 cpu=0 [init -> vmlinux.2] L4x: Setting superpages for main memory [init -> vmlinux.2] Main memory size: 254MB [init -> vmlinux.2] Adjusted memory start: 02000000 [init -> vmlinux.2] Main thread running, waiting... [init -> usb_drv] dev_info: USB hub found unmapping of managed dataspaces not yet supported [init -> vmlinux.1] Main memory: virt: 3600000 to 133fffff [260096 KiB] [init -> usb_drv] dev_info: 5 ports detected unmapping of managed dataspaces not yet supported [init -> vmlinux.2] Main memory: virt: 3600000 to 133fffff [260096 KiB] [init -> vmlinux.2] Main memory: Phys: 0x00000000 to 0x0fe00000, Size: 266338304 [init -> vmlinux.1] Main memory: Phys: 0x00000000 to 0x0fe00000, Size: 266338304 [init -> vmlinux.1] l4x: vmalloc area: 13800000 - 1b800000 [init -> vmlinux.1] l4x_register_pointer_section: addr = 02000000 size = 5242880 [init -> vmlinux.1] text: virt: 2000000 to 24fffff [5120 KiB] [init -> vmlinux.1] Cannot determine physical address for dataspace Binary! [init -> vmlinux.1] error: failed to get physical address for 2000000. [init -> vmlinux.2] l4x: vmalloc area: 13800000 - 1b800000 [init -> vmlinux.2] l4x_register_pointer_section: addr = 02000000 size = 5242880 [init -> vmlinux.2] text: virt: 2000000 to 24fffff [5120 KiB] [init -> vmlinux.2] Cannot determine physical address for dataspace Binary! [init -> vmlinux.2] error: failed to get physical address for 2000000. [init -> vmlinux.1] l4x_virt_to_phys: Could not translate virt. address 2000000 [init -> vmlinux.1] l4x_virt_to_phys: Could not translate virt. address 23b305f [init -> vmlinux.1] l4x_virt_to_phys: Could not translate virt. address 23dc000 [init -> vmlinux.1] l4x_virt_to_phys: Could not translate virt. address 2446de7 [init -> vmlinux.1] l4x_virt_to_phys: Could not translate virt. address 2000000 [init -> vmlinux.1] l4x_virt_to_phys: Could not translate virt. address 24fffff [init -> vmlinux.1] l4x_rd_path: initrd.gz [init -> vmlinux.1] Loading: initrd.gz [init -> vmlinux.2] l4x_virt_to_phys: Could not translate virt. address 2000000 [init -> vmlinux.2] l4x_virt_to_phys: Could not translate virt. address 23b305f [init -> vmlinux.2] l4x_virt_to_phys: Could not translate virt. address 23dc000 [init -> vmlinux.2] l4x_virt_to_phys: Could not translate virt. address 2446de7 [init -> vmlinux.2] l4x_virt_to_phys: Could not translate virt. address 2000000 [init -> vmlinux.2] l4x_virt_to_phys: Could not translate virt. address 24fffff [init -> vmlinux.2] l4x_rd_path: initrd.gz [init -> vmlinux.2] Loading: initrd.gz [init -> vmlinux.1] INITRD: Size of RAMdisk is 6412KiB [init -> vmlinux.1] RAMdisk from 00005000 to 00648000 [6412KiB] [init -> vmlinux.2] INITRD: Size of RAMdisk is 6412KiB [init -> vmlinux.2] RAMdisk from 00005000 to 00648000 [6412KiB] [init -> usb_drv] dev_info: new high-speed USB device number 3 using ehci-omap [init -> vmlinux.1] l4timer: Using IRQ210 [init] vmlinux.1: no route to service "Terminal" [init -> vmlinux.2] l4timer: Using IRQ210 [init] vmlinux.2: no route to service "Terminal" [init -> vmlinux.1] l4x_virt_to_phys: Could not translate virt. address 229c5b8 [init -> vmlinux.1] l4x_virt_to_phys: Could not translate virt. address 229c5b8 [init -> vmlinux.2] l4x_virt_to_phys: Could not translate virt. address 229c5b8 [init -> vmlinux.2] l4x_virt_to_phys: Could not translate virt. address 229c5b8 [init -> vmlinux.1] l4io_get_root_device: Not implemented yet! [init -> vmlinux.1] l4io_iterate_devices: Not implemented yet! [init -> vmlinux.2] l4io_get_root_device: Not implemented yet! [init -> vmlinux.2] l4io_iterate_devices: Not implemented yet! [init -> usb_drv] Using configured mac: 02:00:00:00:01:01 no RM attachment (READ pf_addr=40000 pf_ip=22ac510 from 3e2000) virtual void Genode::Signal_session_component::submit(Genode::Signal_context_cay virtual void Genode::Pager_activation_base::entry(): Could not resolve pf=400000 no RM attachment (READ pf_addr=40000 pf_ip=22ac510 from 3bc000) virtual void Genode::Signal_session_component::submit(Genode::Signal_context_cay virtual void Genode::Pager_activation_base::entry(): Could not resolve pf=400000
Here, we can see the main problem. Both L4Linux instances are causing a pagefault at instruction address 0x22ac510. The pagefault address is 0x40000. When looking at the disassembled code, it turns out the pagefault happens when touching the framebuffer given to L4Linux. L4Linux access to a native framebuffer driver in general is working, but not using more recent GUI servers like 'nit_fb'. This was not tested in more recent time. I have opened a related issue:
https://github.com/genodelabs/genode/issues/1427
Please, try out the attached patch, by applying it via:
patch -p1 < framebuffer.patch
within your Genode repository.
Regards Stefan
[init -> usb_drv] netif_info: open: enable queueing (rx 4, tx 60) mtu 1500 simpg [init -> usb_drv] nedev_info: hardware isn't capable of remote wakeup [init -> usb_drv] netif_info: register 'smsc95xx' at usb-ehci-omap-1.1, smsc95xM
So What's wrong with my script?
Best, Zachary
Dive into the World of Parallel Programming The Go Parallel Website, sponsored by Intel and developed in partnership with Slashdot Media, is your hub for all things parallel software development, from weekly thought leadership blogs to news, videos, case studies, tutorials and more. Take a look and join the conversation now. http://goparallel.sourceforge.net/ _______________________________________________ genode-main mailing list genode-main@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/genode-main