Skip to content
Snippets Groups Projects
Verified Commit 45fcfc14 authored by Ferass El Hafidi's avatar Ferass El Hafidi Committed by Clayton Craft
Browse files

bananapi-bpi-cm4-cm4io: new device (MR 5962)


Signed-off-by: default avatarFerass El Hafidi <funderscore@postmarketos.org>

[ci:skip-build]: already built successfully in CI
parent dcc52796
Branches
No related tags found
1 merge request!5962bananapi-bpi-cm4-cm4io: new device
Pipeline #212724 passed
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: Ferass El Hafidi <funderscore@postmarketos.org>
pkgname=device-bananapi-bpi-cm4-cm4io
pkgdesc="BananaPi BPI-CM4IO Baseboard with BPI-CM4"
pkgver=1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base u-boot-bananapi-bpi-cm4 soc-amlogic-s905 linux-postmarketos-amlogic"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo modules-initfs"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
}
nonfree_firmware() {
pkgdesc="vdec firmware"
depends="linux-firmware-meson"
mkdir "$subpkgdir"
}
sha512sums="
86d5fa7949be1199361f76ba91704ff9d70f2a8cd68bf927bbded3b7592c1ada240762385c02320c42f763a8c92c4c1c578540655b3baf0e108b30f37b01fce6 deviceinfo
52948c2884a6f6384e12b7a598f70878526d0d3293c214425170145231144ec7de805c038641741a4a5d75b50e554f6a3fa3769784a674217ed032f9b6a233c8 modules-initfs
"
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="BananaPi BPI-CM4IO Baseboard with BPI-CM4"
deviceinfo_manufacturer="BananaPi"
deviceinfo_codename="bananapi-bpi-cm4-cm4io"
deviceinfo_dtb="amlogic/meson-g12b-bananapi-cm4-cm4io"
deviceinfo_year="2023"
deviceinfo_arch="aarch64"
deviceinfo_disable_dhcpd="true"
deviceinfo_partition_type="msdos"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="desktop"
deviceinfo_keyboard="true"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1920"
deviceinfo_screen_height="1080"
# Bootloader related
deviceinfo_flash_method="none"
deviceinfo_sd_embed_firmware_step_size="512"
deviceinfo_sd_embed_firmware="u-boot/bananapi-bpi-cm4/u-boot.bin.sd-stripped.bin:1"
deviceinfo_boot_part_start="4096"
deviceinfo_generate_extlinux_config="true"
# Kernel options
deviceinfo_kernel_cmdline="quiet loglevel=2"
meson_drm
meson_dw_hdmi
display_connector
# Reference: <https://u-boot.readthedocs.io/en/latest/board/amlogic/radxa-zero.html>
# Maintainer: Ferass El Hafidi <funderscore@postmarketos.org>
pkgname=u-boot-bananapi-bpi-cm4
pkgver=2024.04
pkgrel=0
pkgdesc="U-Boot bootloader for BananaPi BPI-CM4"
url="https://source.denx.de/u-boot"
arch="aarch64"
license="GPL-2.0-or-later OFL-1.1 BSD-2-Clause BSD-3-Clause eCos-2.0 IBM-pibs
ISC LGPL-2.0-only LGPL-2.1-only X11 proprietary"
makedepends="$depends_dev
bc
bison
dtc
flex
openssl-dev
py3-setuptools
python3-dev
swig
bash
qemu-x86_64
"
options="!check"
# https://u-boot.readthedocs.io/en/latest/board/amlogic/pre-generated-fip.html
_amlogicblob_commit="8599bc77b17f38e69275f6145acc5792faab735e"
source="
https://source.denx.de/u-boot/u-boot/-/archive/v$pkgver/u-boot-v$pkgver.tar.gz
amlogicblobs-$_amlogicblob_commit.tar.gz::https://github.com/LibreELEC/amlogic-boot-fip/archive/$_amlogicblob_commit.tar.gz
"
builddir="$srcdir/u-boot-v$pkgver"
_fipbuilddir="$srcdir/amlogic-boot-fip-$_amlogicblob_commit"
build() {
touch include/config.h
LC_ALL=C date +'#define U_BOOT_DATE "%b %d %C%y"' > include/timestamp_autogenerated.h
LC_ALL=C date +'#define U_BOOT_TIME "%T"' >> include/timestamp_autogenerated.h
make bananapi-cm4-cm4io_defconfig
make all
cd $_fipbuilddir
mkdir build
./build-fip.sh bananapi-cm4io $builddir/u-boot.bin ./build
cd ./build
dd if=u-boot.bin.sd.bin of=u-boot.bin.sd-stripped.bin conv=fsync,notrunc bs=512 skip=1
}
package() {
_installdir="$pkgdir/usr/share/u-boot/bananapi-bpi-cm4"
install -Dm644 "$_fipbuilddir/build/u-boot.bin.sd-stripped.bin" -t "$_installdir"
install -Dm644 "$_fipbuilddir/build/u-boot.bin.sd.bin" -t "$_installdir"
install -Dm644 "$_fipbuilddir/build/u-boot.bin" -t "$_installdir"
install -Dm644 "$_fipbuilddir/build/u-boot.bin.usb.bl2" -t "$_installdir"
install -Dm644 "$_fipbuilddir/build/u-boot.bin.usb.tpl" -t "$_installdir"
}
sha512sums="
be9b0176337fe9321ac244a16a17dfc1fb976b019de36c78d52149fe7c9d89d2907321be4c0c2faf0d47a4982212501f29063dbd01a005ce2c54e072159e0e3e u-boot-v2024.04.tar.gz
74c57daff859e7f449bd2743c7a8c0358b8dbe5d321ddb3a5b242b4d35683890d500d23e769490b1419a18bed233aea03ee11103bb4d646c502e4018283ba975 amlogicblobs-8599bc77b17f38e69275f6145acc5792faab735e.tar.gz
"
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment