* [ptxdist] [PATCH v2 0/2] Add support for device tree overlays @ 2021-12-09 11:02 Michael Riesch 2021-12-09 11:02 ` [ptxdist] [PATCH v2 1/2] ptxd_make_world_{dtb, dtbo}: add " Michael Riesch 2021-12-09 11:02 ` [ptxdist] [PATCH v2 2/2] kernel: activate " Michael Riesch 0 siblings, 2 replies; 5+ messages in thread From: Michael Riesch @ 2021-12-09 11:02 UTC (permalink / raw) To: ptxdist; +Cc: christian.melki, m.tretter, Michael Riesch Hi all, Thanks to Christian Melki and Michael Olbrich for their reviews, their comments are addressed in this v2 of the series. Best regards, Michael Michael Riesch (2): ptxd_make_world_{dtb,dtbo}: add support for device tree overlays kernel: activate support for device tree overlays platforms/kernel.in | 32 ++++++++++- rules/kernel.make | 9 ++++ rules/post/ptxd_make_world_dtbo.make | 21 ++++++++ scripts/lib/ptxd_make_world_dtb.sh | 79 ++++++++++++++++++++-------- 4 files changed, 118 insertions(+), 23 deletions(-) create mode 100644 rules/post/ptxd_make_world_dtbo.make -- 2.30.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* [ptxdist] [PATCH v2 1/2] ptxd_make_world_{dtb, dtbo}: add support for device tree overlays 2021-12-09 11:02 [ptxdist] [PATCH v2 0/2] Add support for device tree overlays Michael Riesch @ 2021-12-09 11:02 ` Michael Riesch 2021-12-10 13:07 ` [ptxdist] [APPLIED] " Michael Olbrich 2021-12-09 11:02 ` [ptxdist] [PATCH v2 2/2] kernel: activate " Michael Riesch 1 sibling, 1 reply; 5+ messages in thread From: Michael Riesch @ 2021-12-09 11:02 UTC (permalink / raw) To: ptxdist; +Cc: christian.melki, m.tretter, Michael Riesch Make ptxd_make_dtb more general and provide suitable wrappers to support the generation of device tree overlays. Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> --- rules/post/ptxd_make_world_dtbo.make | 21 ++++++++ scripts/lib/ptxd_make_world_dtb.sh | 79 ++++++++++++++++++++-------- 2 files changed, 78 insertions(+), 22 deletions(-) create mode 100644 rules/post/ptxd_make_world_dtbo.make diff --git a/rules/post/ptxd_make_world_dtbo.make b/rules/post/ptxd_make_world_dtbo.make new file mode 100644 index 000000000..61babc653 --- /dev/null +++ b/rules/post/ptxd_make_world_dtbo.make @@ -0,0 +1,21 @@ +# -*-makefile-*- +# +# Copyright (C) 2020 by Michael Tretter <m.tretter@pengutronix.de> +# +# For further information about the PTXdist project and license conditions +# see the README file. +# + +world/dtbo/env = \ + $(call world/env, $(1)) \ + pkg_dtso_path="$($(1)_DTSO_PATH)" \ + pkg_dtso="$($(1)_DTSO)" \ + pkg_dtbo_dir="$($(1)_DTBO_DIR)" \ + pkg_kernel_src="$($(1)_KERNEL_DIR)" \ + pkg_arch="$(GENERIC_KERNEL_ARCH)" + +world/dtbo = \ + $(call world/dtbo/env,$(strip $(1))) \ + ptxd_make_world_dtbo + +# vim: syntax=make diff --git a/scripts/lib/ptxd_make_world_dtb.sh b/scripts/lib/ptxd_make_world_dtb.sh index f5e796b9d..f78d2f885 100644 --- a/scripts/lib/ptxd_make_world_dtb.sh +++ b/scripts/lib/ptxd_make_world_dtb.sh @@ -7,24 +7,22 @@ # ptxd_make_dtb() { - local dtc dts tmp_dts dtb deps tmp_deps + local dtc dts tmp_dts dtb dtb_extra_args dtb_kernel_dir deps tmp_deps - if [[ "${dts_dts}" =~ ^/.* ]]; then - ptxd_bailout "'${dts_dts}' must not be an absolute path!" \ - "Use <PKG>_DTS_PATH to specify the search path." - fi + dts="${dtb_source}" + dtb="${dtb_target}" - if ! ptxd_in_path pkg_dts_path "${dts_dts}"; then - ptxd_bailout "Device-tree '${dts_dts}' not found in '${pkg_dts_path}'." - fi - dts="${ptxd_reply}" - dtb="${dtb_dir}/$(basename ${dts/%.dts/.dtb})" + dtb_kernel_dir="${pkg_kernel_src:-${pkg_dir}}" - dtc="${pkg_build_dir}/scripts/dtc/dtc" + dtc="${dtb_kernel_dir}/scripts/dtc/dtc" if [ ! -x "${dtc}" ]; then dtc=dtc fi + if [ "$(ptxd_get_ptxconf PTXCONF_KERNEL_DTS_SUPPORT_OVERLAYS)" == "y" ]; then + dtb_extra_args="-@" + fi + tmp_dts="${ptx_state_dir}/${pkg_label}.$(basename "${dts}").tmp" deps="${ptx_state_dir}/${pkg_label}.$(basename "${dts}").deps" @@ -39,16 +37,16 @@ ptxd_make_dtb() { -Wp,-MT,${dtb_deps_target} \ -nostdinc \ -I"$(dirname "${dts}")" \ - -I${pkg_dir}/arch/${pkg_arch}/boot/dts \ - -I${pkg_dir}/arch/${pkg_arch}/boot/dts/include \ - -I${pkg_dir}/scripts/dtc/include-prefixes \ - -I${pkg_dir}/drivers/of/testcase-data \ - -I${pkg_dir}/include \ + -I${dtb_kernel_dir}/arch/${pkg_arch}/boot/dts \ + -I${dtb_kernel_dir}/arch/${pkg_arch}/boot/dts/include \ + -I${dtb_kernel_dir}/scripts/dtc/include-prefixes \ + -I${dtb_kernel_dir}/drivers/of/testcase-data \ + -I${dtb_kernel_dir}/include \ -undef -D__DTS__ -x assembler-with-cpp \ -o ${tmp_dts} \ ${dts} && - sed -e "\;^ ${pkg_dir}[^ ]*;d" \ + sed -e "\;^ ${dtb_kernel_dir}[^ ]*;d" \ -e 's;^ \([^ \]*\); $(wildcard \1);' "${tmp_deps}" > "${deps}" && # empty line in case all dependencies were removed echo >> "${deps}" && @@ -57,9 +55,9 @@ ptxd_make_dtb() { echo "DTC $(ptxd_print_path "${dtb}")" && ptxd_eval \ "${dtc}" \ - $(ptxd_get_ptxconf PTXCONF_DTC_EXTRA_ARGS) \ + "${dtb_extra_args}" \ -i "$(dirname "${dts}")" \ - -i "${pkg_dir}/arch/${pkg_arch}/boot/dts" \ + -i "${dtb_kernel_dir}/arch/${pkg_arch}/boot/dts" \ -d "${tmp_deps}" \ -I dts -O dtb -b 0 \ -o "${dtb}" "${tmp_dts}" && @@ -81,17 +79,54 @@ ptxd_make_dtb() { export -f ptxd_make_dtb +ptxd_make_world_dtbo() { + local dtb_deps_target dtb_source dtb_target + + ptxd_make_world_init || break + + dtb_deps_target="${ptx_state_dir}/${pkg_stamp}" + + echo -e "\nBuilding device tree overlays..." + + for overlay in ${pkg_dtso}; do + if [[ "${overlay}" =~ ^/.* ]]; then + ptxd_bailout "'${overlay}' must not be an absolute path!" \ + "Use <PKG>_DTSO_PATH to specify the search path." + fi + + if ! ptxd_in_path pkg_dtso_path "${overlay}"; then + ptxd_bailout "Overlay '${overlay}' not found in '${pkg_dtso_path}'." + fi + dtb_source="${ptxd_reply}" + dtb_target="${pkg_pkg_dir}/${pkg_dtbo_dir}/$(basename ${overlay/%.dts*/.dtbo})" + + ptxd_make_dtb || break + done +} +export -f ptxd_make_world_dtbo + + ptxd_make_world_dtb() { - local dtb_deps_target dtb_dir + local dtb_deps_target dtb_source dtb_target ptxd_make_world_init || break dtb_deps_target="${ptx_state_dir}/${pkg_stamp}" - dtb_dir="${pkg_pkg_dir}/boot" - echo -e "\nBuilding Device trees..." + echo -e "\nBuilding device trees..." for dts_dts in ${pkg_dts}; do + if [[ "${dts_dts}" =~ ^/.* ]]; then + ptxd_bailout "'${dts_dts}' must not be an absolute path!" \ + "Use <PKG>_DTS_PATH to specify the search path." + fi + + if ! ptxd_in_path pkg_dts_path "${dts_dts}"; then + ptxd_bailout "Device tree '${dts_dts}' not found in '${pkg_dts_path}'." + fi + dtb_source="${ptxd_reply}" + dtb_target="${pkg_pkg_dir}/boot/$(basename ${dts_dts/%.dts/.dtb})" + ptxd_make_dtb || break done } -- 2.30.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [APPLIED] ptxd_make_world_{dtb, dtbo}: add support for device tree overlays 2021-12-09 11:02 ` [ptxdist] [PATCH v2 1/2] ptxd_make_world_{dtb, dtbo}: add " Michael Riesch @ 2021-12-10 13:07 ` Michael Olbrich 0 siblings, 0 replies; 5+ messages in thread From: Michael Olbrich @ 2021-12-10 13:07 UTC (permalink / raw) To: ptxdist; +Cc: Michael Riesch Thanks, applied as 2fafa7c4308db8d1e79dc3b5d2c9cb3400a16ff8. Michael [sent from post-receive hook] On Fri, 10 Dec 2021 14:07:26 +0100, Michael Riesch <michael.riesch@wolfvision.net> wrote: > Make ptxd_make_dtb more general and provide suitable wrappers to > support the generation of device tree overlays. > > Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> > Message-Id: <20211209110258.3307503-2-michael.riesch@wolfvision.net> > Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> > > diff --git a/rules/post/ptxd_make_world_dtbo.make b/rules/post/ptxd_make_world_dtbo.make > new file mode 100644 > index 000000000000..61babc653660 > --- /dev/null > +++ b/rules/post/ptxd_make_world_dtbo.make > @@ -0,0 +1,21 @@ > +# -*-makefile-*- > +# > +# Copyright (C) 2020 by Michael Tretter <m.tretter@pengutronix.de> > +# > +# For further information about the PTXdist project and license conditions > +# see the README file. > +# > + > +world/dtbo/env = \ > + $(call world/env, $(1)) \ > + pkg_dtso_path="$($(1)_DTSO_PATH)" \ > + pkg_dtso="$($(1)_DTSO)" \ > + pkg_dtbo_dir="$($(1)_DTBO_DIR)" \ > + pkg_kernel_src="$($(1)_KERNEL_DIR)" \ > + pkg_arch="$(GENERIC_KERNEL_ARCH)" > + > +world/dtbo = \ > + $(call world/dtbo/env,$(strip $(1))) \ > + ptxd_make_world_dtbo > + > +# vim: syntax=make > diff --git a/scripts/lib/ptxd_make_world_dtb.sh b/scripts/lib/ptxd_make_world_dtb.sh > index f5e796b9d13d..f78d2f885114 100644 > --- a/scripts/lib/ptxd_make_world_dtb.sh > +++ b/scripts/lib/ptxd_make_world_dtb.sh > @@ -7,24 +7,22 @@ > # > > ptxd_make_dtb() { > - local dtc dts tmp_dts dtb deps tmp_deps > + local dtc dts tmp_dts dtb dtb_extra_args dtb_kernel_dir deps tmp_deps > > - if [[ "${dts_dts}" =~ ^/.* ]]; then > - ptxd_bailout "'${dts_dts}' must not be an absolute path!" \ > - "Use <PKG>_DTS_PATH to specify the search path." > - fi > + dts="${dtb_source}" > + dtb="${dtb_target}" > > - if ! ptxd_in_path pkg_dts_path "${dts_dts}"; then > - ptxd_bailout "Device-tree '${dts_dts}' not found in '${pkg_dts_path}'." > - fi > - dts="${ptxd_reply}" > - dtb="${dtb_dir}/$(basename ${dts/%.dts/.dtb})" > + dtb_kernel_dir="${pkg_kernel_src:-${pkg_dir}}" > > - dtc="${pkg_build_dir}/scripts/dtc/dtc" > + dtc="${dtb_kernel_dir}/scripts/dtc/dtc" > if [ ! -x "${dtc}" ]; then > dtc=dtc > fi > > + if [ "$(ptxd_get_ptxconf PTXCONF_KERNEL_DTS_SUPPORT_OVERLAYS)" == "y" ]; then > + dtb_extra_args="-@" > + fi > + > tmp_dts="${ptx_state_dir}/${pkg_label}.$(basename "${dts}").tmp" > > deps="${ptx_state_dir}/${pkg_label}.$(basename "${dts}").deps" > @@ -39,16 +37,16 @@ ptxd_make_dtb() { > -Wp,-MT,${dtb_deps_target} \ > -nostdinc \ > -I"$(dirname "${dts}")" \ > - -I${pkg_dir}/arch/${pkg_arch}/boot/dts \ > - -I${pkg_dir}/arch/${pkg_arch}/boot/dts/include \ > - -I${pkg_dir}/scripts/dtc/include-prefixes \ > - -I${pkg_dir}/drivers/of/testcase-data \ > - -I${pkg_dir}/include \ > + -I${dtb_kernel_dir}/arch/${pkg_arch}/boot/dts \ > + -I${dtb_kernel_dir}/arch/${pkg_arch}/boot/dts/include \ > + -I${dtb_kernel_dir}/scripts/dtc/include-prefixes \ > + -I${dtb_kernel_dir}/drivers/of/testcase-data \ > + -I${dtb_kernel_dir}/include \ > -undef -D__DTS__ -x assembler-with-cpp \ > -o ${tmp_dts} \ > ${dts} && > > - sed -e "\;^ ${pkg_dir}[^ ]*;d" \ > + sed -e "\;^ ${dtb_kernel_dir}[^ ]*;d" \ > -e 's;^ \([^ \]*\); $(wildcard \1);' "${tmp_deps}" > "${deps}" && > # empty line in case all dependencies were removed > echo >> "${deps}" && > @@ -57,9 +55,9 @@ ptxd_make_dtb() { > echo "DTC $(ptxd_print_path "${dtb}")" && > ptxd_eval \ > "${dtc}" \ > - $(ptxd_get_ptxconf PTXCONF_DTC_EXTRA_ARGS) \ > + "${dtb_extra_args}" \ > -i "$(dirname "${dts}")" \ > - -i "${pkg_dir}/arch/${pkg_arch}/boot/dts" \ > + -i "${dtb_kernel_dir}/arch/${pkg_arch}/boot/dts" \ > -d "${tmp_deps}" \ > -I dts -O dtb -b 0 \ > -o "${dtb}" "${tmp_dts}" && > @@ -81,17 +79,54 @@ ptxd_make_dtb() { > export -f ptxd_make_dtb > > > +ptxd_make_world_dtbo() { > + local dtb_deps_target dtb_source dtb_target > + > + ptxd_make_world_init || break > + > + dtb_deps_target="${ptx_state_dir}/${pkg_stamp}" > + > + echo -e "\nBuilding device tree overlays..." > + > + for overlay in ${pkg_dtso}; do > + if [[ "${overlay}" =~ ^/.* ]]; then > + ptxd_bailout "'${overlay}' must not be an absolute path!" \ > + "Use <PKG>_DTSO_PATH to specify the search path." > + fi > + > + if ! ptxd_in_path pkg_dtso_path "${overlay}"; then > + ptxd_bailout "Overlay '${overlay}' not found in '${pkg_dtso_path}'." > + fi > + dtb_source="${ptxd_reply}" > + dtb_target="${pkg_pkg_dir}/${pkg_dtbo_dir}/$(basename ${overlay/%.dts*/.dtbo})" > + > + ptxd_make_dtb || break > + done > +} > +export -f ptxd_make_world_dtbo > + > + > ptxd_make_world_dtb() { > - local dtb_deps_target dtb_dir > + local dtb_deps_target dtb_source dtb_target > > ptxd_make_world_init || break > > dtb_deps_target="${ptx_state_dir}/${pkg_stamp}" > - dtb_dir="${pkg_pkg_dir}/boot" > > - echo -e "\nBuilding Device trees..." > + echo -e "\nBuilding device trees..." > > for dts_dts in ${pkg_dts}; do > + if [[ "${dts_dts}" =~ ^/.* ]]; then > + ptxd_bailout "'${dts_dts}' must not be an absolute path!" \ > + "Use <PKG>_DTS_PATH to specify the search path." > + fi > + > + if ! ptxd_in_path pkg_dts_path "${dts_dts}"; then > + ptxd_bailout "Device tree '${dts_dts}' not found in '${pkg_dts_path}'." > + fi > + dtb_source="${ptxd_reply}" > + dtb_target="${pkg_pkg_dir}/boot/$(basename ${dts_dts/%.dts/.dtb})" > + > ptxd_make_dtb || break > done > } _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* [ptxdist] [PATCH v2 2/2] kernel: activate support for device tree overlays 2021-12-09 11:02 [ptxdist] [PATCH v2 0/2] Add support for device tree overlays Michael Riesch 2021-12-09 11:02 ` [ptxdist] [PATCH v2 1/2] ptxd_make_world_{dtb, dtbo}: add " Michael Riesch @ 2021-12-09 11:02 ` Michael Riesch 2021-12-10 13:07 ` [ptxdist] [APPLIED] " Michael Olbrich 1 sibling, 1 reply; 5+ messages in thread From: Michael Riesch @ 2021-12-09 11:02 UTC (permalink / raw) To: ptxdist; +Cc: christian.melki, m.tretter, Michael Riesch Activate the recently introduced support for device tree overlays for the kernel package. Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> --- platforms/kernel.in | 32 +++++++++++++++++++++++++++++++- rules/kernel.make | 9 +++++++++ 2 files changed, 40 insertions(+), 1 deletion(-) diff --git a/platforms/kernel.in b/platforms/kernel.in index 9976436ce..9f355f5dc 100644 --- a/platforms/kernel.in +++ b/platforms/kernel.in @@ -186,7 +186,7 @@ config KERNEL_DTS_PATH help Define path to the dts source file. Multiple directories can be specified separated by ':'. A relative path will be expanded relative - to the workspace and all other layers. Only on of the specified paths + to the workspace and all other layers. Only one of the specified paths can be a relative path. config KERNEL_DTS @@ -198,6 +198,36 @@ config KERNEL_DTS is used as a search path for the device tree files specified here. Multiple dts files can be specified, separated by spaces. +config KERNEL_DTS_SUPPORT_OVERLAYS + bool + +endif + +menuconfig KERNEL_DTBO + bool + select KERNEL_DTS_SUPPORT_OVERLAYS + prompt "Build device tree overlays " + +if KERNEL_DTBO + +config KERNEL_DTSO_PATH + string "path to overlay file(s)" + default "${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts/overlays:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts" + help + Define path to the dts(o) source file(s). Multiple directories can be + specified separated by ':'. A relative path will be expanded relative + to the workspace and all other layers. Only one of the specified paths + can be a relative path. + +config KERNEL_DTSO + string "overlay file(s)" + default "<youroverlay>.dtso" + help + Select the dts(o) file(s) to be compiled. For relative file + names KERNEL_DTSO_PATH is used as a search path for the device + tree files specified here. + Multiple dts(o) files can be specified, separated by spaces. + endif config KERNEL_CODE_SIGNING diff --git a/rules/kernel.make b/rules/kernel.make index 0ecf5f4e9..1b70faf21 100644 --- a/rules/kernel.make +++ b/rules/kernel.make @@ -29,7 +29,11 @@ KERNEL_BUILD_DIR := $(KERNEL_DIR)-build KERNEL_CONFIG := $(call ptx/in-platformconfigdir, $(call remove_quotes, $(PTXCONF_KERNEL_CONFIG))) KERNEL_DTS_PATH := $(call remove_quotes,$(PTXCONF_KERNEL_DTS_PATH)) KERNEL_DTS := $(call remove_quotes,$(PTXCONF_KERNEL_DTS)) +KERNEL_DTSO_PATH := $(call remove_quotes,$(PTXCONF_KERNEL_DTSO_PATH)) +KERNEL_DTSO := $(call remove_quotes,$(PTXCONF_KERNEL_DTSO)) KERNEL_DTB_FILES := $(addsuffix .dtb,$(basename $(KERNEL_DTS))) +KERNEL_DTBO_FILES := $(addsuffix .dtbo,$(basename $(KERNEL_DTSO))) +KERNEL_DTBO_DIR := /boot/overlays KERNEL_LICENSE := GPL-2.0-only KERNEL_SOURCE := $(SRCDIR)/$(KERNEL).$(KERNEL_SUFFIX) KERNEL_DEVPKG := NO @@ -265,6 +269,7 @@ ifdef PTXCONF_KERNEL_MODULES_INSTALL @$(call world/install, KERNEL) endif @$(call world/dtb, KERNEL) + @$(call world/dtbo, KERNEL) @$(call touch) # ---------------------------------------------------------------------------- @@ -294,6 +299,10 @@ ifdef PTXCONF_KERNEL_INSTALL @$(foreach dtb, $(KERNEL_DTB_FILES), \ $(call install_copy, kernel, 0, 0, 0644, -, \ /boot/$(dtb), n)$(ptx/nl)) + + @$(foreach dtbo, $(KERNEL_DTBO_FILES), \ + $(call install_copy, kernel, 0, 0, 0644, -, \ + $(KERNEL_DTBO_DIR)/$(dtbo), n)$(ptx/nl)) endif # install the ELF kernel image for debugging purpose -- 2.30.2 _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [ptxdist] [APPLIED] kernel: activate support for device tree overlays 2021-12-09 11:02 ` [ptxdist] [PATCH v2 2/2] kernel: activate " Michael Riesch @ 2021-12-10 13:07 ` Michael Olbrich 0 siblings, 0 replies; 5+ messages in thread From: Michael Olbrich @ 2021-12-10 13:07 UTC (permalink / raw) To: ptxdist; +Cc: Michael Riesch Thanks, applied as e825644b85e9e8c9be99784c3edf3d63ab32bcec. Michael [sent from post-receive hook] On Fri, 10 Dec 2021 14:07:28 +0100, Michael Riesch <michael.riesch@wolfvision.net> wrote: > Activate the recently introduced support for device tree overlays > for the kernel package. > > Signed-off-by: Michael Riesch <michael.riesch@wolfvision.net> > Message-Id: <20211209110258.3307503-3-michael.riesch@wolfvision.net> > Signed-off-by: Michael Olbrich <m.olbrich@pengutronix.de> > > diff --git a/platforms/kernel.in b/platforms/kernel.in > index 9976436ce0a2..9f355f5dc026 100644 > --- a/platforms/kernel.in > +++ b/platforms/kernel.in > @@ -186,7 +186,7 @@ config KERNEL_DTS_PATH > help > Define path to the dts source file. Multiple directories can be > specified separated by ':'. A relative path will be expanded relative > - to the workspace and all other layers. Only on of the specified paths > + to the workspace and all other layers. Only one of the specified paths > can be a relative path. > > config KERNEL_DTS > @@ -198,6 +198,36 @@ config KERNEL_DTS > is used as a search path for the device tree files specified > here. Multiple dts files can be specified, separated by spaces. > > +config KERNEL_DTS_SUPPORT_OVERLAYS > + bool > + > +endif > + > +menuconfig KERNEL_DTBO > + bool > + select KERNEL_DTS_SUPPORT_OVERLAYS > + prompt "Build device tree overlays " > + > +if KERNEL_DTBO > + > +config KERNEL_DTSO_PATH > + string "path to overlay file(s)" > + default "${PTXDIST_PLATFORMCONFIG_SUBDIR}/dts/overlays:${KERNEL_DIR}/arch/${GENERIC_KERNEL_ARCH}/boot/dts" > + help > + Define path to the dts(o) source file(s). Multiple directories can be > + specified separated by ':'. A relative path will be expanded relative > + to the workspace and all other layers. Only one of the specified paths > + can be a relative path. > + > +config KERNEL_DTSO > + string "overlay file(s)" > + default "<youroverlay>.dtso" > + help > + Select the dts(o) file(s) to be compiled. For relative file > + names KERNEL_DTSO_PATH is used as a search path for the device > + tree files specified here. > + Multiple dts(o) files can be specified, separated by spaces. > + > endif > > config KERNEL_CODE_SIGNING > diff --git a/rules/kernel.make b/rules/kernel.make > index 0ecf5f4e986f..1b70faf21dbe 100644 > --- a/rules/kernel.make > +++ b/rules/kernel.make > @@ -29,7 +29,11 @@ KERNEL_BUILD_DIR := $(KERNEL_DIR)-build > KERNEL_CONFIG := $(call ptx/in-platformconfigdir, $(call remove_quotes, $(PTXCONF_KERNEL_CONFIG))) > KERNEL_DTS_PATH := $(call remove_quotes,$(PTXCONF_KERNEL_DTS_PATH)) > KERNEL_DTS := $(call remove_quotes,$(PTXCONF_KERNEL_DTS)) > +KERNEL_DTSO_PATH := $(call remove_quotes,$(PTXCONF_KERNEL_DTSO_PATH)) > +KERNEL_DTSO := $(call remove_quotes,$(PTXCONF_KERNEL_DTSO)) > KERNEL_DTB_FILES := $(addsuffix .dtb,$(basename $(KERNEL_DTS))) > +KERNEL_DTBO_FILES := $(addsuffix .dtbo,$(basename $(KERNEL_DTSO))) > +KERNEL_DTBO_DIR := /boot/overlays > KERNEL_LICENSE := GPL-2.0-only > KERNEL_SOURCE := $(SRCDIR)/$(KERNEL).$(KERNEL_SUFFIX) > KERNEL_DEVPKG := NO > @@ -265,6 +269,7 @@ ifdef PTXCONF_KERNEL_MODULES_INSTALL > @$(call world/install, KERNEL) > endif > @$(call world/dtb, KERNEL) > + @$(call world/dtbo, KERNEL) > @$(call touch) > > # ---------------------------------------------------------------------------- > @@ -294,6 +299,10 @@ ifdef PTXCONF_KERNEL_INSTALL > @$(foreach dtb, $(KERNEL_DTB_FILES), \ > $(call install_copy, kernel, 0, 0, 0644, -, \ > /boot/$(dtb), n)$(ptx/nl)) > + > + @$(foreach dtbo, $(KERNEL_DTBO_FILES), \ > + $(call install_copy, kernel, 0, 0, 0644, -, \ > + $(KERNEL_DTBO_DIR)/$(dtbo), n)$(ptx/nl)) > endif > > # install the ELF kernel image for debugging purpose _______________________________________________ ptxdist mailing list ptxdist@pengutronix.de To unsubscribe, send a mail with subject "unsubscribe" to ptxdist-request@pengutronix.de ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2021-12-10 13:09 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2021-12-09 11:02 [ptxdist] [PATCH v2 0/2] Add support for device tree overlays Michael Riesch 2021-12-09 11:02 ` [ptxdist] [PATCH v2 1/2] ptxd_make_world_{dtb, dtbo}: add " Michael Riesch 2021-12-10 13:07 ` [ptxdist] [APPLIED] " Michael Olbrich 2021-12-09 11:02 ` [ptxdist] [PATCH v2 2/2] kernel: activate " Michael Riesch 2021-12-10 13:07 ` [ptxdist] [APPLIED] " Michael Olbrich
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox