https://github.com/hypersolid-os/bootloader.u-boot
Container isolated U-Boot build enviromment for raspberry pi (and others)
https://github.com/hypersolid-os/bootloader.u-boot
Last synced: 3 months ago
JSON representation
Container isolated U-Boot build enviromment for raspberry pi (and others)
- Host: GitHub
- URL: https://github.com/hypersolid-os/bootloader.u-boot
- Owner: hypersolid-os
- License: gpl-2.0
- Created: 2022-04-12T10:25:11.000Z (about 3 years ago)
- Default Branch: master
- Last Pushed: 2022-04-12T10:25:35.000Z (about 3 years ago)
- Last Synced: 2025-01-12T23:27:53.436Z (5 months ago)
- Language: Shell
- Size: 290 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
Container isolated U-Boot build enviromment for raspberry pi (and others)
=============================================================build your customized [u-boot](https://www.denx.de/wiki/U-Boot) raspberry pi bootloader
Features
--------------------------------------* Targeted to 64bit Rapsberry PI 3/4
* Build environment isolated within container
* `.config` overrides via `merge_config.sh`
* Easy to customize
* Ready to goRequirements
--------------------------------------* Debian/Ubuntu hostsystem
* podman with non-root config
* uid/gid remapping enabledStep 1 - Build container image
--------------------------------------```bash
./build.sh
```Step 2 - Configuration
--------------------------------------### Device/Archicture selection ###
### Image configuration ###
To alter a set of build config variables, just place them within `conf/config` - the values are merged with the default board profile.
Step 3 - Build u-boot binary (64bit only)
--------------------------------------The `uboot-build` script triggers the build process
```bash
build@32e99ec1ab77:~/uboot$ uboot-build
HOSTCC scripts/basic/fixdep
HOSTCC scripts/kconfig/conf.o
YACC scripts/kconfig/zconf.tab.c
LEX scripts/kconfig/zconf.lex.c
HOSTCC scripts/kconfig/zconf.tab.o
HOSTLD scripts/kconfig/conf
#
# configuration written to .config
#
scripts/kconfig/conf --syncconfig Kconfig
UPD include/config.h
CFG u-boot.cfg
GEN include/autoconf.mk.dep
...
DTC arch/arm/dts/bcm2711-rpi-4-b.dtb
COPY u-boot.bin
SHIPPED dts/dt.dtb
```Finally, `u-boot.bin` is copied into the bind mount to `u-boot.bin`
Step 4 - Raspberry PI Boot
--------------------------------------Following file from the [raspberry firmware package](https://github.com/raspberrypi/firmware) are required:
* `bootcode.bin` (raspberry v1 v2 v3)
* `start*.elf` (all)
* `fixup*.dat` (all)
* `bcm*.dtb` (all)And additionally the `u-boot.bin` bootloader
### Boot config ###
File `config.txt`
```
disable_splash=1boot_delay=0
gpu_mem=16enable_uart=1
kernel=u-boot.bin
arm_64bit=1
```### SD Card setup ###
* MBR (DOS) partition table
* FAT32 boot partition (first partition) with boot flag set
* Size min `50MB`References
--------------------------------------* https://elinux.org/RPi_U-Boot
* https://www.raspberrypi.com/documentation/computers/raspberry-pi.html#boot-sequenceLicense
----------------------------**hypersolid** is OpenSource and licensed under the Terms of [GNU General Public Licence v2](LICENSE.txt). You're welcome to [contribute](CONTRIBUTE.md)!