mirror of https://github.com/parazyd/arm-sdk.git
Initial attempt at pocophone-f1 support.
This commit is contained in:
parent
ee3d790b61
commit
8db5c9397b
|
|
@ -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; }
|
||||
}
|
||||
Loading…
Reference in New Issue