05-14-2019 06:25 AM
I want to try the following things :
1. Modify the booting arguments of u-boot of my Petalinux project which is currently using the Xilinx Kernel. I want to modify it such that it runs dhcp during booting the u-boot itself to acquire an IP address for itself and the IP for TFTP server from our central IT infrastructure.
I know this is possible to do with x86_64 processors running a CentOS grub during the boot process, as thats what systems in our office use. The Wiki page for DHCP also says additional options for acquiring IP address for TFTP server can be added in the DHCP packet.
This has been mentioned in the following link :
2. As you guessed, along with modification of boot arguments to add DHCP in the boot process, I want to modify the DHCP command script to add the TFTP option (if possible for the Petalinux DHCP)
This should essentially look like this ,
1. U-boot starts booting
2. It calls DHCP in the process to obtain its own and TFTP server IP from central DHCP server
3. This DHCP command then along with obtaining its own IP also obtains TFTP server IP
Can anybody please help me with this? This would be really helpful.
05-15-2019 07:17 PM
DHCP and TFTP boot are supported by Petalinux.
Just search UG1144 with keyword "DHCP" and "TFTP" for how to enable them.
05-16-2019 04:26 AM
05-16-2019 06:42 PM
Yes, I am talking about u-boot.
I can see DHCP is enabled in u-boot in ZCU102 BSP. Settings in Petalinux will also apply to u-boot. Please let me know if I misunderstanding your questions.
U-Boot 2018.01 (Dec 06 2018 - 10:00:41 +0000) Xilinx ZynqMP ZCU102 rev1.0
DRAM: 4 GiB
EL Level: EL2
Chip ID: zu9eg
MMC: mmc@ff170000: 0 (SD)
SF: Detected n25q512a with page size 512 Bytes, erase size 128 KiB, total 128 MiB
Model: ZynqMP ZCU102 Rev1.0
Board: Xilinx ZynqMP
Net: ZYNQ GEM: ff0e0000, phyaddr c, interface rgmii-id
Warning: ethernet@ff0e0000 MAC addresses don't match:
Address in ROM is cf:db:ec:b5:e5:f7
Address in environment is 00:0a:35:00:22:01
Hit any key to stop autoboot: 0
BOOTP broadcast 1
DHCP client bound to address 172.16.75.86 (156 ms)
05-17-2019 03:06 AM
Have a look at the CONFIG_EXTRA_ENV_SETTINGS. For example if you are usign zynq ultrascale:
This used the modeboot env to know where to automatically boot from:
In your case, if you want to do a tftpboot, you can set the modeboot to netboot (setenv modeboot=netboot; saveenv), and you could update the xilinx_zynqmp.h to do a dhcp, and setup your tftpserver
05-17-2019 06:57 AM
Thank You for the guidance. This helped me in figuring it out.