Skip to content

[feature]: minimal setups for the IMX6ULL - #12

Merged
Charliechen114514 merged 4 commits into
mainfrom
feat/arm-imx6ull-bringup
Jun 30, 2026
Merged

[feature]: minimal setups for the IMX6ULL#12
Charliechen114514 merged 4 commits into
mainfrom
feat/arm-imx6ull-bringup

Conversation

@Charliechen114514

Copy link
Copy Markdown
Member

No description provided.

Add desktop/ui/platform/embedded/ providing an IDisplayServerBackend
implementation for the DirectRender role, used when CFDesktop renders
directly to the framebuffer (Qt linuxfb/EGLFS) without a windowing
system -- e.g. i.MX6ULL.

- EmbeddedDisplayServerBackend: DirectRender role, primary-screen
  output, no-op window backend.
- NullWindowBackend: empty IWindowBackend; reports no multi-window/GPU.
- EmbeddedDisplaySizePolicy: frameless fullscreen for one framebuffer.
- embedded_platform.cpp: native_impl / native_display_impl /
  native_shell_layer_impl (shell layer reuses WidgetShellLayer).
- CMake: CFDESKTOP_EMBEDDED option selects embedded/ instead of
  linux_wsl/ (XCB) or windows/, so the ARM build needs no libxcb.

Enables cross-compiling for armhf (arm-none-linux-gnueabihf, GCC 15.2,
Qt 6.9.1 linuxfb) with -DCFDESKTOP_EMBEDDED=ON.
ConsoleHelper::size() could return a valid optional holding (0, 0) on
consoles with no window size (e.g. an i.MX6ULL serial console). Callers
only checked for nullopt, so the zero size reached the early welcome
renderer, which built a std::string of static_cast<size_t>(-2) chars
and threw std::length_error, aborting boot.

Return nullopt for non-positive dimensions so callers fall back to
fallback_size() (80x24). Confirmed: CFDesktop now boots to the shell on
i.MX6ULL linuxfb.
Four issues blocked the AppLauncher start-menu on the i.MX6ULL linuxfb
target (no compositor / window manager):

1. Qt::Popup auto-closes on deactivation: as a top-level popup it was
   dismissed shortly after show() because linuxfb cannot keep a second
   window active. Make it a frameless CHILD widget of the desktop so it
   renders inside the single desktop window -- no activation fight.
2. As a child widget it auto-shows when the desktop becomes visible,
   rendering the tiles at the default (0,0) on boot. Hide it in the ctor
   so it only appears on popup().
3. popup() used setFixedSize + move separately, which could leave a
   never-shown child at (0,0) on first realization. Use setGeometry
   (atomic) and force the grid to activate.
4. The start button only ever called popup() (no close path), so a second
   click was a no-op. Make it a proper toggle (hide if showing, else popup).

Confirmed on i.MX6ULL linuxfb: the start menu opens centered above the
taskbar, stays open, and toggles cleanly on repeated Start clicks.
The default app list was a set of placeholder X11 apps (xdg-open, xterm,
cfdesktop-settings, ...) that do not exist on the i.MX6ULL board, so
clicking a launcher tile launched nothing. Make the list per-board
configurable and add one real in-process app.

- Load the app list from <bin>/../apps.json at startup; fall back to
  defaultApps() when the file is missing/empty. AppEntry fields are read
  from a JSON apps[] array, so a board customizes the launcher by dropping
  an apps.json -- no recompile. exec_command already supported args via
  QProcess::splitCommand, so apps.json just carries them.
- Add a builtin About panel: a frameless child widget shown over the
  desktop when an entry with exec_command "builtin:about" is clicked,
  dismissed on a tap. CFDesktopEntity routes "builtin:*" entries
  in-process; everything else goes through AppLaunchService (QProcess).
  In-process suits the single-framebuffer linuxfb target, where an
  external GUI app would fight the desktop for /dev/fb0.

Confirmed on i.MX6ULL linuxfb: the start menu lists the apps.json entries,
About opens/closes, and external entries launch with arguments.
@Charliechen114514
Charliechen114514 merged commit 8242b8b into main Jun 30, 2026
6 checks passed
@Charliechen114514
Charliechen114514 deleted the feat/arm-imx6ull-bringup branch June 30, 2026 02:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant