commit a60b17da108b60cf3591233f1c3fd09dced7cfae
parent 6048b97e6248b24b3d858f7172516e4a40447281
Author: parazyd <parazyd@dyne.org>
Date: Sun, 12 Dec 2021 13:57:57 +0100
boards: Add droid3.
Diffstat:
A | boards/droid3.sh | | | 109 | +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ |
M | sdk | | | 1 | + |
2 files changed, 110 insertions(+), 0 deletions(-)
diff --git a/boards/droid3.sh b/boards/droid3.sh
@@ -0,0 +1,109 @@
+#!/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/>.
+
+## kernel build script for Motorola DROID3
+
+## settings & config
+vars+=(device_name arch size parted_type parted_boot parted_root bootfs inittab)
+vars+=(gitkernel gitbranch)
+arrs+=(custmodules)
+
+device_name="droid3"
+arch="armhf"
+size=1891
+inittab=("s0:12345:respawn:/sbin/agetty -L ttyS2 115200 vt100")
+
+parted_type="dos"
+bootfs="ext2"
+rootfs="ext4"
+dos_boot="$bootfs 8192s 270335s"
+dos_root="$rootfs 270336s 100%"
+
+extra_packages+=(firmware-ti-connectivity)
+custmodules=()
+
+gitkernel="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"
+gitbranch="linux-5.15.y"
+
+
+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
+
+ if [[ -e "$strapdir/boot/boot/boot.cfg" ]]; then
+ sudo sed -e "s/@release@/${release}/" -i "$strapdir/boot/boot/boot.cfg"
+ fi
+}
+
+build_kernel_${arch}() {
+ fn build_kernel_${arch}
+ req=(R arch device_name gitkernel gitbranch MAKEOPTS)
+ req+=(strapdir)
+ req+=(loopdevice)
+ ckreq || return 1
+
+ notice "building $arch kernel"
+
+ prebuild || zerr
+
+ get-kernel-sources
+ pushd $R/tmp/kernels/$device_name/${device_name}-linux
+ git checkout -- .
+
+ # compile kernel and modules
+ make \
+ $MAKEOPTS \
+ ARCH=arm \
+ CROSS_COMPILE=$compiler \
+ omap2plus_defconfig || zerr
+
+ make \
+ $MAKEOPTS \
+ ARCH=arm \
+ CROSS_COMPILE=$compiler \
+ zImage modules omap4-droid3-xt862.dtb || zerr
+
+ sudo mkdir -p "$strapdir/boot/boot/"
+ sudo cp -v arch/arm/boot/zImage "$strapdir/boot/boot" || zerr
+ sudo cp -v arch/arm/boot/dts/omap4-droid3-xt862.dtb "$strapdir/boot/boot" || zerr
+
+ # install kernel modules
+ sudo -E PATH="$PATH" \
+ make \
+ $MAKEOPTS \
+ ARCH=arm \
+ CROSS_COMPILE=$compiler \
+ INSTALL_MOD_PATH=$strapdir \
+ INSTALL_MOD_STRIP=1 \
+ modules_install || zerr
+ popd
+
+ postbuild || zerr
+}
diff --git a/sdk b/sdk
@@ -69,6 +69,7 @@ load() {
"n900" "$R/boards/nokia-n900.sh"
"n950" "$R/boards/nokia-n950.sh"
"n9" "$R/boards/nokia-n9.sh"
+ "droid3" "$R/boards/droid3.sh"
"droid4" "$R/boards/droid4.sh"
"bionic" "$R/boards/bionic.sh"
"odroidxu" "$R/boards/odroid-xu.sh"