Orange pi 5b u-boot
When eMMC is programmed with ubuntu os using any programming method such as rkdevtool or through dd commanf, then if empty sd is inserted the board will not boot. If sd is removed the board boot normally. I think sd has priority over emmc, but why bootloader does not neglect empty sd and select the next boot device which is emmc?
In x86 systems, the boot devices are checked sequentially and the system starts once a valid boot device is found!
Further investigation using serial debug show that SPL bootloader is executed normally from the emmc, however the bootloader later try to boot from the SD and fails without trying further the next boot device which should be the emmc I found the solution after some time.
Orange pi 5B and other boards based on some Rockchip CPU have a booting issue.
When the eMMC is flashed with ubuntu (or other OS such as armbian as I believe), then if a blank SD is inserted, the board will not boot.
Investigation of the problem through serial debug cable show that the bootloader select SD as the first boot device,
and try to boot from it. Since there is no valid image, the system will panic and just halt. On x86 systems, the bootloader will
fallback to the next boot device.
The problem is related to the module "config_distro_bootcmd.h" in the u-boot section which contains boot steps.
The system tries to boot from the SD without checking whether it has a valid imag or not.
A quick and solid solution is to patch this moudle and rebuilt the u-boot. The following steps are used to solve the problem:
1. On the development Linux PC, such as virtual machine, with updated ubuntu, create a directory on the home/user folder
mkdir $HOME/orangepi
cd orangepi
git clone https://github.com/orangepi-xunlong/orangepi-build.git -b next
cd orangepi-build
2. Run build script to install the required files:
sudo ./build.sh
then select u-boot only and select board type (ornage pi 5B in my case)
Note: build.sh will install the required cross compile toolchain and source files when it runs first time.
3. To enable code editing without comparing with the git, edit the following file :
sudo nano userpatches/config-default.conf
set:
IGNORE_UPDATES="yes"
4. Edit the following file using gedit or any other editor with root permission
$HOME/orangepi/orangepi-build/u-boot/v2017.09-rk3588/include/config_distro_bootcmd.h
Change line 81 from: "if mmc dev 0; then " \
to: "if mmc dev 0 && rkimgtest mmc 0; then " \
This will force the bootloader to check if there exist a valid image on the SD or not.
I know this solution may be insuitable for other brands, but, of course, it can be applied for all Rockchip boards.
Developers of other boards may implement their checking moudle.
5. repeat building process:
sudo ./build.sh BOARD=orangepi5b BRANCH=legacy BUILD_OPT=u-boot KERNEL_CONFIGURE=no
6. Copy the generated deb package from output directory: orangepi-build/output/debs/u-boot to the home directory of the target board.
7. Install generated linux-u-boot-legacy-orangepi5b_1.0.8_arm64.deb package to the target board
Important: Remove the SD from the board,
power cycle ornage pi 5B and login using terminal emulator, then issue:
sudo apt purge -y linux-u-boot-orangepi5b-legacy
sudo dpkg -i linux-u-boot-legacy-orangepi5b_1.0.8_arm64.deb
sudo nand-sata-install
When asked select : 5 Install/Update the bootloader on SD/eMMC
it will update the u-boot section on the eMMC.
Note: orange pi 5B has no SPI flash. u-boot is stored in eMMC or SD.
Wait a minute? Why is it only showing my views? :O https://77.73.70.190/
Hey this blog is not really bad.I were going to see what else you possess but I don???t have the time I’ll have to look later. Liz
I’d ought to talk to you here. Which isn’t some thing I usually do! I like reading a post that will get people to believe. Also, appreciate your permitting me to comment! gps watch for kids
At Zuchi Technologies in Mombasa, we pride ourselves on delivering responsive and user-friendly web development services that cater to the needs of the modern digital landscape. Our expertise in mobile-friendly design, custom web solutions, and SEO optimization ensures our clients' websites stand out in the competitive market. We specialize in e-commerce websites, graphic design services, and website maintenance, all crafted by our team of professional web designers. Our comprehensive approach includes social media integration, digital advertising, and social media marketing strategies, aimed at enhancing our clients' online presence and brand awareness across Coastal Kenya. Mombasa web development company
Nice post. I discover some thing harder on distinct blogs everyday. Most commonly it is stimulating to see content from other writers and use something there. I’d opt to apply certain together with the content on my blog whether or not you don’t mind. Natually I’ll provide link on your own internet weblog. Many thanks for sharing. https://mtdn.net]사설토토 먹튀검증
I adore each of the content, I seriously liked, I would really like details about it, since it is quite very good., Cheers intended for talking over. gps watch for kids'
Hello Web site owner. I seriously love this writing and also your webpage all in all! That write-up is very clearly written and also without difficulty understandable. Your WordPress design is wonderful as well! Would definitely be excellent to discover where I can get that. Be sure to hold up the great work. We all will need much more this sort of web owners such as you online and much less spammers. Superb mate! Mombasa Internet Marketing