This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

AM620-Q1: Boot from Ethernet

Part Number: AM620-Q1

Tool/software:

I've attached the dhcpd.conf file I'm using to research the Ethernet boot process.  I've installed the isc-dhcp-server on our native linux box that has a static IP of 102.168.1.41.  Have I correctly configured tthe server in the dhcpd.conf.  We want to target the IP range of 192.168.1.201 -192.168.1.220.

# dhcpd.conf
#
# Sample configuration file for ISC dhcpd
#
# Attention: If /etc/ltsp/dhcpd.conf exists, that will be used as
# configuration file instead of this file.
#

# option definitions common to all supported networks...
option domain-name "example.org";
# JM option domain-name-servers ns1.example.org, ns2.example.org;

default-lease-time 600;
max-lease-time 7200;

# The ddns-updates-style parameter controls whether or not the server will
# attempt to do a DNS update when a lease is confirmed. We default to the
# behavior of the version 2 packages ('none', since DHCP v2 didn't
# have support for DDNS.)
ddns-update-style none;

# If this DHCP server is the official DHCP server for the local
# network, the authoritative directive should be uncommented.
#authoritative;

# Use this to send dhcp log messages to a different log file (you also
# have to hack syslog.conf to complete the redirection).
#log-facility local7;

# No service will be given on this subnet, but declaring it helps the 
# DHCP server to understand the network topology.

#subnet 10.152.187.0 netmask 255.255.255.0 {
#}

# This is a very basic subnet declaration.

#subnet 10.254.239.0 netmask 255.255.255.224 {
#  range 10.254.239.10 10.254.239.20;
#  option routers rtr-239-0-1.example.org, rtr-239-0-2.example.org;
#}

# This declaration allows BOOTP clients to get dynamic addresses,
# which we don't really recommend.

#subnet 10.254.239.32 netmask 255.255.255.224 {
#  range dynamic-bootp 10.254.239.40 10.254.239.60;
#  option broadcast-address 10.254.239.31;
#  option routers rtr-239-32-1.example.org;
#}

# A slightly different configuration for an internal subnet.
#subnet 10.5.5.0 netmask 255.255.255.224 {
#  range 10.5.5.26 10.5.5.30;
#  option domain-name-servers ns1.internal.example.org;
#  option domain-name "internal.example.org";
#  option subnet-mask 255.255.255.224;
#  option routers 10.5.5.1;
#  option broadcast-address 10.5.5.31;
#  default-lease-time 600;
#  max-lease-time 7200;
#}

# Hosts which require special configuration options can be listed in
# host statements.   If no address is specified, the address will be
# allocated dynamically (if possible), but the host-specific information
# will still come from the host declaration.

#host passacaglia {
#  hardware ethernet 0:0:c0:5d:bd:95;
#  filename "vmunix.passacaglia";
#  server-name "toccata.example.com";
#}

# Fixed IP addresses can also be specified for hosts.   These addresses
# should not also be listed as being available for dynamic assignment.
# Hosts for which fixed IP addresses have been specified can boot using
# BOOTP or DHCP.   Hosts for which no fixed address is specified can only
# be booted with DHCP, unless there is an address range on the subnet
# to which a BOOTP client is connected which has the dynamic-bootp flag
# set.
#host fantasia {
#  hardware ethernet 08:00:07:26:c0:a5;
#  fixed-address fantasia.example.com;
#}

# You can declare a class of clients and then do address allocation
# based on that.   The example below shows a case where all clients
# in a certain class get addresses on the 10.17.224/24 subnet, and all
# other clients get addresses on the 10.0.29/24 subnet.

#class "foo" {
#  match if substring (option vendor-class-identifier, 0, 4) = "SUNW";
#}

#shared-network 224-29 {
#  subnet 10.17.224.0 netmask 255.255.255.0 {
#    option routers rtr-224.example.org;
#  }
#  subnet 10.0.29.0 netmask 255.255.255.0 {
#    option routers rtr-29.example.org;
#  }
#  pool {
#    allow members of "foo";
#    range 10.17.224.10 10.17.224.250;
#  }
#  pool {
#    deny members of "foo";
#    range 10.0.29.10 10.0.29.230;
#  }
#}
# Jim's TEST
option subnet-mask 255.255.255.0;
option broadcast-address 192.168.1.255;
option routers 192.168.1.254;
option domain-name-servers 192.168.1.1, 8.8.8.8;

