GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — GitHub - amardd/u-boot: U-Boot-Bootloader for BananaPI-R2/R64/R2Pro/R3/R4/R4Pro/R4Lite

BranchesTags
Open more actions menu
 
 

Latest commit

 

History

101,611 Commits
101,611 Commits

Folders and files

NameName
Last commit message
Last commit date
.github
.github
 
 
Licenses
Licenses
 
 
api
api
 
 
arch
arch
 
 
board
board
 
 
boot
boot
 
 
cmd
cmd
 
 
common
common
 
 
configs
configs
 
 
disk
disk
 
 
doc
doc
 
 
drivers
drivers
 
 
dts
dts
 
 
env
env
 
 
examples
examples
 
 
files
files
 
 
fs
fs
 
 
include
include
 
 
lib
lib
 
 
net
net
 
 
post
post
 
 
scripts
scripts
 
 
test
test
 
 
tools
tools
 
 
.azure-pipelines.yml
.azure-pipelines.yml
 
 
.b4-config
.b4-config
 
 
.checkpatch.conf
.checkpatch.conf
 
 
.get_maintainer.conf
.get_maintainer.conf
 
 
.get_maintainer.ignore
.get_maintainer.ignore
 
 
.gitattributes
.gitattributes
 
 
.gitignore
.gitignore
 
 
.gitlab-ci.yml
.gitlab-ci.yml
 
 
.mailmap
.mailmap
 
 
.readthedocs.yml
.readthedocs.yml
 
 
COPYING
COPYING
 
 
Kbuild
Kbuild
 
 
Kconfig
Kconfig
 
 
MAINTAINERS
MAINTAINERS
 
 
Makefile
Makefile
 
 
README
README
 
 
README.md
README.md
 
 
README.xuntai-esr2113.md
README.xuntai-esr2113.md
 
 
build.conf
build.conf
 
 
build.sh
build.sh
 
 
config.mk
config.mk
 
 
uEnv_esr2113.txt
uEnv_esr2113.txt
 
 
uEnv_r2.txt
uEnv_r2.txt
 
 
uEnv_r2pro.txt
uEnv_r2pro.txt
 
 
uEnv_r3.txt
uEnv_r3.txt
 
 
uEnv_r4.txt
uEnv_r4.txt
 
 
uEnv_r64.txt
uEnv_r64.txt
 
 
xuntai-esr2113_emmc.img.gz
xuntai-esr2113_emmc.img.gz
 
 

Repository files navigation

U-boot for BPI-R2/R64/R2Pro/R3/R4

CI

Requirements

On x86/x64-host you need cross compile tools for the armhf architecture:

sudo apt-get install gcc-arm-linux-gnueabihf gcc-aarch64-linux-gnu libc6-armhf-cross u-boot-tools make gcc swig python-dev python3-pyelftools

Issues

R2:

  • loadenv fails because of resized environment (4096 => 8188)
    • backup your saved environment before update uboot or change back CONFIG_ENV_SIZE to SZ_4K (./build.sh soc)
    • erase your saved environment
env erase
  • no emmc-command (not needed "emmc pconf 0x48" = "mmc partconf 0 1 1 0")

Usage

  #edit build.conf to select bpi-r64/bpi-r2pro/bpi-r3 if needed
  ./build.sh importconfig
  ./build.sh config #optional (menuconfig)
  ./build.sh
  ./build.sh install #write to sd-card
  ./build.sh umount #umount automatic mounted partitions

flash precompiled binaries

e.g. for change my image (not tested for openwrt) to 8G-variant

sudo dd if=bpi-r4_sdmmc_8GB_bl2.img of=/dev/sdX1 conv=notrunc,fsync

building and flash image

for all boards there are basic sdcard image templates created containing the full bootchain till uboot.

  • bpi-r2.img.gz
  • bpi-r2pro.img.gz
  • bpi-r3_sdmmc.img.gz
  • bpi-r4_sdmmc.img.gz
  • bpi-r64_sdmmc.img.gz

These do not contain linux kernel or rootfs but you can flash them as base to sdcard.

gunzip -c bpi-r3_sdmmc.img.gz | sudo dd bs=1M status=progress conv=notrunc,fsync of=/dev/sdX

#writing R3 emmc (booting from spi-nand/nor and load kernel with initrd)
gunzip -c /mnt/bpi-r3_emmc.img.gz | dd bs=1M status=progress conv=notrunc,fsync of=/dev/mmcblk0

After this you can extract the rootfs and kernel to the card.

refresh partitiontable and mounting

sudo partprobe /dev/sdX
udisksctl mount -b /dev/disk/by-label/BPI-BOOT
udisksctl mount -b /dev/disk/by-label/BPI-ROOT

debian bullseye rootfs (created by buildchroot.sh in same folder): https://drive.google.com/drive/folders/1mEcz1NLX8kv_AOKCPGGBcebRtLVNrQqF?usp=share_link

kernel: https://github.com/frank-w/BPI-Router-Linux/releases/

# unpack debian rootfs
sudo tar -xzf bullseye_arm64.tar.gz -C /media/$USER/BPI-ROOT
# unpack kernel binary files
sudo tar -xzf bpi-r3_6.1.0-main.tar.gz --strip-components=1 -C /media/$USER/BPI-BOOT BPI-BOOT
# for r3 move kernel binary to root of boot-partition and rename it
mv /media/$USER/BPI-BOOT/bananapi/bpi-r3/linux/bpi-r3.itb /media/$USER/BPI-BOOT/bpi-r3-6.1.0.itb
echo "fit=bpi-r3-6.1.0.itb" >> /media/$USER/BPI-BOOT/uEnv.txt
# unpack kernel modules to rootfs
# debian uses /lib as symlink to usr/lib, extracting the dir from tar overwrites symlink with directory
# which contains then only the kernel-modules, but not other libs so extract the subfolder to /lib
sudo tar -xzf bpi-r3_6.1.0-main.tar.gz --strip-components=2 -C /media/$USER/BPI-ROOT/lib/ BPI-ROOT/lib/

R2 uses uImage and kernel=xxx in uEnv.txt (in folder bananapi/bpi-r2/linux) R64, R3, R4 uses fit in in root dir of BPI-BOOT partition (fit=bpi-rX.itb) R2Pro uses now fit and uEnv.txt too (Image.gz+dtb in extlinux folder as fallback).

set root-password and maybe make additional changes:

sudo chroot /media/$USER/BPI-ROOT
passwd
echo "bpi-r3" > /etc/hostname

/etc/fstab

# <file system>	<dir>	<type>	<options>		<dump>	<pass>
/dev/mmcblk0p5	/boot	vfat    errors=remount-ro	0	1
/dev/mmcblk0p6	/	ext4	defaults		0	0

maybe add network-config (systemd) and systemd services i uploaded here: https://drive.google.com/drive/folders/1kST9ZOv8xQWFfo9GUNIIpKjD8QuYMj8i?usp=share_link

i have created an script which creates full sdcard-Images including rootfs and kernel (except BPI-R4):

https://github.com/frank-w/BPI-Router-Images

About

U-Boot-Bootloader for BananaPI-R2/R64/R2Pro/R3/R4/R4Pro/R4Lite

Resources

Readme
License
Activity

Stars

0 stars

Watchers

0 watching

Forks

0 forks
Report repository

Releases

Packages

Contributors

Languages

You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.