Coder Social home page Coder Social logo

Comments (3)

chenglin-tsai avatar chenglin-tsai commented on August 22, 2024

The boot log of #45 shows the error below:

[    0.000000] [Firmware Bug]: Kernel image misaligned at boot, please fix your bootloader!

@chenglin-tsai, do you know, if that is present also Linux 5.6?

Hi Paul,

Based on the test log on kernel 5.6.16 before. I didn't see such a warning message.

Test log on kernel 5.6.16:
dentOS_tn4810m_check_swp8_fiber_connection_and_all_other_ports_ok_01272020.log

I saw there is a solution for this warning here: raspberrypi/firmware#1415
Not sure whether this is the right solution.

from dentos.

paulmenzel avatar paulmenzel commented on August 22, 2024

Sorry, I should have checked first. Linux commit dd4bc60765 (arm64: warn on incorrect placement of the kernel by the bootloader) added that warning in Linux 5.8, so it couldn’t have been shown by Linux 5.6.

I saw there is a solution for this warning here: raspberrypi/firmware#1415

Do you mean adding kernel_address=0x200000? Unfortunately, I didn’t find a commit, where it’s visible in what file it’s done. I guess U-Boot?

from dentos.

chenglin-tsai avatar chenglin-tsai commented on August 22, 2024

Sorry, I should have checked first. Linux commit dd4bc60765 (arm64: warn on incorrect placement of the kernel by the bootloader) added that warning in Linux 5.8, so it couldn’t have been shown by Linux 5.6.

I saw there is a solution for this warning here: raspberrypi/firmware#1415

Do you mean adding kernel_address=0x200000? Unfortunately, I didn’t find a commit, where it’s visible in what file it’s done. I guess U-Boot?

Good news. We could change the kernel load address to 0x200000 in 'tools/flat-image-tree.py' to solve this issue. But I am not sure whether it will cause other side effects. Wait for confirmed.

        elif arch == 'arm64':
            self.load = "<0x200000>"
            self.entry = "<0x200000>"

src: https://github.com/dentproject/dentOS/blob/main/tools/flat-image-tree.py

Test log:
dentOS_tn48m_fix_arm64_kernel_load_address_to_0x20000_2021_0218.log

2021/02/19 updates:

 In arch/arm64/include/asm/boot.h:
/*
 * arm64 requires the kernel image to placed at a 2 MB aligned base address
 */
#define MIN_KIMG_ALIGN		SZ_2M

In arch/arm64/kernel/setup.c:
if (!efi_enabled(EFI_BOOT) && ((u64)_text % MIN_KIMG_ALIGN) != 0)
    pr_warn(FW_BUG "Kernel image misaligned at boot, please fix your bootloader!");

I think any kernel load address that mod by SZ_2M equals to zero can pass the check.
https://elixir.bootlin.com/linux/v5.10.4/source/arch/arm64/include/asm/boot.h
https://elixir.bootlin.com/linux/v5.10.4/source/arch/arm64/kernel/setup.c

from dentos.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.