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.

Compiler/EVMK2EX: setup-uboot-env.sh ubifs_mount: Error after reboot

Part Number: EVMK2EX

Tool/software: TI C/C++ Compiler

EVMK2E  failed to boot after running setup-uboot-env.sh 

UBIFS error (pid 0): ubifs_get_sb: cannot open "ubi:ubi:rootfs", error -19
UBIFS error (pid 0): ubifs_mount: Error reading superblock on volume 'ubi:ubi:rootfs' errno=-19!

ubifsmount - mount UBIFS volume

Usage:
ubifsmount <volume-name>
- mount 'volume-name' volume
UBIFS not mounted, use ubifs mount to mount volume first!
ubifsload - load file from an UBIFS filesystem

K2E EVM # printenv
addr_load_sec_bm=0x0c09c000
addr_mon=0x87000000
addr_non_sec_mon=0x0c097fc0
addr_secdb_key=0xc000000
addr_ubi=0x82000000
arch=arm
args_all=setenv bootargs console=ttyS0,115200n8 rootwait=1 mtdparts=spi0.0:1m(u-boot-spl)ro,-(misc);
args_net=setenv bootargs ${bootargs} rootfstype=nfs root=/dev/nfs rw nfsroot=${serverip}:${nfs_root},${nfs_options} ip=dhcp
args_ramfs=setenv bootargs ${bootargs} rdinit=/sbin/init rw root=/dev/ram0 initrd=0x808080000,80M
args_ubi=setenv bootargs ${bootargs} rootfstype=ubifs root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048
baudrate=115200
board=ks2_evm
board_name=ks2_evm
boot=ubi
boot_fdt=try
bootargs=console=ttyS0,115200n8 rootwait=1 mtdparts=spi0.0:1m(u-boot-spl)ro,-(misc) rootfstype=ubifs root=ubi0:rootfs rootflags=sync rw ubi.mtd=ubifs,2048
bootcmd=run init_${boot}; run get_mon_${boot} run_mon; run get_kern_${boot}; run init_fw_rd_${boot}; run get_fdt_${boot}; run run_kern
bootdelay=2
bootdir=/boot
bootm_size=0x10000000
burn_ubi=nand erase.part ubifs; nand write ${addr_ubi} ubifs ${filesize}
burn_uboot_nand=nand erase 0 0x100000; nand write ${loadaddr} 0 ${filesize}
burn_uboot_spi=sf probe; sf erase 0 0x100000; sf write ${loadaddr} 0 ${filesize}
cpu=armv7
dfu_alt_info_mmc=MLO fat 0 1;u-boot.img fat 0 1;uEnv.txt fat 0 1
dfu_bufsiz=0x10000
ethact=K2E_EMAC0
ethaddr=b4:99:4c:09:a2:4f
fdt_addr_r=0x88000000
fdtaddr=0x88000000
get_fdt_net=dhcp ${fdtaddr} ${tftp_root}/${name_fdt}
get_fdt_nfs=nfs ${fdtaddr} ${nfs_root}/boot/${name_fdt}
get_fdt_ramfs=dhcp ${fdtaddr} ${tftp_root}/${name_fdt}
get_fdt_ubi=ubifsload ${fdtaddr} ${bootdir}/${name_fdt}
get_fit_mmc=load mmc ${bootpart} ${fit_loadaddr} ${bootdir}/${fit_bootfile}
get_fit_net=dhcp ${fit_loadaddr} ${tftp_root}/${fit_bootfile}
get_fit_nfs=nfs ${fit_loadaddr} ${nfs_root}/boot/${fit_bootfile}
get_fit_ramfs=dhcp ${fit_loadaddr} ${tftp_root}/${fit_bootfile}
get_fit_ubi=ubifsload ${fit_loadaddr} ${bootdir}/${fit_bootfile}
get_fs_ramfs=dhcp ${rdaddr} ${tftp_root}/${name_fs}
get_kern_net=dhcp ${loadaddr} ${tftp_root}/${name_kern}
get_kern_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_kern}
get_kern_ramfs=dhcp ${loadaddr} ${tftp_root}/${name_kern}
get_kern_ubi=ubifsload ${loadaddr} ${bootdir}/${name_kern}
get_mon_net=dhcp ${addr_mon} ${tftp_root}/${name_mon}
get_mon_nfs=nfs ${addr_mon} ${nfs_root}/boot/${name_mon}
get_mon_ramfs=dhcp ${addr_mon} ${tftp_root}/${name_mon}
get_mon_ubi=ubifsload ${addr_mon} ${bootdir}/${name_mon}
get_ubi_net=dhcp ${addr_ubi} ${tftp_root}/${name_ubi}
get_ubi_nfs=nfs ${addr_ubi} ${nfs_root}/boot/${name_ubi}
get_uboot_net=dhcp ${loadaddr} ${tftp_root}/${name_uboot}
get_uboot_nfs=nfs ${loadaddr} ${nfs_root}/boot/${name_uboot}
init_fw_rd_net=dhcp ${rdaddr} ${tftp_root}/${name_fw_rd}; run set_rd_spec
init_fw_rd_nfs=nfs ${rdaddr} ${nfs_root}/boot/${name_fw_rd}; run set_rd_spec
init_fw_rd_ramfs=setenv rd_spec -
init_fw_rd_ubi=ubifsload ${rdaddr} ${bootdir}/${name_fw_rd}; run set_rd_spec
init_net=run args_all args_net
init_nfs=setenv autoload no; dhcp; run args_all args_net
init_ramfs=run args_all args_ramfs get_fs_ramfs
init_ubi=run args_all args_ubi; ubi part ubifs; ubifsmount ubi:rootfs;
kernel_addr_r=0x82000000
loadaddr=0x82000000
mem_lpae=1
mtddevname=bootloader
mtddevnum=0
mtdids=nand0=davinci_nand.0
mtdparts=mtdparts=davinci_nand.0:1024k(bootloader)ro,512k(params)ro,-(ubifs)
name_fdt=keystone-k2e-evm.dtb
name_fs=arago-console-image-k2e-evm.cpio.gz
name_fw_rd=k2-fw-initrd.cpio.gz
name_kern=zImage
name_mon=skern-k2e.bin
name_ubi=arago-base-tisdk-image-k2e-evm.ubi
name_uboot=u-boot-spi-k2e-evm.gph
nfs_options=v3,tcp,rsize=4096,wsize=4096
nfs_root=/mnt/nfs_k2e
no_post=1
partition=nand0,0
pxefile_addr_r=0x80100000
ramdisk_addr_r=0x88080000
rd_spec=0x88080000:
rdaddr=0x88080000
run_kern=bootz ${loadaddr} ${rd_spec} ${fdtaddr}
run_mon=mon_install ${addr_mon}
run_mon_hs=mon_install ${addr_non_sec_mon} ${addr_load_sec_bm}
scriptaddr=0x80000000
serverip=192.168.1.116
set_rd_spec=setenv rd_spec ${rdaddr}:${filesize}
soc=keystone
stderr=serial
stdin=serial
stdout=serial
tftp_root=/var/lib/tftpboot
update_ubi=if run get_ubi_net burn_ubi; then echo UBI update: SUCCESS; else echo UBI update: FAILED; fi
update_uboot=if run get_uboot_net burn_uboot_spi; then echo U-Boot update: SUCCESS; else echo U-Boot update: FAILED; fi
vendor=ti
ver=U-Boot 2013.01-dirty (Nov 19 2015 - 16:41:52)

