Google Groups no longer supports new Usenet posts or subscriptions. Historical content remains viewable.
Dismiss

Bug#1033845: u-boot fails to boot on pinebook pro if installed on internal emmc

102 views
Skip to first unread message

Wolf

unread,
Apr 2, 2023, 3:00:05 PM4/2/23
to
Package: u-boot-rockchip
Version: 2023.01+dfsg-2
Severity: serious
Tags: patch
X-Debbugs-Cc: lxd...@zirdeon.com

If the u-boot is installed on the internal emmc then u-boot is failing as
follows:
U-Boot SPL 2023.01+dfsg-2 (Jan 18 2023 - 01:57:16 +0000)
Trying to boot from MMC1
mmc fail to send stop cmd
mmc_load_image_raw_sector: mmc block read error
Trying to boot from MMC1
mmc_load_image_raw_sector: mmc block read error
Trying to boot from SPI
Trying to boot from MMC2
Card did not respond to voltage select! : -110
spl: mmc init failed with error: -95
SPL: failed to boot from all boot devices
### ERROR ### Please RESET the board ###

The following patch in the configuration will fix that:
pinebook-pro-rk3399_defconfig:
--- pinebook-pro-rk3399_defconfig 2023-03-22 11:09:33.987508968 +0100
+++ pinebook-pro-rk3399_defconfig 2023-03-22 12:56:41.773648426 +0100
@@ -32,6 +32,7 @@ CONFIG_SPL_BSS_MAX_SIZE=0x2000
CONFIG_SPL_STACK=0x400000
CONFIG_SPL_STACK_R=y
CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
+CONFIG_SPL_MTD_SUPPORT=y
CONFIG_SPL_SPI_LOAD=y
CONFIG_TPL=y
CONFIG_CMD_BOOTZ=y
@@ -56,6 +57,8 @@ CONFIG_LED=y
CONFIG_LED_GPIO=y
CONFIG_MISC=y
CONFIG_ROCKCHIP_EFUSE=y
+CONFIG_MMC_HS200_SUPPORT=y
+CONFIG_SPL_MMC_HS200_SUPPORT=y
CONFIG_MMC_DW=y
CONFIG_MMC_DW_ROCKCHIP=y
CONFIG_MMC_SDHCI=y


-- System Information:
Debian Release: 12.0
APT prefers testing-security
APT policy: (500, 'testing-security'), (500, 'testing')
Architecture: arm64 (aarch64)

Kernel: Linux 6.1.0-6-arm64 (SMP w/6 CPU threads)
Kernel taint flags: TAINT_CRAP
Locale: LANG=en_GB.UTF-8, LC_CTYPE=en_GB.UTF-8 (charmap=UTF-8), LANGUAGE=en_GB:en
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

u-boot-rockchip depends on no packages.

Versions of packages u-boot-rockchip recommends:
ii python3 3.11.2-1
ii u-boot-tools 2023.01+dfsg-2

Versions of packages u-boot-rockchip suggests:
ii arm-trusted-firmware 2.8.0+dfsg-1

-- no debconf information

Vagrant Cascadian

unread,
Apr 2, 2023, 4:20:04 PM4/2/23
to
Control: severity 1033845 important

Given that this only affects a single platform, and there are other
tested working boot options for this platform, I am downgrading the
severity to important.

On 2023-04-02, Wolf wrote:
> If the u-boot is installed on the internal emmc then u-boot is failing as
> follows:
> U-Boot SPL 2023.01+dfsg-2 (Jan 18 2023 - 01:57:16 +0000)
> Trying to boot from MMC1
> mmc fail to send stop cmd
> mmc_load_image_raw_sector: mmc block read error
> Trying to boot from MMC1
> mmc_load_image_raw_sector: mmc block read error
> Trying to boot from SPI
> Trying to boot from MMC2
> Card did not respond to voltage select! : -110
> spl: mmc init failed with error: -95
> SPL: failed to boot from all boot devices
> ### ERROR ### Please RESET the board ###

So far I have only ever tested booting from microSD...

Did this work on previous versions?

Does it work on the version in experimental (currently 2023.04~rc5*)?


