using tool/dde_linux/ scripts for usb_net driver

Sebastian Sumpf Sebastian.Sumpf at genode-labs.com
Tue Jan 30 12:40:07 CET 2024


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

-- 
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







More information about the users mailing list