All of lore.kernel.org
 help / color / mirror / Atom feed
* Re: [Buildroot] U-boot stable asks for SYS_LOAD_ADDR when compiling for Le Potato
       [not found] <PH0PR20MB63214D64AC645BD019DB6E39D6B99@PH0PR20MB6321.namprd20.prod.outlook.com>
@ 2023-03-24  8:07 ` Andreas Ziegler
       [not found]   ` <PH0PR20MB6321997EBA9F27BBB815B4EBD6859@PH0PR20MB6321.namprd20.prod.outlook.com>
  0 siblings, 1 reply; 4+ messages in thread
From: Andreas Ziegler @ 2023-03-24  8:07 UTC (permalink / raw)
  To: Kenneth Roland; +Cc: Kenneth Roland, buildroot


On 2023-03-23 13:09, Kenneth Roland wrote:
> Hello,
> Make-cleaned my directory before this, but I did it one more time and 
> got the same error.
> Only thing that I was different was that the value increased from 432 
> to 448 for CONFIG_SYS_INIT_RAM_SIZE.

For a quick test, I cloned the board/amlogic package into an existing 
buildroot-git instance (2023.02-100-g9833247d49). In the build directory 
I ran:

wget 
https://raw.githubusercontent.com/mathieu-lm/libretech-cc-buildroot/master/configs/meson-gxl-s905x-libretech-cc_defconfig
mv meson-gxl-s905x-libretech-cc_defconfig .config
make nconfig
make uboot

It builds successfully:

>>> uboot v2020.01-rc5 Installing to target
>>> uboot v2020.01-rc5 Installing to images directory
cp -dpf /home/data/test/autobuild/build/uboot-v2020.01-rc5/u-boot.bin 
/home/data/test/autobuild/images/

> ```
>   CC      board/amlogic/p212/p212.o
>   CC      arch/arm/lib/reset.o
>   CC      arch/arm/lib/cache.o
>   CC      arch/arm/lib/psci-dt.o
>   AR      arch/arm/lib/lib.a
>   CC      boot/bootm.o
>   CC      boot/bootm_os.o
>   AR      cmd/arm/built-in.o
>   CC      cmd/boot.o
> arch/arm/lib/crt0_64.S: Assembler messages:
> arch/arm/lib/crt0_64.S:85: Error: constant expression expected at 
> operand 2 -- `ldr 
> x0,=((CONFIG_SYS_INIT_RAM_ADDR+CONFIG_SYS_INIT_RAM_SIZE-448))'

You seem to use a different u-boot version than specified in the 
original configuration. You might need to update the u-boot defconfig in 
board/amlogic/s905x-libretech-cc/uboot and probably also the toolchain 
(currently gcc 6 based, from 2017).

Kind regards,
Andreas

> make[2]: *** [scripts/Makefile.build:293: arch/arm/lib/crt0_64.o] Error 
> 1
> make[2]: *** Waiting for unfinished jobs....
>   CC      boot/pxe_utils.o
>   CC      boot/image.o
>   CC      cmd/bootm.o
>   CC      boot/image-board.o
>   CC      boot/bootdev-uclass.o
>   CC      boot/bootflow.o
>   CC      boot/bootmeth-uclass.o
>   CC      boot/bootstd-uclass.o
>   CC      boot/bootmeth_distro.o
> ```
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] U-boot stable asks for SYS_LOAD_ADDR when compiling for Le Potato
       [not found]   ` <PH0PR20MB6321997EBA9F27BBB815B4EBD6859@PH0PR20MB6321.namprd20.prod.outlook.com>
