dede писал(а):будет желание поковырять опять - пишите.
Вот решил разгрузить себя от рабочей рутины и снова поковырять ants на 3536С и попробовать переделать его в XM. Вот пока до чего докопался. Первое, что заметил это на родной прошивки при остановке загрузки LAN не работает так же.
Код: Выделить всё
System startup
ZXD Debug:Uboot lzma decompress start
.........
ZXD Debug:Uboot lzma decompress done
System startup
U-Boot 2010.06 (Oct 16 2018 - 19:33:40)
AUTH_INFO is 'HI3536C_NVR old ants gui'!
Check Flash Memory Controller v100 ... Found
SPI Nor(cs 0) ID: 0x20 0x70 0x18
Block:64KB Chip:16MB Name:"XMC_16M"
SPI Nor total size: 16MB
16384 KiB hi_fmc at 0:0 is now current device
Liuy : licence product id = 482!
16384 KiB hi_fmc at 0:0 is now current device
Liuy : licence serial no is 01e2000227e20000405f!
############## yuhj gd->bd->bi_dram[0].size = 512MB
In: serial
Out: serial
Err: serial
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
##yuhj master bootargs = 'asc_sn=00025f400000e227000000000000000000000001e200000000 mem=353M board_type=0x1e2 local_av=1 system_mode=1 exist_switch=0 board_phy_exist=1 mmz_addr=0x96100000 mmz_size=159M console=ttyAMA0,115200 mtdparts=hi_sfc:192K(boot),14848K(kernel_m1),768K(config_m2),512K(reserve_m3),64K(logo_m4) licence=1.4 '
16384 KiB hi_fmc at 0:0 is now current device
jpeg decoding ...
<<addr=0x98000000, size=0x60000, vobuf=0x9f600000>>
mmu_enable
<<imgwidth=1024, imgheight=768, linebytes=2048>>
decode success!!!!
decode jpeg!
dev 0 set background color!
stMaxRect.u32Width:1024, stMaxRect.u32Height:768.
HDMI_INFO:DispFmt2HdmiTiming[402] ,Non CEA video timing:17
HDMI_INFO:Hdmi_PixelFreqSearch[146] ,u32Fmt17.
dev 0 opened!
graphic layer 0 opened!
##yuhj master bootcmd = 'sf probe 0;sf read 0x82000000 0x30000 0xe80000;bootm 0x82000000;'
graphic layer 0 opened!
(Re)start USB...
USB: scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
graphic layer 0 opened!
load file fail!
Hit any key to stop autoboot: 0
hisilicon # <INTERRUPT>
hisilicon # printenv
bootdelay=5
baudrate=115200
system_mode=1
serverip=192.168.1.20
ipaddr=192.168.1.10
phyaddr0=1
ethact_mii_name=mdio1
phyaddr=2
stdin=serial
stdout=serial
stderr=serial
ethaddr=26:e2:00:00:40:5f
bootargs=asc_sn=00025f400000e227000000000000000000000001e200000000 mem=353M board_type=0x1e2 local_av=1 system_mode=1 exist_switch=0 board_phy_exist=1 mmz_addr=0x96100000 mmz_size=159M console=ttyAMA0,115200 mtdparts=hi_sfc:192K(boot),14848K(kernel_m1),768K(config_m2),512K(reserve_m3),64K(logo_m4) licence=1.4
vobuf=0x9f600000
jpeg_size=0x60000
jpeg_addr=0x98000000
bootcmd=sf probe 0;sf read 0x82000000 0x30000 0xe80000;bootm 0x82000000;
verify=yes
ver=U-Boot 2010.06 (Oct 16 2018 - 19:33:40)
Environment size: 690/65532 bytes
hisilicon # mii device
MII devices:
hisilicon # miiinfo
Unknown command 'miiinfo' - try 'help'
hisilicon # mii info
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
NULL device name!
hisilicon # set
setenv setvobg
hisilicon # setenv ipaddr 192.168.1.10
hisilicon # setenv serverip 192.168.1.20
hisilicon # sa
Saving Environment to SPI Flash...
Erasing SPI flash, offset 0x00020000 size 64K ...done
Writing to SPI flash, offset 0x00020000 size 64K ...done
hisilicon # ping 192.168.1.20
AUTH_INFO is 'HI3536C_NVR old ants gui'!
PHY IDR1 read failed
PHY IDR1 read failed
PHY IDR1 read failed
PHY IDR1 read failed
PHY IDR1 read failed
PHY IDR1 read failed
PHY IDR1 read failed
ETH0: PHY(phyaddr=1, rmii) not link!
ETH1: PHY(phyaddr=2, rmii) not link!
higmac init fail!
ping failed; host 192.168.1.20 is not alive
hisilicon # mii device
MII devices: 'mdio0' 'mdio1'
Current device: 'mdio0'
hisilicon # mii info
hisilicon # mii device mdio1
hisilicon # mii info
PHY 0x00: OUI = 0x0732, Model = 0x11, Rev = 0x06, 100baseT, FDX
PHY 0x02: OUI = 0x0732, Model = 0x11, Rev = 0x06, 100baseT, FDX
hisilicon # mii device
MII devices: 'mdio0' 'mdio1'
Current device: 'mdio1'
hisilicon # ping 192.168.1.20
AUTH_INFO is 'HI3536C_NVR old ants gui'!
PHY IDR1 read failed
PHY IDR1 read failed
PHY IDR1 read failed
PHY IDR1 read failed
PHY IDR1 read failed
PHY IDR1 read failed
ETH0: PHY(phyaddr=1, rmii) not link!
ETH1: PHY(phyaddr=2, rmii) link UP: DUPLEX=FULL : SPEED=100M
MAC: XX-XX-XX-XX-XX-XX
ARP Retry count exceeded; starting again
Здесь я обратился к mii и сменил device, после смены линк поднялся но так же не работает.
Дальше решил проверить когда же включается линк и вот обнаружил когда он запускается.
Код: Выделить всё
System startup
ZXD Debug:Uboot lzma decompress start
.........
ZXD Debug:Uboot lzma decompress done
System startup
U-Boot 2010.06 (Oct 16 2018 - 19:33:40)
AUTH_INFO is 'HI3536C_NVR old ants gui'!
Check Flash Memory Controller v100 ... Found
SPI Nor(cs 0) ID: 0x20 0x70 0x18
Block:64KB Chip:16MB Name:"XMC_16M"
SPI Nor total size: 16MB
16384 KiB hi_fmc at 0:0 is now current device
Liuy : licence product id = 482!
16384 KiB hi_fmc at 0:0 is now current device
Liuy : licence serial no is 01e2000227e20000405f!
############## yuhj gd->bd->bi_dram[0].size = 512MB
In: serial
Out: serial
Err: serial
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
AUTH_INFO is 'HI3536C_NVR old ants gui'!
##yuhj master bootargs = 'asc_sn=00025f400000e227000000000000000000000001e200000000 mem=353M board_type=0x1e2 local_av=1 system_mode=1 exist_switch=0 board_phy_exist=1 mmz_addr=0x96100000 mmz_size=159M console=ttyAMA0,115200 mtdparts=hi_sfc:192K(boot),14848K(kernel_m1),768K(config_m2),512K(reserve_m3),64K(logo_m4) licence=1.4 '
16384 KiB hi_fmc at 0:0 is now current device
jpeg decoding ...
<<addr=0x98000000, size=0x60000, vobuf=0x9f600000>>
mmu_enable
<<imgwidth=1024, imgheight=768, linebytes=2048>>
decode success!!!!
decode jpeg!
dev 0 set background color!
stMaxRect.u32Width:1024, stMaxRect.u32Height:768.
HDMI_INFO:DispFmt2HdmiTiming[402] ,Non CEA video timing:17
HDMI_INFO:Hdmi_PixelFreqSearch[146] ,u32Fmt17.
dev 0 opened!
graphic layer 0 opened!
##yuhj master bootcmd = 'sf probe 0;sf read 0x82000000 0x30000 0xe80000;bootm 0x82000000;'
graphic layer 0 opened!
(Re)start USB...
USB: scanning bus for devices... 2 USB Device(s) found
scanning bus for storage devices... 0 Storage Device(s) found
graphic layer 0 opened!
load file fail!
Hit any key to stop autoboot: 0
16384 KiB hi_fmc at 0:0 is now current device
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-3.18.20
Image Type: ARM Linux Multi-File Image (uncompressed)
Data Size: 14083112 Bytes = 13.4 MiB
Load Address: 80008000
Entry Point: 80008000
Contents:
Image 0: 1804448 Bytes = 1.7 MiB
Image 1: 12278652 Bytes = 11.7 MiB
Verifying Checksum ... OK
## Loading init Ramdisk from multi component Legacy Image at 82000000 ...
Loading Multi-File Image ... OK
OK
Starting kernel ...
Booting Linux on physical CPU 0x0
Initializing cgroup subsys cpu
Linux version 3.18.20 (root@ubuntu) (gcc version 4.9.4 20150629 (prerelease) (Hisilicon_v500_20170922) ) #1 SMP Wed Jul 11 09:43:19 CST 2018
CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine model: Hisilicon HI3536C DEMO Board
Memory policy: Data cache writealloc
PERCPU: Embedded 9 pages/cpu @d5d1d000 s5632 r8192 d23040 u36864
Built 1 zonelists in Zone order, mobility grouping on. Total pages: 89408
Kernel command line: asc_sn=00025f400000e227000000000000000000000001e200000000 mem=353M board_type=0x1e2 local_av=1 system_mode=1 exist_switch=0 board_phy_exist=1 mmz_addr=0x96100000 mmz_size=159M console=ttyAMA0,115200 mtdparts=hi_sfc:192K(boot),14848K(kernel_m1),768K(config_m2),512K(reserve_m3),64K(logo_m4) licence=1.4
get_asc_sn : 00025f400000e227000000000000000000000001e200000000
licence str : 1.4
is licence = 1, licence_part = 4!
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 340296K/360448K available (3268K kernel code, 149K rwdata, 964K rodata, 196K init, 206K bss, 20152K reserved)
Virtual kernel memory layout:
vector : 0xffff0000 - 0xffff1000 ( 4 kB)
fixmap : 0xffc00000 - 0xffe00000 (2048 kB)
vmalloc : 0xd6800000 - 0xff000000 ( 648 MB)
lowmem : 0xc0000000 - 0xd6100000 ( 353 MB)
modules : 0xbf000000 - 0xc0000000 ( 16 MB)
.text : 0xc0008000 - 0xc042a510 (4234 kB)
.init : 0xc042b000 - 0xc045c000 ( 196 kB)
.data : 0xc045c000 - 0xc0481540 ( 150 kB)
.bss : 0xc0481540 - 0xc04b4e9c ( 207 kB)
SLUB: HWalign=64, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
Hierarchical RCU implementation.
RCU restricting CPUs from NR_CPUS=4 to nr_cpu_ids=2.
RCU: Adjusting geometry for rcu_fanout_leaf=16, nr_cpu_ids=2
NR_IRQS:16 nr_irqs:16 16
sched_clock: 32 bits at 3000kHz, resolution 333ns, wraps every 1431655765682ns
Console: colour dummy device 80x30
Calibrating delay loop... 2596.86 BogoMIPS (lpj=12984320)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
CPU: Testing write buffer coherency: ok
CPU0: thread -1, cpu 0, socket 0, mpidr 80000000
Setting up static identity map for 0x8031d3f8 - 0x8031d450
CPU1: Booted secondary processor
CPU1: thread -1, cpu 1, socket 0, mpidr 80000001
Brought up 2 CPUs
SMP: Total of 2 processors activated (5187.17 BogoMIPS).
CPU: All CPU(s) started in SVC mode.
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5
pinctrl core: initialized pinctrl subsystem
regulator-dummy: no parameters
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
Serial: AMBA PL011 UART driver
12080000.uart: ttyAMA0 at MMIO 0x12080000 (irq = 38, base_baud = 0) is a PL011 rev2
console [ttyAMA0] enabled
12090000.uart: ttyAMA1 at MMIO 0x12090000 (irq = 39, base_baud = 0) is a PL011 rev2
120a0000.uart: ttyAMA2 at MMIO 0x120a0000 (irq = 40, base_baud = 0) is a PL011 rev2
SCSI subsystem initialized
ssp-pl022 120d0000.spi: ARM PL022 driver, device ID: 0x00800022
ssp-pl022 120d0000.spi: mapped registers from 0x120d0000 to fe4d0000
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
Switched to clocksource timer00
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
TCP: reno registered
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
Trying to unpack rootfs image as initramfs...
Freeing initrd memory: 11996K (c21b8000 - c2d6f000)
futex hash table entries: 512 (order: 3, 32768 bytes)
jffs2: version 2.2. (NAND) © 2001-2006 Red Hat, Inc.
msgmni has been set to 688
----------------- encryption start --------------------------
----------------- licence ok !! --------------------------
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 254)
io scheduler noop registered
io scheduler deadline registered (default)
io scheduler cfq registered
pinctrl-single 120f0000.pinmux: 234 pins at pa fe4f0000 size 936
brd: module loaded
Loading iSCSI transport class v2.0-870.
iscsi: registered transport (tcp)
ahci 11010000.sata: SSS flag set, parallel bus scan disabled
ahci 11010000.sata: AHCI 0001.0300 32 slots 2 ports 6 Gbps 0x3 impl platform mode
ahci 11010000.sata: flags: ncq sntf stag pm led clo only pmp fbs slum part ccc sxs boh
scsi host0: ahci_platform
scsi host1: ahci_platform
ata1: SATA max UDMA/133 mmio [mem 0x11010000-0x11010fff] port 0x100 irq 49
ata2: SATA max UDMA/133 mmio [mem 0x11010000-0x11010fff] port 0x180 irq 49
hisi-sfc hisi_spi_nor.0: The ID: 0x20 isn't in the BP table, Current device can't not protect
hisi-sfc hisi_spi_nor.0: xmc_16M (16384 Kbytes)
5 cmdlinepart partitions found on MTD device hi_sfc
5 cmdlinepart partitions found on MTD device hi_sfc
Creating 5 MTD partitions on "hi_sfc":
0x000000000000-0x000000030000 : "boot"
0x000000030000-0x000000eb0000 : "kernel_m1"
0x000000eb0000-0x000000f70000 : "config_m2"
0x000000f70000-0x000000ff0000 : "reserve_m3"
0x000000ff0000-0x000001000000 : "logo_m4"
libphy: hisi_gemac_mii_bus: probed
ata1: SATA link down (SStatus 0 SControl 300)
libphy: hisi_gemac_mii_bus: probed
ata2: SATA link down (SStatus 0 SControl 300)
attached PHY 2 to driver Generic PHY, PHY_ID=0x1cc916
Higmac dma_sg_phy: 0x91540000
ETH: rmii, phy_addr=2
PPP generic driver version 2.4.2
NET: Registered protocol family 24
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-platform: EHCI generic platform driver
ehci-platform 10040000.ehci: EHCI Host Controller
ehci-platform 10040000.ehci: new USB bus registered, assigned bus number 1
ehci-platform 10040000.ehci: irq 51, io mem 0x10040000
ehci-platform 10040000.ehci: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 2 ports detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-platform: OHCI generic platform driver
ohci-platform 10030000.ohci: Generic Platform OHCI controller
ohci-platform 10030000.ohci: new USB bus registered, assigned bus number 2
ohci-platform 10030000.ohci: irq 50, io mem 0x10030000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 2 ports detected
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
i2c /dev entries driver
hisi_i2c hisi_i2c.0: Hisilicon [i2c-0] probed!
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
TCP: cubic registered
NET: Registered protocol family 17
Registering SWP/SWPB emulation handler
Freeing unused kernel memory: 196K (c042b000 - c045c000)
_ _ _ _ _ _ _ _ _ _ _ _
\ _ _ _ _ _ ___
/ /__/ \ |_/
/ __ / - _ ___
/ / / / / /
_ _ _ _/ / / \_/ \_ ______
___________\___\__________________
[RCS]: /etc/init.d/S00devs
mknod: /dev/console: File exists
mknod: /dev/ttyAMA0: File exists
mknod: /dev/ttyAMA1: File exists
mknod: /dev/ttyS000: File exists
[RCS]: /etc/init.d/S01udev
[RCS]: /etc/init.d/S80network
[RCS]: /etc/init.d/S99ants
Welcome to HiLinux.
Похоже что после появления этой строчки -ETH: rmii, phy_addr=2 - начинает появляться линк и начинает работать сеть.
Пока, решил разобраться с родным бутом и попробовать запустить ЛАН на родном буте.