There are quite many limitations using old kernel for Agestar, one of them is you can not install the latest Linux distribution. I am eager to make the new Linux kernel to work on the agestar hardware. So since my last post, mainly I am just hacking at the kernel and not at the userspace stuff. As of today, I managed to boot the new kernel, and wrote a serial driver for it (you can see the boot messages at the end of this post). My next target is to port the USB and/or NIC driver.
As you may have read from my earlier posts, there are no documentations available for the STR 9100 hardware, so I based my work on the source code of the earlier kernel (I can’t believe so many things have changed since the 2.4.36). The initial work is quite easy if you are an experienced kernel developer. Because I am not experienced, I need to study quite many things before reaching the current state.
Because I don’t have any documentation about the FA526 CPU, I took the CPU specific code from the Icy Box. They provide the source code for Kernel 2.6. The SoC uses the same Processor, but completely different hardware for the rest (well, something is better than nothing). For the serial port, I realized that the serial port used is "High-speed 16C550-compliant UART serial channel" http://www.starsemi.com/vChn/Prods/str9104.php, so I studied the source code for 8250.c and added a small code to specify the the UART speed, register mapping, and memory location for the UART IO. This creates a much cleaner code than the original serial_str9100.c source code. The serial_str9100.c was 3799 lines of code, mine was about 100 lines of code (70 lines of code in a separate file, and the rest is adding register mapping to 8250.c).
My next plan is to work on the network driver. This should be not so difficult, at least I have higher hope to make this work compared to the USB part. The old network driver have some conditional compilation that indicates it can be compiled in kernel 2.6. I have tried to compile it, and there were many errors and warnings. I will try removing many codes that was not meant for the Agestar configuration (the kernel was from the WAP2000 router, so it contains router specific codes such as to acess hardware NAT).
Continue reading “Porting Linux Kernel 2.6.25.4 To STAR STR9100 (Agestar)”