[U-Boot] using ${var} with env import

Holger Brunck holger.brunck at keymile.com
Wed Mar 30 10:20:04 CEST 2011


Hi all,
I am using env import -t to import environment variables from a textfile.

My simple textfile is:
fdt_file=${hostname}/${hostname}.dtb

I import the file with:
=> tftp 200000 scripts/my_environ.txt
=> env import -t 200000 ${filesize}

Now when I print the variable I get:
=> print fdt_file
fdt_file=${hostname}/${hostname}.dtb

hostname is defined as:
=> print hostname
hostname=mgcoge

I see that the ${hostname} for my fdt_file variable is not replaced. If I do
this with setenv:
=> setenv fdt_file_2 ${hostname}/${hostname}.dtb
=> print fdt_file_2
fdt_file_2=mgcoge/mgcoge.dtb

My variable is replaced.

Is the usage of ${var} in the textfiles not possible? Or is there a way to solve
this problem?

I try to use this textfile for different boards and can therfore not specify
hostname in advance in the textfile.

Best regards
Holger Brunck


More information about the U-Boot mailing list