Newer
Older
Robert Nelson
committed
#!/bin/sh -e
Robert Nelson
committed
# Copyright (c) 2009-2016 Robert Nelson <robertcnelson@gmail.com>
#
# Permission is hereby granted, free of charge, to any person obtaining a copy
# of this software and associated documentation files (the "Software"), to deal
# in the Software without restriction, including without limitation the rights
# to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
# copies of the Software, and to permit persons to whom the Software is
# furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
# AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
# OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
# THE SOFTWARE.
# Split out, so build_kernel.sh and build_deb.sh can share..
Robert Nelson
committed
. ${DIR}/version.sh
Robert Nelson
committed
git_bin=$(which git)
#git hard requirements:
#git: --no-edit
Robert Nelson
committed
git="${git_bin} am"
Robert Nelson
committed
#git_patchset=""
#git_opts
Robert Nelson
committed
git="${git_bin} apply"
Robert Nelson
committed
${git_bin} add .
${git_bin} commit -a -m 'testing patchset'
Robert Nelson
committed
git="${git_bin} am --whitespace=fix"
Robert Nelson
committed
if [ "x${wdir}" = "x" ] ; then
Robert Nelson
committed
${git_bin} format-patch -${number} -o ${DIR}/patches/
Robert Nelson
committed
else
if [ ! -d ${DIR}/patches/${wdir}/ ] ; then
mkdir -p ${DIR}/patches/${wdir}/
fi
Robert Nelson
committed
${git_bin} format-patch -${number} -o ${DIR}/patches/${wdir}/
Robert Nelson
committed
unset wdir
fi
Robert Nelson
committed
exit 2
cherrypick () {
if [ ! -d ../patches/${cherrypick_dir} ] ; then
mkdir -p ../patches/${cherrypick_dir}
Robert Nelson
committed
fi
Robert Nelson
committed
${git_bin} format-patch -1 ${SHA} --start-number ${num} -o ../patches/${cherrypick_dir}
Robert Nelson
committed
num=$(($num+1))
}
Robert Nelson
committed
external_git () {
git_tag=""
echo "pulling: ${git_tag}"
Robert Nelson
committed
${git_bin} pull --no-edit ${git_patchset} ${git_tag}
Robert Nelson
committed
}
aufs_fail () {
echo "aufs4 failed"
exit 2
}
aufs4 () {
echo "dir: aufs4"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
wget https://raw.githubusercontent.com/sfjro/aufs4-standalone/aufs${KERNEL_REL}/aufs4-kbuild.patch
patch -p1 < aufs4-kbuild.patch || aufs_fail
rm -rf aufs4-kbuild.patch
Robert Nelson
committed
${git_bin} add .
${git_bin} commit -a -m 'merge: aufs4-kbuild' -s
wget https://raw.githubusercontent.com/sfjro/aufs4-standalone/aufs${KERNEL_REL}/aufs4-base.patch
patch -p1 < aufs4-base.patch || aufs_fail
rm -rf aufs4-base.patch
Robert Nelson
committed
${git_bin} add .
${git_bin} commit -a -m 'merge: aufs4-base' -s
wget https://raw.githubusercontent.com/sfjro/aufs4-standalone/aufs${KERNEL_REL}/aufs4-mmap.patch
patch -p1 < aufs4-mmap.patch || aufs_fail
rm -rf aufs4-mmap.patch
Robert Nelson
committed
${git_bin} add .
${git_bin} commit -a -m 'merge: aufs4-mmap' -s
wget https://raw.githubusercontent.com/sfjro/aufs4-standalone/aufs${KERNEL_REL}/aufs4-standalone.patch
patch -p1 < aufs4-standalone.patch || aufs_fail
rm -rf aufs4-standalone.patch
Robert Nelson
committed
${git_bin} add .
${git_bin} commit -a -m 'merge: aufs4-standalone' -s
Robert Nelson
committed
${git_bin} format-patch -4 -o ../patches/aufs4/
Robert Nelson
committed
cd ../
if [ ! -f ./aufs4-standalone ] ; then
Robert Nelson
committed
${git_bin} clone https://github.com/sfjro/aufs4-standalone
Robert Nelson
committed
cd ./aufs4-standalone
Robert Nelson
committed
${git_bin} checkout origin/aufs${KERNEL_REL} -b tmp
Robert Nelson
committed
cd ../
else
rm -rf ./aufs4-standalone || true
${git_bin} clone https://github.com/sfjro/aufs4-standalone
cd ./aufs4-standalone
${git_bin} checkout origin/aufs${KERNEL_REL} -b tmp
cd ../
Robert Nelson
committed
fi
cd ./KERNEL/
cp -v ../aufs4-standalone/Documentation/ABI/testing/*aufs ./Documentation/ABI/testing/
mkdir -p ./Documentation/filesystems/aufs/
cp -rv ../aufs4-standalone/Documentation/filesystems/aufs/* ./Documentation/filesystems/aufs/
mkdir -p ./fs/aufs/
cp -v ../aufs4-standalone/fs/aufs/* ./fs/aufs/
cp -v ../aufs4-standalone/include/uapi/linux/aufs_type.h ./include/uapi/linux/
Robert Nelson
committed
${git_bin} add .
${git_bin} commit -a -m 'merge: aufs4' -s
${git_bin} format-patch -5 -o ../patches/aufs4/
Robert Nelson
committed
exit 2
Robert Nelson
committed
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/aufs4/0001-merge-aufs4-kbuild.patch"
${git} "${DIR}/patches/aufs4/0002-merge-aufs4-base.patch"
${git} "${DIR}/patches/aufs4/0003-merge-aufs4-mmap.patch"
${git} "${DIR}/patches/aufs4/0004-merge-aufs4-standalone.patch"
Robert Nelson
committed
${git} "${DIR}/patches/aufs4/0005-merge-aufs4.patch"
Robert Nelson
committed
rt_cleanup () {
echo "rt: needs fixup"
exit 2
}
rt () {
echo "dir: rt"
rt_patch="${KERNEL_REL}${kernel_rt}"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
wget -c https://www.kernel.org/pub/linux/kernel/projects/rt/${KERNEL_REL}/patch-${rt_patch}.patch.xz
xzcat patch-${rt_patch}.patch.xz | patch -p1 || rt_cleanup
rm -f patch-${rt_patch}.patch.xz
rm -f localversion-rt
Robert Nelson
committed
${git_bin} add .
${git_bin} commit -a -m 'merge: CONFIG_PREEMPT_RT Patch Set' -s
${git_bin} format-patch -1 -o ../patches/rt/
Robert Nelson
committed
exit 2
fi
${git} "${DIR}/patches/rt/0001-merge-CONFIG_PREEMPT_RT-Patch-Set.patch"
}
Robert Nelson
committed
local_patch () {
echo "dir: dir"
${git} "${DIR}/patches/dir/0001-patch.patch"
}
Robert Nelson
committed
#external_git
Robert Nelson
committed
#local_patch
Robert Nelson
committed
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
pre_backports () {
echo "dir: backports/${subsystem}"
cd ~/linux-src/
${git_bin} pull --no-edit https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git master
${git_bin} pull --no-edit https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux-stable.git master --tags
${git_bin} pull --no-edit https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git master --tags
if [ ! "x${backport_tag}" = "x" ] ; then
${git_bin} checkout ${backport_tag} -b tmp
fi
cd -
}
post_backports () {
if [ ! "x${backport_tag}" = "x" ] ; then
cd ~/linux-src/
${git_bin} checkout master -f ; ${git_bin} branch -D tmp
cd -
fi
${git_bin} add .
${git_bin} commit -a -m "backports: ${subsystem}: from: linux.git" -s
if [ ! -d ../patches/backports/${subsystem}/ ] ; then
mkdir -p ../patches/backports/${subsystem}/
fi
${git_bin} format-patch -1 -o ../patches/backports/${subsystem}/
exit 2
}
patch_backports (){
echo "dir: backports/${subsystem}"
${git} "${DIR}/patches/backports/${subsystem}/0001-backports-${subsystem}-from-linux.git.patch"
}
backports () {
Robert Nelson
committed
Robert Nelson
committed
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
pre_backports
Robert Nelson
committed
post_backports
fi
patch_backports
}
reverts () {
echo "dir: reverts"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
#https://github.com/torvalds/linux/commit/00f0ea70d2b82b7d7afeb1bdedc9169eb8ea6675
#
#Causes bone_capemgr to get stuck on slot 1 and just eventually exit "without" checking slot2/3/4...
#
#[ 5.406775] bone_capemgr bone_capemgr: Baseboard: 'A335BNLT,00C0,2516BBBK2626'
#[ 5.414178] bone_capemgr bone_capemgr: compatible-baseboard=ti,beaglebone-black - #slots=4
#[ 5.422573] bone_capemgr bone_capemgr: Failed to add slot #1
${git} "${DIR}/patches/reverts/0001-Revert-eeprom-at24-check-if-the-chip-is-functional-i.patch"
fixes () {
echo "dir: fixes"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/fixes/0001-kbuild-add-fno-PIE.patch"
${git} "${DIR}/patches/fixes/0002-kbuild-modversions-for-EXPORT_SYMBOL-for-asm.patch"
${git} "${DIR}/patches/fixes/0003-kbuild-provide-include-asm-asm-prototypes.h-for-ARM.patch"
#v4.9.0-rc3:
${git} "${DIR}/patches/fixes/0004-ARM-wire-up-new-pkey-syscalls.patch"
if [ "x${regenerate}" = "xenable" ] ; then
cleanup
fi
}
drivers () {
echo "dir: drivers/spi"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/drivers/spi/0001-NFM-spi-spidev-allow-use-of-spidev-in-DT.patch"
if [ "x${regenerate}" = "xenable" ] ; then
wdir="drivers/spi"
number=1
cleanup
echo "dir: drivers/pm_opp"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/drivers/pm_opp/0001-PM-OPP-Reword-binding-supporting-multiple-regulators.patch"
${git} "${DIR}/patches/drivers/pm_opp/0002-PM-OPP-Don-t-use-OPP-structure-outside-of-rcu-protec.patch"
${git} "${DIR}/patches/drivers/pm_opp/0003-PM-OPP-Manage-supply-s-voltage-current-in-a-separate.patch"
${git} "${DIR}/patches/drivers/pm_opp/0004-PM-OPP-Pass-struct-dev_pm_opp_supply-to-_set_opp_vol.patch"
${git} "${DIR}/patches/drivers/pm_opp/0005-PM-OPP-Add-infrastructure-to-manage-multiple-regulat.patch"
${git} "${DIR}/patches/drivers/pm_opp/0006-PM-OPP-Separate-out-_generic_opp_set_rate.patch"
${git} "${DIR}/patches/drivers/pm_opp/0007-PM-OPP-Allow-platform-specific-custom-set_opp-callba.patch"
${git} "${DIR}/patches/drivers/pm_opp/0008-PM-OPP-Don-t-WARN-on-multiple-calls-to-dev_pm_opp_se.patch"
${git} "${DIR}/patches/drivers/pm_opp/0009-PM-OPP-Don-t-assume-platform-doesn-t-have-regulators.patch"
if [ "x${regenerate}" = "xenable" ] ; then
wdir="drivers/pm_opp"
cleanup
fi
echo "dir: drivers/tps65218"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/drivers/tps65218/0001-mfd-tps65218-Remove-redundant-read-wrapper.patch"
${git} "${DIR}/patches/drivers/tps65218/0002-Documentation-regulator-tps65218-Update-examples.patch"
${git} "${DIR}/patches/drivers/tps65218/0003-input-tps65218-pwrbutton-Add-platform_device_id-tabl.patch"
${git} "${DIR}/patches/drivers/tps65218/0004-mfd-tps65218-Use-mfd_add_devices-instead-of-of_platf.patch"
${git} "${DIR}/patches/drivers/tps65218/0005-regulator-tps65218-Remove-all-the-compatibles.patch"
${git} "${DIR}/patches/drivers/tps65218/0006-ARM-dts-tps65217-Specify-the-interrupt-controller.patch"
${git} "${DIR}/patches/drivers/tps65218/0007-ARM-dts-tps65217-Add-the-charger-device.patch"
${git} "${DIR}/patches/drivers/tps65218/0008-ARM-dts-tps65217-Add-the-power-button-device.patch"
${git} "${DIR}/patches/drivers/tps65218/0009-ARM-dts-am335x-Support-the-PMIC-interrupt.patch"
${git} "${DIR}/patches/drivers/tps65218/0010-dt-bindings-mfd-Provide-human-readable-defines-for-T.patch"
${git} "${DIR}/patches/drivers/tps65218/0011-ARM-dts-am335x-Add-the-charger-interrupt.patch"
${git} "${DIR}/patches/drivers/tps65218/0012-ARM-dts-am335x-Add-the-power-button-interrupt.patch"
${git} "${DIR}/patches/drivers/tps65218/0013-mfd-tps65217-Fix-mismatched-interrupt-number.patch"
${git} "${DIR}/patches/drivers/tps65218/0014-HACK-tps65217_pwr_but.patch"
if [ "x${regenerate}" = "xenable" ] ; then
wdir="drivers/tps65218"
echo "dir: drivers/ti/iodelay"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/drivers/ti/iodelay/0001-pinctrl-bindings-pinctrl-Add-support-for-TI-s-IODela.patch"
${git} "${DIR}/patches/drivers/ti/iodelay/0002-pinctrl-Introduce-TI-IOdelay-configuration-driver.patch"
${git} "${DIR}/patches/drivers/ti/iodelay/0003-ARM-dts-dra7-Add-iodelay-module.patch"
if [ "x${regenerate}" = "xenable" ] ; then
wdir="drivers/ti/iodelay"
number=3
cleanup
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/drivers/ti/uio/0001-Making-the-uio-pruss-driver-work.patch"
if [ "x${regenerate}" = "xenable" ] ; then
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/drivers/ti/rpmsg/0001-ARM-samples-seccomp-no-m32.patch"
#https://github.com/pantoniou/linux-beagle-track-mainline/tree/bbb-overlays
echo "dir: drivers/ti/bbb_overlays"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0001-scripts-dtc-Update-to-upstream-version-1.4.1-Overlay.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0002-gitignore-Ignore-DTB-files.patch"
if [ "x${regenerate}" = "xenable" ] ; then
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0003-add-PM-firmware.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0004-ARM-CUSTOM-Build-a-uImage-with-dtb-already-appended.patch"
fi
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0005-omap-Fix-crash-when-omap-device-is-disabled.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0006-serial-omap-Fix-port-line-number-without-aliases.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0007-tty-omap-serial-Fix-up-platform-data-alloc.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0008-of-Custom-printk-format-specifier-for-device-node.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0009-of-overlay-kobjectify-overlay-objects.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0010-of-overlay-global-sysfs-enable-attribute.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0011-Documentation-ABI-overlays-global-attributes.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0012-Documentation-document-of_overlay_disable-parameter.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0013-of-overlay-add-per-overlay-sysfs-attributes.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0014-Documentation-ABI-overlays-per-overlay-docs.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0015-of-dynamic-Add-__of_node_dupv.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0016-of-changesets-Introduce-changeset-helper-methods.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0017-of-changeset-Add-of_changeset_node_move-method.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0018-of-unittest-changeset-helpers.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0019-OF-DT-Overlay-configfs-interface-v7.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0020-ARM-DT-Enable-symbols-when-CONFIG_OF_OVERLAY-is-used.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0021-misc-Beaglebone-capemanager.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0022-doc-misc-Beaglebone-capemanager-documentation.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0023-doc-dt-beaglebone-cape-manager-bindings.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0024-doc-ABI-bone_capemgr-sysfs-API.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0025-MAINTAINERS-Beaglebone-capemanager-maintainer.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0026-arm-dts-Enable-beaglebone-cape-manager.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0027-of-overlay-Implement-target-index-support.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0028-of-unittest-Add-indirect-overlay-target-test.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0029-doc-dt-Document-the-indirect-overlay-method.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0030-of-overlay-Introduce-target-root-capability.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0031-of-unittest-Unit-tests-for-target-root-overlays.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0032-doc-dt-Document-the-target-root-overlay-method.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0033-RFC-Device-overlay-manager-PCI-USB-DT.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0034-of-rename-_node_sysfs-to-_node_post.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0035-of-Support-hashtable-lookups-for-phandles.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0036-of-unittest-hashed-phandles-unitest.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0037-of-overlay-Pick-up-label-symbols-from-overlays.patch"
if [ "x${regenerate}" = "xenable" ] ; then
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0038-of-Portable-Device-Tree-connector.patch"
${git} "${DIR}/patches/drivers/ti/bbb_overlays/0039-boneblack-defconfig.patch"
fi
if [ "x${regenerate}" = "xenable" ] ; then
wdir="drivers/ti/bbb_overlays"
number=39
cleanup
fi
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/drivers/ti/cpsw/0001-cpsw-search-for-phy.patch"
if [ "x${regenerate}" = "xenable" ] ; then
wdir="drivers/ti/cpsw"
number=1
soc () {
echo "dir: soc/exynos"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/exynos/0001-exynos5422-artik10.patch"
if [ "x${regenerate}" = "xenable" ] ; then
wdir="soc/exynos"
number=1
cleanup
fi
echo "dir: soc/imx/udoo"
if [ "x${regenerate}" = "xenable" ] ; then
${git} "${DIR}/patches/soc/imx/udoo/0001-binding-doc-power-pwrseq-generic-add-binding-doc-for.patch"
${git} "${DIR}/patches/soc/imx/udoo/0002-power-add-power-sequence-library.patch"
${git} "${DIR}/patches/soc/imx/udoo/0003-binding-doc-usb-usb-device-add-optional-properties-f.patch"
${git} "${DIR}/patches/soc/imx/udoo/0004-usb-core-add-power-sequence-handling-for-USB-devices.patch"
${git} "${DIR}/patches/soc/imx/udoo/0005-usb-chipidea-let-chipidea-core-device-of_node-equal-.patch"
${git} "${DIR}/patches/soc/imx/udoo/0006-ARM-dts-imx6qdl-Enable-usb-node-children-with-reg.patch"
${git} "${DIR}/patches/soc/imx/udoo/0007-ARM-dts-imx6qdl-udoo.dtsi-fix-onboard-USB-HUB-proper.patch"
${git} "${DIR}/patches/soc/imx/udoo/0008-ARM-dts-imx6q-evi-Fix-onboard-hub-reset-line.patch"
echo "dir: soc/imx/wandboard"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
Robert Nelson
committed
${git} "${DIR}/patches/soc/imx/wandboard/0001-ARM-i.MX6-Wandboard-add-wifi-bt-rfkill-driver.patch"
${git} "${DIR}/patches/soc/imx/wandboard/0002-ARM-dts-wandboard-add-binding-for-wand-rfkill-driver.patch"
Robert Nelson
committed
if [ "x${regenerate}" = "xenable" ] ; then
wdir="soc/imx/wandboard"
number=2
cleanup
fi
Robert Nelson
committed
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/imx/0001-first-pass-imx6q-ccimx6sbc.patch"
${git} "${DIR}/patches/soc/imx/0002-mcimx6ul-bb-and-ism43362-b81-evb.patch"
if [ "x${regenerate}" = "xenable" ] ; then
cleanup
fi
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/sunxi/0001-ethernet-add-sun8i-emac-driver.patch"
${git} "${DIR}/patches/soc/sunxi/0002-MAINTAINERS-Add-myself-as-maintainers-of-sun8i-emac.patch"
${git} "${DIR}/patches/soc/sunxi/0003-ARM-sun8i-dt-Add-DT-bindings-documentation-for-Allwi.patch"
${git} "${DIR}/patches/soc/sunxi/0004-ARM-dts-sun8i-h3-add-sun8i-emac-ethernet-driver.patch"
${git} "${DIR}/patches/soc/sunxi/0005-ARM-dts-sun8i-Enable-sun8i-emac-on-the-Orange-PI-PC.patch"
${git} "${DIR}/patches/soc/sunxi/0006-ARM-dts-sun8i-Enable-sun8i-emac-on-the-Orange-PI-One.patch"
${git} "${DIR}/patches/soc/sunxi/0007-ARM-dts-sun8i-Add-ethernet0-alias-for-h3-emac.patch"
if [ "x${regenerate}" = "xenable" ] ; then
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/ti/0001-sync-with-ti-4.4.patch"
${git} "${DIR}/patches/soc/ti/0002-ARM-dts-omap3-beagle-add-i2c2.patch"
${git} "${DIR}/patches/soc/ti/0003-ARM-dts-omap3-beagle-xm-spidev.patch"
${git} "${DIR}/patches/soc/ti/0004-ARM-DTS-omap3-beagle.dts-enable-twl4030-power-reset.patch"
${git} "${DIR}/patches/soc/ti/0005-arm-dts-omap4-move-emif-so-panda-es-b3-now-boots.patch"
${git} "${DIR}/patches/soc/ti/0006-omap3-beagle-fixes.patch"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/ti/bone_common/0001-ARM-dts-am335x-bone-common-update-leds-to-match-3.8..patch"
${git} "${DIR}/patches/soc/ti/bone_common/0002-ARM-dts-am335x-bone-common-add-collision-and-carrier.patch"
${git} "${DIR}/patches/soc/ti/bone_common/0003-ARM-dts-am335x-bone-common-disable-running-JTAG.patch"
${git} "${DIR}/patches/soc/ti/bone_common/0004-ARM-dts-am335x-bone-common-overlays.patch"
${git} "${DIR}/patches/soc/ti/bone_common/0005-ARM-dts-am335x-bone-common-rtc-defined-in-common.patch"
if [ "x${regenerate}" = "xenable" ] ; then
wdir="soc/ti/bone_common"
cleanup
fi
echo "dir: soc/ti/bbg"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/ti/bbg/0001-NFM-ARM-dts-am335x-bonegreen.dts-disable-usart-for-o.patch"
Robert Nelson
committed
number=1
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/ti/bbgw/0001-ARM-dts-add-am335x-bonegreen-wireless.dtb.patch"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/ti/bbbw/0001-ARM-dts-add-am335x-boneblack-wireless.dtb.patch"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/ti/blue/0001-ARM-dts-add-am335x-boneblue.dtb.patch"
if [ "x${regenerate}" = "xenable" ] ; then
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/ti/sancloud/0001-add-am335x-sancloud-bbe.patch"
if [ "x${regenerate}" = "xenable" ] ; then
wdir="soc/ti/sancloud"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/soc/ti/tre/0001-add-am335x-arduino-tre.dts.patch"
if [ "x${regenerate}" = "xenable" ] ; then
wdir="soc/ti/tre"
number=1
cleanup
fi
}
dtb_makefile_append () {
sed -i -e 's:am335x-boneblack.dtb \\:am335x-boneblack.dtb \\\n\t'$device' \\:g' arch/arm/boot/dts/Makefile
}
beaglebone () {
echo "dir: beaglebone/pinmux-helper"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/beaglebone/pinmux-helper/0001-BeagleBone-pinmux-helper.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0002-pinmux-helper-Add-runtime-configuration-capability.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0003-pinmux-helper-Switch-to-using-kmalloc.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0004-gpio-Introduce-GPIO-OF-helper.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0005-Add-dir-changeable-property-to-gpio-of-helper.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0006-am33xx.dtsi-add-ocp-label.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0007-beaglebone-added-expansion-header-to-dtb.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0008-bone-pinmux-helper-Add-support-for-mode-device-tree-.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0009-pinmux-helper-add-P8_37_pinmux-P8_38_pinmux.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0010-pinmux-helper-hdmi.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0011-pinmux-helper-can1.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0012-Remove-CONFIG_EXPERIMENTAL-dependency-on-CONFIG_GPIO.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0013-pinmux-helper-add-P9_19_pinmux-P9_20_pinmux.patch"
${git} "${DIR}/patches/beaglebone/pinmux-helper/0014-gpio-of-helper-idr_alloc.patch"
if [ "x${regenerate}" = "xenable" ] ; then
wdir="beaglebone/pinmux-helper"
number=14
echo "dir: beaglebone/abbbi"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/beaglebone/abbbi/0001-gpu-drm-i2c-add-alternative-adv7511-driver-with-audi.patch"
${git} "${DIR}/patches/beaglebone/abbbi/0002-gpu-drm-i2c-adihdmi-componentize-driver-and-huge-ref.patch"
${git} "${DIR}/patches/beaglebone/abbbi/0003-ARM-dts-add-Arrow-BeagleBone-Black-Industrial-dts.patch"
${git} "${DIR}/patches/beaglebone/abbbi/0004-drm-adihdmi-Drop-dummy-save-restore-hooks.patch"
${git} "${DIR}/patches/beaglebone/abbbi/0005-drm-adihdmi-Pass-name-to-drm_encoder_init.patch"
${git} "${DIR}/patches/beaglebone/abbbi/0006-adihdmi_drv-reg_default-reg_sequence.patch"
if [ "x${regenerate}" = "xenable" ] ; then
number=6
cleanup
fi
echo "dir: beaglebone/am335x_olimex_som"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/beaglebone/am335x_olimex_som/0001-ARM-dts-Add-support-for-Olimex-AM3352-SOM.patch"
if [ "x${regenerate}" = "xenable" ] ; then
number=1
cleanup
fi
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
${git} "${DIR}/patches/beaglebone/capes/0001-cape-Argus-UPS-cape-support.patch"
${git} "${DIR}/patches/beaglebone/capes/0002-ARM-dts-am335x-boneblack-enable-wl1835mod-cape-suppo.patch"
${git} "${DIR}/patches/beaglebone/capes/0003-add-am335x-boneblack-bbbmini.dts.patch"
${git} "${DIR}/patches/beaglebone/capes/0004-add-lcd-am335x-boneblack-bbb-exp-c.dtb-am335x-bonebl.patch"
${git} "${DIR}/patches/beaglebone/capes/0005-bb-audio-cape.patch"
#Replicape use am335x-boneblack-overlay.dtb???
#This has to be last...
echo "dir: beaglebone/dtbs"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
patch -p1 < "${DIR}/patches/beaglebone/dtbs/0001-sync-am335x-peripheral-pinmux.patch"
exit 2
fi
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/beaglebone/dtbs/0001-sync-am335x-peripheral-pinmux.patch"
if [ "x${regenerate}" = "xenable" ] ; then
number=1
cleanup
fi
if [ "x${regenerate}" = "xenable" ] ; then
device="am335x-boneblack-emmc-overlay.dtb" ; dtb_makefile_append
device="am335x-boneblack-hdmi-overlay.dtb" ; dtb_makefile_append
device="am335x-boneblack-nhdmi-overlay.dtb" ; dtb_makefile_append
device="am335x-boneblack-overlay.dtb" ; dtb_makefile_append
device="am335x-bonegreen-overlay.dtb" ; dtb_makefile_append
device="am335x-abbbi.dtb" ; dtb_makefile_append
device="am335x-olimex-som.dtb" ; dtb_makefile_append
device="am335x-bone-cape-bone-argus.dtb" ; dtb_makefile_append
device="am335x-boneblack-cape-bone-argus.dtb" ; dtb_makefile_append
device="am335x-boneblack-wl1835mod.dtb" ; dtb_makefile_append
device="am335x-boneblack-bbbmini.dtb" ; dtb_makefile_append
device="am335x-boneblack-bbb-exp-c.dtb" ; dtb_makefile_append
device="am335x-boneblack-bbb-exp-r.dtb" ; dtb_makefile_append
device="am335x-boneblack-audio.dtb" ; dtb_makefile_append
device="am335x-bonegreen-wireless.dtb" ; dtb_makefile_append
device="am335x-boneblack-wireless.dtb" ; dtb_makefile_append
device="am335x-boneblack-wireless-emmc-overlay.dtb" ; dtb_makefile_append
device="am335x-boneblue.dtb" ; dtb_makefile_append
device="am335x-sancloud-bbe.dtb" ; dtb_makefile_append
device="am335x-arduino-tre.dtb" ; dtb_makefile_append
git commit -a -m 'auto generated: capes: add dtbs to makefile' -s
git format-patch -1 -o ../patches/beaglebone/generated/
else
${git} "${DIR}/patches/beaglebone/generated/0001-auto-generated-capes-add-dtbs-to-makefile.patch"
echo "dir: beaglebone/firmware"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
#http://git.ti.com/gitweb/?p=processor-firmware/ti-amx3-cm3-pm-firmware.git;a=summary
#git clone git://git.ti.com/processor-firmware/ti-amx3-cm3-pm-firmware.git
#cd ti-amx3-cm3-pm-firmware/
#git checkout origin/ti-v4.1.y-next -b tmp
# This version, 0x192, includes the following changes:
# - Fix DDR IO CTRL handling during suspend so both am335x and am437x
# use optimal low power state and restore the exact previous
# configuration.
# - Explicitly configure PER state in standby, even though it is
# configured to ON state to ensure proper state.
# - Add new 'halt' flag in IPC_REG4 bit 11 to allow HLOS to configure
# the suspend path to wait immediately before suspending the system
# entirely to allow JTAG visiblity for debug.
# - Fix board voltage scaling binaries i2c speed configuration in
# order to properly configure 100khz operation.
#cp -v bin/am* /opt/github/bb.org/ti-4.4/normal/KERNEL/firmware/
#git add -f ./firmware/am*
${git} "${DIR}/patches/beaglebone/firmware/0001-add-am33x-firmware.patch"
if [ "x${regenerate}" = "xenable" ] ; then
number=1
cleanup
fi
quieter () {
echo "dir: quieter"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/quieter/0001-quiet-8250_omap.c-use-pr_info-over-pr_err.patch"
if [ "x${regenerate}" = "xenable" ] ; then
number=1
cleanup
fi
}
more_fixes () {
echo "dir: more_fixes"
#regenerate="enable"
if [ "x${regenerate}" = "xenable" ] ; then
start_cleanup
fi
${git} "${DIR}/patches/more_fixes/0001-slab-gcc5-fixes.patch"
if [ "x${regenerate}" = "xenable" ] ; then
number=1
cleanup
fi
}
Robert Nelson
committed
packaging () {
echo "dir: packaging"
Robert Nelson
committed
if [ "x${regenerate}" = "xenable" ] ; then
cp -v "${DIR}/3rdparty/packaging/builddeb" "${DIR}/KERNEL/scripts/package"
Robert Nelson
committed
${git_bin} commit -a -m 'packaging: sync builddeb changes' -s
${git_bin} format-patch -1 -o "${DIR}/patches/packaging"
Robert Nelson
committed
exit 2
Robert Nelson
committed
else
${git} "${DIR}/patches/packaging/0001-packaging-sync-builddeb-changes.patch"
fi
Robert Nelson
committed
}
Robert Nelson
committed
echo "patch.sh ran successfully"