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

Docs: Possibly missing a value or two? #135

Open
IngwiePhoenix opened this issue Feb 4, 2024 · 0 comments
Open

Docs: Possibly missing a value or two? #135

IngwiePhoenix opened this issue Feb 4, 2024 · 0 comments

Comments

@IngwiePhoenix
Copy link

Hello there!

I have spent some time trying to compile the upstream kernel for my VisionFive2 with the options that I would like it to have. However, it won't boot.

After much trial and error, I can rule out SBI, uBoot, it's uEnv.txt file and even extlinux (although I had to adjust /etc/default/u-boot and manually add fdtdir /dtbs).

I followed the description in the README, making sure that the VisionFive specific parameters are in fact set:

root@riscboi /o/linux (JH7110_VisionFive2_upstream) # echo; for k in SOC_STARFIVE CLK_STARFIVE_JH7110_SYS PINCTRL_STARFIVE_JH7110_SYS SERIAL_8250_DW; echo "--> $k"; cat .config | grep $k; end

--> SOC_STARFIVE
CONFIG_SOC_STARFIVE=y
CONFIG_SND_SOC_STARFIVE=y
--> CLK_STARFIVE_JH7110_SYS
CONFIG_CLK_STARFIVE_JH7110_SYS=y
--> PINCTRL_STARFIVE_JH7110_SYS
CONFIG_PINCTRL_STARFIVE_JH7110_SYS=y
--> SERIAL_8250_DW
CONFIG_SERIAL_8250_DWLIB=y
CONFIG_SERIAL_8250_DW=y

I also checked for JH7110 and STARFIVE in general:

--> JH7110
CONFIG_HW_RANDOM_JH7110=y
CONFIG_PINCTRL_STARFIVE_JH7110=y
CONFIG_PINCTRL_STARFIVE_JH7110_SYS=y
CONFIG_PINCTRL_STARFIVE_JH7110_AON=y
CONFIG_SND_SOC_JH7110_PWMDAC=y
CONFIG_SND_SOC_JH7110_TDM=y
CONFIG_CLK_STARFIVE_JH7110_PLL=y
CONFIG_CLK_STARFIVE_JH7110_SYS=y
CONFIG_CLK_STARFIVE_JH7110_AON=y
CONFIG_CLK_STARFIVE_JH7110_STG=y
CONFIG_CLK_STARFIVE_JH7110_ISP=y
CONFIG_CLK_STARFIVE_JH7110_VOUT=y
CONFIG_STARFIVE_JH7110_TIMER=y
CONFIG_RESET_STARFIVE_JH7110=y
CONFIG_PHY_STARFIVE_JH7110_DPHY_RX=y
CONFIG_PHY_STARFIVE_JH7110_PCIE=y
CONFIG_PHY_STARFIVE_JH7110_USB=y
# CONFIG_CRYPTO_DEV_JH7110 is not set
--> STARFIVE
CONFIG_ARCH_STARFIVE=y
CONFIG_SOC_STARFIVE=y
CONFIG_PCIE_STARFIVE_HOST=y
CONFIG_DWMAC_STARFIVE=y
CONFIG_PINCTRL_STARFIVE_JH7100=y
CONFIG_PINCTRL_STARFIVE_JH7110=y
CONFIG_PINCTRL_STARFIVE_JH7110_SYS=y
CONFIG_PINCTRL_STARFIVE_JH7110_AON=y
CONFIG_STARFIVE_WATCHDOG=y
CONFIG_DRM_VERISILICON_STARFIVE_HDMI=y
CONFIG_SND_SOC_STARFIVE=y
CONFIG_USB_CDNS3_STARFIVE=y
CONFIG_MMC_DW_STARFIVE=y
CONFIG_VIDEO_STARFIVE_CAMSS=y
CONFIG_CLK_STARFIVE_JH71X0=y
CONFIG_CLK_STARFIVE_JH7100=y
CONFIG_CLK_STARFIVE_JH7100_AUDIO=m
CONFIG_CLK_STARFIVE_JH7110_PLL=y
CONFIG_CLK_STARFIVE_JH7110_SYS=y
CONFIG_CLK_STARFIVE_JH7110_AON=y
CONFIG_CLK_STARFIVE_JH7110_STG=y
CONFIG_CLK_STARFIVE_JH7110_ISP=y
CONFIG_CLK_STARFIVE_JH7110_VOUT=y
CONFIG_STARFIVE_JH7110_TIMER=y
CONFIG_RESET_STARFIVE_JH71X0=y
CONFIG_RESET_STARFIVE_JH7100=y
CONFIG_RESET_STARFIVE_JH7110=y
CONFIG_PHY_STARFIVE_JH7110_DPHY_RX=y
CONFIG_PHY_STARFIVE_JH7110_PCIE=y
CONFIG_PHY_STARFIVE_JH7110_USB=y

Aside from the audio module being built as a shared module, nothing stuck out to me here.

Is there something I am missing? I did use the existing defconfig and just added my own settings through menuconfig.

Here is the full config (kernel-config.txt) and resulting debian packages:
upstream-build.tar.gz

In addition, here is my current uEnv.txt:

#fdt_high=0xffffffffffffffff
#initrd_high=0xffffffffffffffff
#kernel_addr_r=0x44000000
#kernel_comp_addr_r=0x90000000
#kernel_comp_size=0x10000000
#fdt_addr_r=0x48000000
#ramdisk_addr_r=0x48100000

# from: https://github.com/starfive-tech/linux/tree/JH7110_VisionFive2_upstream?tab=readme-ov-file#how-to-run-on-visionfive-2-board-via-network
setenv fdt_high 0xffffffffffffffff
setenv initrd_high 0xffffffffffffffff
#setenv scriptaddr 0x88100000
#setenv script_offset_f 0x1fff000
#setenv script_size_f 0x1000
setenv kernel_addr_r 0x84000000
setenv kernel_comp_addr_r 0x90000000
#setenv kernel_comp_size 0x10000000
setenv fdt_addr_r 0x88000000
setenv ramdisk_addr_r 0x88300000


# Move distro to first boot to speed up booting
boot_targets=distro mmc0 dhcp
# Fix wrong fdtfile name
fdtfile=starfive/jh7110-visionfive-v2.dtb
# Fix missing bootcmd
bootcmd=run load_distro_uenv
run bootcmd_distro

(I commented out the script parts, because I was taking this from the network booting example. This is also the config currently being booted whilst I grabbed files off it; but it's currently in the 5.15 kernel.)

Thank you very much, good luck with the patch merging into upstream and kind regards,
Ingwie

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant