Hi Sanjay,
The following fix definitely worked but there are a lot of warnings which needs 
to be solved
```
node_offset = fdt_path_offset((void *)dtb_addr, "/soc/reset-sample");
```
is it a good practice to disable Werror when building with yocto?

Thanks and Regards,
Kanak Shilledar

On Thursday, 12 December 2024 at 10:44, k Sanjay Nayak <nayakksan...@gmail.com> 
wrote:

> Hi Kanak
>
> I am not an expert in yocto, but I see from the build logs that Werror is 
> enabled hence you see all the warning treated as error. If the error count is 
> very small you can try to fix those error if its more then you can remove the 
> Werror from cflags..
>
> In the above error typecasting should fix the problem.
>
> node_offset = fdt_path_offset((void *)dtb_addr, "/soc/reset-sample");
>
> Thanks
> Sanjay
>
> On Thu, Dec 12, 2024 at 10:27 AM Kanak Shilledar via lists.yoctoproject.org 
> <kanakshilledar111=protonmail....@lists.yoctoproject.org> wrote:
>
>> Hello everyone,
>> I am learning about BSP development and trying to add support for LicheePi 
>> 4A. In meta-riscv beaglev-ahead was already supported but I was not able to 
>> boot it on licheepi 4a as it got stuck after "Starting kernel..." I thought 
>> of adding support for licheepi 4a as a learning activity. I have pushed the 
>> sources [here](https://github.com/kanakshilledar/meta-riscv/).
>>
>> I am trying the build gradually so I first started with u-boot I took the 
>> vendor u-boot and tried to build is locally without Yocto and it succeeded. 
>> Then I tried to build it using `bitbake u-boot-licheepi` and it got failed 
>> with some -Wint-conversion warnings treated as errors.
>>
>> ```
>> // ...SNIP...
>> /home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/arch/riscv/lib/bootm.c:113:39:
>>  error: passing argument 1 of 'fdt_path_offset' makes pointer from integer 
>> without a cast [-Wint-conversion]
>> 113 | node_offset = fdt_path_offset(dtb_addr, "/soc/reset-sample");
>> | ^~~~~~~~
>> | |
>> | ulong {aka long unsigned int}
>> In file included from 
>> /home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/include/linux/libfdt.h:8,
>> from 
>> /home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/include/fdtdec.h:17,
>> from 
>> /home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/include/asm-generic/global_data.h:23,
>> from 
>> /home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/arch/riscv/include/asm/global_data.h:35,
>> from 
>> /home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/include/common.h:49:
>> /home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/include/linux/../../scripts/dtc/libfdt/libfdt.h:516:33:
>>  note: expected 'const void *' but argument is of type 'ulong' {aka 'long 
>> unsigned int'}
>> 516 | int fdt_path_offset(const void *fdt, const char *path);
>> | ~~~~~~~~~~~~^~~
>> /home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/arch/riscv/lib/bootm.c:
>>  In function 'boot_jump_linux':
>> /home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/arch/riscv/lib/bootm.c:163:21:
>>  error: assignment to 'ulong' {aka 'long unsigned int'} from 'void 
>> (*)(ulong, void *, struct fw_dynamic_info *)' {aka 'void (*)(long unsigned 
>> int, void *, struct fw_dynamic_info *)'} makes integer from pointer without 
>> a cast [-Wint-conversion]
>> 163 | _load_start = kernel;
>> | ^
>> /home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/arch/riscv/lib/bootm.c:164:19:
>>  error: assignment to 'ulong' {aka 'long unsigned int'} from 'char *' makes 
>> integer from pointer without a cast [-Wint-conversion]
>> 164 | _dtb_addr = images->ft_addr;
>> | ^
>> make[2]: *** 
>> [/home/kanak/yocto/buildlicheepi/tmp/work/licheepi_4a-poky-linux/u-boot-licheepi/2023.04+git/git/scripts/Makefile.build:282:
>>  arch/riscv/lib/bootm.o] Error 1
>> make[2]: *** Waiting for unfinished jobs....
>> // ...SNIP...
>> ```
>> When I tried building manually outside the yocto environment, it threw those 
>> warnings but didnt treat them as errors.
>>
>> Full log.do_compile is attached.
>>
>> How can I fix this error? Also if you find some improper implementation in 
>> my recipe please let me know.
>>
>> Thanks and Regards,
>> Kanak Shilledar
>>
>> 
-=-=-=-=-=-=-=-=-=-=-=-
Links: You receive all messages sent to this group.
View/Reply Online (#64433): https://lists.yoctoproject.org/g/yocto/message/64433
Mute This Topic: https://lists.yoctoproject.org/mt/110075186/21656
Group Owner: yocto+ow...@lists.yoctoproject.org
Unsubscribe: https://lists.yoctoproject.org/g/yocto/unsub 
[arch...@mail-archive.com]
-=-=-=-=-=-=-=-=-=-=-=-

Reply via email to