port-lm32

Wiki page by fallen on 24/02/2014 12:37:26

How to build EdgeBSD/lm32:

  • Fetch the source: git clone http://git.edgebsd.org/EdgeBSD/edgebsd-src.git
  • Go to my branch: cd edgebsd-src && git checkout fallen-port-milkymist
  • Build the lm32 cross toolchain: ./build.sh -m milkymist -U tools
  • Build EdgeBSD kernel: ./build.sh -m milkymist -U kernel=GENERIC
Note, if you are rebuilding after a modification or a git pull, this is faster: ./build.sh -m milkymist -U -u kernel=GENERIC

Run EdgeBSD/lm32 in qemu:

  • ./lm32-softmmu/qemu-system-lm32 -M milkymist -cpu lm32-full-mmu -nographic -kernel /path/to/edgebsd-src/sys/arch/milkymist/compile/obj/GENERIC/netbsd

Build Qemu for Milkymist SoC with support for lm32-mmu:

  • git clone https://github.com/fallen/qemu.git && cd qemu && ./configure --target-list=lm32-softmmu && make

Debug with Qemu and GDB:

  • Build EdgeBSD kernel with debug information: DEBUG=-g ./build.sh -m milkymist -U kernel=GENERIC
  • ./lm32-softmmu/qemu-system-lm32 -M milkymist -cpu lm32-full-mmu -nographic -s -S -kernel /path/to/edgebsd-src/sys/arch/milkymist/compile/obj/GENERIC/netbsd.gdb
  • gdb -x /path/to/edgebsd-src/sys/arch/milkymist/compile/obj/GENERIC/.gdbinit /path/to/edgebsd-src/sys/arch/milkymist/compile/obj/GENERIC/netbsd.gdb
  • (inside gdb) target remote :1234
Revisions
NameDateAuthorMessage
1.6 (diff)fallen
1.5 (diff)
1.4 (diff)
1.3 (diff)khorben
1.2 (diff)khorben
1.1fallen