2014-05-20 20:52:55 +00:00
|
|
|
source ${genode_dir}/repos/libports/run/qt5_common.inc
|
|
|
|
|
2013-08-09 13:04:52 +00:00
|
|
|
#
|
|
|
|
# Build
|
|
|
|
#
|
|
|
|
|
2015-02-24 13:53:15 +00:00
|
|
|
if {[have_spec hw_odroid_xu]} {
|
|
|
|
puts "Run script does not support this platform."
|
|
|
|
exit 0
|
|
|
|
}
|
|
|
|
|
2014-05-20 20:52:55 +00:00
|
|
|
set build_components [qt5_build_components feature]
|
|
|
|
|
|
|
|
append build_components {
|
2013-08-09 13:04:52 +00:00
|
|
|
app/qt5/examples/textedit
|
|
|
|
}
|
|
|
|
|
2015-02-24 13:53:15 +00:00
|
|
|
set use_sd_card_driver [expr [have_spec omap4] || [have_spec platform_arndale]]
|
2015-04-17 13:56:21 +00:00
|
|
|
set use_ahci_driver [have_spec x86]
|
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
|
|
|
|
lappend_if [expr ![have_spec linux]] build_components server/ffat_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
|
|
|
create_boot_directory
|
|
|
|
|
2014-08-12 16:08:06 +00:00
|
|
|
#
|
|
|
|
# Create Qt tar archive
|
|
|
|
|
|
|
|
create_qt5_fs_tar_archive "textedit" "gui"
|
|
|
|
|
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>
|
|
|
|
<default-route>
|
2014-05-20 20:52:57 +00:00
|
|
|
<any-service> <parent/> <child name="wm"/> <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 {
|
|
|
|
<start name="ahci">
|
2015-03-25 10:12:52 +00:00
|
|
|
<binary name="ahci_drv" />
|
|
|
|
<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>
|
|
|
|
<policy label="ffat_fs" device="0" />
|
|
|
|
</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 -->
|
|
|
|
<policy label="textedit" root="/" writeable="yes" />
|
|
|
|
<policy label="textedit2" root="/" writeable="yes" />
|
|
|
|
</config>
|
|
|
|
</start>}
|
|
|
|
|
|
|
|
append_if [expr ![have_spec linux]] config {
|
|
|
|
<start name="ffat_fs">
|
|
|
|
<resource name="RAM" quantum="10M"/>
|
|
|
|
<provides><service name="File_system"/></provides>
|
|
|
|
<config>
|
|
|
|
<!-- constrain sessions according to their labels -->
|
|
|
|
<policy label="textedit" root="/" writeable="yes" />
|
|
|
|
</config>
|
|
|
|
</start>}
|
|
|
|
|
2013-08-09 13:04:52 +00:00
|
|
|
append config {
|
|
|
|
<start name="textedit">
|
|
|
|
<resource name="RAM" quantum="70M"/>
|
2014-04-14 09:57:22 +00:00
|
|
|
<config xpos="3" ypos="0" width="500" height="710">
|
2014-08-12 16:08:06 +00:00
|
|
|
<libc stdout="/dev/log" stderr="/dev/log">
|
|
|
|
<vfs>
|
|
|
|
<dir name="dev"> <log/> </dir>
|
|
|
|
<tar name="qt5_fs_textedit.tar"/>
|
|
|
|
<dir name="fs"> <fs/> </dir>
|
|
|
|
</vfs>
|
2014-04-14 09:57:22 +00:00
|
|
|
</libc>
|
|
|
|
</config>
|
2013-08-09 13:04:52 +00:00
|
|
|
</start>
|
|
|
|
<start name="textedit2">
|
|
|
|
<binary name="textedit" />
|
|
|
|
<resource name="RAM" quantum="70M"/>
|
2014-04-14 09:57:22 +00:00
|
|
|
<config xpos="512" ypos="0" width="500" height="710">
|
2014-08-12 16:08:06 +00:00
|
|
|
<libc stdout="/dev/log" stderr="/dev/log">
|
|
|
|
<vfs>
|
|
|
|
<dir name="dev"> <log/> </dir>
|
|
|
|
<tar name="qt5_fs_textedit.tar"/>
|
|
|
|
<dir name="fs"> <fs/> </dir>
|
|
|
|
</vfs>
|
2014-04-14 09:57:22 +00:00
|
|
|
</libc>
|
|
|
|
</config>
|
2013-08-09 13:04:52 +00:00
|
|
|
</start>
|
|
|
|
</config>
|
|
|
|
}
|
|
|
|
|
|
|
|
install_config $config
|
|
|
|
|
|
|
|
#
|
|
|
|
# Boot modules
|
|
|
|
#
|
|
|
|
|
2014-05-20 20:52:55 +00:00
|
|
|
set boot_modules [qt5_boot_modules feature]
|
|
|
|
|
|
|
|
append boot_modules {
|
2013-08-09 13:04:52 +00:00
|
|
|
textedit
|
|
|
|
freetype.lib.so
|
2013-11-25 18:02:52 +00:00
|
|
|
gallium.lib.so
|
2013-08-09 13:04:52 +00:00
|
|
|
icu.lib.so
|
|
|
|
ld.lib.so
|
|
|
|
libc.lib.so
|
|
|
|
libc_lock_pipe.lib.so
|
|
|
|
libm.lib.so
|
|
|
|
libpng.lib.so
|
|
|
|
jpeg.lib.so
|
|
|
|
pthread.lib.so
|
|
|
|
qt5_core.lib.so
|
|
|
|
qt5_gui.lib.so
|
|
|
|
qt5_widgets.lib.so
|
|
|
|
qt5_xml.lib.so
|
|
|
|
zlib.lib.so
|
|
|
|
stdcxx.lib.so
|
2014-08-12 16:08:06 +00:00
|
|
|
qt5_fs_textedit.tar
|
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
|
|
|
|
lappend_if [expr ![have_spec linux]] boot_modules ffat_fs
|
|
|
|
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 }
|
|
|
|
|
2015-04-17 13:56:21 +00:00
|
|
|
append_if $use_ahci_driver qemu_args " -drive id=disk,file=$disk_image,if=none -device ahci,id=ahci -device ide-drive,drive=disk,bus=ahci.0 -boot d"
|
2013-08-09 13:04:52 +00:00
|
|
|
|
|
|
|
append qemu_args " -m 256"
|
|
|
|
|
|
|
|
run_genode_until forever
|
2014-05-20 20:52:55 +00:00
|
|
|
|