Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

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

Closed
wants to merge 1 commit into from

Conversation

SeeleVolleri
Copy link
Contributor

@SeeleVolleri SeeleVolleri commented Jun 15, 2024

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.

  • build
  • boot
  • can play music, Hi-Fi!

Checklist:

Please delete options that are not relevant.

@github-actions github-actions bot added size/small PR with less then 50 lines Hardware Hardware related like kernel, U-Boot, ... labels Jun 15, 2024
@ColorfulRhino
Copy link
Collaborator

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.

@igorpecovnik igorpecovnik added the Work in progress Unfinished / work in progress label Jun 16, 2024
@SeeleVolleri
Copy link
Contributor Author

SeeleVolleri commented Jun 17, 2024 via email

@SeeleVolleri SeeleVolleri marked this pull request as ready for review June 17, 2024 15:55
@SeeleVolleri
Copy link
Contributor Author

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

@ColorfulRhino
Copy link
Collaborator

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.

@chainsx
Copy link
Member

chainsx commented Jun 19, 2024

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:

ce0f24b

@igorpecovnik igorpecovnik added the Discussion Being discussed - Voice your opinions :) label Jun 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Discussion Being discussed - Voice your opinions :) Hardware Hardware related like kernel, U-Boot, ... size/small PR with less then 50 lines Work in progress Unfinished / work in progress
Development

Successfully merging this pull request may close these issues.

4 participants