[U-Boot] uboot sandbox tracing
Witkowski, Andrzej
andrzej.witkowski at intel.com
Wed Apr 10 13:06:57 UTC 2019
Hi,
Thank you very much for your response and fix for the issue.
Do you know when your patches will be pushed to an official u-boot repository?
Could you send/share me the patches earlier if it will last longer than a few days, please?
My next step is to investigate how to enable traces for arm u-boot on qemu (qemu_arm_defconfig and qemu_arm64_defconfig), but I'm not sure if the path was tested by anyone at all.
Currently, I am able to compile arm u-boot for qemu, but observe qemu hang when it tries to run arm u-boot with traces ON.
This is what I do to compile and run arm u-boot on qemu:
- I put the definitions below to "include/configs/qemu-arm.h" file
#ifdef FTRACE
#define CONFIG_TRACE
#define CONFIG_CMD_TRACE
#define CONFIG_TRACE_BUFFER_SIZE (16 << 20)
#define CONFIG_TRACE_EARLY_SIZE (8 << 20)
#define CONFIG_TRACE_EARLY
#define CONFIG_TRACE_EARLY_ADDR 0x00100000
#endif
- I comment out the lines below in "examples/Makefile" file
#subdir-y += standalone
#subdir-$(CONFIG_API) += api
- I perform the commands below:
make distclean
make qemu_arm64_defconfig CROSS_COMPILE=/opt/toolchain/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
make CROSS_COMPILE=/opt/toolchain/gcc-linaro-7.4.1-2019.02-x86_64_aarch64-linux-gnu/bin/aarch64-linux-gnu-
qemu-system-aarch64 -machine virt -cpu cortex-a53 -nographic -no-reboot -bios u-boot.bin
After running qemu it hangs.
I perform all my activities on Fedora 28, gcc (GCC) 8.3.1 20190223 (Red Hat 8.3.1-2), QEMU emulator version 2.11.2(qemu-2.11.2-4.fc28), u-boot latest source code.
Could you give me your opinion on my steps above, please?
Do you know if, currently, is it possible at all to run arm u-boot with traces ON on qemu?
If so, could you give me a contact point to help me enable the path, please?
Andrzej Witkowski
ND Poland
SW Developer
Intel Technology Poland
ul. Slowackiego 173
80-298 Gdansk
Poland
-----Original Message-----
From: Simon Glass [mailto:sjg at chromium.org]
Sent: Tuesday, April 09, 2019 11:14 PM
To: Witkowski, Andrzej <andrzej.witkowski at intel.com>
Cc: trini at konsulko.com; U-Boot Mailing List <u-boot at lists.denx.de>
Subject: Re: uboot sandbox tracing
Hi Andrzej,
On Mon, 1 Apr 2019 at 08:26, Witkowski, Andrzej <andrzej.witkowski at intel.com> wrote:
>
> Hi,
>
>
>
> I’m SW Developer at Intel, Poland.
>
> I try to enable tracing in u-boot to see how it works.
>
> I follow the procedure described in “doc/README.trace” file.
>
> Unfortunately, I always receive segmentation fault.
>
>
>
> I compile and run u-boot on my development machine with Fedora 28.
>
> - for the latest u-boot code on master branch I receive segmentation
> fault (refer to latest_u-boot_master_branch.log in attachment)
>
> After setting CONFIG_TRACE_EARLY_SIZE to 8725512 in “include/configs/sandbox.h” file, I receive different segmentation fault (refer to latest_u-boot_maseter_branch_1.log in attachment).
>
>
>
> What I do wrong?
(Please always send emails to the mailing list - it is OK to cc me but it should go to this list. In this instance I'm copying the list in the reply.)
I found that the early console conflicts with the early trace buffer, which causes the segfault. Also the early trace buffer as given in sandbox.h is too small (although you got around that one).
I've sent some patches to fix this and a few other things I think could be improved. Thanks for the report.
Regards,
Simon
>
>
>
> Andrzej Witkowski
>
> NSG Poland
>
> Host Storage SW & FW Development
>
>
>
> Intel Technology Poland
>
> ul. Slowackiego 173
>
> 80-298 Gdansk
>
> Poland
>
>
>
> ---------------------------------------------------------------------
> Intel Technology Poland sp. z o.o.
> ul. Słowackiego 173 | 80-298 Gdańsk | Sąd Rejonowy Gdańsk Północ | VII Wydział Gospodarczy Krajowego Rejestru Sądowego - KRS 101882 | NIP 957-07-52-316 | Kapitał zakładowy 200.000 PLN.
>
> Ta wiadomość wraz z załącznikami jest przeznaczona dla określonego adresata i może zawierać informacje poufne. W razie przypadkowego otrzymania tej wiadomości, prosimy o powiadomienie nadawcy oraz trwałe jej usunięcie; jakiekolwiek przeglądanie lub rozpowszechnianie jest zabronione.
> This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by others is strictly prohibited.
--------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
ul. Slowackiego 173 | 80-298 Gdansk | Sad Rejonowy Gdansk Polnoc | VII Wydzial Gospodarczy Krajowego Rejestru Sadowego - KRS 101882 | NIP 957-07-52-316 | Kapital zakladowy 200.000 PLN.
Ta wiadomosc wraz z zalacznikami jest przeznaczona dla okreslonego adresata i moze zawierac informacje poufne. W razie przypadkowego otrzymania tej wiadomosci, prosimy o powiadomienie nadawcy oraz trwale jej usuniecie; jakiekolwiek
przegladanie lub rozpowszechnianie jest zabronione.
This e-mail and any attachments may contain confidential material for the sole use of the intended recipient(s). If you are not the intended recipient, please contact the sender and delete all copies; any review or distribution by
others is strictly prohibited.
More information about the U-Boot
mailing list