antsdr-fw
antsdr-fw copied to clipboard
Can NOT using network in uboot. showing that 'ipaddr' not set, which already set.
hi,
Q1: I want to using command 'tftpboot' for loading my operating system( not linux ), and modify file zynq_zc70x.h like:
#ifndef __CONFIG_ZYNQ_ZC70X_H
#define __CONFIG_ZYNQ_ZC70X_H
#define CONFIG_ZYNQ_I2C0
#define CONFIG_ZYNQ_EEPROM
#define CONFIG_DFU_SF
#define CONFIG_ZYNQ_GEM
#define CONFIG_CMD_PING
#define CONFIG_CMD_NET
#define CONFIG_PHYLIB
#define CONFIG_PHY_MARVELL
#define CONFIG_CMD_MII
/*
#define DEBUG
*/
#include <configs/zynq-common.h>
#undef CONFIG_BOOTDELAY
#define CONFIG_BOOTDELAY 5
#endif /* __CONFIG_ZYNQ_ZC70X_H */
the boot log shows as below
Welcome to minicom 2.7.1
OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyUSB0, 15:38:03
Press CTRL-A Z for help on special keys
U-Boot ANTSDR v0.20-PlutoSDR-dirty-00069-gb3ecfa9ec1-dirty (Nov 19 2021 - 15:35:02 +0800)
I2C: ready
DRAM: ECC disabled 1 GiB
MMC: sdhci@e0100000: 0
SF: Detected W25Q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
In: serial@e0001000
Out: serial@e0001000
Err: serial@e0001000
Model: ANT SDR Board
Net: ZYNQ GEM: e000b000, phyaddr 0, interface rgmii-id
eth0: ethernet@e000b000
reading uEnv.txt
7055 bytes read in 20 ms (343.8 KiB/s)
Importing environment from SD ...
Hit any key to stop autoboot: 0
Pluto> printenv
adi_loadvals=fdt addr ${fit_load_address} && fdt get value fdt_choosen /configurations/${fit_config}/ fdt && fdt get addr fdtaddr /images/${fdt_choosen} data && fdt addr ${fdtaddr}; if test -n ${ad936x_ext_refc
baudrate=115200
bitstream_image=system.bit.bin
bitstream_size=0x400000
boot_image=BOOT.bin
boot_size=0xF00000
bootcmd=run $modeboot
bootdelay=5
bootenv=uEnv.txt
clear_reset_cause=mw f8000008 df0d && mw f8000258 00400000 && mw f8000004 767b
devicetree_image=devicetree.dtb
devicetree_load_address=0x2000000
devicetree_size=0x20000
dfu_alt_info=boot.dfu raw 0x0 0x100000;firmware.dfu raw 0x200000 0x1E00000;uboot-extra-env.dfu raw 0xFF000 0x1000;uboot-env.dfu raw 0x100000 0x20000;spare.dfu raw 0x120000 0xE0000
dfu_alt_num=3
dfu_mmc=run dfu_mmc_info && dfu 0 mmc 0
dfu_mmc_info=set dfu_alt_info ${kernel_image} fat 0 1\\;${devicetree_image} fat 0 1\\;${ramdisk_image} fat 0 1
dfu_ram=echo Entering DFU RAM mode ... && run dfu_ram_info && dfu 0 ram 0
dfu_ram_info=set dfu_alt_info dummy.dfu ram 0 0\\;firmware.dfu ram ${fit_load_address} 0x1E00000
dfu_sf=gpio set 15;set stdout serial@e0001000;echo Entering DFU SF mode ... && run dfu_sf_info && dfu 0 sf 0:0:40000000:0 && if test -n ${dfu_alt_num} && test ${dfu_alt_num} = 1; then set fit_size ${filesize} &;
dfu_sf_info=set dfu_alt_info boot.dfu raw 0x0 0x100000\\;firmware.dfu raw 0x200000 0x1E00000\\;uboot-extra-env.dfu raw 0xFF000 0x1000\\;uboot-env.dfu raw 0x100000 0x20000\\;spare.dfu raw 0x120000 0xE0000
ethaddr=00:0a:35:00:01:22
extraenv_load_address=0x207E000
fdt_choosen=fdt@1
fdt_high=0x20000000
fdtaddr=2080100
fdtcontroladdr=3ff967f0
fileaddr=2000000
filesize=1b8f
fit_config=config@0
fit_load_address=0x2080000
fit_size=0x900000
importbootenv=echo Importing environment from SD ...; env import -t ${loadbootenv_addr} $filesize
initrd_high=0x20000000
ipaddr=192.168.2.1
ipaddr_host=192.168.2.10
jtagboot=env default -a;sf probe && sf protect unlock 0 100000 && run dfu_sf;
kernel_image=uImage
loadbit_addr=0x100000
loadbootenv=load mmc 0 ${loadbootenv_addr} ${bootenv}
loadbootenv_addr=0x2000000
maxcpus=1
mode=1r1t
modeboot=sdboot
model=Analog Devices PlutoSDR Rev.C (Z7010/AD9363)
netmask=255.255.255.0
preboot=if test $modeboot = sdboot && env run sd_uEnvtxt_existence_test; then if env run loadbootenv; then env run importbootenv; fi; fi;
qspiboot=set stdout nulldev;adi_hwref;test -n $PlutoRevA || gpio input 14 && set stdout serial@e0001000 && sf probe && sf protect lock 0 100000 && run dfu_sf; set stdout serial@e0001000;itest *f8000258 == 4800
qspiboot_extraenv=sf read ${extraenv_load_address} 0xFF000 0x1000 && env import -c ${extraenv_load_address} 0x1000 || true
qspiboot_verbose=adi_hwref;echo Copying Linux from QSPI flash to RAM... && run read_sf && if run adi_loadvals; then echo Loaded AD936x refclk frequency and model into devicetree; fi; envversion;setenv bootargs
ramboot_verbose=adi_hwref;echo Copying Linux from DFU to RAM... && run dfu_ram;if run adi_loadvals; then echo Loaded AD936x refclk frequency and model into devicetree; fi; envversion;setenv bootargs console=tty}
ramdisk_image=uramdisk.image.gz
ramdisk_load_address=0x4000000
ramdisk_size=0x4000 00
read_sf=sf probe 0:0 50000000 0 && run qspiboot_extraenv &&sf read ${fit_load_address} 0x200000 ${fit_size} && iminfo ${fit_load_address} || sf read ${fit_load_address} 0x200000 0x1E00000;
refclk_source=internal
sd_uEnvtxt_existence_test=test -e mmc 0 /uEnv.txt
sdboot=if mmcinfo; then run uenvboot; echo Copying Linux from SD to RAM... && load mmc 0 ${fit_load_address} ${kernel_image} && load mmc 0 ${devicetree_load_address} ${devicetree_image} && load mmc 0 ${ramdisk_i
stderr=serial@e0001000
stdin=serial@e0001000
stdout=serial@e0001000
thor_mmc=run dfu_mmc_info && thordown 0 mmc 0
thor_ram=run dfu_ram_info && thordown 0 ram 0
uenvboot=if run loadbootenv; then echo Loaded environment from ${bootenv}; run importbootenv; fi; if test -n $uenvcmd; then echo Running uenvcmd ...; run uenvcmd; fi
usbboot=if usb start; then run uenvboot; echo Copying Linux from USB to RAM... && load usb 0 ${fit_load_address} ${kernel_image} && load usb 0 ${devicetree_load_address} ${devicetree_image} && load usb 0 ${ramdi
Environment size: 7594/131068 bytes
Pluto> ping 192.168.2.123
*** ERROR: `ipaddr' not set
ping failed; host 192.168.2.123 is not alive
Pluto> setenv ipaddr 192.168.2.10
Pluto> save
save saveenv
Pluto> saveenv
Saving Environment to SPI Flash...
SF: Detected W25Q256 with page size 256 Bytes, erase size 4 KiB, total 32 MiB
Erasing SPI flash...Writing to SPI flash...done
Pluto> printenv
adi_loadvals=fdt addr ${fit_load_address} && fdt get value fdt_choosen /configurations/${fit_config}/ fdt && fdt get addr fdtaddr /images/${fdt_choosen} data && fdt addr ${fdtaddr}; if test -n ${ad936x_ext_refc
baudrate=115200
bitstream_image=system.bit.bin
bitstream_size=0x400000
boot_image=BOOT.bin
boot_size=0xF00000
bootcmd=run $modeboot
bootdelay=5
bootenv=uEnv.txt
clear_reset_cause=mw f8000008 df0d && mw f8000258 00400000 && mw f8000004 767b
devicetree_image=devicetree.dtb
devicetree_load_address=0x2000000
devicetree_size=0x20000
dfu_alt_info=boot.dfu raw 0x0 0x100000;firmware.dfu raw 0x200000 0x1E00000;uboot-extra-env.dfu raw 0xFF000 0x1000;uboot-env.dfu raw 0x100000 0x20000;spare.dfu raw 0x120000 0xE0000
dfu_alt_num=3
dfu_mmc=run dfu_mmc_info && dfu 0 mmc 0
dfu_mmc_info=set dfu_alt_info ${kernel_image} fat 0 1\\;${devicetree_image} fat 0 1\\;${ramdisk_image} fat 0 1
dfu_ram=echo Entering DFU RAM mode ... && run dfu_ram_info && dfu 0 ram 0
dfu_ram_info=set dfu_alt_info dummy.dfu ram 0 0\\;firmware.dfu ram ${fit_load_address} 0x1E00000
dfu_sf=gpio set 15;set stdout serial@e0001000;echo Entering DFU SF mode ... && run dfu_sf_info && dfu 0 sf 0:0:40000000:0 && if test -n ${dfu_alt_num} && test ${dfu_alt_num} = 1; then set fit_size ${filesize} &;
dfu_sf_info=set dfu_alt_info boot.dfu raw 0x0 0x100000\\;firmware.dfu raw 0x200000 0x1E00000\\;uboot-extra-env.dfu raw 0xFF000 0x1000\\;uboot-env.dfu raw 0x100000 0x20000\\;spare.dfu raw 0x120000 0xE0000
ethact=ethernet@e000b000
ethaddr=00:0a:35:00:01:22
extraenv_load_address=0x207E000
fdt_choosen=fdt@1
fdt_high=0x20000000
fdtaddr=2080100
fdtcontroladdr=3ff967f0
fileaddr=2000000
filesize=1b8f
fit_config=config@0
fit_load_address=0x2080000
fit_size=0x900000
importbootenv=echo Importing environment from SD ...; env import -t ${loadbootenv_addr} $filesize
initrd_high=0x20000000
ipaddr=192.168.2.10
ipaddr_host=192.168.2.10
jtagboot=env default -a;sf probe && sf protect unlock 0 100000 && run dfu_sf;
kernel_image=uImage
loadbit_addr=0x100000
loadbootenv=load mmc 0 ${loadbootenv_addr} ${bootenv}
loadbootenv_addr=0x2000000
maxcpus=1
mode=1r1t
modeboot=sdboot
model=Analog Devices PlutoSDR Rev.C (Z7010/AD9363)
netmask=255.255.255.0
preboot=if test $modeboot = sdboot && env run sd_uEnvtxt_existence_test; then if env run loadbootenv; then env run importbootenv; fi; fi;
qspiboot=set stdout nulldev;adi_hwref;test -n $PlutoRevA || gpio input 14 && set stdout serial@e0001000 && sf probe && sf protect lock 0 100000 && run dfu_sf; set stdout serial@e0001000;itest *f8000258 == 4800
qspiboot_extraenv=sf read ${extraenv_load_address} 0xFF000 0x1000 && env import -c ${extraenv_load_address} 0x1000 || true
qspiboot_verbose=adi_hwref;echo Copying Linux from QSPI flash to RAM... && run read_sf && if run adi_loadvals; then echo Loaded AD936x refclk frequency and model into devicetree; fi; envversion;setenv bootargs
ramboot_verbose=adi_hwref;echo Copying Linux from DFU to RAM... && run dfu_ram;if run adi_loadvals; then echo Loaded AD936x refclk frequency and model into devicetree; fi; envversion;setenv bootargs console=tty}
ramdisk_image=uramdisk.image.gz
ramdisk_load_address=0x4000000
ramdisk_size=0x4000 00
read_sf=sf probe 0:0 50000000 0 && run qspiboot_extraenv &&sf read ${fit_load_address} 0x200000 ${fit_size} && iminfo ${fit_load_address} || sf read ${fit_load_address} 0x200000 0x1E00000;
refclk_source=internal
sd_uEnvtxt_existence_test=test -e mmc 0 /uEnv.txt
sdboot=if mmcinfo; then run uenvboot; echo Copying Linux from SD to RAM... && load mmc 0 ${fit_load_address} ${kernel_image} && load mmc 0 ${devicetree_load_address} ${devicetree_image} && load mmc 0 ${ramdisk_i
stderr=serial@e0001000
stdin=serial@e0001000
stdout=serial@e0001000
thor_mmc=run dfu_mmc_info && thordown 0 mmc 0
thor_ram=run dfu_ram_info && thordown 0 ram 0
uenvboot=if run loadbootenv; then echo Loaded environment from ${bootenv}; run importbootenv; fi; if test -n $uenvcmd; then echo Running uenvcmd ...; run uenvcmd; fi
usbboot=if usb start; then run uenvboot; echo Copying Linux from USB to RAM... && load usb 0 ${fit_load_address} ${kernel_image} && load usb 0 ${devicetree_load_address} ${devicetree_image} && load usb 0 ${ramdi
Environment size: 7622/131068 bytes
Pluto> ping 192.168.2.123
*** ERROR: `ipaddr' not set
ping failed; host 192.168.2.123 is not alive
Pluto>
I had try to ping my host PC, which ip is 192.168.2.123, and set the E310 ip 192.168.2.10. it show me that not setting the var 'ipaddr', which I used cmd 'printenv' to confirm it already set.
Q2: when I define 'DEBUG` in zynq_zc70x.h, building comes error, and I comment file zynq-common.h those code,
#ifdef DEBUG
#define CONFIG_SPL_NET_SUPPORT
#define CONFIG_SPL_ETH_SUPPORT
#define CONFIG_SPL_ENV_SUPPORT
#define CONFIG_SPL_ETH_DEVICE "Gem.e000b000"
#endif
build success, but nothing output in uart.
Any help?