Clarifications on u-boot build and load it on dragonBoard410c

I try to build the code but i am getting the following error

lib/asm-offsets.c:0: error: bad value (armv8-a) for -march= switch.

It seems the problem with the cross compiler, am I correct? Please help me about the resolution.

Thanks,
Korimella

As I read from other blogs, the issue at line -1 of asm-offset.c file is due to “SPDX-License-Identifier: GPL-2.0+”.

I am using ubuntu 14.04LTS as host PC with gcc 6.4.5 version, installed the aarch64-linux-gnu cross compiler.

Can anyone please build the master copy of u-boot from GIT, and provide your inputs.

I am planning to load the u-boot on DB410c and from the u-boot planning to load one small application.

Thanks

No problem to build it on my side, I used a Linaro toolchain (6.4.1).

export ARCH=arm64
export CROSS_COMPILE=~/Workspace/Toolchains/gcc-linaro-6.4.1-2017.08-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
make dragonboard410c_config
make -j7

Hi Loic,

Thanks for your response. I downloaded the toolchains from linaro. But the extracted files doesn’t match the path after bin.

Please let me know from where you clone the packages of cross compile.

Thanks

My bad a mistake in the path, I edited the line.

Thanks Loic, I am able to build and successfully used the u-boot for dragonboard.

Here I followed the below procedure.

  1. The eMMC card is empty, so I loaded the rescue image through sd card.
  2. Loaded the little kernel image files using “bootloader_emmc_android” where we have all the emmc_appsboot.mbn and other .mbn files.
  3. After that I loaded the boot as u-boot.img and then able to use the u-boot command line interface.

Is the process I followed is correct? If so I have certain clarifications.

  1. Can I able to get the source code of sd rescue image and the “bootloader_emmc_android”?
  2. How these two are interacting and any hardware initialization were taken care by these modules or just dealing with eMMC control?
  3. Can we club “bootloader_emmc_android” as under specific board directory of u-boot and make it as part of u-boot.

Thanks

Yes.

Most of these binary blobs are proprietary and source is private (sbl/tz). Only Little-Kernel/LK (emmc_appsboot.mbn) is public [1].

Yes, SBL takes care of DDR initialization (And I suppose flash as well.)
LK (emmc_appsboot.mbn) main job is to load and run the kernel/DTB and implement fastboot protocol.

Have a look at 410c Bootloader

The current working solution is to have u-boot loaded by LK, but you can possibly bypass LK and load directly u-boot from SBL, AFAIK, there is some effort ongoing for such support, but I don’t know the current status.

[1] working/qualcomm/lk.git - [no description]

Thanks Loic,

I have few other points to share with you.

  1. As I understand, BOOT-ROM of qualcomm chip will load the SBL1.mbn code to first partition of eMMC since it is there in first partition of sd-card, after successful load, it gives handle to SBL code.

  2. I understand we don’t have the source for it, Once the SBL completes its initializations, it will create other partitions in eMMC based on ‘gpt_both0.bin’. and then load all the other images (rpm.mbn, tz.mbn, hyp.mbn, NON-HLOS.mbn, emmc_appsboot.mbn) to the respective partitions.

  3. Then it gives the control to emmc_appsboot.mbn, which is at ‘aboot’ partition. It is the source of little kernel (LK) which deals with the loading of boot.img and kernel rootfs files and trasfer the control to kernel.

Please confirm am I correct.

If the above flow is correct means, to replace the LK with u-boot, I have to bring the u-boot in aboot partition and need to check the size of u-boot to be fit into the aboot partition size specified in ‘partitions.txt’ file

do you have a chance to modify the partitions.txt file? there is a field called ‘type’, which is an alphanumeric code, any idea what is this code, if I modify the partition sizes any impact on the code.

and one basic clarification, what is major different between aboot partition and boot partition?

Cheers