WARNING: FTP server may be broken
Right after I got ethernet working in PIO mode, I made some transfers using FTP and just noticed that large files get corrupted. I cannot tell for sure that the problem is in FTP but it is the main suspect as transfer of same file using netcat resulted in no corruption.
I'll fix it ASAP, meanwhile, stick to using the original firmware to transfer files.
Posted by booboo at 3:48 AM 1 comments
Ethernet over USB problem fixed (workaround, actually)
I've been digging into the USB ethernet problem. As I announced, I proceeded by elimination: backported all fixes (which turned out to be minor) to the ethernet gadget from recent kernels in order to see if the problem was there, and it wasn't (as expected anyway, just had to narrow the search). In the process I backported also fixes to the serial gadget, just for fun :-).
So the problem is in the Ingenic USB device code (driver/usb/gadget/jz4740_udc.c). After some serious testing I've found out that it is a DMA related problem. As I've said countless times I'm learning on the go and only know the basics of DMA, so I'll need some serious time to trace down and squash this bug.
Meanwhile, the driver has an option to disable DMA and use PIO (programmed I/O). It's slower (16Mbps versus 40Mbps in my setup) but seems to work consistently.
I've uploaded a new release with just this change, so ethernet is actually usable to transfer files and debug applications. Get it here. The rootfs has not changed, so you just need to copy the appropriate zImage for your LCD type.
Now, on a totally different matter, Bastian has pointed out one possible cause of dingux system installation not working for some people: you need a card with partitions. Some cards come with a filesystem starting right on the first block without a partition table. Your OS of choice deals with it but u-boot (that you flashed in your A320 when you installed dual-boot and who is in charge of loading zImage from the miniSD) seems to get confused if he can't find a partition table.
So, make sure you card is formatted FAT32 and has a partition table.
Right after I got ethernet working in PIO mode, I made some transfers using FTP and just noticed that large files get corrupted. I cannot tell for sure that the problem is in FTP but it is the main suspect as transfer of same file using netcat resulted in no corruption.
I'll fix it ASAP, meanwhile, stick to using the original firmware to transfer files.
Posted by booboo at 3:48 AM 1 comments
Ethernet over USB problem fixed (workaround, actually)
I've been digging into the USB ethernet problem. As I announced, I proceeded by elimination: backported all fixes (which turned out to be minor) to the ethernet gadget from recent kernels in order to see if the problem was there, and it wasn't (as expected anyway, just had to narrow the search). In the process I backported also fixes to the serial gadget, just for fun :-).
So the problem is in the Ingenic USB device code (driver/usb/gadget/jz4740_udc.c). After some serious testing I've found out that it is a DMA related problem. As I've said countless times I'm learning on the go and only know the basics of DMA, so I'll need some serious time to trace down and squash this bug.
Meanwhile, the driver has an option to disable DMA and use PIO (programmed I/O). It's slower (16Mbps versus 40Mbps in my setup) but seems to work consistently.
I've uploaded a new release with just this change, so ethernet is actually usable to transfer files and debug applications. Get it here. The rootfs has not changed, so you just need to copy the appropriate zImage for your LCD type.
Now, on a totally different matter, Bastian has pointed out one possible cause of dingux system installation not working for some people: you need a card with partitions. Some cards come with a filesystem starting right on the first block without a partition table. Your OS of choice deals with it but u-boot (that you flashed in your A320 when you installed dual-boot and who is in charge of loading zImage from the miniSD) seems to get confused if he can't find a partition table.
So, make sure you card is formatted FAT32 and has a partition table.
http://www.dingux.com/