The setup-uboot-env.sh has two option NFS or UBI but neither option was successful.

The U-Boot default settings "env default -f -a" returned the K2E to the functional  UBI configuration.

What is the correct procedure for setting up U-Boot to allow mounting the EVMK2E file system on the Ubuntu host?

  • Hi, Phillip,

    The U-Boot version shown in the printenv is a very old version. I suspect the u-boot isn't upgraded to the same version of PLSDK you are using. Instead of using those script files, could you do the following to upgrade the u-boot and flash ubi file. You need to have DHCP and TFTP server set up first.

    1. Upgrade u-boot:

         # env default -f -a

         # setenv serverip <your DHCP/TFTP server IP>

         # setenv tftp_root <diretory where the images are in tftp server root>

         # run get_uboot_net

         # run burn_uboot_spi 

         Please note that based on your u-boot version, 2013.01 shouldn't have the last command, but burn_uboot. Use this old command instead. That is, "run burn_uboot". Wait till the commnad completes, then reboot the EVM. You should see the correct u-boot version for the PLSDK release you are using.

    2. flash ubi and boot from NAND

         # env default -f -a 

         # setenv boot ubi

         # setenv serverip <dhcp/tftp server ip>

         # setenv tftp_root <diretory where the images are on tftp server root>

         # setenv name_ubi arago-base-.......ubi

         # saveenv 

         # run get_ubi_net

         # run burn_ubi

         # boot

    Rex

  • Hello Rex

    Update of U-Boot and file system was successful. The UBI boot was also successful.

    The setup-uboot-env.sh script has two options, NFS was selected but it set boot to NET (net) which did not work.
    Setting the boot variable to nfs was successful.

    setenv boot nfs
    saveenv
    boot

    Setting the boot variable to hdd produced an error.
    setenv boot hdd
    saveenv
    boot

    ## Error: "init_hdd" not defined
    ## Error: "get_mon_hdd" not defined
    ## Error: "get_kern_hdd" not defined
    ## Error: "init_fw_rd_hdd" not defined
    ## Error: "get_fdt_hdd" not defined

    Thank you,

    Phil

  • Hi, Phil,

    Thanks for the info. It is a bit odd that for nfs, the boot=nfs works for you. I have been using boot=net since day 1, but I have never used the script file to configure u-boot. So, I don;t know what it is doing. To boot from net, you will need to set up NFS filesystem mount point on the server and setenv nfs_root to that mount point.

    HDD boot isn't an option for K2H. There are 3 boot options on K2H, boot=net/ubi/ramfs. The script file is generic to all platforms in our business unit. In KS2 family, K2H doesn't have SATA connector, but K2E has, so it is possible to boot K2E on a hard drive, but the corresponding u-boot env variables need to be created. I don't know if script file is doing that. Booting from hard drive on K2E is not a norm or a feature frequently used. I have some doubt on having it in the script file.

    Anyway, glad to hear your issue is resolved. I'll close the thread.

    Rex

  • Hello Rex

    The boot=nfs did configure the EVMK2E U-Boot to connect to NFS file system mount point on the Ubuntu host. 

    The issue was that  setup-uboot-env.sh did not configure U-Boot for an NFS file system  point which has been clarified.

    Thank you.

    Best Regards,

    Phil