Skip to content

Commit c990a22

Browse files
committed
GSOC 2020 Cape Compability
Signed-off-by: Robert Nelson <[email protected]>
1 parent 35bc03f commit c990a22

File tree

5 files changed

+7393
-2591
lines changed

5 files changed

+7393
-2591
lines changed

patch.sh

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -380,7 +380,7 @@ dtb_makefile_append () {
380380
}
381381

382382
beagleboard_dtbs () {
383-
branch="v4.19.x-ti"
383+
branch="v4.19.x-ti-overlays"
384384
https_repo="https://github.com/beagleboard/BeagleBoard-DeviceTrees"
385385
work_dir="BeagleBoard-DeviceTrees"
386386
#regenerate="enable"
@@ -400,7 +400,11 @@ beagleboard_dtbs () {
400400
fi
401401
cd ./KERNEL/
402402

403+
mkdir -p arch/arm/boot/dts/overlays/
403404
cp -vr ../${work_dir}/src/arm/* arch/arm/boot/dts/
405+
if [ -f ./arch/arm/boot/dts/overlays/README.MD ] ; then
406+
rm -rf ./arch/arm/boot/dts/overlays/README.MD
407+
fi
404408
cp -vr ../${work_dir}/include/dt-bindings/* ./include/dt-bindings/
405409

406410
device="am335x-abbbi.dtb" ; dtb_makefile_append
@@ -593,6 +597,7 @@ drivers () {
593597

594598
dir 'drivers/uio_pruss_shmem'
595599
dir 'drivers/greybus'
600+
# dir 'RPi'
596601
}
597602

598603
soc () {
Lines changed: 121 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,121 @@
1+
From 3436b658415406644bcbdcc2a7b04abc471dc199 Mon Sep 17 00:00:00 2001
2+
From: Robert Nelson <[email protected]>
3+
Date: Wed, 12 Aug 2020 08:57:53 -0500
4+
Subject: [PATCH] Overlays: Port RPi Overlay building
5+
6+
Signed-off-by: Robert Nelson <[email protected]>
7+
---
8+
arch/arm/boot/dts/Makefile | 20 +++-----------------
9+
scripts/Kbuild.include | 2 +-
10+
scripts/Makefile.dtbinst | 15 +++++----------
11+
scripts/Makefile.lib | 12 ++++++++++++
12+
4 files changed, 21 insertions(+), 28 deletions(-)
13+
14+
diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile
15+
index 89354571bc44..fa322802b0c6 100644
16+
--- a/arch/arm/boot/dts/Makefile
17+
+++ b/arch/arm/boot/dts/Makefile
18+
@@ -1262,22 +1262,8 @@ dtb-$(CONFIG_ARCH_ASPEED) += \
19+
aspeed-bmc-portwell-neptune.dtb \
20+
aspeed-bmc-quanta-q71l.dtb
21+
22+
-ifeq ($(BUILD_ITBS),y)
23+
-dtb-y=
24+
-dtb-merge-y=
25+
-else
26+
-dts-dirs=
27+
-endif
28+
-
29+
-always += $(dtb-merge-y)
30+
-
31+
-$(addprefix $(obj)/,$(dtb-merge-y)): TI_DTBOS
32+
- @$(srctree)/scripts/dtb-merge $(srctree) $(objtree) $@ $(objtree)/scripts/dtc/fdtoverlay $(src)/ti
33+
-
34+
-TI_DTBOS:
35+
- $(Q)$(MAKE) $(build)=$(src)/ti
36+
+targets += dtbs dtbs_install
37+
+targets += $(dtb-y)
38+
39+
-PHONY += TI_DTBOS
40+
+subdir-y := overlays
41+
42+
-subdir-y += $(dts-dirs)
43+
-subdir- += ti
44+
diff --git a/scripts/Kbuild.include b/scripts/Kbuild.include
45+
index ce53639a864a..6d9e4233e66a 100644
46+
--- a/scripts/Kbuild.include
47+
+++ b/scripts/Kbuild.include
48+
@@ -287,7 +287,7 @@ ksym_dep_filter = \
49+
$(CPP) $(call flags_nodeps,c_flags) -D__KSYM_DEPS__ $< ;; \
50+
as_*_S|cpp_s_S) \
51+
$(CPP) $(call flags_nodeps,a_flags) -D__KSYM_DEPS__ $< ;; \
52+
- boot*|build*|cpp_its_S|*cpp_lds_S|dtc|host*|vdso*) : ;; \
53+
+ boot*|build*|cpp_its_S|*cpp_lds_S|dtc*|host*|vdso*) : ;; \
54+
*) echo "Don't know how to preprocess $(1)" >&2; false ;; \
55+
esac | tr ";" "\n" | sed -n 's/^.*=== __KSYM_\(.*\) ===.*$$/_\1/p'
56+
57+
diff --git a/scripts/Makefile.dtbinst b/scripts/Makefile.dtbinst
58+
index 6ce32a932099..da2af04a6d7d 100644
59+
--- a/scripts/Makefile.dtbinst
60+
+++ b/scripts/Makefile.dtbinst
61+
@@ -20,6 +20,7 @@ include scripts/Kbuild.include
62+
include $(src)/Makefile
63+
64+
dtbinst-files := $(sort $(dtb-y) $(if $(CONFIG_OF_ALL_DTBS), $(dtb-)))
65+
+dtboinst-files := $(sort $(dtbo-y) $(if $(CONFIG_OF_ALL_DTBS), $(dtb-)))
66+
dtbinst-dirs := $(subdir-y) $(subdir-m)
67+
68+
# Helper targets for Installing DTBs into the boot directory
69+
@@ -28,22 +29,16 @@ quiet_cmd_dtb_install = INSTALL $<
70+
71+
install-dir = $(patsubst $(dtbinst_root)%,$(INSTALL_DTBS_PATH)%,$(obj))
72+
73+
-$(filter %.dtb,$(dtbinst-files)): %.dtb: $(obj)/%.dtb
74+
+$(dtbinst-files): %.dtb: $(obj)/%.dtb
75+
$(call cmd,dtb_install,$(install-dir))
76+
77+
-$(filter %.dtbo,$(dtbinst-files)): %.dtbo: $(obj)/%.dtbo
78+
- $(call cmd,dtb_install,$(install-dir))
79+
-
80+
-$(filter %.itb,$(dtbinst-files)): %.itb: $(obj)/%.itb
81+
+$(dtboinst-files): %.dtbo: $(obj)/%.dtbo
82+
$(call cmd,dtb_install,$(install-dir))
83+
84+
$(dtbinst-dirs):
85+
$(Q)$(MAKE) $(dtbinst)=$(obj)/$@
86+
87+
-dummy:
88+
- @echo > /dev/null
89+
-
90+
-PHONY += $(dtbinst-files) $(dtbinst-dirs) dummy
91+
-__dtbs_install: $(dtbinst-files) $(dtbinst-dirs) dummy
92+
+PHONY += $(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs)
93+
+__dtbs_install: $(dtbinst-files) $(dtboinst-files) $(dtbinst-dirs)
94+
95+
.PHONY: $(PHONY)
96+
diff --git a/scripts/Makefile.lib b/scripts/Makefile.lib
97+
index a232741e3fd3..18381b50fa8e 100644
98+
--- a/scripts/Makefile.lib
99+
+++ b/scripts/Makefile.lib
100+
@@ -293,6 +293,18 @@ cmd_dtc = mkdir -p $(dir ${dtc-tmp}) ; \
101+
$(obj)/%.dtb: $(src)/%.dts $(DTC) FORCE
102+
$(call if_changed_dep,dtc)
103+
104+
+quiet_cmd_dtco = DTCO $@
105+
+cmd_dtco = mkdir -p $(dir ${dtc-tmp}) ; \
106+
+ $(CPP) $(dtc_cpp_flags) -x assembler-with-cpp -o $(dtc-tmp) $< ; \
107+
+ $(DTC) -@ -H epapr -O dtb -o $@ -b 0 \
108+
+ -i $(dir $<) $(DTC_FLAGS) \
109+
+ -Wno-interrupts_property \
110+
+ -d $(depfile).dtc.tmp $(dtc-tmp) ; \
111+
+ cat $(depfile).pre.tmp $(depfile).dtc.tmp > $(depfile)
112+
+
113+
+$(obj)/%.dtbo: $(src)/%-overlay.dts FORCE
114+
+ $(call if_changed_dep,dtco)
115+
+
116+
dtc-tmp = $(subst $(comma),_,$(dot-target).dts.tmp)
117+
118+
# Bzip2
119+
--
120+
2.28.0
121+

patches/git/BBDTBS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
BBDTBS: https://github.com/beagleboard/BeagleBoard-DeviceTrees/commit/af07ef77cc6f8f94568a4c238cc6d41fb8c81931
1+
BBDTBS: https://github.com/beagleboard/BeagleBoard-DeviceTrees/commit/24c9147d23e07666e4dc1d03425abe86994beb6a

0 commit comments

Comments
 (0)