以前より、MarvellのARM64 SoCを搭載していることを把握していた機種。
車の購入と運転に伴ってやりたいことが1つ発生し、それの為にOpenWrtを搭載して用いる目的もあり確保した。
弄っていくのでメモ。
PHY
| zone | LAN |
|---|---|
| port (HDL-TA) |
LAN |
| port | eth0 (88E1512) |
MAC
- LAN:
34:76:C5:xx:xx:43(u-boot-env,"ethaddr"(text))
U-Boot
この機種はHDL-A/HDL2-Aと異なり、U-Bootのブート中断が消されておらず止めることが可能だった。
help
Marvell>> help ? - alias for 'help' base - print or set address offset bdinfo - print Board Info structure blkcache- block cache diagnostics and control boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootefi - Boots an EFI payload from memory bootelf - Boot from an ELF image in memory booti - boot arm64 Linux Image image from memory bootm - boot application image from memory bootp - boot image via network using BOOTP/TFTP protocol bootvx - Boot vxWorks from an ELF image bubt - Burn a u-boot image to flash cmp - memory compare coninfo - print console devices and information cp - memory copy crc32 - checksum calculation dcache - enable or disable data cache dhcp - boot image via network using DHCP/TFTP protocol dm - Driver model low level access echo - echo args to console editenv - edit environment variable eeprom - EEPROM sub-system env - environment handling commands erase - erase FLASH memory exit - exit script ext4load- load binary file from a Ext4 filesystem ext4ls - list files in a directory (default /) ext4size- determine a file's size ext4write- create a file in the root directory false - do nothing, unsuccessfully fatinfo - print information about filesystem fatload - load binary file from a dos filesystem fatls - list files in a directory (default /) fatsize - determine a file's size fatwrite- write file into a dos filesystem fdt - flattened device tree utility commands flinfo - print FLASH memory information fsinfo - print information about filesystems fsload - load binary file from a filesystem image fsls - list files in a directory (default /) fstype - Look up a filesystem type go - start application at address 'addr' gpio - query and control gpio pins gzwrite - unzip and write memory to block device hdl - HDL setting command help - print command description/usage hw_info - hw_info i2c - I2C sub-system icache - enable or disable instruction cache iminfo - print header information for application image imxtract- extract a part of a multi-image ir - ir - Reading and changing internal register values. itest - return true/false on integer compare led - [green|red|orange|all] [on|off] load - load binary file from a filesystem loadb - load binary file over serial line (kermit mode) loads - load S-Record file over serial line loadx - load binary file over serial line (xmodem mode) loady - load binary file over serial line (ymodem mode) loop - infinite loop on address range ls - list files in a directory (default /) md - memory display mdio - MDIO utility commands mii - MII utility commands mm - memory modify (auto-incrementing address) mtest - simple RAM read/write test mw - memory write (fill) nfs - boot image via network using NFS protocol nm - memory modify (constant address) part - disk partition related commands pci - list and access PCI Configuration Space ping - send ICMP ECHO_REQUEST to network host poweroff- poweroff printenv- print environment variables protect - enable or disable FLASH write protection reset - Perform RESET of the CPU run - run commands in an environment variable save - save file to a filesystem saveenv - save environment variables to persistent storage scsi - SCSI sub-system scsiboot- boot from SCSI device setenv - set environment variables sf - SPI flash sub-system showvar - print local hushshell variables size - determine a file's size sleep - delay execution for some time source - run script from memory spi_nand- SPI NAND flash sub-system sspi - SPI utility command test - minimal test like /bin/sh tftpboot- boot image via network using TFTP protocol time - run commands and summarize execution time true - do nothing, successfully unzip - unzip a memory region usb - USB sub-system usbboot - boot from USB device version - print monitor, compiler and linker versionversion
Marvell>> version U-Boot 2017.03-armada-17.06.3-g0a459ce-dirty-1.1 (Jan 18 2018 - 15:14:00 +0800) aarch64-linux-gnu-gcc (Linaro GCC 5.3-2016.05) 5.3.1 20160412 GNU ld (Linaro_Binutils-2016.05) 2.25.0 Linaro 2016_02printenv
Marvell>> printenv autoload=n baudrate=115200 bootargs=console=ttyMV0,115200 earlyprintk keep_bootcon root=/dev/sda2 rw rootflags=data=journal init=/lib/sysvinit/init bootcmd=hdl init;if scsi reset;then if run loadcmd_hdd;then run booticmd;fi;fi;if usb reset;then if run loadcmd_usb || run loadcmd_usb1;then run booticmd;fi;fi;if dhcp;then if run loadcmd_tftp; then run booticmd;fi;fi;echo giveup...;led green off;led red on;set valid_power_button true bootdelay=0 booticmd=booti $kernel_addr $initrd_addr $fdt_addr console=console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000 ethact=neta@30000 ethaddr=34:76:C5:xx:xx:43 ethprime=eth0 fdt_addr=0x1000000 fdt_high=0xffffffffffffffff fdt_name=fdt.dtb fdtcontroladdr=1fb10528 fdtfile=hdl-ta.dtb gatewayip=10.4.50.254 get_images=tftpboot ${kernel_addr} ${image_name}; tftpboot ${fdt_addr} ${fdt_name}; run get_ramfs get_ramfs=if test "${ramfs_name}" != "-"; then setenv ramfs_addr 0x3000000; tftpboot ${ramfs_addr} ${ramfs_name}; else setenv ramfs_addr -;fi hostname=marvell image_name=zImage.ta initrd_addr=0x3000000 initrd_name=uInitrd.ta initrd_size=0x2000000 inst=ca iover=0.2 ipaddr=0.0.0.0 kernel_addr=0x2000000 kernel_gz_addr=0x1800000 loadaddr=0x2000000 loadcmd_hdd=ext4load scsi 0:1 $kernel_gz_addr $image_name && unzip $kernel_gz_addr $kernel_addr && ext4load scsi 0:1 $fdt_addr $fdtfile && ext4load scsi 0:1 $initrd_addr $initrd_name loadcmd_tftp=tftpboot $kernel_gz_addr HDL-TA/boot/$image_name && unzip $kernel_gz_addr $kernel_addr && tftpboot $fdt_addr HDL-TA/boot/$fdtfile && tftpboot $initrd_addr HDL-TA/boot/$initrd_name loadcmd_usb=fatload usb 0:0 $kernel_gz_addr boot/$image_name && unzip $kernel_gz_addr $kernel_addr && fatload usb 0:0 $fdt_addr boot/$fdtfile && fatload usb 0:0 $initrd_addr boot/$initrd_name loadcmd_usb1=fatload usb 0:1 $kernel_gz_addr boot/$image_name && unzip $kernel_gz_addr $kernel_addr && fatload usb 0:1 $fdt_addr boot/$fdtfile && fatload usb 0:1 $initrd_addr boot/$initrd_name netdev=eth0 netmask=255.255.255.0 ramfs_addr=0x5000000 ramfs_name=uInitrd root=root=/dev/nfs rw rootpath=/srv/nfs/ serverip=192.168.0.254 set_bootargs=setenv bootargs ${console} ${root} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}:${netdev}:none nfsroot=${serverip}:${rootpath} ${extra_params} stderr=serial@12000 stdin=serial@12000 stdout=serial@12000 Environment size: 2409/65532 bytesbootcmd整形:
hdl init # SCSI (SATA) リセットOK if scsi reset; then # `loadcmd_hdd` 変数内コマンド実行(SATA HDD読込試行) if run loadcmd_hdd; then run booticmd fi fi # USB リセットOK if usb reset; then # `loadcmd_usb`(失敗時 `loadcmd_usb1`)変数内コマンド実行(USBストレージ読込試行) if run loadcmd_usb || run loadcmd_usb1; then run booticmd fi fi # DHCP取得OK if dhcp; then # `loadcmd_tftp` 変数内コマンド実行(TFTPでの読込試行) if run loadcmd_tftp; then run booticmd fi fi echo giveup... led green off led red on # 電源ボタン待機 set valid_power_button trueloadcmd_*整形:
# loadcmd_hdd ext4load scsi 0:1 $kernel_gz_addr $image_name && unzip $kernel_gz_addr $kernel_addr && ext4load scsi 0:1 $fdt_addr $fdtfile && ext4load scsi 0:1 $initrd_addr $initrd_name # loadcmd_usb fatload usb 0:0 $kernel_gz_addr boot/$image_name && unzip $kernel_gz_addr $kernel_addr && fatload usb 0:0 $fdt_addr boot/$fdtfile && fatload usb 0:0 $initrd_addr boot/$initrd_name # loadcmd_usb1 fatload usb 0:1 $kernel_gz_addr boot/$image_name && unzip $kernel_gz_addr $kernel_addr && fatload usb 0:1 $fdt_addr boot/$fdtfile && fatload usb 0:1 $initrd_addr boot/$initrd_name # loadcmd_tftp tftpboot $kernel_gz_addr HDL-TA/boot/$image_name && unzip $kernel_gz_addr $kernel_addr && tftpboot $fdt_addr HDL-TA/boot/$fdtfile && tftpboot $initrd_addr HDL-TA/boot/$initrd_nametftpboot
ipaddrが初期状態で0.0.0.0なので、先に設定してから実施Marvell>> setenv ipaddr 192.168.0.1 Marvell>> tftpboot neta@30000 Waiting for PHY auto negotiation to complete....... done *** Warning: no boot file name; using 'C0A80001.img' Using neta@30000 device TFTP from server 192.168.0.254; our IP address is 192.168.0.1 Filename 'C0A80001.img'. Load address: 0x2000000 Loading: *bdinfo
HDL-AA>> bdinfo arch_number = 0x00000210 boot_params = 0x00000100 DRAM bank = 0x00000000 -> start = 0x00000000 -> size = 0x20000000 DRAM bank = 0x00000001 -> start = 0x00000000 -> size = 0x00000000 ethaddr = 34:76:C5:xx:xx:05 ip_addr = 192.168.1.100 baudrate = 115200 bps TLB addr = 0x1FFF0000 relocaddr = 0x1FECF000 reloc off = 0x1FECF000 irq_sp = 0x1F9BEF30 sp start = 0x1F9BEF20 FB base = 0x00000000hdl *
Marvell>> help hdl hdl - HDL setting command Usage: hdl init - initializeinitialize the system hdl poweroff - poweroff hdl hdd <on/off> - on/off HDD power hdl check <regs|phyregs|eeprom> - check settings Marvell>> hdl check regs Register name ( Address) = Value : Result Common PHYs Selectors (0x000183FC) = 0x00000010 : OK North Bridge GPIO1 Selection (0x00013830) = 0x000173FE : OK South Bridge GPIO2 Selection (0x00018830) = 0x00007E2F : OK North Bridge GPIO1 Pin Output Enable Low (0x00013800) = 0xF80C3C04 : OK North Bridge GPIO1 Pin Output Enable High (0x00013804) = 0x1000000F : OK South Bridge GPIO2 Pin Output Enable (0x00018800) = 0x3F82FFF2 : OK North Bridge GPIO1 Pin Output Low (0x00013818) = 0x00002800 : OK North Bridge GPIO1 Pin Output High (0x0001381C) = 0x00000000 : OK South Bridge GPIO2 Pin Output (0x00018818) = 0x00000000 : OK Marvell>> hdl check phyregs phy: page = 0 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 1000 796d 0141 0dd1 01e1 c1e1 000f 2001 0008: 59b2 0300 3800 0000 0000 0003 0000 3000 0010: 3060 ac08 0000 7c40 0020 0000 0000 0000 0018: 0000 0000 0040 0000 0000 0000 0000 0000 phy: page = 1 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 1140 014d 0141 0dd1 9901 0000 0004 2001 0008: 0000 0000 0000 0000 0000 0003 0000 c000 0010: 400e a420 0000 0410 0000 0000 0001 0000 0018: 0000 0000 0062 0000 0000 0000 0000 0000 phy: page = 2 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0003 0000 0000 0010: 4448 0000 0000 0000 0000 1076 0002 0000 0018: 5605 0013 0000 0000 0000 0000 0000 0000 phy: page = 3 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0003 0000 0000 0010: 181e 8000 4985 0073 0000 0000 0003 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 4 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0003 0000 0000 0010: 2000 0000 0000 0000 0000 0000 0004 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 5 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0003 0000 0000 0010: 0000 0000 0000 0000 0000 1040 0005 0603 0018: 0000 0104 0f12 0a0c 0c06 0000 0c06 0000 phy: page = 6 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0003 0000 0000 0010: 0000 0000 0000 000b 0200 0000 0006 0000 0018: 0000 0000 190d 0c42 0000 0000 0000 0000 phy: page = 7 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0003 0000 0000 0010: 0000 0000 0000 0000 0000 0000 0007 0000 0018: 0000 0104 0f12 0a0c 0006 0000 0000 0000 phy: page = 8 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 1000 020c 0000 0080 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0000 0000 0000 0010: 0000 0000 0000 0000 0000 0000 0008 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 9 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0000 0000 0000 0010: 0000 0000 0000 0000 0000 0000 0009 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 10 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0000 0000 0000 0010: 0000 0000 0000 0000 0000 0000 000a 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 11 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0000 0000 0000 0010: 0000 0000 0000 0000 0000 0000 000b 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 12 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 1f40 0000 0000 0000 f000 f186 1388 0008: 0000 0000 0000 0000 0000 0000 0000 0000 0010: 0000 0000 0000 0000 0000 0000 000c 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 13 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0000 0000 0000 0010: 0000 0000 0000 0000 0000 0000 000d 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 14 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0001 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0000 0000 0000 0010: 0000 0000 0000 0000 0000 0000 000e 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 15 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0000 0000 0000 0010: 0000 0000 0000 0000 0000 0000 000f 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 16 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0000 0000 0000 0000 0000 0000 0000 0008: 0000 0000 0000 0000 0000 0000 0000 0000 0010: 0000 0000 0000 0000 0000 0000 0010 0000 0018: 0000 0000 0000 0000 0000 0000 0000 0000 phy: page = 17 addr +0 +1 +2 +3 +4 +5 +6 +7 0000: 0000 0001 0000 0000 0000 8000 0000 0000 0008: 0000 0000 0000 0000 0000 0000 0001 0000 0010: 0400 0000 3fff 3fff 3fff 3fff 0011 0000 0018: 0000 0000 0000 0000 0000 5014 0000 0000 Marvell>> hdl check eeprom eeprom: addr +0 +1 +2 +3 +4 +5 +6 +7 +8 +9 +A +B +C +D +E +F 0000 00 00 00 00 00 11 B2 71 00 11 B2 71 00 11 B2 71 0010 00 00 00 1F 00 00 00 00 00 00 00 00 00 00 00 00 0020 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0030 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0040 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0050 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0060 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0070 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0080 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 0090 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00A0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00B0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00C0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00D0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00E0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00F0 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 WOL = 0x00i2c bus
Marvell>> i2c bus Bus 0: i2c@11000 (active 0) 6f: generic_6f, offset len 1, flags 0 57: generic_57, offset len 2, flags 0 50: generic_50, offset len 1, flags 0
Kernel
HDDは出品者側で撤去済みだった為、Kernel関係は無し
bootlog
USBやSATAにストレージを何も接続していない為、途中で止まる
TIM-1.0 WTMI-armada-17.10.1-ef4aec6 ENTER init_ddrgen DDR_TOPOLOGY is 6 : DDR4, 1CS 512M WTMI_CLOCK=1 Fill memory before self refresh...done Now in Self-refresh Mode Restore CAS Read and Write Latency Exited self-refresh ... Vref read training =================== Final vdac_value 0x0000001F Vref write training =================== Final vref_value 0x0000001F DLL TUNING ============== DLL 0xc0001050[21:16]: [9,2c,1a] DLL 0xc0001050[29:24]: [b,2c,1b] DLL 0xc0001054[21:16]: [f,2f,1f] DLL 0xc0001054[29:24]: [15,30,22] DLL 0xc0001074[21:16]: [0,3f,1f] DLL 0xc0001074NOTICE: Booting Trusted Firmware NOTICE: BL1: v1.3(debug)::1.5:ef4aec6 NOTICE: BL1: Built : 15:15:57, Jan 18 2NOTICE: BL2: v1.3(debug)::1.5:ef4aec6 NOTICE: BL2: Built : 15:15:58, Jan 18 2018 NNOTICE: BL31: v1.3(debug)::1.5:ef4aec6 NOTICE: BL31: U-Boot 2017.03-armada-17.06.3-g0a459ce-dirty-1.1 (Jan 18 2018 - 15:14:00 +0800) Model: Marvell Armada 3720 IODATA Board CPU @ 800 [MHz] L2 @ 800 [MHz] TClock @ 200 [MHz] DDR @ 800 [MHz] DRAM: 512 MiB U-Boot DT blob at : 000000001fb10528 Comphy-0: USB3 5 Gbps Comphy-1: SGMII0 1.25 Gbps Comphy-2: SATA0 6 Gbps SF: Detected gd25lq16 with page size 256 Bytes, erase size 64 KiB, total 2 MiB Net: eth0: neta@30000 [PRIME] RTC mcp7940n detected HDL-TA board. Hit any key to stop autoboot: 0 Reset SCSI scanning bus for devices... SATA link 0 timeout. AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode flags: ncq led only pmp fbss pio slum part sxs SATA link 0 timeout. AHCI 0001.0300 32 slots 1 ports 6 Gbps 0x1 impl SATA mode flags: ncq led only pmp fbss pio slum part sxs ** Bad device scsi 0 ** resetting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 1 USB Device(s) found scanning usb for storage devices... 0 Storage Device(s) found ** Bad device usb 0 ** ** Bad device usb 0 ** neta@30000 Waiting for PHY auto negotiation to complete....... done BOOTP broadcast 1 BOOTP broadcast 2 DHCP client bound to address 192.168.50.149 (252 ms) Using neta@30000 device TFTP from server 192.168.50.1; our IP address is 192.168.50.149 Filename 'HDL-TA/boot/zImage.ta'. Load address: 0x1800000 Loading: T Abort giveup...