Linux kernel start up and debugging

Slightly off-topic, but linux is stil a unixoid operating system. And every hint on system startup and debugging is valuable.

https://events.linuxfoundation.org/images/stories/pdf/lf_abs12_anderson.pdf

Seems like running OpenOCD and Turtelizer2 JTAG dongle with NanosG20 will be necesssary. AT91SAM9G20 support should be available, I hope.

Other points are:

  • Use QEMU/VirtualBox + GDB to observe startup behaviour of FreeBSD
  • Remember, nobody forbids looking at certain portions of Linux/NetBSD/OpenBSD kernel sources
  • OpenBSD and NetBSD are also a source of knowledge
  • Take a look at Atmel startup code
  • Make a table of prio 1 peripherials used by the kernel
  • Prioritize other peripherials

So, in summary I will use NanosG20 hardware, U-boot for PortuxG20 and FreeBSD kernel (no idea what is implemented at the moment)

Advertisements

NanosG20 FreeBSD

I would be glad to see FreeBSD running on NanosG20. Since I have no idea how to do that, I need  to investigate. One way would be finding a posibility to run u-boot for AT91SAM9G20 out of the NanosG20 2nd Stage Bootloader (stripped linux kernel). But another solution does exist:

http://www.armbedded.eu/node/445

It is a transplantation of PortuxG20 u-boot into NanosG20.

If this will work, next step would be flashing AT91SAM9G20 u-boot with FreeBSD booting support. And last but not least a working AT91SAM9G20 kernel must be available.

Another help:

Similar processor:

http://www.hytherion.com/beattidp/comput/armbsd/freebsd-on-at91sam9260ek.html

http://wiki.freebsd.org/FreeBSDAtmel

Comparison of linux and bsd kernel startup sequence:

http://cisr.nps.edu/downloads/papers/05paper_linux.pdf

BSD kernel structure:

http://www.atmnis.com/~proger/openkyiv/openkyiv2009_proger_sys.pdf