Post Go back to editing

File not found during U-Boot flash in Yocto Linux for ADSP-SC589 MINI

Category: Software

Hi,

      I'm following the guidance given for U-Boot flashing in Yocto Linux for ADSP-SC589 MINI hardware from the below link.

https://wiki.analog.com/resources/tools-software/linuxdsp/docs/quickstartguide/quickstart_sc589

When starting to flash the uboot in flash memory, facing "TFTP error: 'File Not Found C:\Program Files\DesktopCentral_Server\osdPEMedia\P)
Not retrying...  " , minicom log is given in below.

Please let us know your feedback.

--------------------------------------------------------------

Welcome to minicom 2.7.1

OPTIONS: I18n
Compiled on Dec 23 2019, 02:06:26.
Port /dev/ttyUSB0, 14:33:37

Press CTRL-A Z for help on special keys



U-Boot 2020.10 (Sep 29 2022 - 07:08:35 +0000)

CPU:   ADSP ADSP-SC589-0.1 (Detected Rev: 1.1) (spi flash boot)
VCO: 450 MHz, Cclk0: 450 MHz, Sclk0: 112.500 MHz, Sclk1: 112.500 MHz, DCLK: 450z
OCLK: 150 MHz
Model: ADI sc589-mini
I2C:   ready
DRAM:  224 MiB
MMC:   SC5XX SDH: 0
Loading Environment from SPIFlash...
SF: Detected is25lp512 with page size 256 Bytes, erase size 64 KiB, total 64 MiB
*** Warning - bad CRC, using default environment
                                                                                
In:    serial@0x31003000                                                        
Out:   serial@0x31003000                                                        
Err:   serial@0x31003000                                                        
other init                                                                      
Net:   dwmac.3100c000                                                           
Hit any key to stop autoboot:  0                                                                          
=> setenv serverip 172.21.3.123                                                 
=> dhcp                                                                         
Speed: 100, full duplex                                                         
BOOTP broadcast 1                                                               
DHCP client bound to address 172.21.3.130 (13 ms)                               
=> run update                                                                   
Speed: 100, full duplex                                                         
Using dwmac.3100c000 device                                                     
TFTP from server 172.16.4.177; our IP address is 172.21.3.130; sending through 1
Filename 'u-boot-sc589-mini.ldr'.                                               
Load address: 0xc2000000                                                        
Loading: *                                                                      
TFTP error: 'File Not Found C:\Program Files\DesktopCentral_Server\osdPEMedia\P)
Not retrying...                                                                 
SF: Detected is25lp512 with page size 256 Bytes, erase size 64 KiB, total 64 MiB
SF: 524288 bytes @ 0x0 Erased: OK                                               
device 0 whole chip                                                             
SF: 67108864 bytes @ 0x0 Written: OK 

