{"action":"created","issue":{"url":"https://api.github.com/repos/genodelabs/genode/issues/3466","repository_url":"https://api.github.com/repos/genodelabs/genode","labels_url":"https://api.github.com/repos/genodelabs/genode/issues/3466/labels{/name}","comments_url":"https://api.github.com/repos/genodelabs/genode/issues/3466/comments","events_url":"https://api.github.com/repos/genodelabs/genode/issues/3466/events","html_url":"https://github.com/genodelabs/genode/issues/3466","id":477845370,"node_id":"MDU6SXNzdWU0Nzc4NDUzNzA=","number":3466,"title":"base-linux on ARM cross compillation","user":{"login":"trimpim","id":11905891,"node_id":"MDQ6VXNlcjExOTA1ODkx","avatar_url":"https://avatars2.githubusercontent.com/u/11905891?v=4","gravatar_id":"","url":"https://api.github.com/users/trimpim","html_url":"https://github.com/trimpim","followers_url":"https://api.github.com/users/trimpim/followers","following_url":"https://api.github.com/users/trimpim/following{/other_user}","gists_url":"https://api.github.com/users/trimpim/gists{/gist_id}","starred_url":"https://api.github.com/users/trimpim/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/trimpim/subscriptions","organizations_url":"https://api.github.com/users/trimpim/orgs","repos_url":"https://api.github.com/users/trimpim/repos","events_url":"https://api.github.com/users/trimpim/events{/privacy}","received_events_url":"https://api.github.com/users/trimpim/received_events","type":"User","site_admin":false},"labels":[{"id":203356,"node_id":"MDU6TGFiZWwyMDMzNTY=","url":"https://api.github.com/repos/genodelabs/genode/labels/feature","name":"feature","color":"1b7921","default":false,"description":null},{"id":203357,"node_id":"MDU6TGFiZWwyMDMzNTc=","url":"https://api.github.com/repos/genodelabs/genode/labels/fixed","name":"fixed","color":"a02b19","default":false,"description":null}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":11,"created_at":"2019-08-07T10:33:35Z","updated_at":"2019-11-25T13:18:47Z","closed_at":null,"author_association":"CONTRIBUTOR","body":"I'm trying to run a Genode run script (run/log for testing) using base-linux on arm_v7a.\r\n\r\nAs the Linux on the target has no compiler, and building a tool-chain for arm 32 bit is according issue #3444 not an easy task, I try to use cross compilation.\r\n\r\nWith some minor changes https://github.com/trimpim/genode/commit/b7c647be1bd7a9b8e33d983f9927d325c7fab25c, cross compilation for base-linux on arm_v7a worked.\r\n\r\nAfter copying the resulting `var/log/genode` folder to to the target, I was able to successfully start core. This produced the following output:\r\n\r\n```\r\nGenode sculpt-19.07-2-gbd439408b\r\n4095 MiB RAM and 8999 caps assigned to init\r\nWarning: blocking canceled in entrypoint constructor\r\n```\r\n\r\nNo further output was printed after this, but core was still reported as running with 4 threads by `htop`.\r\n\r\nThe warning is printed when core receives a signal during an IPC (SIGCHLD in this case, which indicates the exit of a child).\r\n\r\nWhile debugging I noticed, that the `init` component, that core starts, exits with an unhandled page fault in `ld.lib.so`.\r\n\r\nThis page fault happens, when in ctr0.s the first value is written to the stack (for debug code  see https://github.com/trimpim/genode/commit/bd439408bb4c3631a0cac3ae6c8f523367bb7907).\r\n\r\nThe address to which ld.lib.so writes comes from the ELF file:\r\n\r\n`/usr/local/genode/tool/current/bin/genode-arm-readelf -a build/linux_arm/var/libcache/ld-linux/ld-linux.lib.so | grep __initial_sp`\r\n\r\n```\r\n6857: 000f7610     0 NOTYPE  LOCAL  DEFAULT   15 __initial_sp\r\n```\r\n\r\nIf my calculations are correct, this address lies inside the BSS section of ld.lib.so:\r\n\r\n`/usr/local/genode/tool/current/bin/genode-arm-readelf -S build/linux_arm/var/libcache/ld-linux/ld-linux.lib.so`\r\n\r\n```\r\n...\r\n[15] .bss  NOBITS  00093570 094564 066994 00  WA  0  0 16\r\n...\r\n```\r\n\r\nFor core that is built using the same crt0.s file, only the addresses are different.\r\n"},"comment":{"url":"https://api.github.com/repos/genodelabs/genode/issues/comments/558151468","html_url":"https://github.com/genodelabs/genode/issues/3466#issuecomment-558151468","issue_url":"https://api.github.com/repos/genodelabs/genode/issues/3466","id":558151468,"node_id":"MDEyOklzc3VlQ29tbWVudDU1ODE1MTQ2OA==","user":{"login":"rite","id":2690417,"node_id":"MDQ6VXNlcjI2OTA0MTc=","avatar_url":"https://avatars0.githubusercontent.com/u/2690417?v=4","gravatar_id":"","url":"https://api.github.com/users/rite","html_url":"https://github.com/rite","followers_url":"https://api.github.com/users/rite/followers","following_url":"https://api.github.com/users/rite/following{/other_user}","gists_url":"https://api.github.com/users/rite/gists{/gist_id}","starred_url":"https://api.github.com/users/rite/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rite/subscriptions","organizations_url":"https://api.github.com/users/rite/orgs","repos_url":"https://api.github.com/users/rite/repos","events_url":"https://api.github.com/users/rite/events{/privacy}","received_events_url":"https://api.github.com/users/rite/received_events","type":"User","site_admin":false},"created_at":"2019-11-25T13:18:47Z","updated_at":"2019-11-25T13:18:47Z","author_association":"CONTRIBUTOR","body":"repos/base/mk/spec/armhf_v7a.mk is missing in 26eeb4e. Here's the fixup:\r\n- 072e31d9754b0c9a8cfa38399ab2c669cb2f50f4"}}
{"actor":{"display_login":"rite"}}