smartcard.run: remove legacy platform_drv

Ref genodelabs/genode#4511
Ref genodelabs/genode#4578
This commit is contained in:
Stefan Kalkowski 2022-09-16 11:51:38 +02:00 committed by Christian Helmuth
parent c8f055c9e3
commit 9b38af4d7d

View File

@ -22,26 +22,14 @@ proc smartcard_product_id {} { return "0x5116" }
# Build # Build
# #
set build_components {
core init timer
drivers/usb_host
test/smartcard
lib/vfs_libusb
lib/vfs_pipe
}
source ${genode_dir}/repos/base/run/platform_drv.inc
append_platform_drv_build_components
build $build_components
create_boot_directory create_boot_directory
import_from_depot [depot_user]/src/[base_src] \
[depot_user]/pkg/test_usb_host_drv-[board] \
[depot_user]/src/report_rom \
[depot_user]/src/init
build { test/smartcard lib/vfs_libusb lib/vfs_pipe }
# install_config {
# Generate config
#
append config {
<config> <config>
<parent-provides> <parent-provides>
<service name="ROM"/> <service name="ROM"/>
@ -56,35 +44,34 @@ append config {
<default-route> <default-route>
<any-service> <parent/> <any-child/> </any-service> <any-service> <parent/> <any-child/> </any-service>
</default-route> </default-route>
<default caps="100"/>} <default caps="100"/>
append_platform_drv_config
append config {
<start name="timer"> <start name="timer">
<resource name="RAM" quantum="1M"/> <resource name="RAM" quantum="1M"/>
<provides><service name="Timer"/></provides> <provides><service name="Timer"/></provides>
</start> </start>
<start name="report_rom"> <start name="report_rom">
<resource name="RAM" quantum="1M"/> <resource name="RAM" quantum="1M"/>
<provides> <service name="Report"/> <service name="ROM"/> </provides> <provides> <service name="Report"/> <service name="ROM"/> </provides>
<config verbose="no"> <config>
<default-policy report="usb_drv -> devices"/> <default-policy report="usb_drv -> usb_drv -> devices"/>
</config>
</start>
<start name="usb_drv" caps="200">
<binary name="} [usb_host_drv_binary] {"/>
<resource name="RAM" quantum="16M"/>
<provides><service name="Usb"/></provides>
<config bios_handoff="yes">
<report devices="yes"/>
<policy label="test-smartcard -> usb_device"
vendor_id="} [smartcard_vendor_id] {" product_id="} [smartcard_product_id] {"/>
</config> </config>
<route> <route>
<any-service> <parent/> </any-service>
</route>
</start>
<start name="usb_drv" caps="1500" managing_system="yes">
<binary name="init"/>
<resource name="RAM" quantum="32M"/>
<provides> <service name="Usb"/> </provides>
<route>
<service name="ROM" label="config">
<parent label="drivers.config"/> </service>
<service name="Report"> <child name="report_rom"/> </service> <service name="Report"> <child name="report_rom"/> </service>
<any-service> <parent/> <any-child/> </any-service> <service name="Timer"> <child name="timer"/> </service>
<any-service> <parent/> </any-service>
</route> </route>
</start> </start>
@ -110,26 +97,25 @@ append config {
</start> </start>
</config>} </config>}
install_config $config
# #
# Boot modules # Define USB host controller config
# #
append usb_config {
<config bios_handoff="yes">
<report devices="yes"/>
<policy label="test-smartcard -> usb_device" vendor_id="} [smartcard_vendor_id] {" product_id="} [smartcard_product_id] {"/>
</config>}
set fd [open [run_dir]/genode/usb_host_drv.config w]
puts $fd $usb_config
close $fd
# generic modules build_boot_image {
set boot_modules { test-smartcard
core init timer test-smartcard
ld.lib.so pcsc-lite.lib.so ccid.lib.so libusb.lib.so ld.lib.so pcsc-lite.lib.so ccid.lib.so libusb.lib.so
libc.lib.so vfs.lib.so libm.lib.so posix.lib.so libc.lib.so vfs.lib.so libm.lib.so posix.lib.so
Info.plist vfs_libusb.lib.so vfs_pipe.lib.so Info.plist vfs_libusb.lib.so vfs_pipe.lib.so
} }
lappend boot_modules [usb_host_drv_binary]
append_platform_drv_boot_modules
build_boot_image $boot_modules
run_genode_until { Response: 62 0A 82 01 38 83 02 3F 00 8A 01 05 90 00} 30 run_genode_until { Response: 62 0A 82 01 38 83 02 3F 00 8A 01 05 90 00} 30
exec rm bin/Info.plist exec rm bin/Info.plist