build icon indicating copy to clipboard operation
build copied to clipboard

Add support for legacy kernel on board firefly-itx-3588j

Open SeeleVolleri opened this issue 1 year ago • 5 comments

Description

basiclly, legacy kernel for board firefly-itx-3588j

How Has This Been Tested?

Please describe the tests that you ran to verify your changes. Please also note any relevant details for your test configuration.

  • [x] build
  • [x] boot
  • [x] can play music, Hi-Fi!

Checklist:

Please delete options that are not relevant.

  • [x] My code follows the style guidelines of this project
  • [x] I have performed a self-review of my own code
  • [x] I have commented my code, particularly in hard-to-understand areas
  • [x] My changes generate no new warnings
  • [x] dependent on https://github.com/armbian/linux-rockchip/pull/193

SeeleVolleri avatar Jun 15 '24 15:06 SeeleVolleri

legacy kernel for rk3588, as in 5.10, will be phased out and be EOL soon, so there's probably no point in adding it. vendor is basically the same but newer (6.1).

If you're having problems with the 6.1 kernel that the 5.10 kernel doesn't have, you may be better off trying to fix 6.1 or let us know the regression instead.

ColorfulRhino avatar Jun 16 '24 11:06 ColorfulRhino

So far I met 3 problems in 6.1 which I suspect my dts or uboot problem: Boot slow I/O LED not blinking When power off, lots wlan warning and errors appeared in dmesg.

~~1 problem that not ours: I can’t boot Android container in 6.1 w/ hwaccel, caused by rockchip didn’t released 6.1 kernel Android sdk(~~

在 2024年6月16日,19:39,ColorfulRhino @.***> 写道:

 legacy kernel for rk3588, as in 5.10, will be phased out and be EOL soon, so there's probably no point in adding it. vendor is basically the same but newer (6.1).

If you're having problems with the 6.1 kernel that the 5.10 kernel doesn't have, you may be better off trying to fix 6.1 or let us know the regression instead.

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you authored the thread.

SeeleVolleri avatar Jun 17 '24 15:06 SeeleVolleri

Here are the exact logs using minicom, timestamp with seconds: tldr; the 5.10 one brings up getty very fast on slower sdcard than 6.1's the 6.1 brings up slower, power down logs was more verbose than 5.10.

firefly-itx-3588j-5.10-slow-sd-card.log firefly-itx-3588j-6.1-fast-sd-card.log

SeeleVolleri avatar Jun 17 '24 16:06 SeeleVolleri

You could try mainline U-Boot by adding this (and removing the vendor U-Boot function in the baord config):

DDR_BLOB='rk35/rk3588_ddr_lp4_2112MHz_lp5_2400MHz_v1.16.bin'
BL31_BLOB='rk35/rk3588_bl31_v1.45.elf'

# Mainline U-Boot
function post_family_config__firefly_itx_3588j_use_mainline_uboot() {
	display_alert "$BOARD" "Using mainline U-Boot for $BOARD / $BRANCH" "info"

	declare -g BOOTCONFIG="generic-rk3588_defconfig"               # Use generic defconfig which should boot all RK3588 boards
	declare -g BOOTDELAY=1                                         # Wait for UART interrupt to enter UMS/RockUSB mode etc
	declare -g BOOTSOURCE="https://github.com/u-boot/u-boot.git"   # We ❤️ Mainline U-Boot
	declare -g BOOTBRANCH="tag:v2024.07-rc4"
	declare -g BOOTPATCHDIR="v2024.07/board_${BOARD}"
	# Don't set BOOTDIR, allow shared U-Boot source directory for disk space efficiency

	declare -g UBOOT_TARGET_MAP="BL31=${RKBIN_DIR}/${BL31_BLOB} ROCKCHIP_TPL=${RKBIN_DIR}/${DDR_BLOB};;u-boot-rockchip.bin"

	# Disable stuff from rockchip64_common; we're using binman here which does all the work already
	unset uboot_custom_postprocess write_uboot_platform write_uboot_platform_mtd

	# Just use the binman-provided u-boot-rockchip.bin, which is ready-to-go
	function write_uboot_platform() {
		dd "if=$1/u-boot-rockchip.bin" "of=$2" bs=32k seek=1 conv=notrunc status=none
	}
}

Basically every RK3588 board should be able to boot with this. But I'm not sure your issues have anything to do with the bootloader.

This is basically where lots of seconds are wasted:


[   13.700056] hub 4-1:1.0: USB hub found
[   13.700665] hub 4-1:1.0: 4 ports detected
[2024-06-17 23:40:29
[   19.946755] EXT4-fs (mmcblk1p1): mounted filesystem with writeback data mode. Quota mode: none.
[2024-06-17 23:40:30
[   20.925883] NET: Registered PF_INET6 protocol family
[   20.929047] Segment Routing with IPv6
[   20.929129] In-situ OAM (IOAM) with IPv6
[   20.979858] systemd[1]: systemd 252.22-1~deb12u1 running in system mode (+PAM +AUDIT +SELINUX +APPARMOR +IMA +SMACK +SECCOMP +GCRYPT -GNUTLS +OPENSSL +ACL +BLKID +CURL +ELFUTILS +FIDO2 +IDN2 -IDN +IPTC +KMOD +LIBCRYPTSETUP +LIBFDIS)
[   20.979949] systemd[1]: Detected architecture arm64.
[   20.987867] systemd[1]: Hostname set to <firefly-itx-3588j>.
[2024-06-17 23:40:34
[   24.336882] EXT4-fs error (device mmcblk1p1): ext4_validate_block_bitmap:420: comm ext4lazyinit: bg 127: bad block bitmap checksum
[   24.341068] EXT4-fs (mmcblk1p1): Remounting filesystem read-only
[2024-06-17 23:40:41
[   32.059953] rk_gmac-dwmac fe1c0000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
[   32.061448] phy_rtl8211f_led_fixup in
[   32.061598] phy_rtl8211f_led_fixup in  val=0x0a42

Maybe a bad SD card or something? it shows it needs to remount readonly.

ColorfulRhino avatar Jun 17 '24 17:06 ColorfulRhino

Yes, this u-boot (https://github.com/150balbes/u-boot-rk) has issues when using the kernel from https://github.com/armbian/linux-rockchip. I suggest using the mainline kernel or referring to this commit for fixing it:

https://github.com/armbian/build/commit/ce0f24bcc2c5a78eb230f32b808d3f57b716a9cf

chainsx avatar Jun 19 '24 09:06 chainsx