Skip to contentSkip to conversation

package/links: enable building graphics mode with only fb driver

PATCH New Urja Rannikko 2 participants 4 messages Apr 27, 2021 – May 18, 2021

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 package/links: enable building graphics mode with only fb driver

The "fb" framebuffer driver needs GPM (mouse support) to compile, but not DirectFB or Xorg.

Also added a Kconfig comment for easier discovery of the GPM requirement.

---
 package/links/Config.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
package/links/Config.in +6 -2
index 713f53da4e..cc2389c9f1 100644
@@ -10,11 +10,15 @@ if BR2_PACKAGE_LINKS
 
 config BR2_PACKAGE_LINKS_GRAPHICS
 	bool "use graphics"
-	depends on BR2_PACKAGE_DIRECTFB || BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_GPM || BR2_PACKAGE_DIRECTFB || BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_LIBPNG
 	help
-	  Enable graphics output for DirectFB or X11.
+	  Enable graphics output for framebuffer, DirectFB or X11.
+	  Framebuffer output requires GPM (console mouse).
 	  Otherwise links will be text-mode only.
 
+comment "links graphics needs GPM, DirectFB or X11"
+	depends on !BR2_PACKAGE_GPM && !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7
+
 endif
Signature · 1 line
2.31.1
#1 lore raw

PATCH 1/1 package/links: enable building graphics mode with only fb driver

Hi Urja,

Quoted 16 lines · Urja Rannikko

The "fb" framebuffer driver needs GPM (mouse support) to compile, but not DirectFB or Xorg.

Also added a Kconfig comment for easier discovery of the GPM requirement.

---
 package/links/Config.in | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)
package/links/Config.in +0 -0
index 713f53da4e..cc2389c9f1 100644

package/links/Config.in if BR2_PACKAGE_LINKS · line 13

Quoted 5 lines
package/links/Config.in +1 -1
@@ -10,11 +10,15 @@ if BR2_PACKAGE_LINKS
 
 config BR2_PACKAGE_LINKS_GRAPHICS
 	bool "use graphics"
-	depends on BR2_PACKAGE_DIRECTFB || BR2_PACKAGE_XORG7
+	depends on BR2_PACKAGE_GPM || BR2_PACKAGE_DIRECTFB || BR2_PACKAGE_XORG7

Still not good enough, I'm afraid :-) You also need to depend on gpm in the .mk
file.

Also, I'm thinking: maybe we can turn this around and automatically select gpm?

	select BR2_PACKAGE_GPM if !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7

That way you don't need the comment either. Well, you still do because gpm
depends on static:

	depends on !BR2_STATIC_LIBS if !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7 # gpm

so the comment would become:

comment "links graphics needs dynamic libs, DirectFB or X11"

	depends on BR2_STATIC_LIBS && !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7

Regards,
Arnout

Quoted 13 lines
package/links/Config.in +5 -1
 	select BR2_PACKAGE_XLIB_LIBXT if BR2_PACKAGE_XORG7
 	select BR2_PACKAGE_LIBPNG
 	help
-	  Enable graphics output for DirectFB or X11.
+	  Enable graphics output for framebuffer, DirectFB or X11.
+	  Framebuffer output requires GPM (console mouse).
 	  Otherwise links will be text-mode only.
 
+comment "links graphics needs GPM, DirectFB or X11"
+	depends on !BR2_PACKAGE_GPM && !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7
+
 endif
#2 lore raw

PATCH 1/1 package/links: enable building graphics mode with only fb driver

Hi,

Quoted 4 lines · Arnout Vandecappelle

Still not good enough, I'm afraid :-) You also need to depend on gpm in the .mk
file.

It already does, atleast that's how i read this fragment in links.mk:

ifeq ($(BR2_PACKAGE_GPM),y)
LINKS_CONF_OPTS += --with-gpm
LINKS_DEPENDENCIES += gpm
else
LINKS_CONF_OPTS += --without-gpm
endif

And yes links can use GPM in textmode-only build too, so that seems correct as-is.

Quoted 7 lines

Also, I'm thinking: maybe we can turn this around and automatically select gpm?

        select BR2_PACKAGE_GPM if !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7

That way you don't need the comment either. Well, you still do because gpm
depends on static:

Quoted 7 lines
        depends on !BR2_STATIC_LIBS if !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7 # gpm

so the comment would become:

comment "links graphics needs dynamic libs, DirectFB or X11"

        depends on BR2_STATIC_LIBS && !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7

I have no hard opinion on this, except that I do dislike possibly non-obvious use of select
(and it has the dependency trouble you listed), which would leave GPM selected if one
toggled links graphics on and off while using menuconfig.

Signature · 1 line
Urja Rannikko
#3 lore raw

PATCH 1/1 package/links: enable building graphics mode with only fb driver

Quoted 16 lines · Urja Rannikko

Hi,

Quoted 4 lines · Arnout Vandecappelle

Still not good enough, I'm afraid :-) You also need to depend on gpm in the .mk
file.

It already does, atleast that's how i read this fragment in links.mk:

ifeq ($(BR2_PACKAGE_GPM),y)
LINKS_CONF_OPTS += --with-gpm
LINKS_DEPENDENCIES += gpm
else
LINKS_CONF_OPTS += --without-gpm
endif

Quoted 2 lines

And yes links can use GPM in textmode-only build too, so that seems correct as-is.

Oops, you're right, my bad.

Applied to next, thanks!

Regards,
Arnout

Quoted 22 lines
Quoted 8 lines

Also, I'm thinking: maybe we can turn this around and automatically select gpm?

        select BR2_PACKAGE_GPM if !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7

That way you don't need the comment either. Well, you still do because gpm
depends on static:

Quoted 7 lines
        depends on !BR2_STATIC_LIBS if !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7 # gpm

so the comment would become:

comment "links graphics needs dynamic libs, DirectFB or X11"

        depends on BR2_STATIC_LIBS && !BR2_PACKAGE_DIRECTFB && !BR2_PACKAGE_XORG7

I have no hard opinion on this, except that I do dislike possibly non-obvious use of select
(and it has the dependency trouble you listed), which would leave GPM selected if one
toggled links graphics on and off while using menuconfig.