mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-11-26 21:54:11 +08:00
37cb8e1f8e
- kbuild cleanups and improvements for dtbs - Code clean-up of overlay code and fixing for some long standing memory leak and race condition in applying overlays - Improvements to DT memory usage making sysfs/kobjects optional and skipping unflattening of disabled nodes. This is part of kernel tinification efforts. - Final piece of removing storing the full path for every DT node. The prerequisite conversion of printk's to use device_node format specifier happened in 4.14. - Sync with current upstream dtc. This brings additional checks to dtb compiling. - Binding doc tree wide removal of leading 0s from examples - RTC binding documentation adding missing devices and some consolidation of duplicated bindings - Vendor prefix documentation for nutsboard, Silicon Storage Technology, shimafuji, Tecon Microprocessor Technologies, DH electronics GmbH, Opal Kelly, and Next Thing -----BEGIN PGP SIGNATURE----- iQItBAABCAAXBQJaCwaSEBxyb2JoQGtlcm5lbC5vcmcACgkQ+vtdtY28YcNzeA/8 C8uQhSsX2+UQZvFzcEA8KQAMGT3kYdrcf+gidRKwCEUWg1qscUEpTb3n3Rm5NUbU RPD1s6GSlh6fJCMHDTQ6Tti/T59L7nZa2/AIGmUishGu4x4q1o18AobpFJmYP/EM SJPwnmm5RV9WcZFao1y+sY3Xtn8DStxHO4cS+dyF5/EvPN9D8nbLJfu7bgTBAZww HktIMB9kx+GTipRQZBvBwXoy5MJjthIZub4XwzesA4tGananj4cXlc0xaVxpdYy3 5bO6q5F7cbrZ2uyrF+oIChpCENK4VaXh80m0WHc8EzaG++shzEkR4he1vYkwnV+I OYo4vsUg9dP8rBksUG1eYhS8fJKPvEBRNP7ETT5utVBy5I/tDEbo/crmQZRTIDIC hZbhcdZlISZj0DzkMK2ZHQV9UYtRWzXrJbZHFIPP12GCyvXVxYJUIWb9iYnUYSon KugygsFSpZHMWmfAhemw5/ctJZ19qhM5UIl2KZk5tMBHAf466ILmZjg0me6fYkOp eADfwHJ1dLMdK79CVMHSfp+vArcZXp35B16c3sWpJB36Il97Mc/9siEufCL4GKX7 IBBnQBlbpSBKBejWVyI7Ip/Xp5u4qAQD+ZMJ9oLqBRqfWerHbDuOERlEOgwGqJYr 9v4HvP7V8eVUvAdqXka4EBfCyAgUzXDAxG2Dfmv9vGU= =jgpN -----END PGP SIGNATURE----- Merge tag 'devicetree-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux Pull DeviceTree updates from Rob Herring: "A bigger diffstat than usual with the kbuild changes and a tree wide fix in the binding documentation. Summary: - kbuild cleanups and improvements for dtbs - Code clean-up of overlay code and fixing for some long standing memory leak and race condition in applying overlays - Improvements to DT memory usage making sysfs/kobjects optional and skipping unflattening of disabled nodes. This is part of kernel tinification efforts. - Final piece of removing storing the full path for every DT node. The prerequisite conversion of printk's to use device_node format specifier happened in 4.14. - Sync with current upstream dtc. This brings additional checks to dtb compiling. - Binding doc tree wide removal of leading 0s from examples - RTC binding documentation adding missing devices and some consolidation of duplicated bindings - Vendor prefix documentation for nutsboard, Silicon Storage Technology, shimafuji, Tecon Microprocessor Technologies, DH electronics GmbH, Opal Kelly, and Next Thing" * tag 'devicetree-for-4.15' of git://git.kernel.org/pub/scm/linux/kernel/git/robh/linux: (55 commits) dt-bindings: usb: add #phy-cells to usb-nop-xceiv dt-bindings: Remove leading zeros from bindings notation kbuild: handle dtb-y and CONFIG_OF_ALL_DTBS natively in Makefile.lib MIPS: dts: remove bogus bcm96358nb4ser.dtb from dtb-y entry kbuild: clean up *.dtb and *.dtb.S patterns from top-level Makefile .gitignore: move *.dtb and *.dtb.S patterns to the top-level .gitignore .gitignore: sort normal pattern rules alphabetically dt-bindings: add vendor prefix for Next Thing Co. scripts/dtc: Update to upstream version v1.4.5-6-gc1e55a5513e9 of: dynamic: fix memory leak related to properties of __of_node_dup of: overlay: make pr_err() string unique of: overlay: pr_err from return NOTIFY_OK to overlay apply/remove of: overlay: remove unneeded check for NULL kbasename() of: overlay: remove a dependency on device node full_name of: overlay: simplify applying symbols from an overlay of: overlay: avoid race condition between applying multiple overlays of: overlay: loosen overly strict phandle clash check of: overlay: expand check of whether overlay changeset can be removed of: overlay: detect cases where device tree may become corrupt of: overlay: minor restructuring ...
85 lines
2.6 KiB
Bash
Executable File
85 lines
2.6 KiB
Bash
Executable File
#!/bin/sh
|
|
# SPDX-License-Identifier: GPL-2.0
|
|
# Simple script to update the version of DTC carried by the Linux kernel
|
|
#
|
|
# This script assumes that the dtc and the linux git trees are in the
|
|
# same directory. After building dtc in the dtc directory, it copies the
|
|
# source files and generated source files into the scripts/dtc directory
|
|
# in the kernel and creates a git commit updating them to the new
|
|
# version.
|
|
#
|
|
# Usage: from the top level Linux source tree, run:
|
|
# $ ./scripts/dtc/update-dtc-source.sh
|
|
#
|
|
# The script will change into the dtc tree, build and test dtc, copy the
|
|
# relevant files into the kernel tree and create a git commit. The commit
|
|
# message will need to be modified to reflect the version of DTC being
|
|
# imported
|
|
#
|
|
# TODO:
|
|
# This script is pretty basic, but it is seldom used so a few manual tasks
|
|
# aren't a big deal. If anyone is interested in making it more robust, the
|
|
# the following would be nice:
|
|
# * Actually fail to complete if any testcase fails.
|
|
# - The dtc "make check" target needs to return a failure
|
|
# * Extract the version number from the dtc repo for the commit message
|
|
# * Build dtc in the kernel tree
|
|
# * run 'make check" on dtc built from the kernel tree
|
|
|
|
set -ev
|
|
|
|
DTC_UPSTREAM_PATH=`pwd`/../dtc
|
|
DTC_LINUX_PATH=`pwd`/scripts/dtc
|
|
|
|
DTC_SOURCE="checks.c data.c dtc.c dtc.h flattree.c fstree.c livetree.c srcpos.c \
|
|
srcpos.h treesource.c util.c util.h version_gen.h Makefile.dtc \
|
|
dtc-lexer.l dtc-parser.y"
|
|
DTC_GENERATED="dtc-lexer.lex.c dtc-parser.tab.c dtc-parser.tab.h"
|
|
LIBFDT_SOURCE="Makefile.libfdt fdt.c fdt.h fdt_addresses.c fdt_empty_tree.c \
|
|
fdt_overlay.c fdt_ro.c fdt_rw.c fdt_strerror.c fdt_sw.c \
|
|
fdt_wip.c libfdt.h libfdt_env.h libfdt_internal.h"
|
|
|
|
get_last_dtc_version() {
|
|
git log --oneline scripts/dtc/ | grep 'upstream' | head -1 | sed -e 's/^.* \(.*\)/\1/'
|
|
}
|
|
|
|
last_dtc_ver=$(get_last_dtc_version)
|
|
|
|
# Build DTC
|
|
cd $DTC_UPSTREAM_PATH
|
|
make clean
|
|
make check
|
|
dtc_version=$(git describe HEAD)
|
|
dtc_log=$(git log --oneline ${last_dtc_ver}..)
|
|
|
|
|
|
# Copy the files into the Linux tree
|
|
cd $DTC_LINUX_PATH
|
|
for f in $DTC_SOURCE; do
|
|
cp ${DTC_UPSTREAM_PATH}/${f} ${f}
|
|
git add ${f}
|
|
done
|
|
for f in $DTC_GENERATED; do
|
|
cp ${DTC_UPSTREAM_PATH}/$f ${f}_shipped
|
|
git add ${f}_shipped
|
|
done
|
|
for f in $LIBFDT_SOURCE; do
|
|
cp ${DTC_UPSTREAM_PATH}/libfdt/${f} libfdt/${f}
|
|
git add libfdt/${f}
|
|
done
|
|
|
|
sed -i -- 's/#include <libfdt_env.h>/#include "libfdt_env.h"/g' ./libfdt/libfdt.h
|
|
sed -i -- 's/#include <fdt.h>/#include "fdt.h"/g' ./libfdt/libfdt.h
|
|
git add ./libfdt/libfdt.h
|
|
|
|
commit_msg=$(cat << EOF
|
|
scripts/dtc: Update to upstream version ${dtc_version}
|
|
|
|
This adds the following commits from upstream:
|
|
|
|
${dtc_log}
|
|
EOF
|
|
)
|
|
|
|
git commit -e -v -s -m "${commit_msg}"
|