2012-12-20 16:34:33 +00:00
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
|
2015-06-08 07:05:32 +00:00
|
|
|
set build_components {
|
2012-05-24 18:09:26 +00:00
|
|
|
core init
|
|
|
|
drivers/timer
|
2015-08-12 12:21:24 +00:00
|
|
|
drivers/framebuffer drivers/input drivers/audio
|
2012-12-20 16:34:33 +00:00
|
|
|
app/avplay drivers/acpi
|
|
|
|
}
|
|
|
|
|
2015-06-08 07:05:32 +00:00
|
|
|
source ${genode_dir}/repos/base/run/platform_drv.inc
|
|
|
|
append_platform_drv_build_components
|
|
|
|
|
|
|
|
build $build_components
|
|
|
|
|
2012-12-20 16:34:33 +00:00
|
|
|
#
|
|
|
|
# Download media file
|
|
|
|
#
|
|
|
|
|
|
|
|
set media_url "ftp://ftp.untergrund.net/users/ae/dhstv/escape-chotro.mp4"
|
|
|
|
if {![file exists bin/mediafile]} {
|
|
|
|
puts "downloading media file from $media_url"
|
|
|
|
catch { exec wget -O bin/mediafile $media_url }
|
2012-05-24 18:09:26 +00:00
|
|
|
}
|
|
|
|
|
2012-12-20 16:34:33 +00:00
|
|
|
#
|
|
|
|
# Generate config
|
|
|
|
#
|
|
|
|
|
2012-05-24 18:09:26 +00:00
|
|
|
create_boot_directory
|
|
|
|
|
|
|
|
set config {
|
|
|
|
<config>
|
|
|
|
<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"/>
|
|
|
|
</parent-provides>
|
|
|
|
<default-route>
|
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
|
|
|
</default-route>
|
2017-05-07 20:36:11 +00:00
|
|
|
<default caps="100"/>
|
2012-05-24 18:09:26 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
append_if [have_spec sdl] config {
|
2018-07-04 16:48:04 +00:00
|
|
|
<start name="fb_sdl" ld="no">
|
2012-05-24 18:09:26 +00:00
|
|
|
<resource name="RAM" quantum="4M"/>
|
|
|
|
<provides>
|
|
|
|
<service name="Input"/>
|
|
|
|
<service name="Framebuffer"/>
|
|
|
|
</provides>
|
|
|
|
</start>}
|
|
|
|
|
2015-06-08 07:05:32 +00:00
|
|
|
append_platform_drv_config
|
2012-05-24 18:09:26 +00:00
|
|
|
|
2013-04-29 08:51:27 +00:00
|
|
|
append_if [have_spec framebuffer] config {
|
|
|
|
<start name="fb_drv">
|
2015-05-06 14:09:29 +00:00
|
|
|
<resource name="RAM" quantum="8M"/>
|
2012-05-24 18:09:26 +00:00
|
|
|
<provides><service name="Framebuffer"/></provides>
|
2015-05-06 14:09:29 +00:00
|
|
|
<config buffered="yes"/>
|
2012-05-24 18:09:26 +00:00
|
|
|
</start>}
|
|
|
|
|
|
|
|
append_if [have_spec ps2] config {
|
|
|
|
<start name="ps2_drv">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Input"/></provides>
|
|
|
|
</start> }
|
|
|
|
|
|
|
|
append config {
|
|
|
|
<start name="timer">
|
|
|
|
<resource name="RAM" quantum="1M"/>
|
|
|
|
<provides><service name="Timer"/></provides>
|
|
|
|
</start>
|
2015-08-12 12:21:24 +00:00
|
|
|
<start name="audio_drv">
|
2017-03-09 16:08:26 +00:00
|
|
|
<binary name="} [audio_drv_binary] {"/>
|
2015-05-06 14:09:29 +00:00
|
|
|
<resource name="RAM" quantum="8M"/>
|
2012-12-20 16:34:33 +00:00
|
|
|
<provides>
|
|
|
|
<service name="Audio_out"/>
|
|
|
|
</provides>
|
|
|
|
</start>
|
2017-05-07 20:36:11 +00:00
|
|
|
<start name="avplay" caps="200">
|
2012-05-24 18:09:26 +00:00
|
|
|
<resource name="RAM" quantum="64M"/>
|
|
|
|
<config>
|
|
|
|
<arg value="avplay"/>
|
|
|
|
<arg value="mediafile"/>
|
|
|
|
<sdl_audio_volume value="100"/>
|
2017-03-20 11:04:55 +00:00
|
|
|
<vfs>
|
|
|
|
<dir name="dev"> <log/> </dir>
|
|
|
|
<rom name="mediafile"/>
|
|
|
|
</vfs>
|
|
|
|
<libc stdout="/dev/log" stderr="/dev/log"/>
|
2012-05-24 18:09:26 +00:00
|
|
|
</config>
|
2012-12-20 16:34:33 +00:00
|
|
|
<route>
|
2015-06-08 07:05:32 +00:00
|
|
|
<service name="Platform"> <any-child /> </service>
|
2016-03-17 15:04:37 +00:00
|
|
|
<service name="Audio_out"> <child name="audio_drv"/> </service>
|
2012-12-20 16:34:33 +00:00
|
|
|
<any-service> <parent/> <any-child /> </any-service>
|
|
|
|
</route>
|
2012-05-24 18:09:26 +00:00
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
2012-12-20 16:34:33 +00:00
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
|
2017-03-09 16:08:26 +00:00
|
|
|
append boot_modules {
|
|
|
|
core init timer } [audio_drv_binary] { avplay
|
2018-04-23 08:49:21 +00:00
|
|
|
ld.lib.so libc.lib.so vfs.lib.so vfs.lib.so vfs.lib.so libm.lib.so pthread.lib.so zlib.lib.so sdl.lib.so
|
2012-05-24 18:09:26 +00:00
|
|
|
avfilter.lib.so avutil.lib.so avcodec.lib.so avformat.lib.so swscale.lib.so
|
2017-11-17 12:03:22 +00:00
|
|
|
avresample.lib.so
|
2012-05-24 18:09:26 +00:00
|
|
|
mediafile
|
|
|
|
}
|
|
|
|
|
2013-04-29 08:51:27 +00:00
|
|
|
lappend_if [have_spec linux] boot_modules fb_sdl
|
|
|
|
lappend_if [have_spec framebuffer] boot_modules fb_drv
|
|
|
|
lappend_if [have_spec ps2] boot_modules ps2_drv
|
2015-06-08 07:05:32 +00:00
|
|
|
|
|
|
|
append_platform_drv_boot_modules
|
2012-05-24 18:09:26 +00:00
|
|
|
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
|
2017-05-23 13:05:55 +00:00
|
|
|
append qemu_args " -soundhw es1370"
|
2012-05-24 18:09:26 +00:00
|
|
|
|
|
|
|
run_genode_until forever
|
|
|
|
|