bodhi, Sorry for asking again. I want to figure out the gpio numbers of F660. How can I read the state of gpios? I read your post about setting gpios of kirkwood but I cannot find the differences when I push a button or plug in an rj45 port. 8086kby 8086k - Debian
bodhi, I build mi424wr's uboot. Hope to find an easier way to make it work. 8086kby 8086k - Debian
bodhi, I run sg200's uboot on F660 successfully. But the whole network config is a mess. I compared mi424wr's uboot and sg200's uboot and can't find anything about ethernet config. It will shut down the switch and the 3xFE PHYs. Can you discover any of these configs in uboot code? 8086kby 8086k - Debian
bodhi, Hope to see the neta driver of new kernel versions will be available soon. 8086kby 8086k - Debian
bodhi, I pushed the code to github, this is my repositry. github.com/msdos03/openwrt-f660 To compile it for f660, just select mi424wr in menuconfig. I can't add a target to it successfully. 8086kby 8086k - Debian
bodhi, Okay, I think this is enough. Without buttons and LEDs it works well too. I will have a rest from doing it. 8086kby 8086k - Debian
bodhi, Please run 'mpp' command in uboot and post the output. This may help me figure out the buttons' or LEDs' gpio in F660. 8086kby 8086k - Debian
bodhi, This is the final hacked u-boot file. To use it, follow the following steps: 1,Flash it to the NAND in uboot or linux(the uboot partition is 512KB) 2,Make sure you have flashed openwrt or other custom OS 3,Change 'bootcmd' to a suitable command for your OS(when using openwrt, you can leave it alone, because I have changed it for my openwrt) 4,Turn off your F660 or F420,by 8086k - Debian
bodhi, I'm trying to use doimage to create an image, but everytime when I run it, it returns 'segmentation fault' . Have you got this error when building sg200 uboot? I am using the same argument as makefile. edit: The problem is solved. I use the binary which is compiled already and make the nand boot image succeasfully. Now the uboot hack is done. :) edit2: 88f6560'by 8086k - Debian
bodhi, !! this file is out of date, please scroll down to get the newest hacked uboot for F420/F660 I find another way to 'autoboot' openwrt. I can use the tftp upgrade function. This function will be called when pushing reset button. Tftp means ethernet must be initialized that time. But a problem is not solved yet. I still can't make the uboot header. Do you have any ideasby 8086k - Debian
bodhi, root@OpenWrt:/# dmesg | grep -i pci [ 0.035130] PCI: CLS 0 bytes, default 32 [ 0.186546] mvebu-pcie mbus:pcie@82000000: PCI host bridge to bus 0000:00 [ 0.186565] pci_bus 0000:00: root bus resource [ 0.186578] pci_bus 0000:00: root bus resource [ 0.186590] pci_bus 0000:00: root bus resource [ 0.186724] pci 0000:00:02.0: [11ab:6500] type 01 class 0x060400 [by 8086k - Debian
bodhi, I have added the kmod in openwrt config. And I can see it is loaded using lsmod. It doesn't find the device so there is no log. I think it's worth adding the initialization function to the kernel. Quote8086k Now, I'm sure that the PEX issue is caused by uboot, my f660's uboot don't initialize PEX when starting U-Boot, but you can see other avanta and kirkwoodby 8086k - Debian
bodhi, I only changed the ethernet node in the DTS, you know it. As you can see, serial interrupt problem is always here. Serial console is still laggy. BootROM 1.34 Booting from NAND flash BootROM: Image checksum verification PASSED l U-Boot 2009.08 ( 3月 28 2013 - 16:11:59) Hit enter to stop autoboot: 0 => => => => => => => => => =>by 8086k - Debian
bodhi, Now, I'm sure that the PEX issue is caused by uboot, my f660's uboot don't initialize PEX when starting U-Boot, but you can see other avanta and kirkwood devices printing something like ''PEX 0: Root Complex Interface, Detected Link X1''. For F660, stock linux kernel does the initialization and print ''PEX0 interface detected no Link.by 8086k - Debian
bodhi, I have already moded the latest version of openwrt which is using linux 5.9 to support avanta. I'm using your DTS and PCI-E still don't work, only USB can work. Now ethernet is the only way to connect it to the network. 8086kby 8086k - Debian
bodhi, Maybe PCI-E is not initialized in U-BOOT? This time I read the log of F660 and MI424WR-revI. Mainline linux can't initialize some of the devices in 88f6560. This is hard to solve. I don't think I am able to port the initial code to mainline linux. 8086kby 8086k - Debian
bodhi, DTS nodes except ethernet should be the same in these kernels. Maybe I'm wrong, I will do more research. 8086kby 8086k - Debian
bodhi, I found that crypto address is 0xF2200000. Size is 2M(0x00200000). Maybe this will fix the crypto device? Maybe NAND driver can scan the device itself. I changed the NAND reg and it works fine as well. PCI-E is different. Maybe Claudio didn't care about it and just make PCI-E port 1 work, port 2 doesn't work. I don't know how to convert the old config to DT valuesby 8086k - Debian
bodhi, Please read mvsyshwconfig.h and kirkwood.h in the linux kernel 3.14. NAND addr should be 0xf8000000. PEX0 addr should be 0xf3000000 and PEX1 addr should be 0xf4000000. And maybe crypto address should be 0xf2200000. 8086kby 8086k - Debian
bodhi, I think I don't need help anymore. I have read the source code of mi424wr and found the problem. I'm surprised that Claudio made so many mistakes in the dts. Mbus NAND memory range is wrong. When I finish, I will post my dts. 8086kby 8086k - Debian
bodhi, I have discovered F660's uboot doesn't initialize eth devices during autoboot. Official kernel can initialize eth devices but kernel3.14 can't. So hacking uboot is impossible. I'd rather boot linux manually each time. Although I have found the way to run bootcmd during autoboot, the ethernet devices doesn't work. 8086kby 8086k - Debian
bodhi, I get it. But compiling it again costs me a lot of time. So I decide to use the one compiled with openwrt. Can you run it and post the output? Thank you. 8086kby 8086k - Debian
bodhi, Quote8086k bodhi, If possible, please post the lspci -vv output in mi424wr rev i's stock firmware. I want to compare them to see if there are differences. At the same time, I am trying to run debian on it. If you use my binary, so much the better. 8086k Edited 1 time(s). Last edit at 05/25/2021 05:48PM by 8086k. Edit Reply Quote Report Attachments: open | downloaby 8086k - Debian
bodhi, The I/O port address and PCI-E memory address from lspci are different from current dtsi. So I doubt it uses a different range for PCI-E device. But I'm not sure whether new kernel and old kernel use different configuration logic. So I need to know lspci output in linux 2.6 kernel of MI424WR-REV-I. Thanks for reading. 8086kby 8086k - Debian
bodhi, If possible, please post the lspci -vv output in mi424wr rev i's stock firmware. I want to compare them to see if there are differences. At the same time, I am trying to run debian on it. If you use my binary, so much the better. 8086kby 8086k - Debian
bodhi, I used lspci on f660 stock firmware and get this. Is it helpful? root@F660:/ # ./pci -vv 01:01.0 Class 0280: Device 10ec:8191 (rev 01) Subsystem: Device 10ec:8191 Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr+ Stepping- SERR+ FastB2B- DisINTx- Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort- <TAbort- <MAbort-by 8086k - Debian
bodhi, Yes, it have tftpboot. I think either put the kernel in the NAND or use tftp to boot it is possible. but I don't know how to do it. I'm new to embedded debian. I think I also need to know how to compile the debian kernel. Can you help me read F660's stock log? There are some PCI-E configurations there. I can't tell the differences of PCI-E devices between these tby 8086k - Debian
bodhi, My uboot doesn't support usb. 8086kby 8086k - Debian
bodhi, I hope you can solve the problem in mvneta. I'm now in linux5.4 and rtl8192ce is still not working. 8086kby 8086k - Debian
bodhi, I can make it autoboot by changing a command string. But it will stop uboot from initializing the ethernet device. Finally, the ethernet won't work. How can I crack it by not changing the assembly code? I'm analyzing uboot code with IDA pro(assembly code is so annoying), The checksum is in assembly code. I have found the function which print 'No Version Available On Fby 8086k - Debian