bananapi-m2-zero: initial port (MR 6063)
This commit is contained in:
parent
c90592c981
commit
08c9c31eed
6 changed files with 6710 additions and 0 deletions
33
device/testing/device-bananapi-bpi-m2-zero/APKBUILD
Normal file
33
device/testing/device-bananapi-bpi-m2-zero/APKBUILD
Normal file
|
|
@ -0,0 +1,33 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname=device-bananapi-bpi-m2-zero
|
||||
pkgdesc="Banana Pi BPI-M2 Zero"
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="armv7"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-bananapi-bpi-m2-zero
|
||||
postmarketos-base
|
||||
u-boot-bananapi-bpi-m2-zero
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
source="
|
||||
deviceinfo
|
||||
"
|
||||
_pmb_recommends="
|
||||
firmware-bananapi-bpi-m2-zero
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
a5dcb9c56ea9225bf8cb3a0734d72b62540a8d710219eb14868c3f0f0b5a6f2c765ad01d0d2139d5a9d0469e16d444963ca7d1ce6dac582ced4e9f4160503b9e deviceinfo
|
||||
"
|
||||
26
device/testing/device-bananapi-bpi-m2-zero/deviceinfo
Normal file
26
device/testing/device-bananapi-bpi-m2-zero/deviceinfo
Normal file
|
|
@ -0,0 +1,26 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell
|
||||
# scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Banana Pi BPI-M2 Zero"
|
||||
deviceinfo_manufacturer="Banana Pi"
|
||||
deviceinfo_codename="bananapi-bpi-m2-zero"
|
||||
deviceinfo_year="2017"
|
||||
deviceinfo_dtb="sun8i-h2-plus-bananapi-m2-zero"
|
||||
deviceinfo_arch="armv7"
|
||||
deviceinfo_generate_extlinux_config="true"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="embedded"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_keyboard="true"
|
||||
|
||||
# Bootloader related
|
||||
|
||||
# U-Boot conflicts with GPT. (Partition table gets overwritten.)
|
||||
deviceinfo_partition_type="msdos"
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_sd_embed_firmware_step_size="1024"
|
||||
deviceinfo_sd_embed_firmware="u-boot/bananapi-m2-zero/u-boot.sunxi:8"
|
||||
deviceinfo_boot_filesystem="fat32"
|
||||
29
device/testing/firmware-bananapi-bpi-m2-zero/APKBUILD
Normal file
29
device/testing/firmware-bananapi-bpi-m2-zero/APKBUILD
Normal file
|
|
@ -0,0 +1,29 @@
|
|||
pkgname=firmware-bananapi-bpi-m2-zero
|
||||
pkgver=0
|
||||
pkgrel=0
|
||||
pkgdesc="Firmware for the Banana Pi M2 Zero"
|
||||
url="https://github.com/BPI-SINOVOIP/BPI_WiFi_Firmware"
|
||||
arch="armv7"
|
||||
license="proprietary"
|
||||
options="!check !strip !archcheck !tracedeps pmb:cross-native"
|
||||
builddir="$srcdir/"
|
||||
|
||||
# Sources
|
||||
_commit="a4846b40bc92b6d12e83143353455b2e79bf385e"
|
||||
source="$pkgname-$pkgver.tar.gz::https://github.com/user0-07161/bananapi-m2-zero-wifi/archive/$_commit.tar.gz"
|
||||
|
||||
package() {
|
||||
_directories="ap6210 ap6212 brcm"
|
||||
for _i in $_directories; do
|
||||
_files=$(find bananapi-m2-zero-wifi-a4846b40bc92b6d12e83143353455b2e79bf385e/"$_i"/ -exec basename {} \;)
|
||||
for _file in $_files; do
|
||||
if [ "$_i" != "$file" ]; then
|
||||
install -D -m644 bananapi-m2-zero-wifi-a4846b40bc92b6d12e83143353455b2e79bf385e/"$_i"/"$_file" "$pkgdir"/lib/firmware/"$_i"/"$_file" || true # true is needed to ignore errors when install tries to install the root directory.
|
||||
fi
|
||||
done
|
||||
done
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
dca8fa72fca189e15f0e5f23c03fc2660074937a330bd5a43def3b3ab9df30308ae1906f80cc42547464076f4f137acd04ba1719a79871a032c8cf35a9796395 firmware-bananapi-bpi-m2-zero-0.tar.gz
|
||||
"
|
||||
66
device/testing/linux-bananapi-bpi-m2-zero/APKBUILD
Normal file
66
device/testing/linux-bananapi-bpi-m2-zero/APKBUILD
Normal file
|
|
@ -0,0 +1,66 @@
|
|||
# Reference: <https://postmarketos.org/vendorkernel>
|
||||
# Kernel config based on: arch/arm/configs/sun8iw7p1smp_defconfig in downstream kernel for BPi M2 Zero
|
||||
|
||||
pkgname=linux-bananapi-bpi-m2-zero
|
||||
pkgver=6.13.0_rc7
|
||||
pkgrel=0
|
||||
pkgdesc="Banana Pi BPI-M2 Zero mainline kernel fork"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
_flavor="bananapi-bpi-m2-zero"
|
||||
url="https://kernel.org"
|
||||
license="GPL-2.0-only"
|
||||
options="!strip !check !tracedeps pmb:cross-native"
|
||||
makedepends="bash
|
||||
bc
|
||||
bison
|
||||
devicepkg-dev
|
||||
flex
|
||||
openssl-dev
|
||||
perl
|
||||
gmp-dev
|
||||
mpc1-dev
|
||||
mpfr-dev
|
||||
findutils
|
||||
postmarketos-installkernel
|
||||
"
|
||||
|
||||
# Source
|
||||
_commit="619f0b6fad524f08d493a98d55bac9ab8895e3a6"
|
||||
_config="config-$_flavor.$arch"
|
||||
_repository="linux"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/torvalds/$_repository/archive/$_commit.tar.gz
|
||||
$_config
|
||||
"
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
_outdir="out"
|
||||
|
||||
prepare() {
|
||||
default_prepare
|
||||
cp -v "$srcdir/$_config" .config
|
||||
}
|
||||
|
||||
build() {
|
||||
unset LDFLAGS
|
||||
make ARCH="$_carch" CC="${CC:-gcc}" \
|
||||
KBUILD_BUILD_VERSION="$((pkgrel + 1 ))-postmarketOS"
|
||||
}
|
||||
|
||||
package() {
|
||||
mkdir -p "$pkgdir"/boot
|
||||
make zinstall modules_install dtbs_install \
|
||||
ARCH="$_carch" \
|
||||
INSTALL_MOD_STRIP=1 \
|
||||
INSTALL_PATH="$pkgdir"/boot \
|
||||
INSTALL_MOD_PATH="$pkgdir" \
|
||||
INSTALL_DTBS_PATH="$pkgdir/usr/share/dtb"
|
||||
|
||||
install -D "$builddir"/include/config/kernel.release \
|
||||
"$pkgdir/usr/share/kernel/$_flavor/kernel.release"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
6bf4bb3e7e6974ffb5eb21438d8ac7c651b6b4cf494133946650a95a0ca7ceac01820351e6583fc14b2aa66e6c4a4b6c2c9989d99ecff3731aef4f48a0bb2161 linux-bananapi-bpi-m2-zero-619f0b6fad524f08d493a98d55bac9ab8895e3a6.tar.gz
|
||||
eef1d6f4d1937a46307b6091d865d6607c5fb3876ad184bd61613860fe2ef88d215dfdd14946b1a4751c411a531190c78ed4c47a3fef096e3d4cef9b2c103e32 config-bananapi-bpi-m2-zero.armv7
|
||||
"
|
||||
File diff suppressed because it is too large
Load diff
43
device/testing/u-boot-bananapi-bpi-m2-zero/APKBUILD
Normal file
43
device/testing/u-boot-bananapi-bpi-m2-zero/APKBUILD
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
# Maintainer: User0 <user0thenyancat@proton.me>
|
||||
pkgname=u-boot-bananapi-bpi-m2-zero
|
||||
pkgver=2025.01
|
||||
pkgrel=0
|
||||
pkgdesc="Mainline U-Boot fork for the Banana Pi BPI-M2 Zero"
|
||||
arch="armv7"
|
||||
_carch="arm"
|
||||
license="GPL-2.0"
|
||||
url="https://github.com/u-boot/u-boot"
|
||||
makedepends="
|
||||
bash
|
||||
bc
|
||||
bison
|
||||
dtc
|
||||
flex
|
||||
gnutls-dev
|
||||
openssl-dev
|
||||
py3-setuptools
|
||||
python3-dev
|
||||
swig
|
||||
"
|
||||
options="!check !tracedeps pmb:cross-native"
|
||||
_repository="u-boot"
|
||||
_commit="178f6ecb21fe12ada74a9a1a08093c812b15eea5"
|
||||
source="
|
||||
$pkgname-$_commit.tar.gz::https://github.com/u-boot/$_repository/archive/$_commit.tar.gz
|
||||
"
|
||||
|
||||
builddir="$srcdir/$_repository-$_commit"
|
||||
|
||||
build() {
|
||||
make ARCH="$_carch" bananapi_m2_zero_defconfig
|
||||
make ARCH="$_carch" all
|
||||
}
|
||||
|
||||
package() {
|
||||
install -Dm644 "$builddir/u-boot-dtb.bin" "$pkgdir/usr/share/u-boot/bananapi-m2-zero/u-boot.bin"
|
||||
install -Dm644 "$builddir/u-boot-sunxi-with-spl.bin" "$pkgdir/usr/share/u-boot/bananapi-m2-zero/u-boot.sunxi"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
0f9cc03abdc4451a56edcd7ef51bf63fc25f29afdf670c73387f0107e0f9bf5aee98a0cb0efe897c69ebd9f37643df40350d6d48b00418a4b6779be72d1a7614 u-boot-bananapi-bpi-m2-zero-178f6ecb21fe12ada74a9a1a08093c812b15eea5.tar.gz
|
||||
"
|
||||
Loading…
Add table
Add a link
Reference in a new issue