kernel icon indicating copy to clipboard operation
kernel copied to clipboard

develop-5.10 compile error

Open dorfil opened this issue 2 years ago • 5 comments

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

dorfil avatar Feb 07 '23 15:02 dorfil

This is sunxi code.

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

avafinger avatar Feb 07 '23 16:02 avafinger

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

dorfil avatar Feb 07 '23 17:02 dorfil

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.

avafinger avatar Feb 07 '23 17:02 avafinger

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

kkursor avatar Mar 16 '23 12:03 kkursor

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

ballestrerod avatar May 16 '23 00:05 ballestrerod