Skip to content
Snippets Groups Projects
Commit df9a3990 authored by ΞЖKƆ/QVH's avatar ΞЖKƆ/QVH
Browse files

radxa-zero: new device

parent af90fe20
No related branches found
No related tags found
No related merge requests found
# Reference: <https://postmarketos.org/devicepkg>
# Maintainer: exkc <exxxxkc@getgoogleoff.me>
# Co-Maintainer: Timothy Valldeperas <tvall43@gmail.com>
pkgname=device-radxa-zero
pkgver=1
pkgrel=0
pkgdesc="Radxa Zero"
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base linux-edge u-boot-radxa-zero"
makedepends="devicepkg-dev"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
source="deviceinfo
extlinux.conf
"
build() {
devicepkg_build $startdir $pkgname
}
package() {
devicepkg_package $startdir $pkgname
# Due to linux-edge bugs in boot-deploy (see boot-deploy!20)
# This device could not be use generated extlinux.conf.
# There are hack for the boot-deploy bugs.
# but the ci dont like the hack.
install -D -m644 "$srcdir"/extlinux.conf \
"$pkgdir"/boot/extlinux/extlinux.conf
}
nonfree_firmware() {
pkgdesc="WiFi/BT firmware"
depends="firmware-radxa-zero linux-firmware-meson"
mkdir "$subpkgdir"
}
sha512sums="
543fc66fc0fd456e8ee8ddf1817eb78c143f7e27f416ceac7853704be43714483cfd72a781c30a89ad9555def1bdbc3eb68989a46c381deabd519023e37259b4 extlinux.conf
ed45620b6b34a41347a858c142dd605749ae9f2432ce5ad147d7cce107b92f738b4d860ace862bae66cd98e1173e3a9bc7795d3bbd869abf465921325adfa96b deviceinfo
"
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Radxa Zero"
deviceinfo_manufacturer="Radxa"
deviceinfo_codename="radxa-zero"
deviceinfo_modules_initfs="fixed meson_gxbb_wdt meson_wdt meson-gx-mmc"
deviceinfo_dtb="amlogic/meson-g12a-radxa-zero"
deviceinfo_year="2021"
deviceinfo_arch="aarch64"
# Device related
deviceinfo_gpu_accelerated="true"
deviceinfo_chassis="embedded"
deviceinfo_keyboard="true"
deviceinfo_external_storage="true"
deviceinfo_screen_width="1920"
deviceinfo_screen_height="1080"
# Bootloader related
deviceinfo_flash_method="none"
deviceinfo_kernel_cmdline="rw console=ttyAML0,115200 console=tty0 PMOS_NO_OUTPUT_REDIRECT no_console_suspend"
deviceinfo_sd_embed_firmware_step_size="512"
deviceinfo_sd_embed_firmware="u-boot/radxa-zero/u-boot.bin.sd-stripped.bin:1"
deviceinfo_boot_part_start="4096"
timeout 1
default postmarketOS
menu title boot prev kernel
label postmarketOS
kernel /vmlinuz-edge
fdt /meson-g12a-radxa-zero.dtb
initrd /initramfs
append rw console=ttyAML0,115200 console=tty0 PMOS_NO_OUTPUT_REDIRECT no_console_suspend
# Maintainer: exkc <exxxxkc@getgoogleoff.me>
# Co-Maintainer: Timothy Valldeperas <tvall43@gmail.com>
pkgname=firmware-radxa-zero
pkgver=1
pkgrel=0
pkgdesc="Broadcom firmware for Radxa Zero"
url="https://github.com/armbian/firmware"
arch="aarch64"
license="proprietary"
options="!check !strip !archcheck !tracedeps pmb:cross-native"
_commit="e2c95c9994b87d28e517495a9a52f0b3f634bcf9"
source="$pkgname-$_commit.tar.gz::$url/archive/$_commit.tar.gz"
_fwdir="/lib/firmware/postmarketos"
package() {
mkdir -p "$pkgdir"
cd "$srcdir/firmware-$_commit"
install -Dm644 brcm/brcmfmac43456-sdio.bin -t "$pkgdir/$_fwdir"/brcm
install -Dm644 brcm/brcmfmac43456-sdio.clm_blob -t "$pkgdir/$_fwdir"/brcm
install -Dm644 brcm/brcmfmac43456-sdio.txt -t "$pkgdir/$_fwdir"/brcm
install -Dm644 brcm/BCM4345C5.hcd -t "$pkgdir/$_fwdir"/brcm
}
sha512sums="
296c6e96a42d01d883669fef9ccfffe4b4bf1e3192e8182023a132b0cfc2b063377c3db90af1944a50f575bdfddae4ef1797dc5a98b4424f6cdc1ea3a657367f firmware-radxa-zero-e2c95c9994b87d28e517495a9a52f0b3f634bcf9.tar.gz
"
# Reference: <https://u-boot.readthedocs.io/en/latest/board/amlogic/radxa-zero.html>
# Maintainer: exkc <exxxxkc@getgoogleoff.me>
# Reference: <https://u-boot.readthedocs.io/en/latest/board/amlogic/radxa-zero.html>
# Maintainer: exkc <exxxxkc@getgoogleoff.me>
pkgname=u-boot-radxa-zero
pkgver=2023.01
pkgrel=0
......@@ -37,10 +37,8 @@ build() {
make O="$BUILD_DIR" HOSTCC=gcc ARCH=arm radxa-zero_defconfig
make O="$BUILD_DIR" HOSTCC=gcc ARCH=arm all
cd $srcdir/fip-$_amlogicblob_commit/radxa-zero
pwd
cp $srcdir/u-boot-v$pkgver/build/u-boot.bin ./bl33.bin
make
#dd if=fip/u-boot.bin.sd.bin of=$DEV conv=fsync,notrunc bs=1 count=444 is not necessary
dd if=u-boot.bin.sd.bin of=u-boot.bin.sd-stripped.bin conv=fsync,notrunc bs=512 skip=1
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment