[PATCH v5 2/4] button: add a simple Analog to Digital Converter device based button driver

Marek Szyprowski m.szyprowski at samsung.com
Tue Feb 9 09:43:17 CET 2021


Hi Simon,

On 08.02.2021 18:08, Simon Glass wrote:
> On Mon, 8 Feb 2021 at 09:10, Marek Szyprowski <m.szyprowski at samsung.com> wrote:
>> On 06.02.2021 17:21, Simon Glass wrote:
>>> On Thu, 4 Feb 2021 at 03:36, Marek Szyprowski <m.szyprowski at samsung.com> wrote:
>>>> ...
>>>> Could you give me a bit more hints or point where to start? I've tried
>>>> to build sandbox, but it fails for v2021.01 release (I've did make
>>>> sandbox_defconfig && make all). I assume I would need to add adc and
>>>> adc-keys devices to some sandbox dts and some code triggering and
>>>> checking the key values, but that's all I know now.
>>> Well you do need to be able to build sandbox or you will get
>>> nowhere...what error did you get? Once we understand what went wrong
>>> we can update the docs. Maybe it is missing a dependency.
>> $ gcc --version
>> gcc (Ubuntu 7.5.0-3ubuntu1~18.04) 7.5.0
>> Copyright (C) 2017 Free Software Foundation, Inc.
>> This is free software; see the source for copying conditions. There is NO
>> warranty; not even for MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
>>
>> $ git checkout v2021.01
>>
>> $ make sandbox_defconfig
>> #
>> # configuration written to .config
>> #
>>
>> $ make
>> scripts/kconfig/conf  --syncconfig Kconfig
>>     CFG     u-boot.cfg
>>     GEN     include/autoconf.mk
>>     GEN     include/autoconf.mk.dep
>>     CFGCHK  u-boot.cfg
>>     UPD     include/generated/timestamp_autogenerated.h
>>     HOSTCC  tools/mkenvimage.o
>>     HOSTLD  tools/mkenvimage
>>     HOSTCC  tools/fit_image.o
>>     HOSTCC  tools/image-host.o
>>     HOSTCC  tools/dumpimage.o
>>     HOSTLD  tools/dumpimage
>>     HOSTCC  tools/mkimage.o
>>     HOSTLD  tools/mkimage
>>     HOSTLD  tools/fit_info
>>     HOSTLD  tools/fit_check_sign
>>
>> ...
>>
>>     CC      arch/sandbox/cpu/cpu.o
>> In file included from include/common.h:26:0,
>>                    from arch/sandbox/cpu/cpu.c:6:
>> include/asm/global_data.h:112:58: warning: call-clobbered register used
>> for global register variable
>>    #define DECLARE_GLOBAL_DATA_PTR  register volatile gd_t *gd asm ("r9")
>>                                                             ^
>> include/dm/of.h:86:1: note: in expansion of macro ‘DECLARE_GLOBAL_DATA_PTR’
>>    DECLARE_GLOBAL_DATA_PTR;
> This is pretty mysterious. Are you sure you are using an x86_64 machine?

I've finally found what caused the issue on my build system. It is 
x86_64 machine, but after some old cross-builds I had an 'asm' symlink 
in u-boot/include directory pointing to arch/arm directory. I'm quite 
surprised that it has not been removed by make clean/distclean/mrproper 
combo.

Best regards

-- 
Marek Szyprowski, PhD
Samsung R&D Institute Poland



More information about the U-Boot mailing list