diff options
author | Liav A <liavalb@gmail.com> | 2023-05-12 16:36:07 +0300 |
---|---|---|
committer | Andreas Kling <kling@serenityos.org> | 2023-05-13 07:56:00 +0200 |
commit | 420952a4334b05d6ac639429e876150c78866963 (patch) | |
tree | 2da36bb2d505bd6f386210b5656617c542d93927 | |
parent | c5d3de3f7d7edaed7f45084f5a0af0d3f0049ba2 (diff) | |
download | serenity-420952a4334b05d6ac639429e876150c78866963.zip |
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.
-rw-r--r-- | Kernel/Arch/aarch64/RPi/Framebuffer.cpp | 53 | ||||
-rw-r--r-- | Kernel/Arch/aarch64/RPi/Framebuffer.h | 2 | ||||
-rw-r--r-- | Kernel/Arch/aarch64/SerenityLogoRGB.ppm | bin | 274351 -> 0 bytes | |||
-rw-r--r-- | Kernel/Arch/init.cpp | 3 | ||||
-rw-r--r-- | Kernel/CMakeLists.txt | 9 |
5 files changed, 0 insertions, 67 deletions
diff --git a/Kernel/Arch/aarch64/RPi/Framebuffer.cpp b/Kernel/Arch/aarch64/RPi/Framebuffer.cpp index 1c7bfc7626..e0168b35fa 100644 --- a/Kernel/Arch/aarch64/RPi/Framebuffer.cpp +++ b/Kernel/Arch/aarch64/RPi/Framebuffer.cpp @@ -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; - } -} - } diff --git a/Kernel/Arch/aarch64/RPi/Framebuffer.h b/Kernel/Arch/aarch64/RPi/Framebuffer.h index 57e7dd448c..eb1da572c1 100644 --- a/Kernel/Arch/aarch64/RPi/Framebuffer.h +++ b/Kernel/Arch/aarch64/RPi/Framebuffer.h @@ -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; diff --git a/Kernel/Arch/aarch64/SerenityLogoRGB.ppm b/Kernel/Arch/aarch64/SerenityLogoRGB.ppm Binary files differdeleted file mode 100644 index 6cf9490cd4..0000000000 --- a/Kernel/Arch/aarch64/SerenityLogoRGB.ppm +++ /dev/null diff --git a/Kernel/Arch/init.cpp b/Kernel/Arch/init.cpp index ce41d4089e..f26166e71b 100644 --- a/Kernel/Arch/init.cpp +++ b/Kernel/Arch/init.cpp @@ -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(); } diff --git a/Kernel/CMakeLists.txt b/Kernel/CMakeLists.txt index e0c66bdba0..e68897f3bf 100644 --- a/Kernel/CMakeLists.txt +++ b/Kernel/CMakeLists.txt @@ -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) |