how to cross compile 4.19 BSP?

Philip C subs at pscan.uk
Mon Feb 7 03:17:31 PST 2022


I have made some progress.

There is a complete BSP build environment available here 
http://files.pine64.org/SDK/Quartz64/QUARTZ64-model-A_BSP%20Linux.tar.gz

By using the built in scripts "./envsetup.sh" and then "./build.sh 
kernel" I was able to compile a 4.19.161 kernel that successfully boots 
on the quartz64-a.

Next I swapped out the kernel directory for the develop-4.19 one on 
github and compiled it using the same scripts.  That also compiles and 
boots and appears to also be 4.19.161

Next I swapped in the kernel direction for develop-4.19-rt87 and that 
one fails on drivers/net/wireless/rockchip_wlan/rkwifi/bcmdhd/dhd_pno.c 
with "-Werror=incompatible-pointer-types".  It isn't clear to me whether 
develop-4.19-rt87 is a newer kernel than develop-4.19

Next I need to figure out how these kernels compile from the build.sh 
scripts and see if I can extract whatever it is that makes it work.

If this is too annoying / too off topic for this mailing list please let 
me know.

thanks, Philip

On 06/02/2022 18:08, Philip C wrote:
> sorry folks,  my EXPORT was messed up.
> 
> I downloaded gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu.tar.xz 
> and unpacked it again
> 
> export ARCH=arm64
> export 
> CROSS_COMPILE=/home/philip/gcc-arm/10.3/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- 
> 
> 
> If I do make menuconfig and save it (so a default .config) I still fail 
> with this:-
> 
>    CC      mm/page_counter.o
>    CC      mm/memcontrol.o
> mm/memcontrol.c: In function 'memcg_stat_show':
> mm/memcontrol.c:3542:1: warning: the frame size of 1040 bytes is larger 
> than 1024 bytes [-Wframe-larger-than=]
> error, forbidden warning:memcontrol.c:3542
>   3542 | }
>        | ^
> mm/memcontrol.c: In function 'memory_stat_show':
> mm/memcontrol.c:5709:1: warning: the frame size of 1040 bytes is larger 
> than 1024 bytes [-Wframe-larger-than=]
> error, forbidden warning:memcontrol.c:5709
>   5709 | }
>        | ^
> make[1]: *** [scripts/Makefile.build:334: mm/memcontrol.o] Error 1
> make: *** [Makefile:1194: mm] Error 2
> 
> 
> On 06/02/2022 12:48, Philip C wrote:
>> I am sorry if this list is not exactly the right place for this 
>> question, but I don't know where to ask.
>>
>> Until mainline supports the DSI/LCD output I need something that I can 
>> use for my project based on an RK3566 with an LCD screen.
>>
>> So I have been trying (and failing) to compile the 4.19-develop branch 
>> of https://github.com/rockchip-linux/kernel
>>
>> I have been using this cross compiler:-
>> gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu
>>
>> using these commands:-
>> export ARCH=arm64
>> export 
>> CROSS_COMPILE=/home/philip/gcc-arm-10.3-2021.07-x86_64-aarch64-none-linux-gnu/bin/aarch64-none-linux-gnu- 
>>
>> make Image modules
>> make dtbs
>>
>> This works on other kernels, but with the official kernel source I get 
>> many, many errors which are probably beyond my abilities to fix.  For 
>> example I can compile Radxa Team 4.19 kernels, but my project isn't a 
>> Radxa product.
>>
>> Three questions:-
>>
>> 1. Should I be using branch 4.19-develop? or 4.19-develop-rt87?
>> 2. Is there a particular OS/version and cross compiler that I should 
>> be using?  Currently I am on ubuntu hirsute but I have no problem to 
>> change it to something else.
>> 3. If this isn't the right place to ask then please where is?
>>
>> thanks, Philip
>>
>>
> 
> _______________________________________________
> Linux-rockchip mailing list
> Linux-rockchip at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-rockchip



More information about the Linux-rockchip mailing list