------------------------------------------

  • Hi Samy,

    1. It seems there is some issue with your TFTP server setup. From the log shared I could see the severip set was "setenv serverip 172.21.3.123"

    But later "TFTP from server 172.16.4.177" was used. 

    2. It looks for the file "u-boot-sc589-mini.ldr" under your Windows location  "C:\Program Files\DesktopCentral_Server\osdPEMedia\P" 

    Suggestion: 

    1. Try copying the "u-boot-sc589-mini.ldr" file under "C:\Program Files\DesktopCentral_Server\osdPEMedia\P" in Windows location - ( I Recommend )

    or

    2. Need to fix your TFTP server configuration which should look into your Ubuntu machine /tftpboot directory.

    Thanks,

    Prasanth R

  • HI Prasanth, 

           Thanks for feedback. Please find our comments in below,

    1. PC ip address is shown as '172.21.3.123', based on the ip address given in setenv serverip 

    But when running 'run update' command, TFTP from server 172.16.4.177 is displayed. 

    Please let us know whether ip address should be '172.21.3.123' when running 'run update' command. 

    2. Windows OS is not installed & only Ubuntu 20.04 is installed. We are not clear why it is showing the windows location.

    Regarding fix in tftp configuration we followed the below procedure, do we need to add any other point, please let us know

    $ sudo vi /etc/default/tftpd-hpa
    
    #Replace the existing file with the following
    TFTP_USERNAME="tftp"
    TFTP_DIRECTORY="/tftpboot"
    TFTP_ADDRESS="0.0.0.0:69"
    TFTP_OPTIONS="--secure"
    #End of File
    
    $ sudo mkdir /tftpboot
    $ sudo chmod 777 /tftpboot
    $ sudo service tftpd-hpa restart

    We can view the 'u-boot-sc589-mini.ldr' file in '\tftpboot' folder. 

  • Hi Samy,

    It seems you haven't configured your TFTP server well. Try the below setting which was used in my machine.

    1. install the TFTP server and NFS server

    ```

    # sudo apt-get install xinetd tftp tftpd isc-dhcp-server nfs-kernel-server portmap -y

    ```

    2. On Ubuntu, edit /etc/xinetd.conf and add the following lines just above the line that reads includedir /etc/xinetd.d.

    ```
    service tftp
    {
    socket_type = dgram
    protocol = udp
    wait = yes
    user = root
    server = /usr/sbin/in.tftpd
    server_args = -s /tftpboot
    disable = no
    }
    ```

    3. Create the /tftpboot folder if it does not exist:

    ```
    # mkdir /tftpboot
    ```

    4. Restart the xinetd server with the following command:
    ```
    # /etc/init.d/xinetd restart

    # ps -alxww | grep inet
    140 0 578 1 0 0 1152 356 do_select S ? 0:00 xinetd ...
    0 500 13361 13336 18 0 1360 508 pipe_read S ? 0:00 grep -i inet
    ```

    5. Test the TFTP server with the following commands

    ```

    # echo "Hello, embedded world" > /tftpboot/hello.txt"
    # tftp localhost
    tftp> get hello.txt
    Received 23 bytes in 0.1 seconds
    tftp> quit
    ```
    ```
    # tftp localhost
    tftp> get u-boot-sc589-mini.ldr
    Received * bytes in 0.4 seconds
    tftp> quit
    ```

    tftp 0xc2000000 172.21.3.123:/tftpboot/u-boot-sc589-mini.ldr

  • Hi Prasanth,

    I configured the TFTP server as you given in above steps.

    I given 'tftp 0xc2000000 172.21.3.123:/tftpboot/u-boot-sc589-mini.ldr' in Flashing U-Boot to SPI Flash on TFTP. It is showing the "Loading: T T T..."

    Please find the log in below. Kindly let us know your feedback.

    -----------------------------------------                                                                               
    U-Boot 2020.10 (Sep 29 2022 - 07:08:35 +0000)                                   
                                                                                    
    CPU:   ADSP ADSP-SC589-0.1 (Detected Rev: 1.1) (spi flash boot)                 
    VCO: 450 MHz, Cclk0: 450 MHz, Sclk0: 112.500 MHz, Sclk1: 112.500 MHz, DCLK: 450z
    OCLK: 150 MHz                                                                   
    Model: ADI sc589-mini                                                           
    I2C:   ready                                                                    
    DRAM:  224 MiB                                                                  
    MMC:   SC5XX SDH: 0                                                             
    Loading Environment from SPIFlash...                                            
    SF: Detected is25lp512 with page size 256 Bytes, erase size 64 KiB, total 64 MiB
    *** Warning - bad CRC, using default environment                                
                                                                                    
    In:    serial@0x31003000                                                        
    Out:   serial@0x31003000                                                        
    Err:   serial@0x31003000                                                        
    other init                                                                      
    Net:   dwmac.3100c000                                                           
    Hit any key to stop autoboot:  0                                                
    => setenv serverip 172.21.3.123                                                 
    => dhcp                                                                         
    Speed: 100, full duplex                                                         
    BOOTP broadcast 1                                                               
    DHCP client bound to address 172.21.3.130 (16 ms)                               
    => tftp 0xc2000000 172.21.3.123:/tftpboot/u-boot-sc589-mini.ldr                 
    Speed: 100, full duplex                                                         
    Using dwmac.3100c000 device                                                     
    TFTP from server 172.21.3.123; our IP address is 172.21.3.130                   
    Filename '/tftpboot/u-boot-sc589-mini.ldr'.                                     
    Load address: 0xc2000000                                                        
    Loading: T T T T T T T T T T T T T T T T 

    -------------------------------------

  • Hi Prasanth,

    We can able to flash the uboot loader now.. We given 'save' command after  setenv serverip. With this update, flashing is successful.

    => setenv serverip 172.21.3.123                                                 
    => save           

    We will ask you further queries if any.

    Regards,

    Ramasamy S.

  • Hi Prasanth,

    Thanks for support.

    Further, I'm trying to run the SHARC LED blinking application loader created in windows & trying to invoke the application from Linux using following guide.

    https://wiki.analog.com/resources/tools-software/linuxdsp/docs/linux-kernel-and-drivers/remoteproc/remoteproc

    "blinky_Core1_sc589_mini.ldr " is kept in 'tftpboot' folder in linux pc for verification.

    But i'm getting error as in below,

    ----------------------------------------------

    root@adsp-sc589-mini:~# cd /                                                    
    root@adsp-sc589-mini:/# echo -n \tftpboot > /sys/module/firmware_class/parameter
    s/path                                                                          
    root@adsp-sc589-mini:/# echo blinky_Core1_sc589_mini.ldr > /sys/class/remoteproc
    /remoteproc0/firmware                                                           
    root@adsp-sc589-mini:/# echo start > /sys/class/remoteproc/remoteproc0/state
    remoteproc remoteproc0: powering up core1-rproc                                 
    remoteproc remoteproc0: Direct firmware load for blinky_Core1_sc589_mini.ldr fa2
    remoteproc remoteproc0: request_firmware failed: -2                             
    remoteproc remoteproc0: Boot failed: -2                                         
    sh: write error: No such file or directory                                      
    root@adsp-sc589-mini:/#

    --------------------------------------------------

    Please correct, am i missing anything here?

  • Hi samy,

    is this blinky_Core1_sc589_mini.ldr really exist in the rfs? or only in /tftboot directory? 

    copy blinky_Core1_sc589_mini.ldr file into your root filesystem location /lib/firmware/

    Thanks,

    Prasanth R

  • Dear Prasanth,

    Sorry, I given local Linux PC path as '/tftboot.

    Kindly let us know, how to copy linky_Core1_sc589_mini.ldr file root filesystem location /lib/firmware/

    Please share the relevant document for this.

  • Hi Samy,

    Could you let me know how the roots was mounted for your device?

    If you were not aware share your bootargs from your uboot promot. #printenv bootargs

    If you are using SD card, just do a sudo cp blinky_Core1_sc589_mini.ldr to the /lib/firmware 

    If it's a nfs boot copy the file to your nfs mount location?

    Thanks,

    Prasanth R