@ 2023-03-26  7:37     ` Andreas Ziegler
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Ziegler @ 2023-03-26  7:37 UTC (permalink / raw)
  To: Kenneth Roland; +Cc: buildroot

Hi Kenneth,

On 2023-03-25 20:26, Kenneth Roland wrote:
> You are right, I use the master version of U-Boot so that make 
> downloads the latest version. Is this incorrect practice? I didn't know 
> if I am supposed to use the latest version so that more optimizations 
> are included or if I should stick with what just works. I'm guessing I 
> should keep the original, 2020.01 release candidate 5?

If the boot loader works, I would keep it, at least for now. The 
assembler (binutils-2.27) seems to have a problem with this construct:

https://github.com/u-boot/u-boot/blob/8be7b4629e87ff8db08dd087c81d58129d029bad/include/system-constants.h#L17-L19

Not sure if this is a toolchain issue or something missing in the 
configuration. Try updating your uboot defconfig with:

$ make uboot-nconfig
enter SYS_LOAD_ADDR, then
$ make uboot-savedefconfig
then copy defconfig to 
board/amlogic/s905x-libretech-cc/uboot/libretech-cc_defconfig

and rebuild u-boot (rm build/uboot-custom/.stamp* && make uboot). At 
least, uboot-2022.04 builds successfully with the Linaro toolchain 
(needs openssl).

Actually, I would upgrade Buildroot first, configure a buildroot 
toolchain (the Linaro toolchain misses sys/random.h), switch to 2022.04 
uboot (current buildroot default) and then check if the kernel can be 
upgraded (the head of libretech-linux is currently at 5.19.0).

<cut>

Kind regards,
Andreas
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [Buildroot] U-boot stable asks for SYS_LOAD_ADDR when compiling for Le Potato
       [not found] <mailman.6972.1678395514.50374.buildroot@buildroot.org>
@ 2023-03-10  8:09 ` Andreas Ziegler
  0 siblings, 0 replies; 4+ messages in thread
From: Andreas Ziegler @ 2023-03-10  8:09 UTC (permalink / raw)
  To: Kenneth Roland; +Cc: buildroot

Hi Kenneth,

On 2023-03-09 17:29, Kenneth Roland wrote:

> As the subject says, I am unable to successfully compile buildroot for 
> this board. I used this repo 
> (https://github.com/mathieu-lm/libretech-cc-buildroot), as support for 
> the Le Potato dev board isn't in mainstream. This fork isn't too old as 
> it is dated 2020.02 in menu makeconfig?. I assume that because this 
> repo is slightly dated that it doesn't account for newer changes for 
> u-boot? Uname and logs are attached. I used the value 0x1000000 as 
> given in the device's forums 
> (https://forum.loverpi.com/discussion/748/u-boot-guide-for-le-potato-aml-s905x-cc).
> u-boot Guide for Le Potato 
> AML-S905X-CC<https://forum.loverpi.com/discussion/748/u-boot-guide-for-le-potato-aml-s905x-cc>
> The boot priority of Le Potato is as follows: eMMC then SD. The current 
> version of u-boot found in the images is the 2019.04 release.
> forum.loverpi.com

Toolchain and u-boot versions are static, the fault probably lies within 
the instructions in the README of [1].

Clean up your build and initialize it properly:

$ make clean
$ make meson-gxl-s905x-libretech-cc_defconfig

Then run 'make'.

<cut>

Kind regards,
Andreas

[1] https://github.com/mathieu-lm/libretech-cc-buildroot
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] U-boot stable asks for SYS_LOAD_ADDR when compiling for Le Potato
@ 2023-03-09 17:29 Kenneth Roland
  0 siblings, 0 replies; 4+ messages in thread
From: Kenneth Roland @ 2023-03-09 17:29 UTC (permalink / raw)
  To: buildroot


[-- Attachment #1.1: Type: text/plain, Size: 1521 bytes --]

As the subject says, I am unable to successfully compile buildroot for this board. I used this repo (https://github.com/mathieu-lm/libretech-cc-buildroot), as support for the Le Potato dev board isn't in mainstream. This fork isn't too old as it is dated 2020.02 in menu makeconfig​. I assume that because this repo is slightly dated that it doesn't account for newer changes for u-boot? Uname and logs are attached. I used the value 0x1000000 as given in the device's forums (https://forum.loverpi.com/discussion/748/u-boot-guide-for-le-potato-aml-s905x-cc).
u-boot Guide for Le Potato AML-S905X-CC<https://forum.loverpi.com/discussion/748/u-boot-guide-for-le-potato-aml-s905x-cc>
The boot priority of Le Potato is as follows: eMMC then SD. The current version of u-boot found in the images is the 2019.04 release.
forum.loverpi.com


uname -a​:
Linux poweredge-r620 6.0.0-0.deb11.6-rt-amd64 #1 SMP PREEMPT_RT Debian 6.0.12-1~bpo11+1 (2022-12-19) x86_64 GNU/Linux
​
[https://opengraph.githubassets.com/b19b319f30aeb80b4475154071cffb867020fa37ac2c67d088e276fb0c074cbb/mathieu-lm/libretech-cc-buildroot]<https://github.com/mathieu-lm/libretech-cc-buildroot>
GitHub - mathieu-lm/libretech-cc-buildroot: Buildroot with Amlogic S905X LibreTech-CC "LePotato" support<https://github.com/mathieu-lm/libretech-cc-buildroot>
Buildroot with Amlogic S905X LibreTech-CC "LePotato" support - GitHub - mathieu-lm/libretech-cc-buildroot: Buildroot with Amlogic S905X LibreTech-CC "LePotato" support
github.com



[-- Attachment #1.2: Type: text/html, Size: 8905 bytes --]

[-- Attachment #2: log.txt --]
[-- Type: text/plain, Size: 4529 bytes --]

Local version - append to U-Boot release (LOCALVERSION) [] 
Automatically append version information to the version string (LOCALVERSION_AUTO) [Y/n/?] y
Optimization level
> 1. Optimize for size (CC_OPTIMIZE_FOR_SIZE)
  2. Optimize for speed (CC_OPTIMIZE_FOR_SPEED)
  3. Optimize for debugging (CC_OPTIMIZE_FOR_DEBUG)
choice[1-3?]: 1
Allow compiler to uninline functions marked 'inline' in full U-Boot (OPTIMIZE_INLINING) [N/y/?] n
Enable Link Time Optimizations (LTO) [N/y/?] n
Select U-Boot be run as a bootloader for XEN Virtual Machine (XEN) [N/y/?] n
Select defaults suitable for booting general purpose Linux distributions (DISTRO_DEFAULTS) [Y/n/?] y
Add arch, board, vendor and soc variables to default environment (ENV_VARS_UBOOT_CONFIG) [Y/?] y
Number of DRAM banks (NR_DRAM_BANKS) [1] 1
Enable kernel command line setup (SYS_BOOT_GET_CMDLINE) [N/y/?] n
Enable kernel board information setup (SYS_BOOT_GET_KBD) [N/y/?] n
Use a custom location for the initial stack pointer address (HAS_CUSTOM_SYS_INIT_SP_ADDR) [N/y/?] n
Enable malloc() pool before relocation (SYS_MALLOC_F) [Y/?] y
  Size of malloc() pool before relocation (SYS_MALLOC_F_LEN) [0x1000] 0x1000
Define memory for Dynamic allocation (SYS_MALLOC_LEN) [0x2000000] 0x2000000
Inform valgrind about memory allocations (VALGRIND) [N/y/?] n
64bit physical address support (PHYS_64BIT) [Y/?] y
Recreate an ELF image from raw U-Boot binary (REMAKE_ELF) [N/y/?] n
Build target special images (BUILD_TARGET) [] 
Define a maximum size for the U-Boot image (HAS_BOARD_SIZE_LIMIT) [N/y/?] n
Use a custom location for the U-Boot linker script (SYS_CUSTOM_LDSCRIPT) [N/y/?] n
Address in memory to use by default (SYS_LOAD_ADDR) [] (NEW) true     
Address in memory to use by default (SYS_LOAD_ADDR) [] (NEW) TRUE
Address in memory to use by default (SYS_LOAD_ADDR) [] (NEW) TRUE
Address in memory to use by default (SYS_LOAD_ADDR) [] (NEW) y        
Address in memory to use by default (SYS_LOAD_ADDR) [] (NEW) y
Address in memory to use by default (SYS_LOAD_ADDR) [] (NEW) 0x1000000

USER EDIT: THIS IS WHAT I WAS INSTRUCTED TO ENTER VIA: https://forum.loverpi.com/discussion/748/u-boot-guide-for-le-potato-aml-s905x-cc

Define max stack size that can be used by U-Boot (STACK_SIZE) [0x1000000] 0x1000000
Exclude some memory from U-Boot / OS information (SYS_MEM_TOP_HIDE) [0x0] 0x0
Support for multiprocessor (MP) [N/y/?] n
Compile API examples (EXAMPLES) [N/y/?] n
  UPD     include/config.h
  CFG     u-boot.cfg
  GEN     include/autoconf.mk.dep
  GEN     include/autoconf.mk
  UPD     include/generated/dt.h
  UPD     include/generated/timestamp_autogenerated.h
  ENVC    include/generated/env.txt
  UPD     include/config/uboot.release
  ENVP    include/generated/env.in
  UPD     include/generated/version_autogenerated.h
  ENVT    include/generated/environment.h
  HOSTCC  scripts/dtc/dtc.o
  HOSTCC  scripts/dtc/flattree.o
  HOSTCC  scripts/dtc/fstree.o


USER EDIT; MORE COMPILING MESSAGES/LINKING/ARCHIVING


  CC      cmd/version.o
  CC      boot/bootmeth_pxe.o
  CC      boot/bootmeth_efi.o
  CC      cmd/blk_common.o
  CC      boot/image-fdt.o
  CC      cmd/bootflow.o
  AR      board/amlogic/p212/built-in.o
  CC      cmd/source.o
  AR      arch/arm/mach-meson/built-in.o
  CC      cmd/blkcache.o
  CC      cmd/bootefi.o
arch/arm/lib/crt0_64.S: Assembler messages:
arch/arm/lib/crt0_64.S:85: Error: constant expression expected at operand 2 -- `ldr x0,=((CONFIG_SYS_INIT_RAM_ADDR+CONFIG_SYS_INIT_RAM_SIZE-448))'
  CC      common/main.o
make[2]: *** [scripts/Makefile.build:293: arch/arm/lib/crt0_64.o] Error 1
make[2]: *** Waiting for unfinished jobs....
  CC      common/exports.o
  CC      cmd/booti.o
  CC      disk/part.o
  CC      disk/disk-uclass.o
  CC      common/init/board_init.o
  CC      disk/part_dos.o
  CC      cmd/console.o
make[1]: *** [Makefile:1875: arch/arm/lib] Error 2
make[1]: *** Waiting for unfinished jobs....
  CC      common/cli_hush.o
  CC      cmd/dm.o
  CC      disk/part_iso.o
  CC      common/autoboot.o
  CC      cmd/echo.o
  CC      common/board_f.o
  CC      disk/part_efi.o


USER EDIT; MORE COMPILING MESSAGES/LINKING/ARCHIVING


  CC      drivers/video/meson/simplefb_common.o
  CC      drivers/video/meson/../dw_hdmi.o
  AR      cmd/built-in.o
  AR      drivers/video/meson/built-in.o
  AR      drivers/video/built-in.o
  AR      drivers/built-in.o
make[1]: Leaving directory '/tmp/potato/output/build/uboot-2022.10'
make: *** [package/pkg-generic.mk:260: /tmp/potato/output/build/uboot-2022.10/.stamp_built] Error 2

[-- Attachment #3: Type: text/plain, Size: 150 bytes --]

_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-03-26  7:37 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
     [not found] <PH0PR20MB63214D64AC645BD019DB6E39D6B99@PH0PR20MB6321.namprd20.prod.outlook.com>
2023-03-24  8:07 ` [Buildroot] U-boot stable asks for SYS_LOAD_ADDR when compiling for Le Potato Andreas Ziegler
     [not found]   ` <PH0PR20MB6321997EBA9F27BBB815B4EBD6859@PH0PR20MB6321.namprd20.prod.outlook.com>
2023-03-26  7:37     ` Andreas Ziegler
     [not found] <mailman.6972.1678395514.50374.buildroot@buildroot.org>
2023-03-10  8:09 ` Andreas Ziegler
2023-03-09 17:29 Kenneth Roland

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.