#subnet 192.168.1.0 netmask 255.255.255.0 {
#range 192.168.1.201 192.168.1.220;
#}
subnet 192.168.1.0 netmask 255.255.255.0
{
  range dynamic-bootp 192.168.1.201 192.168.1.210;
  if substring (option vendor-class-identifier, 0, 16) = "TI K3 Bootp Boot"
  {
    filename "tiboot3.bin";
  } elsif substring (option vendor-class-identifier, 0, 20) = "AM62X U-Boot R5 SPL"
  {
    filename "tispl.bin";
  } elsif substring (option vendor-class-identifier, 0, 21) = "AM62X U-Boot A53 SPL"
  {
    filename "u-boot.img";
  }

  range 192.168.1.211 192.168.1.220;
  default-lease-time 60000;
  max-lease-time 720000;
  next-server 192.168.1.1;
}

  • Hello Jim,

    >>> I've installed the isc-dhcp-server on our native linux box that has a static IP of 102.168.1.41.

    I'm assuming the IP address you mean is 192.168.1.41 so that it is on the same subnet as the target IP range?

    >>>We want to target the IP range of 192.168.1.201 -192.168.1.220.

    Is there an issue you are seeing with the current dhcpd.conf configuration? 

    -Daolin

  • Daolin,

         Yes, 192.168.1.41 is our Linux box.  We want the range to be 192.168.1.201 - 192.168.1.220.  If I start the dhcp server with "sudo service isc-dhcp-server start"  I don't see anything on Wireshark.  Is the config file set up correctly?  Also, I don't actually have any files for it to transfer, yet.  I wanted to see if there was anything on Wireshark first.  Do I need to start any other service on the Linux box?  

  • Hi Jim,

    After running "sudo service isc-dhcp-server start" what do you see when you check the status of isc-dhcp-server, is it "active"?

    Also, do you have a tftp server setup on your Linux box as well?

    -Daolin

  • Hi Jim,

    Looks like the two services you need (isc-dhcp-server and tftp server) are actively running. Do you have your target board to boot from connected to your Linux PC via ethernet? 

    -Daolin

  • Yes, there is no code on it and I don't see any LED activity on the RJ45 connectors.

  • Are you testing on a custom board or AM62x SKEVM? If testing on the SKEVM, do you have the boot switches configured for Ethernet boot mode?

    -Daolin

  • I'm working on our custom board and it has similar "boot" switches.  I can configure the UART Boot and run SBL_UART successfully.  It initiallizes the processor so I can use CCS.  Since we don't have OSPI, I need to run the SBL_UART script each power cycle.  The design was complete before I started on the project.

    So I have it set for Ethernet boot.

    I have the equivalent of this setting on our custom board.

  • Hi, 

    When running Ethernet boot mode do you see any BOOTP packets coming the device? These packets should be transmitted regardless if you have a DHCP server configured correctly.

    If you directly connect the Linux PC to your custom board do you see an Ethernet link established?

    Best Regards,

    Schuyler

  • Schuyler,

         I currently have the custom board connected to a switch for our corporate network.  I see no BOOTP traffic using WireShark (from my Windows PC).  In addition, I see no LED activity on the switch or Ethernet RJ45 (port 0).

         We currently have no code on our custom board.  We can initialize it with SBL_UART and connect CCS.

         We can initialize the custom board with SBL_UART and connect CCS.  There is no code on the custom board.

  • Hi,

    OK, so currently you are setting up for UART boot but have not loaded code yet to load for the custom board. 

    Did you want to do ethernet boot or boot over UART?

    What my previous answer was in relation to doing a ethernet boot. If the boot mode is ethernet that the ROM code will send BOOTP packets looking to get both an ip address and then tftp the code from the tftp server.

    Best Regards,

    Schuyler

  • Schuyler,

         OK!  So we should see something (BOOTP packets) on Wireshark when we are in ethernet boot mode at power up - nothing else is needed?  Regarding the boot method (ethernet or UART), we'd prefer to go with the fastest but the hardware is not verified (thus the question regarding the BOOTP packets).

         I should see these packets even if I'm on the corporate network and not on an Isolated network?

         We did need to make a hardware change to get the indicator LEDs functioning:

         

         I was not able to see BOOTP on Wireshark.  I monitored our network while doing the same thing on the development board and I didn't see BOOTP messages from the development board either (just setting DIP switches to ethernet boot).

           Any suggestions?

  • Since you are mentioning the PHY and are unsure of the board I will recommend a couple of preliminary steps. 

    You need to prove that the PHY on the custom board is able to establish a link with a link partner. Try using the TI EVM as the link partner directly connected to your custom board, use the eth0 port. Then use ethtool eth0 to see if a link is established. The PHYs do this automatically without drivers needed to be loaded.  

    If a link is established the next step I would recommend is connecting the custom board directly to the machine that has wireshark running on it, single cable no switches. I do not have a board at the moment, I will look tomorrow to confirm your switch settings.

    Best Regards,

    Schuyler

  • OK!  What output should I expect on Wireshark if I confirm a link with ethtool?

    Both ports are able to establish a link:

    Wireshark shows:

    What useful information is displayed (with no code on the processor)?

    Back to BOOTP...  I got the dhcp config file working but I get the following on Wireshark

    I'm not using UBOOT files built for the ethernet boot, yet.  I just wanted to be sure I was able to get the files using the server.  I've got files in both /tftpboot and /var/lib/tftpboot.

    One of the config files had the file location in another location.  After adjusting for that I got the following:

    I didn't see any additional file transferred and I'm using a tiboot3.bin from the standard TI image (it's not been built for the ethernet boot).  I don't see anything on the terminal when I cycle power.  Do I keep the DIP switches in the ethernet boot mode position?  Will I see anything if I don't use a tiboot3.bin file built for the ethernet boot?

    Moving forward...

    When I change the defconfig to ethboot, build u-boot from the top level "make u-boot) and move the three files ( tiboot3.bin, tispl.bin and u-boot.img) to the folder for the ethernet boot, I get the following:

    Right now I'm trying it on the development board so there should be no need for hardware changes. 

    More...

    It looks like it sends tiboot3.bin again after I reset the development board and then the above text appears on the terminal.

  • Schuyler,

    Any suggestions regarding the information I have been sending?

  • Schuyler,

    I downloaded the latest SDK and built u-boot.  When I moved the tiboot3.bin, tispl.bin and uboot.img to my SD card it booted from the SD Card (on our lp-sk development board).  I needed to change the Rules.make file to "PLATFORM?=am62xx-lp-evm" and then when I wanted to try the ethernet boot, I changed the UBOOT_MACHINE_R5 to "UBOOT_MACHINE_R5=am62x_evm_r5_ethboot_defconfig"
    I still get:

    I've attached my Rules.make.

    ### COMMON CONFIG ###
    CFLAGS?=
    
    #Strip modules when installing to conserve disk space
    INSTALL_MOD_STRIP?=1
    
    # Set EXEC_DIR to install example binaries.
    # This will be configured with the setup.sh script.
    EXEC_DIR?=__EXEC_DIR__
    
    #root of the target file system for installing applications
    DESTDIR?=__DESTDIR__
    
    # Root of the boot partition to install boot binaries
    BOOTFS?=__BOOTFS__
    
    MAKE_JOBS?=1
    
    ### TI SDK CONFIG ###
    #Points to the root of the TI SDK
    export TI_SDK_PATH?=/home/jim/ti/ti-processor-sdk-linux-rt-am62xx-evm-09.02.01.10
    
    export LINUX_DEVKIT_PATH=$(TI_SDK_PATH)/linux-devkit
    export K3_R5_LINUX_DEVKIT_PATH=$(TI_SDK_PATH)/k3r5-devkit
    SDK_PATH_TARGET=$(LINUX_DEVKIT_PATH)/sysroots/aarch64-oe-linux
    SDK_PATH_HOST=$(LINUX_DEVKIT_PATH)/sysroots/x86_64-arago-linux
    
    # The source directories for each component
    ARM_BENCHMARKS_SRC_DIR=$(TI_SDK_PATH)/example-applications/*arm-benchmarks*
    AM_SYSINFO_SRC_DIR=$(TI_SDK_PATH)/example-applications/*am-sysinfo*
    OPROFILE_SRC_DIR=$(TI_SDK_PATH)/example-applications/*oprofile-example*
    CRYPTODEV_SRC_DIR=$(TI_SDK_PATH)/board-support/extra-drivers/cryptodev*
    IMG_ROGUE_SRC_DIR=$(TI_SDK_PATH)/board-support/extra-drivers/ti-img-rogue-driver*
    UBOOT_SRC_DIR=$(TI_SDK_PATH)/board-support/ti-u-boot*
    KIG_SRC_DIR=$(TI_SDK_PATH)/board-support/k3-image-gen-*
    LINUXKERNEL_INSTALL_DIR=$(TI_SDK_PATH)/board-support/ti-linux-kernel*
    
    export TI_SECURE_DEV_PKG=$(TI_SDK_PATH)/board-support/core-secdev-k3
    ### PLATFORM CONFIG ###
    #platform
    SOC=am62
    
    #add platform for scripts
    # JM PLATFORM?=am62xx-evm
    PLATFORM?=am62xx-lp-evm
    #end of mod
    
    #defconfig
    DEFCONFIG=tisdk_am62xx-evm_defconfig
    
    #Architecture
    ARCH=arm64
    
    #ARM Toolchains
    export CROSS_COMPILE=$(LINUX_DEVKIT_PATH)/sysroots/x86_64-arago-linux/usr/bin/aarch64-oe-linux/aarch64-oe-linux-
    export CROSS_COMPILE_ARMV7=$(K3_R5_LINUX_DEVKIT_PATH)/sysroots/x86_64-arago-linux/usr/bin/arm-oe-eabi/arm-oe-eabi-
    
    #Default CC value to be used when cross compiling.  This is so that the
    #GNU Make default of "cc" is not used to point to the host compiler
    export CC=$(CROSS_COMPILE)gcc --sysroot=$(SDK_PATH_TARGET)
    
    # u-boot machine configs for A53 and R5
    UBOOT_MACHINE=am62x_evm_a53_defconfig
    # JM UBOOT_MACHINE_R5=am62x_evm_r5_defconfig
    UBOOT_MACHINE_R5=am62x_evm_r5_ethboot_defconfig
    # end of JM
    MKIMAGE_DTB_FILE=a53/arch/arm/dts/k3-am625-sk.dtb
    
    # rt fragment
    RT_FRAGMENT=ti_rt.config
    
    # Update platform, defconfig if PLATFORM=am62xx-lp-evm
    ifeq ($(PLATFORM),am62xx-lp-evm)
        UBOOT_MACHINE=am62x_lpsk_a53_defconfig
        UBOOT_MACHINE_R5=am62x_lpsk_r5_defconfig
        MKIMAGE_DTB_FILE=a53/arch/arm/dts/k3-am62-lp-sk.dtb
    endif
    
    KERNEL_DEVICETREE_PREFIX=ti/k3-am625|ti/k3-am62-|ti/k3-am62x|ti/k3-am62.dtsi
    
    TI_LINUX_FIRMWARE=$(TI_SDK_PATH)/board-support/prebuilt-images/$(PLATFORM)
    UBOOT_ATF=$(TI_SDK_PATH)/board-support/prebuilt-images/$(PLATFORM)/bl31.bin
    UBOOT_TEE=$(TI_SDK_PATH)/board-support/prebuilt-images/$(PLATFORM)/bl32.bin
    LINUXEXTRASKERNEL_INSTALL_DIR=$(TI_SDK_PATH)/board-support/linux-extras-*
    UBOOTEXTRAS_SRC_DIR=$(TI_SDK_PATH)/board-support/u-boot-extras-jailhouse-*
    
    # Add configs for ti-img-rogue-driver
    PVR_BUILD_DIR=am62_linux
    RGX_BVNC="33.15.11.3"
    WINDOW_SYSTEM=wayland
    
    MAKE_ALL_TARGETS?= arm-benchmarks cryptodev u-boot linux linux-dtbs ti-img-rogue-driver jailhouse linux-extras linux-extras-dtbs u-boot-extras
    
    MAKE_JOBS=16
    

    It looks like my UBOOT_MACHINE_R5= "am62x_evm_r5_ethboot_defconfig" might be getting changed to "am62x_lpsk_r5_defconfig".  Is there a "am62x_lpsk_r5_ethboot_defconfig"?