Verified Commit 698a4905 authored by JuniorJPDJ's avatar JuniorJPDJ Committed by Alexey Min
Browse files

lark-freeme-70-2s: new device (MR 2040)

still missing:
* touchscreen driver
* front camera

[ci:skip-build] Already built fine on CI
parent 34b1b440
Pipeline #277644602 passed with stages
in 1 minute and 22 seconds
# Maintainer: Jacek Pruciak <pmos@juniorjpdj.pl>
# Reference: <https://postmarketos.org/devicepkg>
pkgname=device-lark-freeme-70-2s
pkgdesc="Lark FreeMe 70.2S"
pkgver=0.1
pkgrel=0
url="https://postmarketos.org"
license="MIT"
arch="armv7"
options="!check !archcheck"
depends="
linux-postmarketos-allwinner
mesa-egl
mesa-dri-gallium
postmarketos-base
u-boot-tools
u-boot-lark-freeme-70-2s
"
makedepends="devicepkg-dev linux-postmarketos-allwinner"
source="
deviceinfo
u-boot-script.cmd
"
subpackages="$pkgname-nonfree-firmware:nonfree_firmware"
build() {
devicepkg_build $startdir $pkgname
mkimage \
-A arm \
-O linux \
-T script \
-C none \
-a 0 \
-e 0 \
-n postmarketos \
-d "$srcdir"/u-boot-script.cmd \
"$srcdir"/boot.scr
}
package() {
devicepkg_package $startdir $pkgname
# U-Boot boot script
install -Dm644 "$srcdir"/boot.scr \
"$pkgdir"/boot/boot.scr
# Device Tree - temporary workaround: copy from kernel package
install -Dm644 /usr/share/dtb/sun4i-a10-lark-freeme-70-2s.dtb \
"$pkgdir"/boot/dtbs-postmarketos-allwinner/sun4i-a10-lark-freeme-70-2s.dtb
}
nonfree_firmware() {
pkgdesc="Wifi firmware (rtl8188ctv)"
depends="linux-firmware-rtlwifi"
mkdir "$subpkgdir"
}
sha512sums="d1560628106729da53886ab98262fdab2cf85c96279274f83451fa783e3e9f0431166971a511259096d44ea34b03fd0394bef88318e2dd337ede550e77a88727 deviceinfo
26751c01bd998545b60d45f373e6d8356120ee2e49f923e85e1413b34a3aa1bdf9c84a04aac43c487d587e614710f7ade5a293c83a551cf7e3b2a4a90b076420 u-boot-script.cmd"
# Reference: <https://postmarketos.org/deviceinfo>
# Please use double quotes only. You can source this file in shell
# scripts.
deviceinfo_format_version="0"
deviceinfo_name="Lark FreeMe 70.2S"
deviceinfo_manufacturer="Lark"
deviceinfo_codename="lark-freeme-70-2s"
deviceinfo_year="2012"
deviceinfo_dtb=""
deviceinfo_modules_initfs=""
deviceinfo_arch="armv7"
deviceinfo_mesa_driver="sun4i-drm"
# Device related
deviceinfo_chassis="tablet"
deviceinfo_keyboard="false"
deviceinfo_external_storage="true"
deviceinfo_screen_width="800"
deviceinfo_screen_height="480"
# Bootloader related
deviceinfo_flash_method="none"
deviceinfo_sd_embed_firmware="u-boot/lark-freeme-70-2s/u-boot-sunxi-with-spl.bin:8"
# USB related
deviceinfo_usb_idVendor="0x1f3a" # Allwinner Technology Co., Ltd.
deviceinfo_usb_idProduct="0x1007" # reference Android device
setenv kernel-flavor postmarketos-allwinner
setenv bootargs init=/init.sh rw console=tty1 panic=10 consoleblank=0 loglevel=1 PMOS_FORCE_PARTITION_RESIZE pmos_boot=/dev/mmcblk0p1 pmos_root=/dev/mmcblk0p2
echo Loading DTB: dtbs-${kernel-flavor}/${fdtfile}
load mmc 0:1 ${fdt_addr_r} dtbs-${kernel-flavor}/${fdtfile}
echo Resizing FDT
fdt addr ${fdt_addr_r}
fdt resize
echo Loading Kernel: vmlinuz-${kernel-flavor}
load mmc 0:1 ${kernel_addr_r} vmlinuz-${kernel-flavor}
echo Loading Initramfs: initramfs-${kernel-flavor}
load mmc 0:1 ${ramdisk_addr_r} initramfs-${kernel-flavor}
echo Booting kernel
bootz ${kernel_addr_r} ${ramdisk_addr_r}:${filesize} ${fdt_addr_r}
sleep 10
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment