2022-07-25 15:04:12 +00:00
|
|
|
assert_spec x86_64
|
|
|
|
|
|
|
|
if {[get_cmd_switch --autopilot] && [have_include "power_on/qemu"]} {
|
|
|
|
puts "Run script does not support autopilot mode on Qemu"
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
|
|
|
if {[get_cmd_switch --autopilot] && [have_board linux]} {
|
|
|
|
puts "Autopilot mode is not supported on this platform."
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2015-09-09 14:21:19 +00:00
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
|
2022-01-21 10:07:28 +00:00
|
|
|
set use_gpu 1
|
|
|
|
set use_top 0
|
2022-11-02 15:02:43 +00:00
|
|
|
set use_fb_controller 0
|
|
|
|
if {$use_fb_controller} {
|
|
|
|
set apply_on_hotplug "no"
|
|
|
|
} else {
|
|
|
|
set apply_on_hotplug "yes"
|
|
|
|
}
|
2022-01-21 10:07:28 +00:00
|
|
|
|
2015-09-09 14:21:19 +00:00
|
|
|
set build_components {
|
2023-11-17 16:24:13 +00:00
|
|
|
core lib/ld init timer
|
2024-05-31 15:24:20 +00:00
|
|
|
driver/acpi
|
|
|
|
driver/platform
|
2022-07-29 15:31:20 +00:00
|
|
|
app/pci_decode
|
2024-05-31 15:24:20 +00:00
|
|
|
driver/framebuffer/intel/pc
|
2015-09-18 14:34:19 +00:00
|
|
|
test/framebuffer
|
|
|
|
server/report_rom
|
2023-11-17 16:24:13 +00:00
|
|
|
server/vfs lib/vfs lib/vfs_import
|
2016-03-22 10:04:07 +00:00
|
|
|
server/fs_rom
|
2015-09-09 14:21:19 +00:00
|
|
|
}
|
|
|
|
|
2024-05-31 15:24:20 +00:00
|
|
|
append_if $use_gpu build_components { driver/gpu/intel }
|
2022-01-21 10:07:28 +00:00
|
|
|
append_if $use_top build_components { app/top }
|
|
|
|
|
2015-09-09 14:21:19 +00:00
|
|
|
build $build_components
|
|
|
|
|
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
#
|
|
|
|
# Generate config
|
|
|
|
#
|
|
|
|
|
|
|
|
append config {
|
2018-04-09 21:33:34 +00:00
|
|
|
<config verbose="yes" prio_levels="4">
|
2015-09-09 14:21:19 +00:00
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="IRQ"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="LOG"/>
|
2018-04-09 21:33:34 +00:00
|
|
|
<service name="TRACE"/>
|
2015-09-09 14:21:19 +00:00
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
2017-05-07 20:36:11 +00:00
|
|
|
</default-route>
|
2022-07-29 15:31:20 +00:00
|
|
|
<default caps="100"/>
|
2015-09-09 14:21:19 +00:00
|
|
|
|
2023-01-27 09:10:03 +00:00
|
|
|
<start name="report_rom" caps="100">
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
2022-07-29 15:31:20 +00:00
|
|
|
<provides>
|
|
|
|
<service name="ROM" />
|
|
|
|
<service name="Report" />
|
|
|
|
</provides>
|
|
|
|
<config>
|
2024-05-30 13:46:57 +00:00
|
|
|
<policy label="pci_decode -> system" report="acpi -> acpi"/>
|
|
|
|
<policy label="intel_fb -> intel_opregion" report="acpi -> intel_opregion"/>
|
|
|
|
<policy label="platform -> devices" report="pci_decode -> devices"/>
|
2022-07-29 15:31:20 +00:00
|
|
|
</config>
|
|
|
|
<route>
|
|
|
|
<service name="LOG"> <parent/> </service>
|
|
|
|
<service name="PD"> <parent/> </service>
|
|
|
|
<service name="CPU"> <parent/> </service>
|
|
|
|
<service name="ROM"> <parent/> </service>
|
|
|
|
</route>
|
|
|
|
</start>
|
2015-09-09 14:21:19 +00:00
|
|
|
|
2024-05-30 13:46:57 +00:00
|
|
|
<start name="acpi" caps="250">
|
2023-03-23 10:20:43 +00:00
|
|
|
<resource name="RAM" quantum="6M"/>
|
2022-07-29 15:31:20 +00:00
|
|
|
<route>
|
|
|
|
<service name="IO_MEM"> <parent/> </service>
|
|
|
|
<service name="LOG"> <parent/> </service>
|
|
|
|
<service name="PD"> <parent/> </service>
|
|
|
|
<service name="RM"> <parent/> </service>
|
|
|
|
<service name="CPU"> <parent/> </service>
|
|
|
|
<service name="ROM"> <parent/> </service>
|
|
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
|
|
|
</route>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="pci_decode" caps="350">
|
2022-11-18 13:11:38 +00:00
|
|
|
<resource name="RAM" quantum="2M"/>
|
2022-07-29 15:31:20 +00:00
|
|
|
<route>
|
|
|
|
<service name="Report">
|
|
|
|
<child name="report_rom"/> </service>
|
|
|
|
<service name="ROM" label="system">
|
|
|
|
<child name="report_rom"/> </service>
|
|
|
|
<service name="IO_MEM"> <parent/> </service>
|
|
|
|
<service name="LOG"> <parent/> </service>
|
|
|
|
<service name="PD"> <parent/> </service>
|
|
|
|
<service name="RM"> <parent/> </service>
|
|
|
|
<service name="CPU"> <parent/> </service>
|
|
|
|
<service name="ROM"> <parent/> </service>
|
|
|
|
</route>
|
2015-09-09 14:21:19 +00:00
|
|
|
</start>
|
2016-03-22 10:04:07 +00:00
|
|
|
|
2024-05-30 13:46:57 +00:00
|
|
|
<start name="platform" caps="100" managing_system="yes">
|
2023-01-27 09:10:03 +00:00
|
|
|
<resource name="RAM" quantum="2M"/>
|
2022-07-29 15:31:20 +00:00
|
|
|
<provides> <service name="Platform"/> </provides>
|
|
|
|
<route>
|
|
|
|
<service name="ROM" label="devices"> <child name="report_rom"/> </service>
|
|
|
|
<service name="IRQ"> <parent/> </service>
|
|
|
|
<service name="IO_MEM"> <parent/> </service>
|
|
|
|
<service name="IO_PORT"> <parent/> </service>
|
|
|
|
<service name="ROM"> <parent/> </service>
|
|
|
|
<service name="PD"> <parent/> </service>
|
|
|
|
<service name="CPU"> <parent/> </service>
|
|
|
|
<service name="LOG"> <parent/> </service>
|
2022-10-10 13:17:55 +00:00
|
|
|
<service name="Timer"> <child name="timer"/> </service>
|
2022-07-29 15:31:20 +00:00
|
|
|
</route>
|
|
|
|
<config>
|
2024-05-30 13:46:57 +00:00
|
|
|
<policy label_prefix="intel_fb" info="yes">
|
2022-07-29 15:31:20 +00:00
|
|
|
<pci class="VGA"/>
|
|
|
|
<pci class="ISABRIDGE"/>
|
|
|
|
</policy>
|
2024-05-30 13:46:57 +00:00
|
|
|
<policy label_prefix="intel_gpu" info="yes">
|
2022-07-29 15:31:20 +00:00
|
|
|
<pci class="VGA"/>
|
|
|
|
<pci class="ISABRIDGE"/>
|
|
|
|
</policy>
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
2016-04-19 13:37:27 +00:00
|
|
|
</start>
|
|
|
|
|
2018-04-09 21:33:34 +00:00
|
|
|
<start name="init_dynamic" caps="10000">
|
|
|
|
<binary name="init"/>
|
|
|
|
<resource name="RAM" quantum="1000M"/>
|
2015-09-18 14:34:19 +00:00
|
|
|
<route>
|
|
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
2024-05-30 13:46:57 +00:00
|
|
|
<service name="Platform"> <child name="platform" label="intel_fb"/> </service>
|
|
|
|
<service name="ROM" label="intel_fb -> intel_opregion">
|
|
|
|
<child name="report_rom" label="intel_fb -> intel_opregion"/>
|
2022-05-20 12:11:48 +00:00
|
|
|
</service>
|
2016-04-19 13:37:27 +00:00
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
2018-04-09 21:33:34 +00:00
|
|
|
<config prio_levels="2">
|
|
|
|
<parent-provides>
|
|
|
|
<service name="ROM"/>
|
|
|
|
<service name="IO_MEM"/>
|
|
|
|
<service name="IO_PORT"/>
|
|
|
|
<service name="PD"/>
|
|
|
|
<service name="RM"/>
|
|
|
|
<service name="CPU"/>
|
|
|
|
<service name="LOG"/>
|
|
|
|
<service name="TRACE"/>
|
|
|
|
<service name="Platform"/>
|
|
|
|
<service name="Timer"/>
|
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</default-route>
|
|
|
|
<default caps="100"/>
|
2022-01-21 10:07:28 +00:00
|
|
|
<report init_ram="yes" child_ram="yes" delay_ms="10000"/>}
|
2018-04-09 21:33:34 +00:00
|
|
|
|
2022-01-21 10:07:28 +00:00
|
|
|
append_if $use_top config {
|
2018-04-09 21:33:34 +00:00
|
|
|
<start name="top">
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<config period_ms="40000"/>
|
2023-12-04 10:53:26 +00:00
|
|
|
<route>
|
|
|
|
<service name="TRACE"> <parent label=""/> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
2022-01-21 10:07:28 +00:00
|
|
|
</start>}
|
2018-04-09 21:33:34 +00:00
|
|
|
|
2022-01-21 10:07:28 +00:00
|
|
|
append config {
|
2018-04-09 21:33:34 +00:00
|
|
|
<start name="report_rom" priority="-1">
|
|
|
|
<resource name="RAM" quantum="2M"/>
|
|
|
|
<provides> <service name="Report" /> <service name="ROM" /> </provides>
|
|
|
|
<config verbose="yes">
|
2024-05-30 13:46:57 +00:00
|
|
|
<policy label="intel_fb_controller -> connectors" report="intel_fb -> connectors"/>
|
2018-04-09 21:33:34 +00:00
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="config_fs" priority="-1">
|
2020-04-20 12:00:57 +00:00
|
|
|
<binary name="vfs"/>
|
2018-04-09 21:33:34 +00:00
|
|
|
<resource name="RAM" quantum="8M"/>
|
|
|
|
<provides> <service name="File_system"/> </provides>
|
|
|
|
<config>
|
2020-04-20 12:00:57 +00:00
|
|
|
<vfs>
|
|
|
|
<ram/>
|
|
|
|
<import>
|
2024-05-30 13:46:57 +00:00
|
|
|
<inline name="fb.config">
|
2022-11-02 15:02:43 +00:00
|
|
|
<config ld_verbose="yes" apply_on_hotplug="} $apply_on_hotplug {">
|
2018-04-09 21:33:34 +00:00
|
|
|
<report connectors="yes"/>
|
|
|
|
</config>
|
2020-04-20 12:00:57 +00:00
|
|
|
</inline>
|
|
|
|
</import>
|
|
|
|
</vfs>
|
2018-04-09 21:33:34 +00:00
|
|
|
<policy label_prefix="config_rom" root="/"/>
|
|
|
|
<policy label_prefix="intel_fb_controller" root="/" writeable="yes"/>
|
|
|
|
</config>
|
|
|
|
</start>
|
|
|
|
|
|
|
|
<start name="config_rom" priority="-1">
|
|
|
|
<binary name="fs_rom"/>
|
|
|
|
<resource name="RAM" quantum="4M"/>
|
|
|
|
<provides><service name="ROM"/></provides>
|
|
|
|
<route>
|
|
|
|
<service name="File_system"> <child name="config_fs" /> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
2022-01-21 10:07:28 +00:00
|
|
|
</start>}
|
|
|
|
|
|
|
|
append_if $use_gpu config {
|
2024-05-30 13:46:57 +00:00
|
|
|
<start name="intel_gpu" caps="2000">
|
2022-11-02 15:00:57 +00:00
|
|
|
<resource name="RAM" quantum="90M"/>
|
2022-01-21 10:07:28 +00:00
|
|
|
<provides>
|
|
|
|
<service name="Gpu"/>
|
|
|
|
<service name="Platform"/>
|
|
|
|
</provides>
|
2024-02-20 13:22:28 +00:00
|
|
|
<config max_framebuffer_memory="64M">
|
2022-01-21 10:07:28 +00:00
|
|
|
<device vendor="0x8086" device="0x1606" generation="8" platform="broadwell" description="HD Graphics (BDW GT1 ULT)"/>
|
|
|
|
<device vendor="0x8086" device="0x1616" generation="8" platform="broadwell" description="HD Graphics 5500 (BDW GT2 ULT)"/>
|
|
|
|
<device vendor="0x8086" device="0x1622" generation="8" platform="broadwell" description="Iris Pro Graphics 6200 (BDW GT3e)"/>
|
|
|
|
<device vendor="0x8086" device="0x1916" generation="9" platform="skylake" description="HD Graphics 520 (Skylake, Gen9)"/>
|
|
|
|
<device vendor="0x8086" device="0x191b" generation="9" platform="skylake" description="HD Graphics 530 (Skylake, Gen9)"/>
|
|
|
|
<device vendor="0x8086" device="0x5916" generation="9" platform="kabylake" description="HD Graphics 620 (Kaby Lake, Gen9p5)"/>
|
|
|
|
<device vendor="0x8086" device="0x5917" generation="9" platform="kabylake" description="UHD Graphics 620 (Kaby Lake, Gen9p5)"/>
|
|
|
|
<device vendor="0x8086" device="0x591b" generation="9" platform="kabylake" description="HD Graphics 630 (Kaby Lake, Gen9p5)"/>
|
|
|
|
<device vendor="0x8086" device="0x3ea0" generation="9" platform="whiskeylake" description="UHD Graphics 620 (Whiskey Lake, Gen9p5)"/>
|
2022-12-20 11:06:37 +00:00
|
|
|
<device vendor="0x8086" device="0x9a49" generation="12" platform="tigerlake" description="Iris Xe Graphics (Tiger Lake, Xe)"/>
|
2022-01-21 10:07:28 +00:00
|
|
|
</config>
|
|
|
|
<route>
|
|
|
|
<service name="Platform"> <parent/> </service>
|
|
|
|
<any-service> <parent /> <any-child/> </any-service>
|
|
|
|
</route>
|
|
|
|
</start>}
|
2018-04-09 21:33:34 +00:00
|
|
|
|
2022-01-21 10:07:28 +00:00
|
|
|
append config {
|
2024-05-30 13:46:57 +00:00
|
|
|
<start name="intel_fb" caps="1000">
|
|
|
|
<binary name="pc_intel_fb"/>
|
2022-11-02 15:00:57 +00:00
|
|
|
<resource name="RAM" quantum="90M"/>
|
2022-01-21 10:07:28 +00:00
|
|
|
<route>}
|
|
|
|
|
|
|
|
append_if $use_gpu config {
|
2024-05-30 13:46:57 +00:00
|
|
|
<service name="Platform"> <child name="intel_gpu"/> </service>}
|
2022-01-21 10:07:28 +00:00
|
|
|
|
|
|
|
append config {
|
2020-05-08 14:21:20 +00:00
|
|
|
<service name="ROM" label="config">
|
2024-05-30 13:46:57 +00:00
|
|
|
<child name="config_rom" label="fb.config"/> </service>
|
2018-04-09 21:33:34 +00:00
|
|
|
<service name="Report"> <child name="report_rom"/> </service>
|
|
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
|
|
</route>
|
2022-11-02 15:02:43 +00:00
|
|
|
</start>}
|
2018-04-09 21:33:34 +00:00
|
|
|
|
2023-07-10 13:34:36 +00:00
|
|
|
append_if $use_fb_controller config {
|
2018-04-09 21:33:34 +00:00
|
|
|
<start name="intel_fb_controller" priority="-1">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
2022-11-02 15:02:43 +00:00
|
|
|
<config>
|
2022-01-27 14:47:44 +00:00
|
|
|
<vfs> <fs/> </vfs>
|
|
|
|
</config>
|
2018-04-09 21:33:34 +00:00
|
|
|
<route>
|
|
|
|
<service name="File_system"> <child name="config_fs"/> </service>
|
|
|
|
<service name="ROM" label="connectors"> <child name="report_rom"/> </service>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</route>
|
2022-11-02 15:02:43 +00:00
|
|
|
</start>}
|
2018-04-09 21:33:34 +00:00
|
|
|
|
2022-11-02 15:02:43 +00:00
|
|
|
append config {
|
2018-04-09 21:33:34 +00:00
|
|
|
<start name="test-framebuffer" priority="-1">
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
2020-07-01 20:26:11 +00:00
|
|
|
<provides> <service name="Capture"/> </provides>
|
|
|
|
<config/>
|
2018-04-09 21:33:34 +00:00
|
|
|
</start>
|
|
|
|
</config>
|
2015-09-09 14:21:19 +00:00
|
|
|
</start>
|
|
|
|
</config>}
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
2023-11-17 16:24:13 +00:00
|
|
|
build_boot_image [build_artifacts]
|
2015-09-09 14:21:19 +00:00
|
|
|
|
2022-07-25 15:04:12 +00:00
|
|
|
if { [get_cmd_switch --autopilot] } {
|
2024-08-06 11:15:32 +00:00
|
|
|
run_genode_until {\[init -\> init_dynamic -\> intel_fb\] HDMI-A-3: enable.*} 30
|
|
|
|
run_genode_until {\</connectors\>} 20 [output_spawn_id]
|
|
|
|
run_genode_until {green} 30 [output_spawn_id]
|
2022-07-25 15:04:12 +00:00
|
|
|
} else {
|
|
|
|
run_genode_until forever
|
|
|
|
}
|