> The following patch in the configuration will fix that:
> pinebook-pro-rk3399_defconfig:
> --- pinebook-pro-rk3399_defconfig 2023-03-22 11:09:33.987508968 +0100
> +++ pinebook-pro-rk3399_defconfig 2023-03-22 12:56:41.773648426 +0100
> @@ -32,6 +32,7 @@ CONFIG_SPL_BSS_MAX_SIZE=0x2000
> CONFIG_SPL_STACK=0x400000
> CONFIG_SPL_STACK_R=y
> CONFIG_SPL_STACK_R_MALLOC_SIMPLE_LEN=0x10000
> +CONFIG_SPL_MTD_SUPPORT=y
> CONFIG_SPL_SPI_LOAD=y
> CONFIG_TPL=y
> CONFIG_CMD_BOOTZ=y
> @@ -56,6 +57,8 @@ CONFIG_LED=y
> CONFIG_LED_GPIO=y
> CONFIG_MISC=y
> CONFIG_ROCKCHIP_EFUSE=y
> +CONFIG_MMC_HS200_SUPPORT=y
> +CONFIG_SPL_MMC_HS200_SUPPORT=y
> CONFIG_MMC_DW=y
> CONFIG_MMC_DW_ROCKCHIP=y
> CONFIG_MMC_SDHCI=y

Would you consider submitting a patch upstream?


live well,
vagrant
signature.asc

Vagrant Cascadian

unread,
Apr 3, 2023, 4:00:04 PM4/3/23
to
On 2023-04-03, Wolf wrote:
>> Control: severity 1033845 important
>>
>> Given that this only affects a single platform, and there are other
>> tested working boot options for this platform, I am downgrading the
>> severity to important.
>
> So far ok if you consider it so.
>
> Actually I thought 'severity' because more or less you brick it if you install on the
> internal emmc due to the boot selection and you have to recover with screwdriver, DIP
> switching off the internal emmc, booting from the microSD and stopping at the u-boot
> prompt, DIP switching on the internal emmc and rescanning the mmc's to be able to boot.

I had not extensively considered that angle...


>> So far I have only ever tested booting from microSD...
>
> Yes, that works, as long as nothing bad is installed on the internal emmc or SPL.

Did you mean SPI? At any rate, yeah, from what I recall the boot order
defined in rom for most rockchip systems is SPI, eMMC, microSD
... (basically from the least removable to the most removable)


>> Did this work on previous versions?
>
> Not with the Debian u-boot package, because I could boot Debian with the pre-installed and
> I just recently upgraded the u-boot, because I wanted the u-boot prompt on LCD.

Ok, so it is not a regression.


>> Does it work on the version in experimental (currently 2023.04~rc5*)?
>
> No, it does not:
> pinebook-pro-rk3399_defconfig of 2023.04~rc5:
> # CONFIG_SPL_MTD_SUPPORT is not set
> # CONFIG_MMC_HS200_SUPPORT is not set
> # CONFIG_SPL_MMC_HS200_SUPPORT is not set

Yeah, I figured that it wouldn't, but sometimes settings change or get
renamed or fixed in some other way. Nevertheless, worth trying.


> However, the SPL settings are just precaution, because I have the intention to try again
> installing u-boot in SPL if I find time enough to do so, also for brick/recover actions.

SPI?


>> Would you consider submitting a patch upstream?
>
> Sure, I can do so however, I was reading that a bug report should be always
> done to the distribution.

As a simple rule, sure, but it is always a judgement call. I do not
think we are patching anything hugely relevent in the Debian packaging
here (slight chance the rockchip USB related patches are relevent, but I
would guess very slight).


> Anyway, should I then report in general u-boot related bugs with patches upstream?

If you are up to it, that can be helpful as it will eventually land in
Debian (and other distros) that way.

It can still be useful to file a bug with Debian in case it make sense
to backport a patch from upstream, too. This way we can track when the
issue is resolved.

So, in some cases, file bugs/patches/etc in both. :)


> Because there is another bug screwing up the LCD on reboot or just a reset command
> from u-boot prompt and if I have time enough I might hunt it.

I have never had reboot work reliably on the pinebook-pro...


Thanks for poking at all this!


live well,
vagrant
signature.asc

Vagrant Cascadian

unread,
Jun 20, 2023, 4:20:04 PM6/20/23
to
On 2023-05-02, Wolf wrote:
> On 04/04/2023 17:14, Wolfgang Zarre wrote:
>>> It can still be useful to file a bug with Debian in case it make sense
>>> to backport a patch from upstream, too. This way we can track when the
>>> issue is resolved.
>>>
>>> So, in some cases, file bugs/patches/etc in both. :)
>>>
>>
>> Ok, I agree, maybe then also mentioning the upstream report if done.
>>
>
> Did some additional investigation and reported upstream:
> https://lists.denx.de/pipermail/u-boot/2023-May/516951.html

Thanks!

I nudged upstream, as it seems to be marked "accepted" in patchwork, but
I do not see it in upstream git yet:

https://lists.denx.de/pipermail/u-boot/2023-June/520776.html

Presumably, it is on a maintainer branch or possibly deferred till
2023.10...


live well,
vagrant
signature.asc
0 new messages