mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 04:37:44 +00:00
Kernel/aarch64: Remove drawing of logo on the framebuffer during init
This logo was actually used as a first sign of life in the very early days of the aarch64 port. Now that we boot into the graphical mode of the system just fine there's no need to keep this.
This commit is contained in:
parent
c5d3de3f7d
commit
420952a433
5 changed files with 0 additions and 67 deletions
|
@ -11,9 +11,6 @@
|
|||
#include <Kernel/BootInfo.h>
|
||||
#include <Kernel/Sections.h>
|
||||
|
||||
extern const u32 serenity_boot_logo_start;
|
||||
extern const u32 serenity_boot_logo_size;
|
||||
|
||||
namespace Kernel::RPi {
|
||||
|
||||
Framebuffer::Framebuffer()
|
||||
|
@ -133,54 +130,4 @@ void Framebuffer::initialize()
|
|||
}
|
||||
}
|
||||
|
||||
void Framebuffer::draw_logo(u8* framebuffer_data)
|
||||
{
|
||||
BootPPMParser logo_parser(reinterpret_cast<u8 const*>(&serenity_boot_logo_start), serenity_boot_logo_size);
|
||||
if (!logo_parser.parse()) {
|
||||
dbgln("Failed to parse boot logo.");
|
||||
return;
|
||||
}
|
||||
|
||||
dbgln("Boot logo size: {} ({} x {})", serenity_boot_logo_size, logo_parser.image.width, logo_parser.image.height);
|
||||
|
||||
auto fb_ptr = framebuffer_data;
|
||||
auto image_left = (width() - logo_parser.image.width) / 2;
|
||||
auto image_right = image_left + logo_parser.image.width;
|
||||
auto image_top = (height() - logo_parser.image.height) / 2;
|
||||
auto image_bottom = image_top + logo_parser.image.height;
|
||||
auto logo_pixels = logo_parser.image.pixel_data;
|
||||
|
||||
for (u32 y = 0; y < height(); y++) {
|
||||
for (u32 x = 0; x < width(); x++) {
|
||||
if (x >= image_left && x < image_right && y >= image_top && y < image_bottom) {
|
||||
switch (pixel_order()) {
|
||||
case RPi::Framebuffer::PixelOrder::RGB:
|
||||
fb_ptr[0] = logo_pixels[0];
|
||||
fb_ptr[1] = logo_pixels[1];
|
||||
fb_ptr[2] = logo_pixels[2];
|
||||
break;
|
||||
case RPi::Framebuffer::PixelOrder::BGR:
|
||||
fb_ptr[0] = logo_pixels[2];
|
||||
fb_ptr[1] = logo_pixels[1];
|
||||
fb_ptr[2] = logo_pixels[0];
|
||||
break;
|
||||
default:
|
||||
dbgln("Unsupported pixel format");
|
||||
VERIFY_NOT_REACHED();
|
||||
}
|
||||
|
||||
logo_pixels += 3;
|
||||
} else {
|
||||
fb_ptr[0] = 0xBD;
|
||||
fb_ptr[1] = 0xBD;
|
||||
fb_ptr[2] = 0xBD;
|
||||
}
|
||||
|
||||
fb_ptr[3] = 0xFF;
|
||||
fb_ptr += 4;
|
||||
}
|
||||
fb_ptr += pitch() - width() * 4;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -29,8 +29,6 @@ public:
|
|||
u32 pitch() const { return m_pitch; }
|
||||
PixelOrder pixel_order() { return m_pixel_order; }
|
||||
|
||||
void draw_logo(u8* framebuffer_data);
|
||||
|
||||
private:
|
||||
u16 m_width;
|
||||
u16 m_height;
|
||||
|
|
Binary file not shown.
|
@ -239,9 +239,6 @@ extern "C" [[noreturn]] UNMAP_AFTER_INIT void init([[maybe_unused]] BootInfo con
|
|||
if (!kernel_command_line().is_early_boot_console_disabled()) {
|
||||
if (!multiboot_framebuffer_addr.is_null() && multiboot_framebuffer_type == MULTIBOOT_FRAMEBUFFER_TYPE_RGB) {
|
||||
g_boot_console = &try_make_lock_ref_counted<Graphics::BootFramebufferConsole>(multiboot_framebuffer_addr, multiboot_framebuffer_width, multiboot_framebuffer_height, multiboot_framebuffer_pitch).value().leak_ref();
|
||||
#if ARCH(AARCH64)
|
||||
RPi::Framebuffer::the().draw_logo(static_cast<Graphics::BootFramebufferConsole*>(g_boot_console.load())->unsafe_framebuffer_data());
|
||||
#endif
|
||||
} else {
|
||||
g_boot_console = &Graphics::VGATextModeConsole::initialize().leak_ref();
|
||||
}
|
||||
|
|
|
@ -736,15 +736,6 @@ install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Kernel" DESTINATION boot)
|
|||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/Kernel.debug" DESTINATION boot)
|
||||
install(FILES "${CMAKE_CURRENT_BINARY_DIR}/kernel.map" DESTINATION res)
|
||||
|
||||
if ("${SERENITY_ARCH}" STREQUAL "aarch64")
|
||||
embed_resource(Kernel serenity_boot_logo "Arch/aarch64/SerenityLogoRGB.ppm")
|
||||
add_custom_command(
|
||||
TARGET Kernel POST_BUILD
|
||||
COMMAND ${CMAKE_OBJCOPY} -O binary Kernel kernel8.img
|
||||
BYPRODUCTS ${CMAKE_CURRENT_BINARY_DIR}/kernel8.img
|
||||
)
|
||||
endif()
|
||||
|
||||
serenity_install_headers(Kernel)
|
||||
serenity_install_sources(Kernel)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue