Skip to content

Build process requires additional make opensbi-rebuild #3

@bluewww

Description

@bluewww

After setting up buildroot with make setup and building it through make -j we have to issue an additional make opensbi-rebuild to get a working image. If the last step is not done booting will be stuck at

[    0.023012] printk: legacy console [tty0] enabled
[    0.029445] printk: legacy bootconsole [sbi0] disabled

This is the result of diffing a good and bad image

--- fw_payload_bad.dump 2024-05-24 16:26:22.248431363 +0200
+++ fw_payload_good.dump        2024-05-24 16:26:07.450118694 +0200
@@ -1,5 +1,5 @@

-output/images-corrupted/fw_payload.elf:     file format elf64-littleriscv
+output/images/fw_payload.elf:     file format elf64-littleriscv


Disassembly of section .text:
@@ -3590,7 +3590,7 @@
    800027a4:  357d                    addiw   a0,a0,-1
    800027a6:  fffc17b7                lui     a5,0xfffc1
    800027aa:  03f57513                andi    a0,a0,63
-    800027ae:  17fd                    addi    a5,a5,-1 # fffffffffffc0fff <_fw_reloc_end+0xffffffff7f121387>
+    800027ae:  17fd                    addi    a5,a5,-1 # fffffffffffc0fff <_fw_reloc_end+0xffffffff7ed21387>
    800027b0:  0532                    slli    a0,a0,0xc
    800027b2:  8cfd                    and     s1,s1,a5
    800027b4:  8cc9                    or      s1,s1,a0
@@ -5883,7 +5883,7 @@
    80003e28:  105026f3                csrr    a3,stvec
    80003e2c:  1084b783                ld      a5,264(s1)
    80003e30:  7779                    lui     a4,0xffffe
-    80003e32:  6ff70713                addi    a4,a4,1791 # ffffffffffffe6ff <_fw_reloc_end+0xffffffff7f15ea87>
+    80003e32:  6ff70713                addi    a4,a4,1791 # ffffffffffffe6ff <_fw_reloc_end+0xffffffff7ed5ea87>
    80003e36:  10d4b023                sd      a3,256(s1)
    80003e3a:  4685                    li      a3,1
    80003e3c:  8ff9                    and     a5,a5,a4
    
    [...]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions