tInitial attempt at pocophone-f1 support. - arm-sdk - os build toolkit for various embedded devices
HTML git clone https://git.parazyd.org/arm-sdk
DIR Log
DIR Files
DIR Refs
DIR Submodules
DIR README
DIR LICENSE
---
DIR commit 8db5c9397b33b9644a6f92ac8091631f9973837b
DIR parent ee3d790b61c77663836ede53094e5daeeb96b408
HTML Author: venji10 <venji10@riseup.net>
Date: Wed, 10 Feb 2021 20:06:41 +0100
Initial attempt at pocophone-f1 support.
Diffstat:
A boards/pocophone-f1.sh | 102 +++++++++++++++++++++++++++++++
1 file changed, 102 insertions(+), 0 deletions(-)
---
DIR diff --git a/boards/pocophone-f1.sh b/boards/pocophone-f1.sh
t@@ -0,0 +1,102 @@
+#!/usr/bin/env zsh
+# Copyright (c) 2016-2021 Ivan J. <parazyd@dyne.org>
+# This file is part of arm-sdk
+#
+# This source code is free software: you can redistribute it and/or modify
+# it under the terms of the GNU General Public License as published by
+# the Free Software Foundation, either version 3 of the License, or
+# (at your option) any later version.
+#
+# This software is distributed in the hope that it will be useful,
+# but WITHOUT ANY WARRANTY; without even the implied warranty of
+# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+# GNU General Public License for more details.
+#
+# You should have received a copy of the GNU General Public License
+# along with this source code. If not, see <http://www.gnu.org/licenses/>.
+
+vars+=(device_name arch size parted_type parted_boot parted_root bootfs inittab)
+vars+=(gitkernel gitbranch)
+arrs+=(custmodules)
+
+device_name="pocophone-f1"
+arch="arm64"
+size=1891
+inittab=("T0:23:respawn:/sbin/agetty -L ttyAMA0 115200 vt100")
+
+parted_type="dos"
+bootfs="vfat"
+rootfs="ext4"
+dos_boot="fat32 2048s 264191s"
+dos_root="$rootfs 24192s 100%"
+
+extra_packages+=()
+custmodules=()
+
+gitkernel="https://gitlab.com/venji10/linux-beryllium"
+gitbranch="beryllium-panel-ebbg"
+
+prebuild() {
+ fn prebuild
+ req=(device_name strapdir)
+ ckreq || return 1
+
+ notice "Executing $device_name prebuild"
+
+ mkdir -p "$R/tmp/kernels/$device_name"
+}
+
+postbuild() {
+ fn postbuild
+
+ notice "Executing $device_name postbuild"
+
+ copy-root-overlay
+
+ pushd "$R/tmp/kernels/$device_name/${device_name}-linux"
+
+ cat Image.gz dts/qcom/sdm845-xiaomi-beryllium-ebbg.dtb > Image.gz-dtb || { zerr; return 1; }
+
+ mkbootimg \
+ --kernel Image.gz-dtb \
+ --base 0x00000000 \
+ --second_offset 0x00f00000 \
+ --kernel_offset 0x00008000 \
+ --ramdisk_offset 0x01000000 \
+ --tags_offset 0x00000100 \
+ --pagesize 4096 \
+ --cmdline "root=LABEL=ALARM rw audit=0" \
+ -o $R/boot/boot.img || { zerr; return 1; }
+
+ popd
+
+}
+
+build_kernel_arm64() {
+ fn build_kernel_arm64
+ req=(R arch device_name gitkernel gitbranch strapdir)
+ ckreq || return 1
+
+ notice "Building $arch kernel"
+
+ prebuild || { zerr; return 1; }
+
+ get-kernel-sources || { zerr; return 1; }
+
+ pushd "$R/tmp/kernels/$device_name/${device_name}-linux"
+ make \
+ $MAKEOPTS \
+ ARCH=arm64 \
+ CROSS_COMPILE=$compiler \
+ beryllium_defconfig || { zerr; return 1; }
+
+ make \
+ $MAKEOPTS \
+ ARCH=arm64 \
+ CROSS_COMPILE=$compiler \
+ Image.gz modules qcom/sdm845-xiaomi-beryllium-ebbg.dtb || { zerr; return 1; }
+
+ popd
+
+ postbuild || { zerr; return 1; }
+}