U-Boot support for Dragonboard410c?

Er… could I go for “not obviously wrong” (it looks right to me but I’ve never run u-boot on this particular board).

Hi thanks i have those patches…but still I have some doubts. I tried two approaches . one is :

#define CONFIG_ENV_SIZE 0x2000
#define CONFIG_SYS_MMC_ENV_DEV 0 /* mmc0 = emmc, mmc1 = sd /
#define CONFIG_ENV_VARS_UBOOT_CONFIG
#define CONFIG_ENV_OFFSET -0x2000

so as doc says it should save the variable with the offset of 2000 from the end , but as I checked with the hexdump it puts it somwhere else ( on the boot partition)… and wit the second approach i tried to use

#undef CONFIG_ENV_IS_IN_MMC
#define CONFIG_ENV_IS_IN_FAT
#define CONFIG_FAT_WRITE
#define FAT_ENV_INTERFACE “mmc”
#define FAT_ENV_DEVICE_AND_PART “0:A”
#define FAT_ENV_FILE “uboot.env”
#define CONFIG_ENV_VARS_UBOOT_CONFIG
#define CONFIG_SYS_REDUNDAND_ENVIRONMENT

the uboot will not start at all …even if from the fw_printenv I can reach and change the uboot variables

It’s not clear to me why you are changing the config at all! Are the default settings doing something different to what you predicted?

If so perhaps try instrumenting the code to make sure you understand what is happening. I’d suggest starting here:

1 Like

But that is not what the software does (you don’t need CONFIG_ENV_OFFSET if you defined the device tree property). the environment will be saved CONFIG_ENV_SIZE bytes before the end of the partition indicated in the device tree (these are the default settings in the master branch so you don’t need any changes…as long as you have a partition named boot it will work)

Hi , yes …the only reason is that I cannot reach it correctly by the fw_printenv …

Strange.

To be honest though I’d still be inclined to tackling things by figuring out what the default settings do and then looking at why fw_printenv is going wrong.

Perhaps something simple like: zero last 8k of the boot partition using dd, check u-boot has CRC error when it loads environment, saveenv from u-boot, check that last 8k of boot partition has changed.

I have compiled u-boot successfully and I have put the apq-8016.dtb, uEnv.txt and uImage in the emmc/boot directory. When I apply power to it it gets stuck on the u boot prompt and it doesn’t read the uEnv.txt file. When I manually put the commands in the u boot prompt it boots the kernel. Does anyone know why this is happening?

How did you put the uEnv.txt into the boot partition of the emmc?

I saw that we have now (kernel 4.14) the Image.gz format which I
suppose is compressed image correct ? how should uboot load it now with
the bootz ?

Image.gz and zImages are different things. A zImage is a
self-decompressing kernel image (e.g. it contains the code to decompress
itself) but a Image.gz is simple a normal image that has been compressed
using gunzip.

bootz is intend for a zImage and I don’t think it will support Image.gz
files. To be honest I don’t remember precisely how to boot a compressed
image and a search of the source code didn’t offer any clues. Possibly
you will have to manually unzip before handing it to booti.

PS Ideally the distro boot mechanisms (where you don’t have to write any
u-boot commands at all) would support decompression… but I didn’t
see code for that either.

I haven’t tried it myself, but it looks like tftpboot command can boot Image.gz.

Hello,

I follow your steps but the only question I have is how do you copy the .dtb and uEnv.txt to the emmc /boot/ directory? Can I flash them in some way with fastboot?