diff --git a/repos/libports/lib/import/import-qt5.inc b/repos/libports/lib/import/import-qt5.inc index 541df217f..b81ec5bfb 100644 --- a/repos/libports/lib/import/import-qt5.inc +++ b/repos/libports/lib/import/import-qt5.inc @@ -52,7 +52,7 @@ HEADERS_FILTERED = $(filter-out $(HEADERS_FILTER_OUT), $(HEADERS)) SRC_CC += $(SOURCES_FILTERED) # handle moc-headers, resources and ui descriptions -$(SRC_CC:.cpp=.o): $(addprefix ui_,$(FORMS:.ui=.h)) +$(addsuffix .o,$(basename $(SRC_CC))): $(addprefix ui_,$(FORMS:.ui=.h)) SRC_CC_QT_GENERATED = $(addprefix moc_,$(HEADERS_FILTERED:.h=.cpp)) \ $(addprefix qrc_,$(RESOURCES:.qrc=.cpp)) diff --git a/repos/libports/lib/mk/qt5.inc b/repos/libports/lib/mk/qt5.inc index c9f604b18..00cf23356 100644 --- a/repos/libports/lib/mk/qt5.inc +++ b/repos/libports/lib/mk/qt5.inc @@ -6,10 +6,10 @@ SRC_CC += $(filter %.cc, $(QT_SOURCES_FILTERED)) SRC_C += $(filter %.c, $(QT_SOURCES_FILTERED)) COMPILER_MOC_HEADER_MAKE_ALL_FILES_FILTERED = $(filter-out $(COMPILER_MOC_HEADER_MAKE_ALL_FILES_FILTER_OUT), $(COMPILER_MOC_HEADER_MAKE_ALL_FILES)) -$(SRC_CC:.cpp=.o): $(COMPILER_MOC_HEADER_MAKE_ALL_FILES_FILTERED) +$(addsuffix .o,$(basename $(SRC_CC))): $(COMPILER_MOC_HEADER_MAKE_ALL_FILES_FILTERED) COMPILER_MOC_SOURCE_MAKE_ALL_FILES_FILTERED = $(filter-out $(COMPILER_MOC_SOURCE_MAKE_ALL_FILES_FILTER_OUT), $(COMPILER_MOC_SOURCE_MAKE_ALL_FILES)) -$(SRC_CC:.cpp=.o): $(COMPILER_MOC_SOURCE_MAKE_ALL_FILES_FILTERED) +$(addsuffix .o,$(basename $(SRC_CC))): $(COMPILER_MOC_SOURCE_MAKE_ALL_FILES_FILTERED) QT5_INC_DIR += $(REP_DIR)/src/lib/qt5/qtbase/mkspecs/qws/genode-generic-g++ \ $(REP_DIR)/src/lib/qt5/qtbase/src/corelib/global diff --git a/repos/libports/lib/mk/qt5_core.mk b/repos/libports/lib/mk/qt5_core.mk index 9f4d01c47..3e5c18eb3 100644 --- a/repos/libports/lib/mk/qt5_core.mk +++ b/repos/libports/lib/mk/qt5_core.mk @@ -25,6 +25,10 @@ COMPILER_MOC_HEADER_MAKE_ALL_FILES_FILTER_OUT = \ include $(REP_DIR)/lib/mk/qt5.inc +# reduce 'not implemented yet' noise +SRC_CC += libc_dummies.cc +vpath libc_dummies.cc $(REP_DIR)/src/lib/qt5 + INC_DIR += $(REP_DIR)/include/qt5/qtbase/QtCore/private \ $(REP_DIR)/src/lib/qt5/qtbase/src/corelib/thread \ $(REP_DIR)/contrib/$(QT5)/qtbase/include/QtCore/$(QT_VERSION) \ diff --git a/repos/libports/lib/mk/qt5_v8.mk b/repos/libports/lib/mk/qt5_v8.mk index 67dc909d1..dd52805d0 100644 --- a/repos/libports/lib/mk/qt5_v8.mk +++ b/repos/libports/lib/mk/qt5_v8.mk @@ -49,7 +49,7 @@ QT_SOURCES += \ regexp-macro-assembler-ia32.cc \ stub-cache-ia32.cc QT_VPATH += qtjsbackend/src/3rdparty/v8/src/ia32 -else +else ifeq ($(filter-out $(SPECS),arm),) QT_DEFINES += -DV8_TARGET_ARCH_ARM QT_SOURCES += \ @@ -57,6 +57,7 @@ QT_SOURCES += \ builtins-arm.cc \ code-stubs-arm.cc \ codegen-arm.cc \ + constants-arm.cc \ cpu-arm.cc \ debug-arm.cc \ deoptimizer-arm.cc \ @@ -71,7 +72,7 @@ QT_SOURCES += \ regexp-macro-assembler-arm.cc \ stub-cache-arm.cc QT_VPATH += qtjsbackend/src/3rdparty/v8/src/arm -endif +endif endif endif @@ -80,4 +81,3 @@ QT_VPATH += qtjsbackend/generated include $(REP_DIR)/lib/mk/qt5.inc LIBS += qt5_network - diff --git a/repos/libports/run/qt5.run b/repos/libports/run/qt5.run index c8db391df..30070f173 100644 --- a/repos/libports/run/qt5.run +++ b/repos/libports/run/qt5.run @@ -1,21 +1,18 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + # # Build # -build { - core - init - drivers/input/ps2 - drivers/pci - drivers/framebuffer - drivers/timer - server/nitpicker - server/liquid_framebuffer +set build_components [qt5_build_components feature] + +append build_components { app/qt5/qt_launchpad app/qt5/examples/calculatorform app/qt5/examples/tetrix } +build $build_components create_boot_directory @@ -25,59 +22,17 @@ create_boot_directory set config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { - } + } -append_if [have_spec sdl] config { - - - - - - - } - -append_if [have_spec pci] config { - - - - } - -append_if [have_spec framebuffer] config { - - - - } - -append_if [have_spec ps2] config { - - - - } +append config [qt5_start_nodes feature] append config { - - - - - - - - @@ -90,13 +45,9 @@ install_config $config # Boot modules # -# generic modules -set boot_modules { - core - init - timer - nitpicker - liquid_fb +set boot_modules [qt5_boot_modules feature] + +append boot_modules { qt_launchpad freetype.lib.so gallium.lib.so @@ -122,14 +73,9 @@ set boot_modules { } -# platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec ps2] boot_modules ps2_drv - build_boot_image $boot_modules append qemu_args " -m 512" run_genode_until forever + diff --git a/repos/libports/run/qt5_avplay.run b/repos/libports/run/qt5_avplay.run index aa887e2a2..7b64a4376 100644 --- a/repos/libports/run/qt5_avplay.run +++ b/repos/libports/run/qt5_avplay.run @@ -1,21 +1,20 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + +set feature(Audio_out) 1 + # # Build # -build { - core - init - drivers/input/ps2 - drivers/pci - drivers/framebuffer - drivers/timer - drivers/audio_out - server/nitpicker - server/liquid_framebuffer +set build_components [qt5_build_components feature] + +append build_components { app/avplay app/qt5/qt_avplay } +build $build_components + # # Download media file # @@ -34,63 +33,17 @@ create_boot_directory set config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { - } + } -append_if [have_spec sdl] config { - - - - - - - } - -append_if [have_spec pci] config { - - - - } - -append_if [have_spec framebuffer] config { - - - - } - -append_if [have_spec ps2] config { - - - - } +append config [qt5_start_nodes feature] append config { - - - - - - - - - - - - @@ -106,14 +59,9 @@ install_config $config # Boot modules # -# generic modules -set boot_modules { - core - init - timer - audio_out_drv - nitpicker - liquid_fb +set boot_modules [qt5_boot_modules feature] + +append boot_modules { qt_avplay freetype.lib.so gallium.lib.so @@ -144,12 +92,6 @@ set boot_modules { stdcxx.lib.so } -# platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec ps2] boot_modules ps2_drv - build_boot_image $boot_modules append qemu_args " -m 768 -soundhw all" diff --git a/repos/libports/run/qt5_calculatorform.run b/repos/libports/run/qt5_calculatorform.run index 79b02887a..dcef822b1 100644 --- a/repos/libports/run/qt5_calculatorform.run +++ b/repos/libports/run/qt5_calculatorform.run @@ -1,19 +1,17 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + # # Build # -build { - core - init - drivers/input/ps2 - drivers/pci - drivers/framebuffer - drivers/timer - server/nitpicker - server/liquid_framebuffer +set build_components [qt5_build_components feature] + +append build_components { app/qt5/examples/calculatorform } +build $build_components + create_boot_directory # @@ -22,59 +20,17 @@ create_boot_directory set config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { - } + } -append_if [have_spec sdl] config { - - - - - - - } - -append_if [have_spec pci] config { - - - - } - -append_if [have_spec framebuffer] config { - - - - } - -append_if [have_spec ps2] config { - - - - } +append config [qt5_start_nodes feature] append config { - - - - - - - - @@ -87,13 +43,9 @@ install_config $config # Boot modules # -# generic modules -set boot_modules { - core - init - timer - nitpicker - liquid_fb +set boot_modules [qt5_boot_modules feature] + +append boot_modules { calculatorform freetype.lib.so gallium.lib.so @@ -114,14 +66,9 @@ set boot_modules { stdcxx.lib.so } -# platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec ps2] boot_modules ps2_drv - build_boot_image $boot_modules append qemu_args " -m 128" run_genode_until forever + diff --git a/repos/libports/run/qt5_common.inc b/repos/libports/run/qt5_common.inc new file mode 100644 index 000000000..c034b2db7 --- /dev/null +++ b/repos/libports/run/qt5_common.inc @@ -0,0 +1,80 @@ +source ${genode_dir}/repos/libports/run/qt5_drivers.inc + +set feature(Input) 1 +set feature(Framebuffer) 1 +set feature(Timer) 1 + +# +# Build +# + +proc qt5_build_components { feature_arg } { + + upvar $feature_arg feature + + set build_components { + core + init + } + + append build_components [drivers_build_components feature] + + append build_components { + server/nitpicker + } + + return $build_components +} + + +# +# Configuration +# + +proc qt5_parent_provides { feature_arg } { + + upvar $feature_arg feature + + set parent_provides [drivers_parent_provides feature] + + return $parent_provides +} + +proc qt5_start_nodes { feature_arg } { + + upvar $feature_arg feature + + set start_nodes [drivers_start_nodes feature] + + append start_nodes { + + + + + } + + return $start_nodes +} + +# +# Boot modules +# + +proc qt5_boot_modules { feature_arg } { + + upvar $feature_arg feature + + set boot_modules { + core + init + } + + append boot_modules [drivers_boot_modules feature] + + append boot_modules { + nitpicker + } + + return $boot_modules +} + diff --git a/repos/libports/run/qt5_drivers.inc b/repos/libports/run/qt5_drivers.inc new file mode 100644 index 000000000..69a202706 --- /dev/null +++ b/repos/libports/run/qt5_drivers.inc @@ -0,0 +1,221 @@ + +# +# Helper functions +# + +proc use_audio_out_drv { feature_arg } { + upvar $feature_arg feature + return [info exists feature(Audio_out)] +} + +proc use_fb_drv { feature_arg } { + upvar $feature_arg feature + return [have_spec framebuffer] +} + +proc use_fb_sdl { feature_arg } { + upvar $feature_arg feature + return [have_spec linux] +} + +proc use_gpio_drv { feature_arg } { + upvar $feature_arg feature + return [expr {[use_usb_drv feature] && + [have_spec gpio]}] +} + +proc use_nic_drv { feature_arg } { + upvar $feature_arg feature + return [expr {[info exists feature(Nic)] && + ![use_usb_drv feature]}] +} + +proc use_pci_drv { feature_arg } { + upvar $feature_arg feature + return [expr {[use_nic_drv feature] && + [have_spec pci]}] +} + +proc use_ps2_drv { feature_arg } { + upvar $feature_arg feature + return [have_spec ps2] +} + +proc use_timer { feature_arg } { + upvar $feature_arg feature + return [info exists feature(Timer)] +} + +proc use_usb_drv { feature_arg } { + upvar $feature_arg feature + return [expr {([info exists feature(Input)] || + [info exists feature(Nic)]) && + (![use_ps2_drv feature] && [have_spec usb])}] +} + +# +# Build +# + +proc drivers_build_components { feature_arg } { + + upvar $feature_arg feature + + set build_components { } + + lappend_if [use_audio_out_drv feature] build_components drivers/audio_out + lappend_if [use_fb_drv feature] build_components drivers/framebuffer + lappend_if [use_fb_sdl feature] build_components drivers/framebuffer + lappend_if [use_gpio_drv feature] build_components drivers/gpio + lappend_if [use_nic_drv feature] build_components drivers/nic + lappend_if [use_pci_drv feature] build_components drivers/pci + lappend_if [use_ps2_drv feature] build_components drivers/input/ps2 + lappend_if [use_timer feature] build_components drivers/timer + lappend_if [use_usb_drv feature] build_components drivers/usb + + return $build_components +} + +# +# Configuration +# + +proc drivers_parent_provides { feature_arg } { + + upvar $feature_arg feature + + set parent_provides { } + + # TODO: make dependent on features + + append parent_provides { + + + + + + + + + + + + } + + return $parent_provides +} + +proc drivers_start_nodes { feature_arg } { + + upvar $feature_arg feature + + set start_nodes { } + + append_if [use_audio_out_drv feature] start_nodes { + + + + + } + + append_if [use_fb_drv feature] start_nodes { + + + + + } + + append_if [use_fb_sdl feature] start_nodes { + + + + + + + + } + + append_if [use_gpio_drv feature] start_nodes { + + + + + + } + + append_if [use_nic_drv feature] start_nodes { + + + + + } + + append_if [use_pci_drv feature] start_nodes { + + + + + } + + append_if [use_ps2_drv feature] start_nodes { + + + + + } + + append_if [use_timer feature] start_nodes { + + + + + } + + if { [use_usb_drv feature] } { + append start_nodes { + + + } + append_if [info exists feature(Input)] start_nodes { + } + append_if [info exists feature(Nic)] start_nodes { + } + append start_nodes { + + } + append_if [info exists feature(Input)] start_nodes { + } + append_if [info exists feature(Nic)] start_nodes { + } + append start_nodes { + + + } + } + + return $start_nodes +} + +# +# Boot modules +# + +proc drivers_boot_modules { feature_arg } { + + upvar $feature_arg feature + + set boot_modules { } + + lappend_if [use_audio_out_drv feature] boot_modules audio_out_drv + lappend_if [use_fb_drv feature] boot_modules fb_drv + lappend_if [use_fb_sdl feature] boot_modules fb_sdl + lappend_if [use_gpio_drv feature] boot_modules gpio_drv + lappend_if [use_nic_drv feature] boot_modules nic_drv + lappend_if [use_pci_drv feature] boot_modules pci_drv + lappend_if [use_ps2_drv feature] boot_modules ps2_drv + lappend_if [use_timer feature] boot_modules timer + lappend_if [use_usb_drv feature] boot_modules usb_drv + + return $boot_modules +} + diff --git a/repos/libports/run/qt5_openglwindow.run b/repos/libports/run/qt5_openglwindow.run index 2d9209c89..246e52274 100644 --- a/repos/libports/run/qt5_openglwindow.run +++ b/repos/libports/run/qt5_openglwindow.run @@ -1,18 +1,17 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + # # Build # -build { - core - init - drivers/input/ps2 - drivers/pci - drivers/framebuffer - drivers/timer - server/nitpicker +set build_components [qt5_build_components feature] + +append build_components { app/qt5/examples/openglwindow } +build $build_components + create_boot_directory # @@ -21,59 +20,17 @@ create_boot_directory set config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { - } + } -append_if [have_spec sdl] config { - - - - - - - } - -append_if [have_spec pci] config { - - - - } - -append_if [have_spec framebuffer] config { - - - - } - -append_if [have_spec ps2] config { - - - - } +append config [qt5_start_nodes feature] append config { - - - - - - - - @@ -91,12 +48,9 @@ install_config $config # Boot modules # -# generic modules -set boot_modules { - core - init - timer - nitpicker +set boot_modules [qt5_boot_modules feature] + +append boot_modules { openglwindow freetype.lib.so gallium.lib.so @@ -117,14 +71,9 @@ set boot_modules { stdcxx.lib.so } -# platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec ps2] boot_modules ps2_drv - build_boot_image $boot_modules append qemu_args " -m 256" run_genode_until forever + diff --git a/repos/libports/run/qt5_previewer.run b/repos/libports/run/qt5_previewer.run index 72f7485ff..7dcc33e52 100644 --- a/repos/libports/run/qt5_previewer.run +++ b/repos/libports/run/qt5_previewer.run @@ -1,19 +1,17 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + # # Build # -build { - core - init - drivers/input/ps2 - drivers/pci - drivers/framebuffer - drivers/timer - server/nitpicker - server/liquid_framebuffer +set build_components [qt5_build_components feature] + +append build_components { app/qt5/examples/previewer } +build $build_components + create_boot_directory # @@ -22,59 +20,17 @@ create_boot_directory set config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { - } + } -append_if [have_spec sdl] config { - - - - - - - } - -append_if [have_spec pci] config { - - - - } - -append_if [have_spec framebuffer] config { - - - - } - -append_if [have_spec ps2] config { - - - - } +append config [qt5_start_nodes feature] append config { - - - - - - - - @@ -87,13 +43,9 @@ install_config $config # Boot modules # -# generic modules -set boot_modules { - core - init - timer - nitpicker - liquid_fb +set boot_modules [qt5_boot_modules feature] + +append boot_modules { previewer freetype.lib.so gallium.lib.so @@ -124,14 +76,9 @@ set boot_modules { stdcxx.lib.so } -# platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec ps2] boot_modules ps2_drv - build_boot_image $boot_modules append qemu_args " -m 256" run_genode_until forever + diff --git a/repos/libports/run/qt5_qpluginwidget.run b/repos/libports/run/qt5_qpluginwidget.run index 77a708e55..37e43398b 100644 --- a/repos/libports/run/qt5_qpluginwidget.run +++ b/repos/libports/run/qt5_qpluginwidget.run @@ -1,21 +1,20 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + # # Build # -build { - core - init - drivers/input/ps2 - drivers/pci - drivers/framebuffer - drivers/timer - server/nitpicker +set build_components [qt5_build_components feature] + +append build_components { server/loader server/tar_rom test/nitpicker test/qt5/qpluginwidget } +build $build_components + create_boot_directory # @@ -24,59 +23,17 @@ create_boot_directory set config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { - } + } -append_if [have_spec sdl] config { - - - - - - - } - -append_if [have_spec pci] config { - - - - } - -append_if [have_spec framebuffer] config { - - - - } - -append_if [have_spec ps2] config { - - - - } +append config [qt5_start_nodes feature] append config { - - - - - - - - @@ -95,12 +52,9 @@ install_config $config exec sh -c "ln -sf ../test/qt5/qpluginwidget/test-plugin.tar bin/" -# generic modules -set boot_modules { - core - init - timer - nitpicker +set boot_modules [qt5_boot_modules feature] + +append boot_modules { loader tar_rom testnit @@ -130,14 +84,9 @@ set boot_modules { stdcxx.lib.so } -# platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec ps2] boot_modules ps2_drv - build_boot_image $boot_modules append qemu_args " -m 128" run_genode_until forever + diff --git a/repos/libports/run/qt5_quicktest.run b/repos/libports/run/qt5_quicktest.run index b7d19adbf..889d92aba 100644 --- a/repos/libports/run/qt5_quicktest.run +++ b/repos/libports/run/qt5_quicktest.run @@ -1,19 +1,18 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + # # Build # -build { - core - init - drivers/input/ps2 - drivers/pci - drivers/framebuffer - drivers/timer - server/nitpicker +set build_components [qt5_build_components feature] + +append build_components { app/qt5/qt_quicktest lib/qt5/qtdeclarative/src/imports/qtquick2 } +build $build_components + create_boot_directory # @@ -28,59 +27,17 @@ exec tar chf bin/qt5_fs.tar -C bin/qt5_fs . set config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { - } + } -append_if [have_spec sdl] config { - - - - - - - } - -append_if [have_spec pci] config { - - - - } - -append_if [have_spec framebuffer] config { - - - - } - -append_if [have_spec ps2] config { - - - - } +append config [qt5_start_nodes feature] append config { - - - - - - - - @@ -101,16 +58,12 @@ install_config $config # Boot modules # -# generic modules - # The QtQuick plugin currently needs to be provided both in the file system # (for Qt) and as ROM module (for 'dlopen()'). -set boot_modules { - core - init - timer - nitpicker +set boot_modules [qt5_boot_modules feature] + +append boot_modules { qt_quicktest freetype.lib.so gallium.lib.so @@ -139,14 +92,9 @@ set boot_modules { qt5_qtquick2plugin.lib.so } -# platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec ps2] boot_modules ps2_drv - build_boot_image $boot_modules append qemu_args " -m 256" run_genode_until forever + diff --git a/repos/libports/run/qt5_samegame.run b/repos/libports/run/qt5_samegame.run index 04514b999..d95b5d1c7 100644 --- a/repos/libports/run/qt5_samegame.run +++ b/repos/libports/run/qt5_samegame.run @@ -1,19 +1,18 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + # # Build # -build { - core - init - drivers/input/ps2 - drivers/pci - drivers/framebuffer - drivers/timer - server/nitpicker +set build_components [qt5_build_components feature] + +append build_components { app/qt5/examples/samegame lib/qt5/qtdeclarative/src/imports/qtquick2 } +build $build_components + create_boot_directory # @@ -28,59 +27,17 @@ exec tar chf bin/qt5_fs.tar -C bin/qt5_fs . set config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { - } + } -append_if [have_spec sdl] config { - - - - - - - } - -append_if [have_spec pci] config { - - - - } - -append_if [have_spec framebuffer] config { - - - - } - -append_if [have_spec ps2] config { - - - - } +append config [qt5_start_nodes feature] append config { - - - - - - - - @@ -101,16 +58,12 @@ install_config $config # Boot modules # -# generic modules - # The QtQuick plugin currently needs to be provided both in the file system # (for Qt) and as ROM module (for 'dlopen()'). -set boot_modules { - core - init - timer - nitpicker +set boot_modules [qt5_boot_modules feature] + +append boot_modules { samegame freetype.lib.so gallium.lib.so @@ -139,14 +92,9 @@ set boot_modules { qt5_qtquick2plugin.lib.so } -# platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec ps2] boot_modules ps2_drv - build_boot_image $boot_modules append qemu_args " -m 256" run_genode_until forever + diff --git a/repos/libports/run/qt5_tetrix.run b/repos/libports/run/qt5_tetrix.run index ad5fcc530..917f1af38 100644 --- a/repos/libports/run/qt5_tetrix.run +++ b/repos/libports/run/qt5_tetrix.run @@ -1,18 +1,17 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + # # Build # -build { - core - init - drivers/input/ps2 - drivers/pci - drivers/framebuffer - drivers/timer - server/nitpicker +set build_components [qt5_build_components feature] + +append build_components { app/qt5/examples/tetrix } +build $build_components + create_boot_directory # @@ -21,59 +20,17 @@ create_boot_directory set config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { - } + } -append_if [have_spec sdl] config { - - - - - - - } - -append_if [have_spec pci] config { - - - - } - -append_if [have_spec framebuffer] config { - - - - } - -append_if [have_spec ps2] config { - - - - } +append config [qt5_start_nodes feature] append config { - - - - - - - - @@ -86,12 +43,9 @@ install_config $config # Boot modules # -# generic modules -set boot_modules { - core - init - timer - nitpicker +set boot_modules [qt5_boot_modules feature] + +append boot_modules { tetrix freetype.lib.so gallium.lib.so @@ -114,14 +68,9 @@ set boot_modules { stdcxx.lib.so } -# platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec ps2] boot_modules ps2_drv - build_boot_image $boot_modules append qemu_args " -m 128" run_genode_until forever + diff --git a/repos/libports/run/qt5_textedit.run b/repos/libports/run/qt5_textedit.run index 1e1abfbde..742985317 100644 --- a/repos/libports/run/qt5_textedit.run +++ b/repos/libports/run/qt5_textedit.run @@ -1,108 +1,56 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + # # Build # -set build_components { - core - init - drivers/framebuffer - drivers/timer - server/nitpicker - server/liquid_framebuffer +set build_components [qt5_build_components feature] + +append build_components { app/qt5/examples/textedit } set use_sd_card_driver [expr [have_spec omap4] || [have_spec exynos5]] -set use_usb_driver [expr [have_spec omap4] || [have_spec exynos5]] lappend_if $use_sd_card_driver build_components drivers/sd_card -lappend_if $use_usb_driver build_components drivers/usb -lappend_if [have_spec pci] build_components drivers/pci lappend_if [have_spec pci] build_components drivers/atapi lappend_if [have_spec acpi] build_components drivers/acpi -lappend_if [have_spec ps2] build_components drivers/input/ps2 lappend_if [have_spec linux] build_components server/ram_fs lappend_if [expr ![have_spec linux]] build_components server/ffat_fs -lappend_if [have_spec gpio] build_components drivers/gpio build $build_components + create_boot_directory # # Generate config # -set config { +append config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { - } + } -append_if [have_spec sdl] config { - - - - - - - } +append config [qt5_start_nodes feature] append_if [have_spec pci] config { - - - - } -append_if [have_spec gpio] config { - - - - - } - append_if $use_sd_card_driver config { } -append_if [have_spec framebuffer] config { - - - - } - -append_if [expr ![have_spec ps2] && [have_spec usb]] config { - - - - - } - -append_if [have_spec ps2] config { - - - - } - append_if [have_spec linux] config { @@ -125,14 +73,6 @@ append_if [expr ![have_spec linux]] config { } append config { - - - - - - - - @@ -159,13 +99,9 @@ install_config $config # Boot modules # -# generic modules -set boot_modules { - core - init - timer - nitpicker - liquid_fb +set boot_modules [qt5_boot_modules feature] + +append boot_modules { textedit freetype.lib.so gallium.lib.so @@ -187,16 +123,10 @@ set boot_modules { } # platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl lappend_if [have_spec linux] boot_modules ram_fs lappend_if [expr ![have_spec linux]] boot_modules ffat_fs -lappend_if [have_spec pci] boot_modules pci_drv lappend_if [have_spec pci] boot_modules atapi_drv -lappend_if [have_spec ps2] boot_modules ps2_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv lappend_if $use_sd_card_driver boot_modules sd_card_drv -lappend_if $use_usb_driver boot_modules usb_drv -lappend_if [have_spec gpio] boot_modules gpio_drv build_boot_image $boot_modules @@ -214,3 +144,4 @@ append_if [have_spec pci] qemu_args " -hda $disk_image -boot order=d " append qemu_args " -m 256" run_genode_until forever + diff --git a/repos/libports/src/lib/qt5/libc_dummies.cc b/repos/libports/src/lib/qt5/libc_dummies.cc new file mode 100644 index 000000000..27c6bdb71 --- /dev/null +++ b/repos/libports/src/lib/qt5/libc_dummies.cc @@ -0,0 +1,15 @@ +/* + * \brief quiet libc dummy functions to reduce the log noise + * \author Christian Prochaska + * \date 2014-04-16 + */ + +/* + * Copyright (C) 2014 Genode Labs GmbH + * + * This file is part of the Genode OS framework, which is distributed + * under the terms of the GNU General Public License version 2. + */ + +extern "C" void _sigprocmask() { } +extern "C" void sigprocmask() { } diff --git a/repos/libports/src/lib/qt5/patches/qt5_arm.patch b/repos/libports/src/lib/qt5/patches/qt5_arm.patch new file mode 100644 index 000000000..e22592869 --- /dev/null +++ b/repos/libports/src/lib/qt5/patches/qt5_arm.patch @@ -0,0 +1,77 @@ +qt5_arm.patch + +From: Christian Prochaska + + +--- + qtjsbackend/src/3rdparty/v8/src/arm/cpu-arm.cc | 6 ++++++ + .../Source/JavaScriptCore/assembler/ARMAssembler.h | 7 +++++++ + .../JavaScriptCore/assembler/MacroAssemblerARM.cpp | 3 ++- + 3 files changed, 15 insertions(+), 1 deletion(-) + +diff --git a/qtjsbackend/src/3rdparty/v8/src/arm/cpu-arm.cc b/qtjsbackend/src/3rdparty/v8/src/arm/cpu-arm.cc +index bed9503..286d7be 100644 +--- a/qtjsbackend/src/3rdparty/v8/src/arm/cpu-arm.cc ++++ b/qtjsbackend/src/3rdparty/v8/src/arm/cpu-arm.cc +@@ -27,6 +27,10 @@ + + // CPU specific code for arm independent of OS goes here. + ++#ifdef __GENODE__ ++#include ++#endif ++ + #include "v8.h" + + #if defined(__arm__) && !defined(_WIN32_WCE) +@@ -78,6 +82,8 @@ void CPU::FlushICache(void* start, size_t size) { + // __ARM_NR_cacheflush. As well as Windows CE does not support to flush a + // region, so we need to flush the whole process. + FlushInstructionCache(GetCurrentProcess(), NULL, NULL); ++#elif defined(__GENODE__) ++ Genode::cache_coherent((Genode::addr_t)start, size); + #else + // Ideally, we would call + // syscall(__ARM_NR_cacheflush, start, +diff --git a/qtwebkit/Source/JavaScriptCore/assembler/ARMAssembler.h b/qtwebkit/Source/JavaScriptCore/assembler/ARMAssembler.h +index 18b1017..7b0e2ea 100644 +--- a/qtwebkit/Source/JavaScriptCore/assembler/ARMAssembler.h ++++ b/qtwebkit/Source/JavaScriptCore/assembler/ARMAssembler.h +@@ -29,9 +29,14 @@ + + #if ENABLE(ASSEMBLER) && CPU(ARM_TRADITIONAL) + ++#if OS(GENODE) ++#include ++#endif ++ + #include "AssemblerBufferWithConstantPool.h" + #include "JITCompilationEffort.h" + #include ++ + namespace JSC { + + typedef uint32_t ARMWord; +@@ -1052,6 +1057,8 @@ namespace JSC { + UNUSED_PARAM(size); + #elif OS(QNX) + msync(code, size, MS_INVALIDATE_ICACHE); ++#elif OS(GENODE) ++ Genode::cache_coherent((Genode::addr_t)code, size); + #else + #error "The cacheFlush support is missing on this platform." + #endif +diff --git a/qtwebkit/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp b/qtwebkit/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp +index 98dc3e9..e26df76 100644 +--- a/qtwebkit/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp ++++ b/qtwebkit/Source/JavaScriptCore/assembler/MacroAssemblerARM.cpp +@@ -57,7 +57,8 @@ static bool isVFPPresent() + } + #endif + +-#if (COMPILER(RVCT) && defined(__TARGET_FPU_VFP)) || (COMPILER(GCC) && defined(__VFP_FP__)) ++#if (COMPILER(RVCT) && defined(__TARGET_FPU_VFP)) || \ ++ (COMPILER(GCC) && defined(__VFP_FP__) && !defined(__SOFTFP__)) + return true; + #else + return false; diff --git a/repos/libports/src/lib/qt5/patches/qt5_qml.patch b/repos/libports/src/lib/qt5/patches/qt5_qml.patch index 8da5cd646..2ec84f818 100644 --- a/repos/libports/src/lib/qt5/patches/qt5_qml.patch +++ b/repos/libports/src/lib/qt5/patches/qt5_qml.patch @@ -76,7 +76,7 @@ index 5702c59..3d616b5 100644 QT_BEGIN_NAMESPACE diff --git a/qtjsbackend/src/3rdparty/v8/src/platform-genode.cc b/qtjsbackend/src/3rdparty/v8/src/platform-genode.cc new file mode 100644 -index 0000000..3a8cf90 +index 0000000..a2e5634 --- /dev/null +++ b/qtjsbackend/src/3rdparty/v8/src/platform-genode.cc @@ -0,0 +1,701 @@ @@ -209,17 +209,17 @@ index 0000000..3a8cf90 + return 0; +} + -+#if 0 ++ +CpuImplementer OS::GetCpuImplementer() { -+ UNIMPLEMENTED(); ++ return UNKNOWN_IMPLEMENTER; +} + + +bool OS::ArmCpuHasFeature(CpuFeature feature) { -+ UNIMPLEMENTED(); ++ return false; +} + -+ ++#if 0 +bool OS::ArmUsingHardFloat() { + UNIMPLEMENTED(); +} diff --git a/repos/libports/src/lib/qt5/patches/qt5_qpa.patch b/repos/libports/src/lib/qt5/patches/qt5_qpa.patch index b72617505..62c2a64b2 100644 --- a/repos/libports/src/lib/qt5/patches/qt5_qpa.patch +++ b/repos/libports/src/lib/qt5/patches/qt5_qpa.patch @@ -7,7 +7,8 @@ From: Christian Prochaska .../fontdatabases/basic/qbasicfontdatabase.cpp | 9 +++++++++ .../input/evdevkeyboard/qevdevkeyboardhandler.cpp | 9 ++++++--- .../input/evdevkeyboard/qevdevkeyboardhandler_p.h | 2 ++ - 3 files changed, 17 insertions(+), 3 deletions(-) + qtbase/src/widgets/kernel/qwidget_qpa.cpp | 2 +- + 4 files changed, 18 insertions(+), 4 deletions(-) diff --git a/qtbase/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp b/qtbase/src/platformsupport/fontdatabases/basic/qbasicfontdatabase.cpp index 9b87418..aa25c6b 100644 @@ -91,3 +92,16 @@ index 1065b05..b395d46 100644 KeycodeAction processKeycode(quint16 keycode, bool pressed, bool autorepeat); private: +diff --git a/qtbase/src/widgets/kernel/qwidget_qpa.cpp b/qtbase/src/widgets/kernel/qwidget_qpa.cpp +index dafe7dc..79bfd40 100644 +--- a/qtbase/src/widgets/kernel/qwidget_qpa.cpp ++++ b/qtbase/src/widgets/kernel/qwidget_qpa.cpp +@@ -933,7 +933,7 @@ void QWidgetPrivate::registerDropSite(bool on) + void QWidgetPrivate::setMask_sys(const QRegion ®ion) + { + if (!QGuiApplicationPrivate::platformIntegration()->hasCapability(QPlatformIntegration::WindowMasks)) { +- qWarning("%s: Not supported on %s.", Q_FUNC_INFO, qPrintable(QGuiApplication::platformName())); ++ //qWarning("%s: Not supported on %s.", Q_FUNC_INFO, qPrintable(QGuiApplication::platformName())); + return; + } + Q_Q(QWidget); diff --git a/repos/libports/src/lib/qt5/patches/qt5_textedit_example.patch b/repos/libports/src/lib/qt5/patches/qt5_textedit_example.patch index 1bc2cbbed..515b6862b 100644 --- a/repos/libports/src/lib/qt5/patches/qt5_textedit_example.patch +++ b/repos/libports/src/lib/qt5/patches/qt5_textedit_example.patch @@ -4,16 +4,16 @@ From: Christian Prochaska --- - qtbase/examples/widgets/richtext/textedit/main.cpp | 21 +++++++++++++++++++- - .../widgets/richtext/textedit/textedit.cpp | 11 +++++----- + qtbase/examples/widgets/richtext/textedit/main.cpp | 17 ++++++++++++++++- + .../widgets/richtext/textedit/textedit.cpp | 11 +++++------ .../widgets/richtext/textedit/textedit.pro | 4 ---- - 3 files changed, 25 insertions(+), 11 deletions(-) + 3 files changed, 21 insertions(+), 11 deletions(-) diff --git a/qtbase/examples/widgets/richtext/textedit/main.cpp b/qtbase/examples/widgets/richtext/textedit/main.cpp -index 196dbfc..2513df9 100644 +index 196dbfc..ff8d024 100644 --- a/qtbase/examples/widgets/richtext/textedit/main.cpp +++ b/qtbase/examples/widgets/richtext/textedit/main.cpp -@@ -39,16 +39,35 @@ +@@ -39,6 +39,10 @@ ** ****************************************************************************/ @@ -24,11 +24,7 @@ index 196dbfc..2513df9 100644 #include "textedit.h" #include -+/* disable "not implemented yet" messages */ -+extern "C" void _sigprocmask() { } -+extern "C" void sigprocmask() { } -+ - int main(int argc, char *argv[]) +@@ -46,9 +50,20 @@ int main(int argc, char *argv[]) { Q_INIT_RESOURCE(textedit); diff --git a/repos/libports/src/lib/qt5/patches/series b/repos/libports/src/lib/qt5/patches/series index 57ac76227..46b19360d 100644 --- a/repos/libports/src/lib/qt5/patches/series +++ b/repos/libports/src/lib/qt5/patches/series @@ -13,4 +13,5 @@ qt5_qtwebkit.patch qt5_textedit_example.patch qt5_openglwindow_example.patch qt5_qml.patch +qt5_arm.patch qt5_tools.patch diff --git a/repos/libports/src/test/qt5/qpluginwidget/config.plugin b/repos/libports/src/test/qt5/qpluginwidget/config.plugin index 7d6d2d462..eda407929 100644 --- a/repos/libports/src/test/qt5/qpluginwidget/config.plugin +++ b/repos/libports/src/test/qt5/qpluginwidget/config.plugin @@ -1,6 +1,7 @@ + diff --git a/repos/libports/tool/qt5/Makefile b/repos/libports/tool/qt5/Makefile index 08873170b..b00485b56 100644 --- a/repos/libports/tool/qt5/Makefile +++ b/repos/libports/tool/qt5/Makefile @@ -14,16 +14,7 @@ include $(REP_DIR)/lib/mk/qt5_version.inc # all: qmake/qmake moc/moc rcc/rcc uic/uic -# -# Determine qmakespec to be passed to the sub makefiles -# -ifeq ($(shell uname -m),x86_64) -HOST_ARCH := 64 -else -HOST_ARCH := 32 -endif - -QMAKESPEC = $(REP_DIR)/contrib/$(QT5)/qtbase/mkspecs/linux-g++-$(HOST_ARCH) +QMAKESPEC = $(REP_DIR)/contrib/$(QT5)/qtbase/mkspecs/linux-g++ # # Build qmake diff --git a/repos/ports/run/arora.run b/repos/ports/run/arora.run index a34e7e736..e1a3cbdf1 100644 --- a/repos/ports/run/arora.run +++ b/repos/ports/run/arora.run @@ -1,22 +1,18 @@ +source ${genode_dir}/repos/libports/run/qt5_common.inc + +set feature(Nic) 1 + # # Build # -set build_components { - core init - drivers/timer drivers/framebuffer drivers/pci drivers/input drivers/nic - server/nitpicker +set build_components [qt5_build_components feature] + +append build_components { server/loader server/tar_rom server/nit_fb app/launchpad test/nitpicker app/arora } -# -# Qt5-specific components to build -# -append_if [expr ![have_spec qt4_deprecated]] build_components { - server/liquid_framebuffer -} - build $build_components create_boot_directory @@ -30,65 +26,19 @@ exec tar cf bin/nitpicker_plugin.tar -C [genode_dir]/repos/ports/src/app/arora/d # Generate config # -append config { +set config { - - - - - - - - - - - - + } +append config [qt5_parent_provides feature] +append config { } -append_if [have_spec sdl] config { - - - - - - - } - -append_if [have_spec pci] config { - - - - } - -append_if [have_spec framebuffer] config { - - - - } - -append_if [have_spec ps2] config { - - - - } +append config [qt5_start_nodes feature] append config { - - - - - - - - - - - - @@ -109,11 +59,9 @@ install_config $config # Boot modules # -# generic modules -set boot_modules { - core init - timer nic_drv - nitpicker +set boot_modules [qt5_boot_modules feature] + +append boot_modules { loader tar_rom nit_fb @@ -152,7 +100,6 @@ if {[have_spec qt4_deprecated]} { # Qt5-specific boot modules # append boot_modules { - liquid_fb gallium.lib.so icu.lib.so pthread.lib.so @@ -176,12 +123,6 @@ if {[have_spec qt4_deprecated]} { } } -# platform-specific modules -lappend_if [have_spec linux] boot_modules fb_sdl -lappend_if [have_spec pci] boot_modules pci_drv -lappend_if [have_spec framebuffer] boot_modules fb_drv -lappend_if [have_spec ps2] boot_modules ps2_drv - build_boot_image $boot_modules append qemu_args " -m 512 " @@ -192,3 +133,4 @@ append_if [have_spec lan9118] qemu_args " -net nic,model=lan9118 " append qemu_args " -net user " run_genode_until forever + diff --git a/repos/ports/src/app/arora/patches/arora_disable_log_messages.patch b/repos/ports/src/app/arora/patches/arora_disable_log_messages.patch deleted file mode 100644 index 1443a6e35..000000000 --- a/repos/ports/src/app/arora/patches/arora_disable_log_messages.patch +++ /dev/null @@ -1,23 +0,0 @@ -arora_disable_log_messages.patch - -From: Christian Prochaska - - ---- - src/main.cpp | 3 +++ - 1 file changed, 3 insertions(+) - -diff --git a/src/main.cpp b/src/main.cpp -index 1d4d531..a9771b0 100644 ---- a/src/main.cpp -+++ b/src/main.cpp -@@ -24,6 +24,9 @@ - #include "explorerstyle.h" - #endif - -+/* disable "not implemented yet" messages */ -+extern "C" void _sigprocmask() { } -+ - int main(int argc, char **argv) - { - Q_INIT_RESOURCE(htmls); diff --git a/repos/ports/src/app/arora/patches/series b/repos/ports/src/app/arora/patches/series index 36cbc6932..5417860c3 100644 --- a/repos/ports/src/app/arora/patches/series +++ b/repos/ports/src/app/arora/patches/series @@ -6,5 +6,4 @@ arora_disable_adblock.patch arora_bookmarks.patch arora_disable_program_exit.patch arora_startpage.patch -arora_disable_log_messages.patch arora_disable_ssl_messageboxes.patch