Skip to content

Prebuilt Kernel Boot Failure Due to Insufficient INITRD_SIZE #585

Open
@otteryc

Description

@otteryc

The current prebuilt kernel image and root filesystem (rootfs) include SDL support (see #551), which increases the space required for the initrd to load the rootfs (see #553). However, the default INITRD_SIZE (8MB, located in Makefile:55) is insufficient, causing the boot process to fail.

When building rv32emu using the command provided in README.md:

make ENABLE_SYSTEM=1 system

the system fails to boot due to the above issue.

00:19:16 INFO  src/riscv.c:422: Log level: TRACE
00:19:16 INFO  src/riscv.c:498: Kernel loaded
00:19:16 INFO  src/riscv.c:503: DTB loaded
[1]    660383 segmentation fault (core dumped)  ./rv32emu -k linux-image/Image -i linux-image/rootfs.cpio

However, explicitly setting INITRD_SIZE=32 allows the kernel to boot successfully:

make ENABLE_SYSTEM=1 INITRD_SIZE=32 system

Potential Solutions:

  1. Increase the default INITRD_SIZE in Makefile to 32MB or larger.
  2. Remove SDL support and DOOM-related files from default Linux image to reduce the required space.
  3. Update the README to specify INITRD_SIZE=32 as the default for testing.

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