Re: U-boot fails for khadas-edge -v

2024-03-26 Thread Fabio Estevam
Hi Vivek,

[Please don't top-post and do not post HTML]

On Mon, Mar 25, 2024 at 1:37 PM Vivek Jaiswal  wrote:
>
> Hello Fabio,
> I tried using the this github repository.
> https://github.com/u-boot/u-boot.git
>
> And the configuration used was following
>
> rockchip-rk3399-khadas-edge-v.conf
>
> UBOOT_MACHINE = "khadas-edge-v-rk3399_defconfig"
>
> I got some error during the build from the u-boot.
>
> Please check the attachment BuildError1.txt or BuildError2.txt
>
> make[2]: *** 
> [/home/vjaiswal/dev/Projects/SOLAR/khadas-dev/forTesting/yocto2_actual_meta_rockchip/build/tmp/work/rockchip_rk3399_khadas_edge_v-poky-linux/u-boot-rockchip/1_2017.09-r0/git/scripts/Makefile.build:280:
>  cmd/bootm.o] Error 1
> make[1]: *** 
> [/home/vjaiswal/dev/Projects/SOLAR/khadas-dev/forTesting/yocto2_actual_meta_rockchip/build/tmp/work/rockchip_rk3399_khadas_edge_v-poky-linux/u-boot-rockchip/1_2017.09-r0/git/Makefile:1317:
>  cmd] Error 2
> make: *** [Makefile:157: sub-make] Error 2

You are trying to build U-Boot 2017.09.

U-Boot 2024.01 builds khadas-edge-v-rk3399_defconfig just fine.


Re: U-boot fails for khadas-edge -v

2024-03-25 Thread Vivek Jaiswal
Hello Fabio,
I have also attached the Makefile where also the error was reported

make[2]: *** 
[/home/vjaiswal/dev/Projects/SOLAR/khadas-dev/forTesting/yocto2_actual_meta_rockchip/build/tmp/work/rockchip_rk3399_khadas_edge_v-poky-linux/u-boot-rockchip/1_2017.09-r0/git/scripts/Makefile.build:280:
 cmd/bootm.o] Error 1


Best Regards,
Vivek

From: Vivek Jaiswal 
Sent: Monday, March 25, 2024 5:37 PM
To: Fabio Estevam 
Cc: u-boot@lists.denx.de 
Subject: Re: U-boot fails for khadas-edge -v

Hello Fabio,
I tried using the this github repository.
https://github.com/u-boot/u-boot.git

And the configuration used was following

[https://res-geo.cdn.office.net/assets/mail/file-icon/png/generic_16x16.png]rockchip-rk3399-khadas-edge-v.conf<https://cinemo0-my.sharepoint.com/:u:/g/personal/vjaiswal_cinemo_com/EV-eU09iFz9GsPUVr5DEd0QBCIOp1v71AjYZHpcgH_D3aA>

UBOOT_MACHINE = "khadas-edge-v-rk3399_defconfig"

I got some error during the build from the u-boot.

Please check the attachment BuildError1.txt or BuildError2.txt

make[2]: *** 
[/home/vjaiswal/dev/Projects/SOLAR/khadas-dev/forTesting/yocto2_actual_meta_rockchip/build/tmp/work/rockchip_rk3399_khadas_edge_v-poky-linux/u-boot-rockchip/1_2017.09-r0/git/scripts/Makefile.build:280:
 cmd/bootm.o] Error 1
make[1]: *** 
[/home/vjaiswal/dev/Projects/SOLAR/khadas-dev/forTesting/yocto2_actual_meta_rockchip/build/tmp/work/rockchip_rk3399_khadas_edge_v-poky-linux/u-boot-rockchip/1_2017.09-r0/git/Makefile:1317:
 cmd] Error 2
make: *** [Makefile:157: sub-make] Error 2

I have attached the Makefile.txt as well.


I am using this repository as meta rockchip 
https://github.com/JeffyCN/meta-rockchip
Linux : https://github.com/khadas/linux/tree/khadas-edges-5.10.y-release-v1.0.0
Yocto branch : Kirkstone
Layes used:
meta-rockchip
poky/meta
poky/meta-poky
poky/meta-yocto-bsp
meta-openembedded/meta-oe

Can you fix this issue ?

Best regards,
Vivek



From: Fabio Estevam 
Sent: Thursday, March 7, 2024 10:19 PM
To: Vivek Jaiswal 
Cc: u-boot@lists.denx.de 
Subject: Re: U-boot fails for khadas-edge -v

[You don't often get email from feste...@gmail.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

On Thu, Mar 7, 2024 at 2:43 PM Vivek Jaiswal  wrote:

> are you saying to use this one?
> https://github.com/u-boot/u-boot/blob/master/configs/khadas-edge-v-rk3399_defconfig

Yes, this one.
# ==
# Building
# ==
#
# SPDX-License-Identifier:  GPL-2.0
#

# Modified for U-Boot
prefix := tpl
src := $(patsubst $(prefix)/%,%,$(obj))
ifeq ($(obj),$(src))
prefix := spl
src := $(patsubst $(prefix)/%,%,$(obj))
ifeq ($(obj),$(src))
prefix := .
endif
endif

PHONY := __build
__build:

# Init all relevant variables used in kbuild files so
# 1) they have correct type
# 2) they do not inherit any value from the environment
obj-y :=
obj-m :=
lib-y :=
lib-m :=
always :=
targets :=
subdir-y :=
subdir-m :=
EXTRA_AFLAGS   :=
EXTRA_CFLAGS   :=
EXTRA_CPPFLAGS :=
EXTRA_LDFLAGS  :=
asflags-y  :=
ccflags-y  :=
cppflags-y :=
ldflags-y  :=

subdir-asflags-y :=
subdir-ccflags-y :=

# Read auto.conf if it exists, otherwise ignore
# Modified for U-Boot
-include include/config/auto.conf
-include $(prefix)/include/autoconf.mk
include scripts/Makefile.uncmd_spl

include scripts/Kbuild.include

# For backward compatibility check that these variables do not change
save-cflags := $(CFLAGS)

# The filename Kbuild has precedence over Makefile
kbuild-dir := $(if $(filter /%,$(src)),$(src),$(srctree)/$(src))
kbuild-file := $(if $(wildcard 
$(kbuild-dir)/Kbuild),$(kbuild-dir)/Kbuild,$(kbuild-dir)/Makefile)
include $(kbuild-file)

# Added for U-Boot
asflags-y  += $(PLATFORM_CPPFLAGS)
ccflags-y  += $(PLATFORM_CPPFLAGS)
cppflags-y += $(PLATFORM_CPPFLAGS)

# If the save-* variables changed error out
ifeq ($(KBUILD_NOPEDANTIC),)
ifneq ("$(save-cflags)","$(CFLAGS)")
$(error CFLAGS was changed in "$(kbuild-file)". Fix it to use 
ccflags-y)
endif
endif

include scripts/Makefile.lib

ifdef host-progs
ifneq ($(hostprogs-y),$(host-progs))
$(warning kbuild: $(obj)/Makefile - Usage of host-progs is deprecated. Please 
replace with hostprogs-y!)
hostprogs-y += $(host-progs)
endif
endif

# Do not include host rules unless needed
ifneq ($(hostprogs-y)$(hostprogs-m),)
include scripts/Makefile.host
endif

# Uncommented for U-Boot
#  We need to create output dicrectory for SPL and TPL even for in-tree build
#ifneq ($(KBUILD_SRC),)
# Create output directory if not already present
_dummy := $(shell [ -d $(obj) ] || mkdir -p $(obj))

# Create directories for object files if directory does not exist
# Needed when obj-y := dir/file.o syntax is used
_dummy := $(foreach d,$(obj-dirs), $(shell [ -d $(d) ] || mkdir -p $(d)))
#endif

ifn

Re: U-boot fails for khadas-edge -v

2024-03-07 Thread Fabio Estevam
On Thu, Mar 7, 2024 at 2:43 PM Vivek Jaiswal  wrote:

> are you saying to use this one?
> https://github.com/u-boot/u-boot/blob/master/configs/khadas-edge-v-rk3399_defconfig

Yes, this one.


Re: U-boot fails for khadas-edge -v

2024-03-07 Thread Vivek Jaiswal
Hello Fabio,
Thanks for looking into the matter.

Can you please send me the link of the khadas-edge-v-rk3399_defconfig in main 
line.
I am not been able to find any  mainline branch in 
https://github.com/khadas/u-boot

are you saying to use this one?
https://github.com/u-boot/u-boot/blob/master/configs/khadas-edge-v-rk3399_defconfig

Best Regards,
Vivek Jaiswal




From: Fabio Estevam 
Sent: Thursday, March 7, 2024 5:57 PM
To: Vivek Jaiswal 
Cc: u-boot@lists.denx.de 
Subject: Re: U-boot fails for khadas-edge -v

[You don't often get email from feste...@gmail.com. Learn why this is important 
at https://aka.ms/LearnAboutSenderIdentification ]

Hi Vivek,

On Thu, Mar 7, 2024 at 11:56 AM Vivek Jaiswal  wrote:
>
> Hello U-boot Team,
> I am using the u-boot for Khadas Edge-v rk3399 rockchip:  
> https://github.com/khadas/u-boot/tree/khadas-edges-v2017.09-release-v1.0.0?tab=readme-ov-file
> And I am using configuration file : 
> https://github.com/khadas/u-boot/blob/khadas-edges-v2017.09-release-v1.0.0/configs/rk3399_defconfig

That's an old out-of-tree repository, not supported by the U-Boot community.

Try khadas-edge-v-rk3399_defconfig which is supported in mainline U-Boot.


Re: U-boot fails for khadas-edge -v

2024-03-07 Thread Fabio Estevam
Hi Vivek,

On Thu, Mar 7, 2024 at 11:56 AM Vivek Jaiswal  wrote:
>
> Hello U-boot Team,
> I am using the u-boot for Khadas Edge-v rk3399 rockchip:  
> https://github.com/khadas/u-boot/tree/khadas-edges-v2017.09-release-v1.0.0?tab=readme-ov-file
> And I am using configuration file : 
> https://github.com/khadas/u-boot/blob/khadas-edges-v2017.09-release-v1.0.0/configs/rk3399_defconfig

That's an old out-of-tree repository, not supported by the U-Boot community.

Try khadas-edge-v-rk3399_defconfig which is supported in mainline U-Boot.


U-boot fails for khadas-edge -v

2024-03-07 Thread Vivek Jaiswal
Hello U-boot Team,
I am using the u-boot for Khadas Edge-v rk3399 rockchip:  
https://github.com/khadas/u-boot/tree/khadas-edges-v2017.09-release-v1.0.0?tab=readme-ov-file
And I am using configuration file : 
https://github.com/khadas/u-boot/blob/khadas-edges-v2017.09-release-v1.0.0/configs/rk3399_defconfig
After creating the .wic image using tutorial: 
https://github.com/JeffyCN/meta-rockchip/tree/kirkstone?tab=readme-ov-file#v-supporting-new-machine
I flashed the image inside the khadas edge-v rk3399  device.
device : https://www.khadas.com/product-page/edge-v

But the boot did not happened , please check the URART log below
Complete logs : 
​[https://res-geo.cdn.office.net/assets/mail/file-icon/png/txt_16x16.png]UART_Error.log.txt


Call trace
---
x0 : 0830 x1 : 
x2 :  x3 : 
x4 : 00172e10 x5 : 0001
x6 : 0008 x7 : 0008
x8 : f3c45278 x9 : 0100
x10: ffd0 x11: 0006
x12: 0001869f x13: f3c451bc
x14: 0830 x15: 0002
x16: f5cb4098 x17: 00df3404
x18: f3c49cf0 x19: 0400
x20: f5d5fef0 x21: 
x22: 0004 x23: f3c45488
x24: f3c45488 x25: 
x26:  x27: 0400
x28:  x29: f3c452e0


Call trace:
  PC:   [< 0a7ae008 >]
  LR:   [< 002020bc >]

Stack:
[< 0a7ae008 >]
[< 00218ea0 >]
[< 00218960 >]
[< 002287d0 >]
[< 002294a4 >]
[< 00208324 >]
[< 0022dd84 >]
[< 00216c10 >]
[< 00216dc4 >]
[< 00216514 >]
[< 00216ac8 >]
[< 00216dc4 >]
[< 002164d8 >]
[< 0022d2a8 >]
[< 00217464 >]
[< 00214f3c >]
[< 00217ab8 >]
[< 0028ebd8 >]
[< 00217d08 >]
[< 00201b10 >]
---

when I try to run the "./scripts.stacktrace.sh dump.txt". Following was the 
output.
I don't understand what is the error and what does "C:   [< 0a7ae008 
>]" means.

---
$ ./u-boot/scripts/stacktrace.sh ../tempDir/dump_clean.txt

SYMBOL File: 
./build/tmp/work/rockchip_rk3399_khadas_edge_v-poky-linux/u-boot-rockchip/1_2017.09-r0/build/u-boot.sym

Call trace:
  C:   [< 0a7ae008 >]
  do_bootm_linux+0x5c/0x74

Stack:
  boot_selected_os+0x48/0x80]
  do_bootm_states+0x8d0/0x950
  android_bootloader_boot_kernel+0x15c/0x250
  android_bootloader_boot_flow+0x2a0/0x2a4
  do_boot_android+0xd0/0xf8
  cmd_process+0xdc/0x10c
  run_list_real+0x6e4/0x728
  parse_stream_outer+0x170/0x66c
  parse_string_outer+0xcc/0xe4
  run_list_real+0x59c/0x728
  parse_stream_outer+0x170/0x66c
  parse_string_outer+0x90/0xe4
  run_command_list+0x50/0x90
  autoboot_command+0x40/0x114
  main_loop+0x58/0x68
  run_main_loop+0xc/0x10
  initcall_run_list+0x58/0x94
  board_init_r+0x20/0x24
  relocation_return+0x4/0x0

PC Surrounding Instructions:
---
Best Regards
Vivek Jaiswal