Rudolf Marek wrote:
I clean up the patch bit more. Looks way better. Question is if the ne2k.c belongs to drivers or /lib (and where to put header file)
It's not a driver for initialization, it's console code, so I think it belongs in lib, similar to usbdebug code.
Otherwise it is nearly ready. I made Kconfig for that which is able to translate the IP strings to the binary data via new funcs.
It's starting to look pretty awesome! I would like some small clarifications for the Kconfig prompts but I can send a patch or do them myself later.
I just had a thought. Would it make sense to use syslog format for the packets that are sent out?
+++ src/console/Kconfig (working copy) @@ -1,5 +1,31 @@ menu "Console options"
+config CONSOLE_NE2K
- bool "Ethernet console over NE2K"
Is it only for PCI clones? coreboot supports many boards with ISA slots. Can the code work there as well if the jumper/jumperless configured IO base is specified?
+config CONSOLE_NE2K_DST_MAC
- depends on CONSOLE_NE2K
- string "DST unicast MAC"
We may need to create some new terminology for the network console. (What terms are Linux using?)
The destination might be called the "console server" so here it would say "Console server MAC address" and the help can explain further why it's neccessary to supply it.
+config CONSOLE_NE2K_DST_IP
- depends on CONSOLE_NE2K
- string "DST unicast IP"
Same here, "Console server IP address"
+config CONSOLE_NE2K_SRC_IP
- depends on CONSOLE_NE2K
- string "SRC unicast IP"
Hmm, "Source IP address" maybe?
+config CONSOLE_NE2K_IO_PORT
- depends on CONSOLE_NE2K
- hex "NE2K adapter fixed IO port"
- default 0xe00
If an ISA device is also allowed then it may be more difficult to add a fixed IO resource to the device tree..
+++ src/lib/ns8390.h (revision 0)
This file has a bunch of register defines for various hardware (WDC, SMC, Digital, 3Com) - are they all relevant?
//Peter