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

Release v0.8 #73

Merged
merged 62 commits into from
Oct 31, 2024
Merged

Release v0.8 #73

merged 62 commits into from
Oct 31, 2024

Conversation

tym2k1
Copy link
Contributor

@tym2k1 tym2k1 commented Jul 19, 2024

Merged PRs:
#69
#70
#71 counterpart with adjustments - see 200cf5b
#76

README.md Show resolved Hide resolved
tym2k1 added 23 commits August 13, 2024 12:51
```
devtool modify u-boot
devtool finish --force-patch-refresh u-boot /build/../repo
```
@PLangowski
Copy link
Contributor

Something very unusual is happening.

Booting hangs on [ 1.769553] Waiting for root device /dev/mmcblk0p2... and never continues. It doesn't fall back to shell either.

First we thought that the error can be resolved by specifying the partition UUID in the boot command:

setenv bootargs console=${console} console=tty1 root=PARTUUID=076c4a2a-02 rootwait panic=10 ${extra}

Thisfixes the problem with mounting the root partition, but booting still does not complete. It hangs on:

[    7.091486] dwmac-sun8i 1c30000.ethernet end0: configuring for phy/mii link mode
[    7.184108] random: crng init done

And falls back to recovery shell.
We tried increasing log verbosity to debug the issue. Here's where the weird stuff happened: The system booted. We then tried booting it with unchanged root parameter. It also booted. For some reason adding debug-related options fixes the issue. We have no idea why. Below are the steps required to boot the system:

  1. Power on the RTE and go interrupt booting to get into U-boot shell
  2. In U-boot shell execute the following commands:
setenv boot_part 2
setenv bootargs console=${console} console=tty1 root=/dev/mmcblk0p${boot_part} rootwait panic=10 ${extra} ignore_loglevel initcall_debug
ext4load mmc 0:${boot_part} ${fdt_addr_r} /boot/${fdtfile}
ext4load mmc 0:${boot_part} ${kernel_addr_r} /boot/uImage
booti ${kernel_addr_r} - ${fdt_addr_r} || bootm ${kernel_addr_r} - ${fdt_addr_r}

The commands are taken from recipes-bsp/u-boot/u-boot/orange-pi-zero/boot.cmd. The only difference is the presence of ignore_loglevel initcall_debug.

@macpijan
Copy link
Member

macpijan commented Oct 25, 2024

[    7.091486] dwmac-sun8i 1c30000.ethernet end0: configuring for phy/mii link mode
[    7.184108] random: crng init done

This is probably unrelated log. Look in dmesg or journactl -x for erros.

Check mount --all in recovery shell and check if it does not complain.

Check fstab. Do you have all partitions /dev/mmcblk0p[1-4] visible in OS?

I can try removing my tmp, rebuild and test again on my unit.

@macpijan
Copy link
Member

macpijan commented Oct 25, 2024

In the presence of these "weirdnesses you may want to check on different hardware unit as well.

@macpijan
Copy link
Member

macpijan commented Oct 25, 2024

@PLangowski I was able to trigger the Waiting for root device /dev/mmcblk0p2... problem as well. Your conclusions are incorrect. This problem is completely random. Just try booting the board 10 times for instance with no changes to the boot commands.

Sometimes the SD card gets enumerated as mmcblk0, sometimes as mmcblk1. There is a race condition, the SDIO WiFi chip sometimes gets enumerated first as mmc0, and the SD card gets mmc1 then. We do not use WiFi, so we could even remove it (disable in devicetree) as a quick workaround to this issue.

https://paste.dasharo.com/?a383dc8cd91aca31#2Mt88gsFh2o1xQcnMw2HMVoPGLBv4122eX5JFxD5hEvQ

Let's focus on SPI first here.

@PLangowski
Copy link
Contributor

PLangowski commented Oct 30, 2024

@macpijan The GPIO expander pins have been shifted by 112. I don't know the reason why this happened. Some service tries to export GPIO 404 during late boot, but fails to do so. We should probably modify that so that it exports 516, 517 and 518.

@PLangowski
Copy link
Contributor

Fixed the SPI problem by modifying the RteCtrl config.

Now after boot the GPIOs are correctly exported and can be used to control SPI.

@PLangowski
Copy link
Contributor

PLangowski commented Oct 30, 2024

I also disabled the WiFi chip. It seems that we fixed all the problems.

@PLangowski PLangowski requested a review from macpijan October 30, 2024 13:29
Copy link
Member

@macpijan macpijan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This commit e3937c9 could use some explanation as well.

Also, it's name is rather long, we do not always need to include the full path.

@@ -21,112 +21,112 @@
"description" : "oc3",
"direction" : "out",
"init_value" : 0,
"sys_gpio" : 404
"sys_gpio" : 516
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we know why this has changed?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unfortunately I don't know

The GPIO expander pin numbers have recently been shifted by 112. Therefore, the
numbers in RteCtrl needed to be adjusted.

Signed-off-by: Pawel Langowski <[email protected]>
@PLangowski
Copy link
Contributor

@macpijan I added the explanation 93fb19f

@PLangowski PLangowski requested a review from macpijan October 31, 2024 10:08
@macpijan
Copy link
Member

Looks good enough for me to get merged into develop.

This thread bother me though: #73 (comment)

In the end, we must understand this.

@macpijan macpijan merged commit bc68841 into develop Oct 31, 2024
1 check passed
@macpijan macpijan deleted the release_v0.8 branch October 31, 2024 10:13
@PLangowski PLangowski restored the release_v0.8 branch October 31, 2024 10:50
macpijan added a commit to 3mdeb/RteCtrl that referenced this pull request Oct 31, 2024
See: 3mdeb/meta-rte#73 (comment)
Needs a proper fix that this script is compatible for all RTE OS versions.

This script could go directly to meta-rte - that would ease to keep it
in sync.

Finally, it should be removed entirely, and replaced with osfv_cli
instead.

Signed-off-by: Maciej Pijanowski <[email protected]>
@macpijan macpijan deleted the release_v0.8 branch November 6, 2024 11:44
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
4 participants