Skip to content

Commit

Permalink
kbuild: Install dtb files as 0644 in Makefile.dtbinst
Browse files Browse the repository at this point in the history
commit 9cc5f3b upstream.

The compiled dtb files aren't executable, so install them with 0644 as their
permission mode, instead of defaulting to 0755 for the permission mode and
installing them with the executable bits set.

Some Linux distributions, including Debian, [1][2][3] already include fixes
in their kernel package build recipes to change the dtb file permissions to
0644 in their kernel packages.  These changes, when additionally propagated
into the long-term kernel versions, will allow such distributions to remove
their downstream fixes.

[1] https://salsa.debian.org/kernel-team/linux/-/merge_requests/642
[2] https://salsa.debian.org/kernel-team/linux/-/merge_requests/749
[3] https://salsa.debian.org/kernel-team/linux/-/blob/debian/6.8.12-1/debian/rules.real#L193

Cc: Diederik de Haas <didi.debian@cknow.org>
Cc: <stable@vger.kernel.org>
Fixes: aefd803 ("kbuild: refactor Makefile.dtbinst more")
Signed-off-by: Dragan Simic <dsimic@manjaro.org>
Reviewed-by: Nicolas Schier <nicolas@fjasle.eu>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Dragan Simic authored and gregkh committed Jul 5, 2024
1 parent f6c839e commit bf4a43c
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion scripts/Makefile.dtbinst
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ __dtbs_install: $(dtbs) $(subdirs)
@:

quiet_cmd_dtb_install = INSTALL $@
cmd_dtb_install = install -D $< $@
cmd_dtb_install = install -D -m 0644 $< $@

$(dst)/%.dtb: $(obj)/%.dtb
$(call cmd,dtb_install)
Expand Down

0 comments on commit bf4a43c

Please sign in to comment.