2014-05-20 20:52:55 +00:00
|
|
|
source ${genode_dir}/repos/libports/run/qt5_common.inc
|
|
|
|
|
2018-04-24 10:40:22 +00:00
|
|
|
import_from_depot genodelabs/src/qt5_component \
|
|
|
|
genodelabs/src/qt5_printsupport \
|
|
|
|
genodelabs/src/qt5_textedit \
|
|
|
|
genodelabs/src/qt5_widgets
|
|
|
|
|
2013-08-09 13:04:52 +00:00
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
|
2017-01-03 12:17:41 +00:00
|
|
|
if {[have_spec odroid_xu]} {
|
2015-02-24 13:53:15 +00:00
|
|
|
puts "Run script does not support this platform."
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2015-09-17 10:50:42 +00:00
|
|
|
append build_components [qt5_build_components feature]
|
2014-05-20 20:52:55 +00:00
|
|
|
|
2015-09-03 12:55:05 +00:00
|
|
|
set use_sd_card_driver [expr [have_spec omap4] || [have_spec arndale]]
|
2016-08-03 14:47:20 +00:00
|
|
|
set use_ahci_driver [expr [have_spec x86] && ![have_spec linux]]
|
2013-08-09 13:04:52 +00:00
|
|
|
|
2013-08-14 13:24:01 +00:00
|
|
|
lappend_if $use_sd_card_driver build_components drivers/sd_card
|
2015-04-17 13:56:21 +00:00
|
|
|
lappend_if $use_ahci_driver build_components drivers/ahci
|
2013-08-14 13:24:01 +00:00
|
|
|
lappend_if [have_spec acpi] build_components drivers/acpi
|
|
|
|
lappend_if [have_spec linux] build_components server/ram_fs
|
2017-05-16 18:59:37 +00:00
|
|
|
lappend_if [expr ![have_spec linux]] build_components server/fatfs_fs
|
2013-08-09 13:04:52 +00:00
|
|
|
|
|
|
|
build $build_components
|
2014-05-20 20:52:55 +00:00
|
|
|
|
2013-08-09 13:04:52 +00:00
|
|
|
#
|
|
|
|
# Generate config
|
|
|
|
#
|
|
|
|
|
2014-05-20 20:52:55 +00:00
|
|
|
append config {
|
2013-08-09 13:04:52 +00:00
|
|
|
<config>
|
2014-05-20 20:52:55 +00:00
|
|
|
<parent-provides>}
|
|
|
|
append config [qt5_parent_provides feature]
|
|
|
|
append config {
|
2013-08-09 13:04:52 +00:00
|
|
|
</parent-provides>
|
2017-05-07 20:36:11 +00:00
|
|
|
<default caps="100"/>
|
2013-08-09 13:04:52 +00:00
|
|
|
<default-route>
|
2017-08-17 11:29:32 +00:00
|
|
|
<any-service> <parent/> <any-child/> </any-service>
|
2014-05-20 20:52:55 +00:00
|
|
|
</default-route>}
|
|
|
|
|
|
|
|
append config [qt5_start_nodes feature]
|
2013-08-09 13:04:52 +00:00
|
|
|
|
2015-04-17 13:56:21 +00:00
|
|
|
append_if $use_ahci_driver config {
|
2015-09-17 10:50:42 +00:00
|
|
|
<start name="ahci_drv">
|
2015-03-25 10:12:52 +00:00
|
|
|
<resource name="RAM" quantum="5M"/>
|
2013-08-09 13:04:52 +00:00
|
|
|
<provides> <service name="Block"/> </provides>
|
2015-03-25 10:12:52 +00:00
|
|
|
<config>
|
2017-05-16 18:59:37 +00:00
|
|
|
<policy label_prefix="fatfs_fs" device="0" />
|
2015-03-25 10:12:52 +00:00
|
|
|
</config>
|
2013-08-09 13:04:52 +00:00
|
|
|
</start>}
|
|
|
|
|
2013-08-14 13:24:01 +00:00
|
|
|
append_if $use_sd_card_driver config {
|
2013-08-09 13:04:52 +00:00
|
|
|
<start name="sd_card_drv">
|
|
|
|
<resource name="RAM" quantum="1M" />
|
|
|
|
<provides><service name="Block"/></provides>
|
|
|
|
</start>}
|
|
|
|
|
2013-08-14 13:24:01 +00:00
|
|
|
append_if [have_spec linux] config {
|
|
|
|
<start name="ram_fs">
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
|
|
|
<provides><service name="File_system"/></provides>
|
|
|
|
<config>
|
|
|
|
<!-- constrain sessions according to their labels -->
|
2016-11-24 14:28:32 +00:00
|
|
|
<policy label_prefix="textedit" root="/" writeable="yes" />
|
|
|
|
<policy label_prefix="textedit2" root="/" writeable="yes" />
|
2013-08-14 13:24:01 +00:00
|
|
|
</config>
|
|
|
|
</start>}
|
|
|
|
|
|
|
|
append_if [expr ![have_spec linux]] config {
|
2017-05-16 18:59:37 +00:00
|
|
|
<start name="fatfs_fs">
|
2013-08-14 13:24:01 +00:00
|
|
|
<resource name="RAM" quantum="10M"/>
|
|
|
|
<provides><service name="File_system"/></provides>
|
|
|
|
<config>
|
|
|
|
<!-- constrain sessions according to their labels -->
|
2016-11-24 14:28:32 +00:00
|
|
|
<policy label_prefix="textedit" root="/" writeable="yes" />
|
2013-08-14 13:24:01 +00:00
|
|
|
</config>
|
|
|
|
</start>}
|
|
|
|
|
2013-08-09 13:04:52 +00:00
|
|
|
append config {
|
2017-05-22 12:50:09 +00:00
|
|
|
<start name="textedit" caps="250">
|
2013-08-09 13:04:52 +00:00
|
|
|
<resource name="RAM" quantum="70M"/>
|
2017-05-24 18:02:19 +00:00
|
|
|
<config>
|
2018-04-24 10:40:22 +00:00
|
|
|
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc"/>
|
2017-02-02 17:26:57 +00:00
|
|
|
<vfs>
|
2018-04-24 10:40:22 +00:00
|
|
|
<dir name="dev">
|
|
|
|
<log/>
|
|
|
|
<inline name="rtc">2018-01-01 00:01</inline>
|
|
|
|
</dir>
|
2017-02-02 17:26:57 +00:00
|
|
|
<dir name="fs"> <fs/> </dir>
|
2018-04-24 10:40:22 +00:00
|
|
|
<tar name="qt5_dejavusans.tar"/>
|
2017-02-02 17:26:57 +00:00
|
|
|
</vfs>
|
2014-04-14 09:57:22 +00:00
|
|
|
</config>
|
2017-08-17 11:29:32 +00:00
|
|
|
<route>
|
|
|
|
<service name="Nitpicker"> <child name="wm"/> </service>
|
2017-11-24 19:23:45 +00:00
|
|
|
<service name="Report" label="shape">
|
|
|
|
<child name="pointer" label="wm -> textedit -> shape"/>
|
|
|
|
</service>
|
2017-08-17 11:29:32 +00:00
|
|
|
<service name="ROM" label="egl_drv.lib.so"> <parent label="egl_swrast.lib.so" /> </service>
|
|
|
|
<any-service> <parent /> <any-child/> </any-service>
|
|
|
|
</route>
|
2013-08-09 13:04:52 +00:00
|
|
|
</start>
|
2017-05-22 12:50:09 +00:00
|
|
|
<start name="textedit2" caps="250">
|
2013-08-09 13:04:52 +00:00
|
|
|
<binary name="textedit" />
|
|
|
|
<resource name="RAM" quantum="70M"/>
|
2017-05-24 18:02:19 +00:00
|
|
|
<config>
|
2018-04-24 10:40:22 +00:00
|
|
|
<libc stdout="/dev/log" stderr="/dev/log" rtc="/dev/rtc"/>
|
2017-02-02 17:26:57 +00:00
|
|
|
<vfs>
|
2018-04-24 10:40:22 +00:00
|
|
|
<dir name="dev">
|
|
|
|
<log/>
|
|
|
|
<inline name="rtc">2018-01-01 00:01</inline>
|
|
|
|
</dir>
|
2017-02-02 17:26:57 +00:00
|
|
|
<dir name="fs"> <fs/> </dir>
|
2018-04-24 10:40:22 +00:00
|
|
|
<tar name="qt5_dejavusans.tar"/>
|
2017-02-02 17:26:57 +00:00
|
|
|
</vfs>
|
2014-04-14 09:57:22 +00:00
|
|
|
</config>
|
2017-08-17 11:29:32 +00:00
|
|
|
<route>
|
|
|
|
<service name="Nitpicker"> <child name="wm"/> </service>
|
2017-11-24 19:23:45 +00:00
|
|
|
<service name="Report" label="shape">
|
|
|
|
<child name="pointer" label="wm -> textedit2 -> shape"/>
|
|
|
|
</service>
|
2017-08-17 11:29:32 +00:00
|
|
|
<service name="ROM" label="egl_drv.lib.so"> <parent label="egl_swrast.lib.so" /> </service>
|
|
|
|
<any-service> <parent /> <any-child/> </any-service>
|
|
|
|
</route>
|
2013-08-09 13:04:52 +00:00
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
|
2015-09-17 10:50:42 +00:00
|
|
|
append boot_modules [qt5_boot_modules feature]
|
2014-05-20 20:52:55 +00:00
|
|
|
|
2013-08-09 13:04:52 +00:00
|
|
|
# platform-specific modules
|
2013-08-14 13:24:01 +00:00
|
|
|
lappend_if [have_spec linux] boot_modules ram_fs
|
2017-05-16 18:59:37 +00:00
|
|
|
lappend_if [expr ![have_spec linux]] boot_modules fatfs_fs
|
2013-08-14 13:24:01 +00:00
|
|
|
lappend_if $use_sd_card_driver boot_modules sd_card_drv
|
2015-03-25 10:12:52 +00:00
|
|
|
lappend_if $use_ahci_driver boot_modules ahci_drv
|
2013-08-09 13:04:52 +00:00
|
|
|
|
|
|
|
build_boot_image $boot_modules
|
|
|
|
|
|
|
|
set disk_image "bin/test.hda"
|
|
|
|
set cmd "dd if=/dev/zero of=$disk_image bs=1024 count=65536"
|
|
|
|
puts "creating disk image: $cmd"
|
|
|
|
catch { exec sh -c $cmd }
|
|
|
|
|
|
|
|
set cmd "mkfs.vfat -F32 $disk_image"
|
|
|
|
puts "formating disk image with vfat file system: $cmd"
|
|
|
|
catch { exec sh -c $cmd }
|
|
|
|
|
2016-03-24 10:48:04 +00:00
|
|
|
append_if $use_ahci_driver qemu_args " -drive id=disk,file=$disk_image,format=raw,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d"
|
2013-08-09 13:04:52 +00:00
|
|
|
|
2017-05-23 13:05:55 +00:00
|
|
|
append qemu_args " -usbdevice tablet "
|
2013-08-09 13:04:52 +00:00
|
|
|
|
|
|
|
run_genode_until forever
|
2014-05-20 20:52:55 +00:00
|
|
|
|