Add Motorola Droid Bionic support.

This commit is contained in:
parazyd 2020-10-20 16:30:42 +02:00
parent 6834e91dce
commit 6da83e3e4c
No known key found for this signature in database
GPG Key ID: 6B636BF0493EE747
6 changed files with 138 additions and 0 deletions

111
boards/bionic.sh Normal file
View File

@ -0,0 +1,111 @@
#!/usr/bin/env zsh
# Copyright (c) 2016-2020 Dyne.org Foundation
# arm-sdk is written and maintained by 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 DROID4
## settings & config
vars+=(device_name arch size parted_type parted_boot parted_root bootfs inittab) vars+=(gitkernel gitbranch)
arrs+=(custmodules)
device_name="bionic"
arch="armhf"
size=1891
inittab=("s0:12345:respawn:/sbin/agetty -L ttyS2 115200 vt100")
parted_type="dos"
parted_boot="8192s 270335s"
parted_root="ext4 270336s 100%"
bootfs="ext2"
extra_packages+=(firmware-ti-connectivity)
custmodules=()
#gitkernel="https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
#gitbranch="v4.16-rc1"
gitkernel="https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git"
gitbranch="linux-4.14.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 -- .
copy-kernel-config
_patchdir="$R/extra/patches/linux-droid4-patches"
_patchset="$(find ${_patchdir} -name '*.patch' | sort)"
for i in "${=_patchset}"; do
patch -p1 < "$i"
done
# compile kernel and modules
make \
$MAKEOPTS \
ARCH=arm \
CROSS_COMPILE=$compiler \
zImage modules omap4-droid-bionic-xt875.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-droid-bionic-xt875.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
}

View File

@ -0,0 +1,6 @@
LABEL=Devuan @release@
PRIORITY=8
DTB=/boot/omap4-droid-bionic-xt875.dtb
KERNEL=/boot/zImage
CMDLINE=console=tty0 console=ttyS2,115200 fbcon=rotate:1 debug earlycon ro rootwait rootfstype=ext4 root=/dev/mmcblk0p2
TIMEOUT=3

View File

@ -0,0 +1,6 @@
Section "InputClass"
Identifier "calibration"
MatchProduct "Atmel maXTouch Touchscreen"
Option "Calibration" "-5 964 1026 -7"
Option "SwapAxes" "1"
EndSection

View File

@ -0,0 +1,14 @@
# interfaces(5) file used by ifup(8) and ifdown(8)
# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'
# Include files from /etc/network/interfaces.d:
# source-directory /etc/network/interfaces.d
auto lo
iface lo inet loopback
allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf

1
sdk
View File

@ -72,6 +72,7 @@ load() {
"n950" "$R/boards/nokia-n950.sh"
"n9" "$R/boards/nokia-n9.sh"
"droid4" "$R/boards/droid4.sh"
"bionic" "$R/boards/bionic.sh"
"odroidxu" "$R/boards/odroid-xu.sh"
"odroidxu4" "$R/boards/odroid-xu4.sh"
"ouya" "$R/boards/ouya.sh"