rockchip-linux / kernel

BSP kernel source
Other
947 stars 1.1k forks source link

develop-5.10 compile error #288

Open dorfil opened 1 year ago

dorfil commented 1 year ago

Hi!

I'm trying to build develop-5.10 for a rk3328 board, using the defconfig located in arch/arm64/configs/defconfig.

The build throw this error:

| .../linux-5.10/drivers/clk/sunxi-ng/ccu_mp.c: In function 'ccu_mp_round_rate':                      
| .../linux-5.10/drivers/clk/sunxi-ng/ccu_mp.c:111:14: error: implicit declaration of function 'clk_hw
_can_set_rate_parent'; did you mean 'clk_hw_set_rate_range'? [-Werror=implicit-function-declaration]                                                                                                               
|   111 |         if (!clk_hw_can_set_rate_parent(&cmp->common.hw)) {

When searching in the code, it seems the function clk_hw_can_set_rate_parent is not defined anywhere...

Any hints on what is going on?

Thanks

avafinger commented 1 year ago

This is sunxi code.

disable SUNXI and other nonrelated platforms and try again: # CONFIG_ARCH_SUNXI is not set

dorfil commented 1 year ago

Thanks! I disable that and the kernel builds.

But it gets stucked when booting, after uboot prints "Starting kernel..." nothing else is displayed on console.

I'm using the same kernel command line I used when booting kernel 4:

rw init=/sbin/init rootwait console=tty1 console=ttyS2,1500000n8 rootfstype=ext4 root=/dev/mmcblk2p10

Tried to enable earlyprintk but didn't help.

Any ideas?

Thanks again

avafinger commented 1 year ago

But it gets stucked when booting, after uboot prints "Starting kernel..." nothing else is displayed on console.

Typical message when you have the wrong kernel config for your board OR the wrong dtb. You could ask someone for a good kernel config for your board. or get it from some build system like Armbian, buildroot, etc.

kkursor commented 1 year ago

@dorfil maybe console device is wrong. I have ttyFIQ0 on my RK3568 board, not ttyS*

ballestrerod commented 1 year ago

comment this section on your dtb

fiq-debugger {
...
};

and modify bootargs and stdout-path like below

chosen {
    bootargs = "earlycon=uart8250,mmio32,0xff130000 rw root=/dev/mmcblk0p4 rootfstype=ext4 rootwait";
    stdout-path = "serial2:1500000n8";
};

after that I modified what yocto defines as

-SERIAL_CONSOLES = "1500000;ttyFIQ0"
+SERIAL_CONSOLES = "1500000;ttyS2"

in this manner everything is coherent and works