xunlong-orangepi3: new device (MR 2268)
[ci:skip-build] already built successfully in CI
This commit is contained in:
parent
d415968dc9
commit
424528a799
4 changed files with 123 additions and 0 deletions
47
device/testing/device-xunlong-orangepi3/APKBUILD
Normal file
47
device/testing/device-xunlong-orangepi3/APKBUILD
Normal file
|
@ -0,0 +1,47 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
# Maintainer: Maxim Karasev <begs@disroot.org>
|
||||
pkgname=device-xunlong-orangepi3
|
||||
pkgdesc="Xunlong Orange Pi 3"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="aarch64"
|
||||
options="!check !archcheck"
|
||||
depends="
|
||||
linux-postmarketos-allwinner
|
||||
mesa-dri-gallium
|
||||
postmarketos-base
|
||||
u-boot-tools
|
||||
u-boot-sunxi
|
||||
"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
|
||||
source="
|
||||
deviceinfo
|
||||
uboot-script.cmd
|
||||
"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
mkimage -A arm -O linux -T script -C none -a 0 -e 0 \
|
||||
-n postmarketos -d "$srcdir"/uboot-script.cmd \
|
||||
"$srcdir"/boot.scr
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
install -D -m644 "$srcdir"/boot.scr \
|
||||
"$pkgdir"/boot/boot.scr
|
||||
}
|
||||
|
||||
nonfree_firmware() {
|
||||
pkgdesc="Wi-Fi and Bluetooth firmware"
|
||||
depends="firmware-xunlong-orangepi3"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="
|
||||
1fb319af5c74b85f4ceac02a51b0645bcee2674f6189e00c0e5ce40837076bd0c412250216f07a5a04c952eedcf1954277e0fa4b13854aee424f23c802799802 deviceinfo
|
||||
90dab64c2b3c55756017b63fea18852a22cae6ee43abb71b1c019c00a77e140cc162d7736bba5c8c007d1f6fa32cb8901ec190a3e46aaa85c557e4907d0bb1c7 uboot-script.cmd
|
||||
"
|
26
device/testing/device-xunlong-orangepi3/deviceinfo
Normal file
26
device/testing/device-xunlong-orangepi3/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="Xunlong Orange Pi 3"
|
||||
deviceinfo_manufacturer="Xunlong"
|
||||
deviceinfo_codename="xunlong-orangepi3"
|
||||
deviceinfo_year="2019"
|
||||
deviceinfo_dtb="allwinner/sun50i-h6-orangepi-3"
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="aarch64"
|
||||
deviceinfo_disable_dhcpd="true"
|
||||
|
||||
# Device related
|
||||
deviceinfo_chassis="embedded"
|
||||
deviceinfo_keyboard="true"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1920"
|
||||
deviceinfo_screen_height="1080"
|
||||
deviceinfo_getty="ttyS0;115200"
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_generate_legacy_uboot_initfs="true"
|
||||
deviceinfo_sd_embed_firmware="u-boot/orangepi_3/u-boot-sunxi-with-spl.bin:8"
|
27
device/testing/device-xunlong-orangepi3/uboot-script.cmd
Normal file
27
device/testing/device-xunlong-orangepi3/uboot-script.cmd
Normal file
|
@ -0,0 +1,27 @@
|
|||
if test ${mmc_bootdev} -eq 0 ; then
|
||||
echo "Booting from SD";
|
||||
setenv bootdev 0;
|
||||
else
|
||||
echo "Booting from eMMC";
|
||||
setenv bootdev 2;
|
||||
fi;
|
||||
|
||||
setenv bootargs init=/init.sh rw console=tty0 console=ttyS0,115200 earlycon no_console_suspend panic=10 consoleblank=0 loglevel=1 pmos_boot=/dev/mmcblk${bootdev}p1 pmos_root=/dev/mmcblk${bootdev}p2 PMOS_NO_OUTPUT_REDIRECT
|
||||
|
||||
printenv
|
||||
|
||||
echo Loading DTB
|
||||
load mmc ${mmc_bootdev}:1 ${fdt_addr_r} sun50i-h6-orangepi-3.dtb
|
||||
|
||||
echo Loading Initramfs
|
||||
load mmc ${mmc_bootdev}:1 ${ramdisk_addr_r} uInitrd-postmarketos-allwinner
|
||||
|
||||
echo Loading Kernel
|
||||
load mmc ${mmc_bootdev}:1 ${kernel_addr_r} vmlinuz-postmarketos-allwinner
|
||||
|
||||
echo Resizing FDT
|
||||
fdt addr ${fdt_addr_r}
|
||||
fdt resize
|
||||
|
||||
echo Booting kernel
|
||||
booti ${kernel_addr_r} ${ramdisk_addr_r} ${fdt_addr_r}
|
23
device/testing/firmware-xunlong-orangepi3/APKBUILD
Normal file
23
device/testing/firmware-xunlong-orangepi3/APKBUILD
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Maintainer: Maxim Karasev <begs@disroot.org>
|
||||
pkgname=firmware-xunlong-orangepi3
|
||||
pkgver=1
|
||||
pkgrel=0
|
||||
_commit="3ddc301c272f081aa5513c1934f6d530bf80de4a"
|
||||
pkgdesc="Firmware for the Xunlong Orange Pi 3 (xunlong-orangepi3)"
|
||||
url="https://github.com/LibreELEC/brcmfmac_sdio-firmware"
|
||||
arch="aarch64"
|
||||
license="proprietary"
|
||||
options="!check !strip !archcheck"
|
||||
source="https://github.com/LibreELEC/brcmfmac_sdio-firmware/archive/$_commit/brcmfmac_sdio-firmware-$_commit.tar.gz"
|
||||
builddir="$srcdir/brcmfmac_sdio-firmware-$_commit"
|
||||
|
||||
package() {
|
||||
for file in BCM4345C5.hcd brcmfmac43456-sdio.bin brcmfmac43456-sdio.xunlong,orangepi-3.txt; do
|
||||
install -Dm 0644 "$file" -t "$pkgdir"/lib/firmware/postmarketos/brcm
|
||||
done
|
||||
}
|
||||
|
||||
|
||||
sha512sums="
|
||||
6638fbb6a1ed94e17da1dfea3efa2914f1465ff8788bd937c8c221a80b160f5469242d99be941042bd4134301d3d7c34fe1be2c3b3cb9342f4a32bbe24b03bf2 brcmfmac_sdio-firmware-3ddc301c272f081aa5513c1934f6d530bf80de4a.tar.gz
|
||||
"
|
Loading…
Reference in a new issue