Skip to content

Conversation

@m-iwanicki
Copy link
Contributor

@m-iwanicki m-iwanicki commented Mar 24, 2025

  • Add splash in U-Boot, kernel and userspace (psplash).
  • Add patch with VOP2 & HDMI drivers so we can enable display in U-Boot.
  • Add patch with virtio-gpu drivers so we can enable display in U-Boot on QEMU (should probably be moved to meta-zarhus-bsp-qemuarm-uboot: Add qemuarm-uboot machine #47 before merge) - moved to meta-zarhus-bsp-qemuarm-uboot: Add qemuarm-uboot machine #47
  • Download, convert and optionally resize logo for each stage (so it fills the screen)
  • Enable framebuffer passing between U-Boot and kernel (needs to be tested, might not work) - at least reserved memory works (so framebuffer isn't overridden), framebuffer passing would need some kind of test to make sure it works.
  • Fix orange-pi device-tree paths

TODO:

  • Before merge: remove 6084281, should probably be set individually for each platform. - Done, left only 86e9ecc which can be overridden in e.g. kas config file. To enable splash add splash to DISTRO_FEATURES or add DISTRO_FEATURES_DEFAULT:append = " splash" inside kas file
  • Better readme for qemu - should be done in meta-zarhus-bsp-qemuarm-uboot: Add qemuarm-uboot machine #47
  • Maybe create framebuffer and reserved memory nodes dynamically in U-Boot - possible improvement for future

Tested on Radxa-cm3 and QEMU. As of now display signal is lost when booting kernel (on HDMI and QEMU).
HDMI monitor on Radxa is very slow to start up after losing signal so usually before you see anything Linux manages to almost boot to login prompt (so you see only brief psplash logo).
On QEMU it's easier to see each stage as display is enabled quite early in kernel stage.

@m-iwanicki m-iwanicki force-pushed the add-splash branch 8 times, most recently from baa2e06 to 051dd4b Compare March 25, 2025 22:24
@m-iwanicki
Copy link
Contributor Author

@macpijan splash on QEMU:

1-flicker.mp4

Without 0001-virtio_gpu-remove-DM_FLAG_ACTIVE_DMA-to-keep-splash.patch patch there is much longer Display output not active (until kernel initializes driver).
I also tested device-tree with framebuffer (to deal with flicker) but hadn't managed yet. One config that results in no errors in dmesg is (how to get dtb in and out: https://docs.u-boot.org/en/latest/develop/devicetree/dt_qemu.html):

    reserved-memory {
        #address-cells = <2>;
        #size-cells = <2>;
        ranges;
        
        fb: framebuffer@7fe00000 {
            compatible = "framebuffer";
            reg = <0 0x7fe00000 0 0xa00000>;
            no-map;
        };
    };

	chosen {
		bootargs = "root=PARTLABEL=root rw ip=dhcp swiotlb=0 quiet splash";
		stdout-path = "/pl011@9000000";
		rng-seed = <0x3da86298 0xbe5d7724 0x11f59fc5 0xae4cd81b 0xe4efb4ea 0xc1e46854 0xc69fe738 0x95153740>;
		kaslr-seed = <0x3ffc7adc 0xb71d3355>;
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;
        
		framebuffer@7fe00000 {
			compatible = "simple-framebuffer";
			reg = <0 0x7fe00000 0 (640 * 480 * 4)>;
			width = <640>;
			height = <480>;
			stride = <(640 * 4)>;
			format = "a8r8g8b8";
			memory-region = <&fb>;
		};
	};

But results in Display output is not active and second framebuffer being allocated (fb1) by gpu driver (virtio-pci/virtio_gpudrmfb). You can show image by using e.g. psplash -f 1 or by adding fbcon=map:1 to cmdline (to show kernel logs on fb1) but that's not what we want.
There is also small flicker between kernel logo and psplash but I didn't check why.

Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
@@ -0,0 +1,33 @@
SUMMARY = "Prepare U-Boot logo"
HOMEPAGE = "https://docs.zarhus.com"
# TODO: which license does logo have
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This recipe only function is to prepare logo for u-boot (resize and convert to BMP).
Not sure which part does this license apply to as the only file we download is Zarhus Logo.

DaniilKl
DaniilKl previously approved these changes Apr 1, 2025
@DaniilKl DaniilKl dismissed their stale review April 1, 2025 14:38

Forgot that one thread is still open.

Signed-off-by: Michał Iwanicki <michal.iwanicki@3mdeb.com>
@DaniilKl DaniilKl merged commit 8cc1e04 into develop Apr 1, 2025
1 check failed
@DaniilKl DaniilKl deleted the add-splash branch April 1, 2025 15:19
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.

4 participants