IAIK/sweb

ARM Verdex: Kernel too large

misc0110 opened this issue · 9 comments

The ARM Verdex version fails in the CI, as the kernel image is too large. QEMU expects a 32MB flash, and the kernel is copied to offset 31MB of the flash:

dd of=flash.img bs=128k conv=notrunc seek=248 if=kernel.img

With the current kernel size of >1.5MB, this fails, and SWEB does not boot.

maybe we scrap verdex?

I'm not sure if anyone uses that anyway, so this could be a solution

Alternatively, we disable the debug infos for verdex, then it should fit again.

Also relevant here: #247

(I previously added a check for this issue in that PR)

Why was that PR reverted?

As far as i can see, it doesn't solve the issue and just aborts when the kernel is too large. I see three options:

  1. Disable debug information for Verdex (remove -gstabs2 in
    set(ARCH_ARM_VERDEX_KERNEL_CFLAGS -O0 -gstabs2 -Wall -Wextra -Werror -nostdinc -nostdlib -nostartfiles -nodefaultlibs -fno-builtin -fno-exceptions -fno-stack-protector -ffreestanding -mapcs -marm -march=armv5te -Wno-strict-aliasing -fshort-wchar ${NOPICFLAG})
    ) - this gets the kernel to ~400kb, it boots again, but it runs into an assert regarding memory corruption -> someone would have to debug that
  2. Remove Verdex from the CI pipeline (ugly)
  3. Remove Verdex entirely

Removed in dc523ba