Skip to content
Snippets Groups Projects
Unverified Commit fd8582fe authored by Clayton Craft's avatar Clayton Craft :speech_balloon: Committed by Oliver Smith
Browse files

purism-librem5dev: new device (!141)

[skip ci]: build takes pretty long, at least the download timed out
in CI last time. ollieparanoid made sure that this builds before
merging.
parent 03a22d6e
No related branches found
No related tags found
No related merge requests found
Pipeline #195637 skipped
# Reference: <https://postmarketos.org/devicepkg>
pkgname="device-purism-librem5dev"
pkgdesc="Purism Librem 5 Devkit"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="aarch64"
options="!check !archcheck"
depends="postmarketos-base linux-purism-librem5dev uboot-tools u-boot-librem5dev"
makedepends="devicepkg-dev"
source="
deviceinfo
uboot-script.cmd
"
install="$pkgname.post-install"
build() {
mkimage -A arm64 -O linux -T script -C none -a 0 -e 0 -n postmarketos -d "$srcdir/uboot-script.cmd" "$srcdir/boot.scr"
# This disables bluetooth, but enables wifi.
echo "options rsi_91x dev_oper_mode=13 rsi_zone_enabled=1" > "$srcdir/rsi.conf"
devicepkg_build $startdir $pkgname
}
package() {
install -D -m644 "$srcdir"/boot.scr \
"$pkgdir"/boot/boot.scr
install -D -m644 "$srcdir/rsi.conf" "$pkgdir/etc/modprobe.d/rsi.conf"
devicepkg_package $startdir $pkgname
}
sha512sums="154b6d487ba8eb1fd073d8bc9db458e8c0db24a7f78102c225917aa310eda4549c8edcffae6d9d9bb88f418708f90bed461c3c69eea2302df3a6869d7c38a68b deviceinfo
e52cbb518677070d5933d0d1415916b9a570d80f270edab4f14bd193716fd064b389ff1fed5db7efd9966ea953569a7922c5bee6f15405eaa93838e1c01ae2aa uboot-script.cmd"
#!/bin/sh
## Run getty on serial port
sed -i -e "s/#ttyS0::respawn:\/sbin\/getty -L ttyS0 115200 vt100/ttymxc0::respawn:\/sbin\/getty -L ttymxc0 115200 vt100/" /etc/inittab
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell scripts.
deviceinfo_format_version="0"
deviceinfo_name="Purism Librem 5 Devkit"
deviceinfo_manufacturer="Purism"
deviceinfo_codename="purism-librem5dev"
deviceinfo_date=""
deviceinfo_dtb="freescale/librem5-evk"
deviceinfo_modules_initfs=""
deviceinfo_arch="aarch64"
# Device related
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="720"
deviceinfo_screen_height="1440"
deviceinfo_dev_touchscreen=""
deviceinfo_dev_touchscreen_calibration=""
deviceinfo_dev_keyboard=""
deviceinfo_no_framebuffer="true"
# The following is required since this device has builtin ethernet
deviceinfo_disable_dhcpd="true"
# Bootloader related
deviceinfo_flash_method="none"
deviceinfo_generate_legacy_uboot_initfs="true"
deviceinfo_sd_embed_firmware="firmware/librem5dev/u-boot.bin:33,firmware/librem5dev/m4.bin:2"
setenv bootargs init=/init.sh rw console=ttymxc0,115200 earlycon=ec_imx7q,0x30860000,115200 video=HDMI-A-1:1920x1080-32@60 usbcore.autosuspend=-1 PMOS_NO_OUTPUT_REDIRECT PMOS_FORCE_PARTITION_RESIZE
setenv mmcdev 0
setenv mmcpart 1
printenv
echo Loading DTB
ext2load mmc ${mmcdev}:${mmcpart} ${fdt_addr} dtb-purism-librem5dev.dtb
echo Loading Initramfs
ext2load mmc ${mmcdev}:${mmcpart} ${initrd_addr} uInitrd-purism-librem5dev
echo Loading Kernel
ext2load mmc ${mmcdev}:${mmcpart} ${loadaddr} vmlinuz-purism-librem5dev
echo Resizing FDT
fdt addr ${fdt_addr}
fdt resize
echo Booting kernel
booti ${loadaddr} ${initrd_addr} ${fdt_addr}
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