Hello Genodians
While upgrading to Genode 23.11 I noticed, that the new usb_net_drv no longer supports the smsc95xx which is in our IoT gateway. The source file for this was used by the old driver but isn't in the sources.list of the new driver.
I started by adding the missing source file. After fixing a missing include path I have a number of unresolved symbols. To use tool/dde_linux/create_dummies some variables need to be set - TARGET -> drivers/usb_net - DUMMY_FILE -> /tmp/generated_dummies.c - ARCH -> x86_64 - BUILD_DIR -> build/x86_64 - LINUX_KERNEL_DIR -> build/x86_64/pc_linux/x86_64
This generates a file that contains the missing functions and variables.
If I change the following: - ARCH -> arm_v8a - BUILD_DIR -> build/arm_v8a - LINUX_KERNEL_DIR -> build/arm_v8a/imx_linux/arm_v8a
The generated file only contains the header.
Is it save to copy the functions generated in the x86_64 run in to the generated_dummies.c for the arm_64 spec?
Regards, Pirmin
Hi Pirmin,
On 30.01.24 09:40, Pirmin Duss wrote:
Hello Genodians
While upgrading to Genode 23.11 I noticed, that the new usb_net_drv no longer supports the smsc95xx which is in our IoT gateway. The source file for this was used by the old driver but isn't in the sources.list of the new driver.
I started by adding the missing source file. After fixing a missing include path I have a number of unresolved symbols. To use tool/dde_linux/create_dummies some variables need to be set - TARGET -> drivers/usb_net - DUMMY_FILE -> /tmp/generated_dummies.c - ARCH -> x86_64 - BUILD_DIR -> build/x86_64 - LINUX_KERNEL_DIR -> build/x86_64/pc_linux/x86_64
This generates a file that contains the missing functions and variables.
If I change the following: - ARCH -> arm_v8a - BUILD_DIR -> build/arm_v8a - LINUX_KERNEL_DIR -> build/arm_v8a/imx_linux/arm_v8a
The generated file only contains the header.
Is it save to copy the functions generated in the x86_64 run in to the generated_dummies.c for the arm_64 spec?
Not a good idea. Sometimes you have to start the script multiple times. Also if the DUMMY_FILE (e.g., generated_dummies.c) is not empty when you run the tool, functions in there will not be re-generated - because the build step will not produce undefined references - and the file will be empty.
I have re-enabled smsc95xx for arm_v6 on current staging. You can have a look there, technically you just need to add 'smsc95xx.c' to the 'source.list' for arm_v8 (as it will be called) now arm_64, add 'smc95xx.h' to the dep.list, and as you did re-generate the dummies. Then you can check what is called and not implemented at runtime.
Regards,
Sebastian
Hello Sebastian
Many thanks for your quick reply.
On 30.01.24 12:40, Sebastian Sumpf wrote:
Not a good idea. Sometimes you have to start the script multiple times. Also if the DUMMY_FILE (e.g., generated_dummies.c) is not empty when you run the tool, functions in there will not be re-generated - because the build step will not produce undefined references - and the file will be empty.
No Idea what went wrong this morning, after restarting the change again with your arm_v6 patches for usb_net applied, I was able to generate the file.
I had to manually extract some methods from drivers/net/phy/phylink.c, for those the script reported that it couldn't find the definition. This could be, that for imx_linux this file isn't built.
I have re-enabled smsc95xx for arm_v6 on current staging. You can have a look there, technically you just need to add 'smsc95xx.c' to the 'source.list' for arm_v8 (as it will be called) now arm_64, add 'smc95xx.h' to the dep.list, and as you did re-generate the dummies. Then you can check what is called and not implemented at runtime.
I now have a running usb_net that can at least get the IP-address via DHCP.
I will test it some more and send you the patch if works reliably and you are interested in it.
Regards, Pirmin