Owersun / mymfc

mymfc
8 stars 2 forks source link

about the GT8K switch #3

Closed nasbdh9 closed 4 years ago

nasbdh9 commented 5 years ago

Sorry to send this Issues in an irrelevant repo I have a GT8K board, I try to make him work normally but unfortunately the switch can't work normally after connecting the wan port. Can you test my compiled image to see if there is the same problem?

Owersun commented 5 years ago

hi. which "your" image do you want to be tested? and what do you mean by "cannot work normally"?

nasbdh9 commented 5 years ago

When I connect the wan port to the device in openwrt, the switch will not work properly, but the wan port to the sfp port is normal… ( Sorry, I use google translation

Owersun commented 5 years ago

You would probably need to address this concern to openwrt maintainers. The device functionality is mostly implemented in software, and it highly depends on kernel and what happens in OS when you connect the port. I'm afraid I cannot help you with openwrt, I didn't even look into that.

nasbdh9 commented 5 years ago

This is the openwrt image I build. Can you try to see if it works properly when you look at the wan port to the lan port? https://drive.google.com/file/d/1txYGMOcSU5Br9g47-39YWpNnT23l197z/view?usp=sharing

setenv fdt_name armada-8040-clearfog-gt-8k.dtb
setenv image_name Image
setenv bootmmc 'mmc dev 1; ext4load mmc 1:1 0x7000000 Image;ext4load mmc 1:1 0x6000000 armada-8040-clearfog-gt-8k.dtb;setenv bootargs $console root=/dev/mmcblk1p2 rw rootwait; booti 0x7000000 - 0x6000000'
setenv bootcmd 'mmc dev 1; ext4load mmc 1:1 0x7000000 Image;ext4load mmc 1:1 0x6000000 armada-8040-clearfog-gt-8k.dtb;setenv bootargs $console root=/dev/mmcblk1p2 rw rootwait; booti 0x7000000 - 0x6000000'

This is the boot environment variable for u-boot

I don't know yet whether it is a hardware failure or a software failure.😣

Owersun commented 5 years ago

I'll give it a spin, but I'm not sure when. I use the board as my main router and every test with it will leave me disconnected from the net.

nasbdh9 commented 5 years ago

Also want to ask a question, I build ubuntu, how to set the boot parameters of uboot?

=> ext4ls mmc 1:0 /
<DIR>       4096 .
<DIR>       4096 ..
<DIR>      16384 lost+found
<DIR>       4096 etc
<DIR>       4096 dev
<DIR>       4096 bin
<DIR>       4096 sbin
<DIR>       4096 opt
<DIR>       4096 tmp
<DIR>       4096 boot
<DIR>       4096 proc
<DIR>       4096 mnt
<DIR>       4096 srv
<DIR>       4096 media
<DIR>       4096 root
<DIR>       4096 sys
<DIR>       4096 run
<DIR>       4096 usr
<DIR>       4096 var
<DIR>       4096 home
<DIR>       4096 lib
=> ext4ls mmc 1:0 /boot
<DIR>       4096 .
<DIR>       4096 ..
        15981056 Image
           30621 armada-8040-clearfog-gt-8k.dtb
Owersun commented 5 years ago

There should be a file called boot.scr in the root folder, this is the one that u-boot reads to boot. For some reason you don't have it... But you can actually type all the commands from that file by hand, as I see you know how to deal with u-boot command line. Here are the commands:

setenv bootargs earlyprintk kpti=0 swiotlb=0 console=ttyS0,115200 root=/dev/mmcblk0p1 net.ifnames=0 biosdevname=0 fsck.mode=auto fsck.repair=yes rootwait ro nospectre_v1 nospectre_v2 nospec_store_bypass_disable
load mmc 1:0 ${kernel_addr_r} /boot/Image
load mmc 1:0 ${fdt_addr_r} /boot/armada-8040-clearfog-gt-8k.dtb
booti ${kernel_addr_r} - ${fdt_addr_r}

and if you put these commands to boot.txt you can produce boot.scr from it by mkimage -A arm64 -T script -O linux -d boot.txt boot.scr