-
-
Notifications
You must be signed in to change notification settings - Fork 185
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'cairo' of https://github.com/kakaroto/heads
- Loading branch information
Showing
6 changed files
with
101 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
modules-$(CONFIG_CAIRO) += cairo | ||
|
||
cairo_version := 1.14.12 | ||
cairo_dir := cairo-$(cairo_version) | ||
cairo_tar := cairo-$(cairo_version).tar.xz | ||
cairo_url := https://www.cairographics.org/releases/$(cairo_tar) | ||
cairo_hash := 8c90f00c500b2299c0a323dd9beead2a00353752b2092ead558139bd67f7bf16 | ||
|
||
cairo_configure := \ | ||
$(CROSS_TOOLS) \ | ||
CFLAGS="-DCAIRO_NO_MUTEX=1 -O3" \ | ||
./configure \ | ||
--host i386-elf-linux \ | ||
--prefix="/" \ | ||
--disable-xlib --disable-xcb --disable-pdf \ | ||
--disable-ps --disable-svg --disable-script \ | ||
--disable-ft --disable-fc --disable-pthread \ | ||
--disable-glib --disable-gobject | ||
|
||
cairo_target := \ | ||
$(MAKE_JOBS) \ | ||
$(CROSS_TOOLS) \ | ||
DESTDIR="$(INSTALL)" \ | ||
install | ||
|
||
cairo_libraries := src/.libs/libcairo.so.2 | ||
|
||
cairo_depends := pixman $(musl_dep) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,15 @@ | ||
modules-$(CONFIG_FBWHIPTAIL) += fbwhiptail | ||
|
||
fbwhiptail_depends := cairo $(musl_dep) | ||
|
||
fbwhiptail_version := git | ||
fbwhiptail_dir := fbwhiptail | ||
fbwhiptail_repo := https://code.puri.sm/kakaroto/fbwhiptail.git | ||
|
||
fbwhiptail_target := \ | ||
$(MAKE_JOBS) \ | ||
$(CROSS_TOOLS) \ | ||
fbwhiptail | ||
|
||
fbwhiptail_output := \ | ||
fbwhiptail whiptail |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
modules-$(CONFIG_CAIRO) += libpng | ||
|
||
libpng_version := 1.6.34 | ||
libpng_dir := libpng-$(libpng_version) | ||
libpng_tar := libpng-$(libpng_version).tar.gz | ||
libpng_url := https://download.sourceforge.net/libpng/$(libpng_tar) | ||
libpng_hash := 574623a4901a9969080ab4a2df9437026c8a87150dfd5c235e28c94b212964a7 | ||
|
||
libpng_configure := \ | ||
$(CROSS_TOOLS) \ | ||
./configure \ | ||
--host i386-elf-linux \ | ||
--prefix="/" \ | ||
|
||
libpng_target := \ | ||
$(MAKE_JOBS) \ | ||
$(CROSS_TOOLS) \ | ||
DESTDIR="$(INSTALL)" \ | ||
install \ | ||
|
||
libpng_libraries := .libs/libpng16.so.16 | ||
|
||
libpng_depends := zlib $(musl_dep) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
modules-$(CONFIG_CAIRO) += pixman | ||
|
||
pixman_version := 0.34.0 | ||
pixman_dir := pixman-$(pixman_version) | ||
pixman_tar := pixman-$(pixman_version).tar.gz | ||
pixman_url := https://www.cairographics.org/releases/$(pixman_tar) | ||
pixman_hash := 21b6b249b51c6800dc9553b65106e1e37d0e25df942c90531d4c3997aa20a88e | ||
|
||
pixman_configure := \ | ||
$(CROSS_TOOLS) \ | ||
./configure \ | ||
--host i386-elf-linux \ | ||
--prefix="/" \ | ||
--disable-gtk | ||
|
||
pixman_target := \ | ||
$(MAKE_JOBS) \ | ||
$(CROSS_TOOLS) \ | ||
DESTDIR="$(INSTALL)" \ | ||
install \ | ||
|
||
pixman_libraries := pixman/.libs/libpixman-1.so.0 | ||
|
||
pixman_depends := libpng $(musl_dep) |
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
When merging the changes into x230 board config, the following boot gives the following error in loop:
I don't see any probable differences in the merge applying to Librem that could explain the error for x230.
@kakaroto ?
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Might be linked to coreboot config:
CONFIG_HAVE_VGA_TEXT_FRAMEBUFFER=y
Retesting with it commented.
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Humm.. It might be the text framebuffer, might be something else. I use the DRM interface for drawing on the framebuffer, I also had a linuxfb 'driver' to draw the cairo surface into /dev/fb but since on my machine, it didn't support double buffering (which caused horrible tearing at every refresh), that's why I implemented the DRM 'driver'.
So, your issue here is either because you use the VGA text framebuffer, which means the framebuffer doesn't work/exist, or because your kernel driver doesn't support the DRI interface at all and you should use the linuxfb driver (which I removed, so I'd need to commit that back and make it use it if DRI fails).
You can check if there's a /dev/dri/card0 device on your machine, and you could also define DRI_DEBUG in fbwhiptail/cairo_dri.c and recompile, see if the debugging information from DRI are more helpful (no DRI card, no screens, no valid modes, etc...)
EDIT: I think that even if coreboot initializes the graphics in vga text mode, it won't matter, once the i915 kernel driver of heads loads up, it will set it up differently, no ? In the case of the librem, we don't include the vgabios or vbt, and we don't do any graphics initialization in coreboot, the i915 driver does it for us once Heads is loaded, and that saves some time in boot time from coreboot not initializing the GPU needlessly
EDIT2: https://github.com/osresearch/heads/blob/master/config/linux-x230.config#L1508 :
# CONFIG_DRM_I915 is not set
That's probably why it failed, because the DRM driver isn't compiled. You should either enable it, or if /dev/fb works for you and supports double buffering and you prefer that, I can bring back the linuxfb driver in fbwhiptail.
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kakaroto : weird it is found in the Audio Coprocessor section. Testing.
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kakaroto It did it. Thanks!
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@tlaurion cool, glad it worked! Weird that you found the option in Audio Coprocessor though...
I hope you like how it looks now with fbwhiptail :)
We'll soon start working on it again so that the gui design isn't as bad (it was done for a ps3 game in 2011, so it was flashy and used (apparently) out-of-fashion reflection on buttons) and make everything customizable through arguments (I'm actually thinking of a
--gui definition.txt
option instead of having hundreds of --gui-related-options).For now, the only gui options available are --background-gradient (like used in the whiptail wrapper script) or --background-png (which will stretch the png to fit the screen resolution), so you could at least customize that.
Note: on your linux system, if you compile fbwhiptail, it will build 'gtkwhiptail' which you can use to test stuff out with the buffer being drawn inside of a gtk window.
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kakaroto : screen flickers on the librem13v2 when booting xen before linux kernel?
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
no idea, never tried xen, maybe @kylerankin can answer that.
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with i915 enabled on x230, there is a long pause after the kexec from Heads, then a brief glitch/flicker before seeing the console once the new dom0 kernel has a chance to setup the framebuffer again.
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
c6ece3b
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kakaroto : discussion continues here