Skip to content

Conversation

filipleple
Copy link
Member

@filipleple filipleple commented Sep 11, 2025

@filipleple filipleple self-assigned this Sep 11, 2025
Makefile Outdated
define protectli_branding_hook

# Gate on vendor; use filter to avoid whitespace pitfalls
ifneq ($(filter y,$(CONFIG_VENDOR_PROTECTLI)),)
Copy link
Member

Choose a reason for hiding this comment

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

can we make it generic to all platforms by introducing a Kconfig option instead of checking the vendor?

Copy link
Member Author

Choose a reason for hiding this comment

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

@mkopec I've added a Kconfig option and using it in the Makefile

@SergiiDmytruk
Copy link
Member

Doesn't this effectively undo 831ace5 by ignoring what's in the defconfig/.config?

@filipleple filipleple force-pushed the protectli-logo-buildsys branch from 909453c to 26230ab Compare September 16, 2025 13:18
@filipleple filipleple force-pushed the protectli-logo-buildsys branch 2 times, most recently from 319ecff to 2fe40b5 Compare October 1, 2025 09:46
@filipleple
Copy link
Member Author

@SergiiDmytruk Not quite, I think what's key is that there's a black "empty" default image built into the payload, and then there's the customizable BOOTSPLASH region that's set to the Protectli logo. The customer wanted to be able to remove the logo to display the fallback black screen instead.

Since we always want the logo to be in there in the binaries we deliver to the customer, I think it's more failsafe when it's inserted within the build than when we have to remember to set an extra flag in dasharo/dasharo to get the exact binary we want

@filipleple filipleple requested a review from mkopec October 1, 2025 11:04
Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Filip Lewiński <[email protected]>
Add the BOOTSPLASH region logo.bmp file from within the buildsystem,
instead of having to patch it afterwards in build.sh or elsewhere.

Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Filip Lewiński <[email protected]>
The Protectli logo is now added within the buildsystem, it doesn't need
to be patched externally in build.sh.

Upstream-Status: Inappropriate [Dasharo downstream]
Signed-off-by: Filip Lewiński <[email protected]>
@filipleple filipleple force-pushed the protectli-logo-buildsys branch 2 times, most recently from 29ea400 to abaea78 Compare October 1, 2025 12:19
Copy link
Member

@SergiiDmytruk SergiiDmytruk left a comment

Choose a reason for hiding this comment

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

Not quite, I think what's key is that there's a black "empty" default image built into the payload, and then there's the customizable BOOTSPLASH region that's set to the Protectli logo. The customer wanted to be able to remove the logo to display the fallback black screen instead.

Got it, thanks.

-n logo.bmp \
-t raw \
-c lzma
@:
Copy link
Member

Choose a reason for hiding this comment

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

Looks unnecessary.

Suggested change
@:

# Only run if a file is provided
ifneq ($(CONFIG_BOOTSPLASH_REGION_LOGO_FILE),"")

real-target: branding_bootsplash_region
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
real-target: branding_bootsplash_region
files_added:: branding_bootsplash_region

Otherwise BRANDING ... can be printed after the final Built ... line. This placement is also not ideal:

    CBFSPRINT  coreboot.rom

    BRANDING   Adding bootsplash (BOOTSPLASH/logo.bmp) from 3rdparty/dasharo-blobs/protectli/bootsplash.bmp
FMAP REGION: COREBOOT
Name                           Offset     Type           Size   Comp

but it's better and I think files_added is how such modifications must be done.

endif
endef

postinclude-hooks += $(bootsplash_region_hook)
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
postinclude-hooks += $(bootsplash_region_hook)
postinclude-hooks += $(bootsplash_region_hook)

endif

# Add bootsplash to BOOTSPLASH/logo.bmp
define bootsplash_region_hook
Copy link
Member

Choose a reason for hiding this comment

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

Why make it a hook? .config is sourced in line 184 of this file.

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.

3 participants