Years ago when I first wrote the 440BX ram init code, I also wrote a test program that would read some SPD dump files and set up a simulated environment to run my ram init code in, without actually flashing a chip. I now have to do it again and I can't seem to get it to work again. Maybe the build system has changed since then.
I am looking to just compile this program and nb/intel/i440bx/raminit.c (unmodified beyond patches I'm testing) and link them together for an executable to run from the command line.
Here is the command line I figured would work, gathered with "make -n":
gcc -Isrc -Isrc/include -Isrc/commonlib/include -Isrc/commonlib/bsd/include -Ibuild -I3rdparty/vboot/firmware/include -include src/include/kconfig.h -include src/include/rules.h -include src/commonlib/bsd/include/commonlib/bsd/compiler.h -I3rdparty -D__BUILD_DIR__="build" -Isrc/arch/x86/include -D__ARCH_x86_32__ -Isrc/device/oprom/include -nostdinc -pipe -g -std=gnu11 -nostdlib -Wall -Wundef -Wstrict-prototypes -Wmissing-prototypes -Wwrite-strings -Wredundant-decls -Wno-trigraphs -Wimplicit-fallthrough -Wshadow -Wdate-time -Wtype-limits -Wvla -Wold-style-definition -Wdangling-else -Wmissing-include-dirs -fno-common -ffreestanding -fno-builtin -fomit-frame-pointer -fstrict-aliasing -ffunction-sections -fdata-sections -fno-pie -Wno-packed-not-aligned -fconserve-stack -Wnull-dereference -Wreturn-type -Wlogical-op -Wduplicated-cond -Wno-unused-but-set-variable -Werror -Os -Wno-address-of-packed-member -m32 -fuse-ld=bfd -fno-stack-protector -Wl,--build-id=none -fno-delete-null-pointer-checks -Wlogical-op -march=i686 -mno-mmx --param asan-globals=0 -D__RAMSTAGE__ -include build/config.h src/northbridge/intel/i440bx/raminit.c src/northbridge/intel/i440bx/raminittest.c -o raminittest2023
The C test code is attached.
Any suggestions is appreciated.
Thanks Keith