Add Raspberry Pi device (#1501)
This commit is contained in:
parent
cca32f2610
commit
047439a66f
8 changed files with 103 additions and 0 deletions
1
device/device-raspberry-pi/95-vchiq-permissions.rules
Normal file
1
device/device-raspberry-pi/95-vchiq-permissions.rules
Normal file
|
@ -0,0 +1 @@
|
|||
SUBSYSTEM=="vchiq", GROUP="video", MODE="0660"
|
49
device/device-raspberry-pi/APKBUILD
Normal file
49
device/device-raspberry-pi/APKBUILD
Normal file
|
@ -0,0 +1,49 @@
|
|||
# Reference: <https://postmarketos.org/devicepkg>
|
||||
pkgname="device-raspberry-pi"
|
||||
pkgdesc="Raspberry Pi"
|
||||
pkgver=0.1
|
||||
pkgrel=0
|
||||
url="https://postmarketos.org"
|
||||
license="MIT"
|
||||
arch="noarch"
|
||||
options="!check"
|
||||
depends="postmarketos-base raspberrypi-bootloader"
|
||||
makedepends="devicepkg-dev"
|
||||
subpackages="
|
||||
$pkgname-kernel-rpi:kernel_rpi
|
||||
$pkgname-kernel-rpi2:kernel_rpi2
|
||||
"
|
||||
source="deviceinfo config.txt usercfg.txt cmdline.txt 95-vchiq-permissions.rules"
|
||||
|
||||
build() {
|
||||
devicepkg_build $startdir $pkgname
|
||||
}
|
||||
|
||||
package() {
|
||||
devicepkg_package $startdir $pkgname
|
||||
install -Dm644 "$srcdir"/config.txt "$pkgdir"/boot/config.txt
|
||||
install -Dm644 "$srcdir"/usercfg.txt "$pkgdir"/boot/usercfg.txt
|
||||
install -Dm644 "$srcdir"/cmdline.txt "$pkgdir"/boot/cmdline.txt
|
||||
install -Dm644 "$srcdir"/95-vchiq-permissions.rules \
|
||||
"$pkgdir"/etc/udev/rules.d/95-vchiq-permissions.rules
|
||||
}
|
||||
|
||||
kernel_rpi() {
|
||||
pkgdesc="Kernel for the Raspberry Pi Zero & 1"
|
||||
depends="$pkgname linux-rpi"
|
||||
install="$subpkgname.post-install"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
kernel_rpi2() {
|
||||
pkgdesc="Kernel for the Raspberry Pi 2 & 3"
|
||||
depends="$pkgname linux-rpi2"
|
||||
install="$subpkgname.post-install"
|
||||
mkdir "$subpkgdir"
|
||||
}
|
||||
|
||||
sha512sums="e8243fb5a7e6f47ee48d6eba80a17aba294810bbae985145e7beb5f93d73c8221daa491edfebd908ee0dced635f5ed7d87b652e2e061910bea327b46ec3b3527 deviceinfo
|
||||
de4d6967be7f68d0b005ab968e6f8da2eacf4ba2d814d1f47ed6ad43ba81cacc1fdc74b3ba3a44b5ae6f08c51b53708432afb5779422b977b65ae69a5a4bf068 config.txt
|
||||
e94c810f973eb6b6d0fb3687ea1d70612ba00e9c5d6b3608390a161e077c5591fd9d232c37b42443c05ed28bb639ca1754422ff35899c5e33d7fc266e0e1ad05 usercfg.txt
|
||||
ae3de0b8fec07d3a283dc3c06bf8678eec1e65c9faf0b7f4fdc9fb92751e324d1f8e2fb224dbbf561b7e5a6fb34769bfa1657858375f74b101a130d78e0737e2 cmdline.txt
|
||||
7e5505cb07d5b4a81bd28443d508336b5c547356538f1c06f91ed93ad0d7d456d4f74f1d24df5a2e08c17e74f0a66607352ac4874e967e9a91dfec9522d2d58d 95-vchiq-permissions.rules"
|
1
device/device-raspberry-pi/cmdline.txt
Normal file
1
device/device-raspberry-pi/cmdline.txt
Normal file
|
@ -0,0 +1 @@
|
|||
modules=loop,squashfs,sd-mod,usb-storage quiet dwc_otg.lpm_enable=0 console=ttyAMA0,115200 console=tty1
|
18
device/device-raspberry-pi/config.txt
Normal file
18
device/device-raspberry-pi/config.txt
Normal file
|
@ -0,0 +1,18 @@
|
|||
disable_splash=0
|
||||
boot_delay=0
|
||||
gpu_mem=256
|
||||
gpu_mem_256=64
|
||||
[pi0]
|
||||
kernel=vmlinuz-rpi
|
||||
initramfs initramfs-rpi
|
||||
[pi1]
|
||||
kernel=vmlinuz-rpi
|
||||
initramfs initramfs-rpi
|
||||
[pi2]
|
||||
kernel=vmlinuz-rpi2
|
||||
initramfs initramfs-rpi2
|
||||
[pi3]
|
||||
kernel=vmlinuz-rpi2
|
||||
initramfs initramfs-rpi2
|
||||
[all]
|
||||
include usercfg.txt
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
kernver=$(cat /usr/share/kernel/rpi/kernel.release)
|
||||
cd /usr/lib/linux-${kernver}/
|
||||
find . -type f -regex ".*\.dtbo\?$" -exec install -Dm644 {} /boot/{} \;
|
|
@ -0,0 +1,5 @@
|
|||
#!/bin/sh
|
||||
|
||||
kernver=$(cat /usr/share/kernel/rpi2/kernel.release)
|
||||
cd /usr/lib/linux-${kernver}/
|
||||
find . -type f -regex ".*\.dtbo\?$" -exec install -Dm644 {} /boot/{} \;
|
23
device/device-raspberry-pi/deviceinfo
Normal file
23
device/device-raspberry-pi/deviceinfo
Normal file
|
@ -0,0 +1,23 @@
|
|||
# Reference: <https://postmarketos.org/deviceinfo>
|
||||
# Please use double quotes only. You can source this file in shell scripts.
|
||||
|
||||
deviceinfo_format_version="0"
|
||||
deviceinfo_name="Raspberry Pi"
|
||||
deviceinfo_manufacturer="Raspberry Pi Foundation"
|
||||
deviceinfo_date=""
|
||||
deviceinfo_dtb=""
|
||||
deviceinfo_modules_initfs=""
|
||||
deviceinfo_arch="armhf"
|
||||
|
||||
# Device related
|
||||
deviceinfo_keyboard="true"
|
||||
deviceinfo_external_storage="true"
|
||||
deviceinfo_screen_width="1920"
|
||||
deviceinfo_screen_height="1080"
|
||||
deviceinfo_dev_touchscreen=""
|
||||
deviceinfo_dev_touchscreen_calibration=""
|
||||
deviceinfo_dev_keyboard=""
|
||||
|
||||
# Bootloader related
|
||||
deviceinfo_flash_method="none"
|
||||
deviceinfo_boot_filesystem="fat16"
|
1
device/device-raspberry-pi/usercfg.txt
Normal file
1
device/device-raspberry-pi/usercfg.txt
Normal file
|
@ -0,0 +1 @@
|
|||
enable_uart=1
|
Loading…
Reference in a new issue