1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
| | This patch fixes cross-building the rumpkernel:
* Fixes for non-multiarch toolchains,
* Support cross-mig,
* Cater for non-FHS .../bin/sh.
Upstream status: not presented upstream.
From 3e080e8a43f8b2f7a107849dd2e7e38ee2732d20 Mon Sep 17 00:00:00 2001
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 16 May 2023 07:29:23 +0200
Subject: [PATCH 1/3] squash! patch: debian/patches/crossbuild
---
buildrump.sh/src/build.sh | 10 ++++++++--
pci-userspace/src-gnu/Makefile.inc | 3 ++-
2 files changed, 10 insertions(+), 3 deletions(-)
diff --git a/buildrump.sh/src/build.sh b/buildrump.sh/src/build.sh
index 60375f5f4..0e80813c1 100755
--- a/buildrump.sh/src/build.sh
+++ b/buildrump.sh/src/build.sh
@@ -2230,12 +2230,18 @@ maketoolwrapper ()
musthave=$1
tool=$2
- if [ "${tool}" = "CC" ]; then
+ if [ "${tool}" = "AR" ]; then
+ lctool=${TARGET_AR-ar}
+ elif [ "${tool}" = "CC" ]; then
lctool=${TARGET_CC-gcc}
elif [ "${tool}" = "CXX" ]; then
lctool=${TARGET_CXX-g++}
elif [ "${tool}" = "LD" ]; then
lctool=${TARGET_LD-ld}
+ elif [ "${tool}" = "MIG" ]; then
+ lctool=${TARGET_MIG-mig}
+ elif [ "${tool}" = "NM" ]; then
+ lctool=${TARGET_NM-nm}
else
lctool=$(echo ${tool} | tr '[A-Z]' '[a-z]')
fi
@@ -2302,7 +2308,7 @@ makerumptools ()
for x in CC AR NM OBJCOPY; do
maketoolwrapper true $x
done
- for x in AS LD OBJDUMP RANLIB READELF SIZE STRINGS STRIP CXX; do
+ for x in AS LD OBJDUMP RANLIB READELF SIZE STRINGS STRIP CXX MIG; do
maketoolwrapper false $x
done
diff --git a/pci-userspace/src-gnu/Makefile.inc b/pci-userspace/src-gnu/Makefile.inc
index 6f8db357e..ef25bac3a 100644
--- a/pci-userspace/src-gnu/Makefile.inc
+++ b/pci-userspace/src-gnu/Makefile.inc
@@ -8,11 +8,12 @@ RUMPCOMP_USER_CPPFLAGS+=-I${PCIDIR} -I${DESTDIR}/usr/include
RUMPCOMP_CPPFLAGS+= -I${PCIDIR} -I${DESTDIR}/usr/include
CPPFLAGS+= -I${PCIDIR}
LDFLAGS+= -lmachuser -Wl,--no-as-needed -lpciaccess -Wl,--as-needed
+MIG=mig
mach_debugUser.c:
echo '#include <mach_debug/mach_debug.defs>' \
| ${CC} -E -x c - -o - \
- | mig -cc cat - /dev/null -subrprefix __ \
+ | $(MIG) -cc cat - /dev/null -subrprefix __ \
-user mach_debugUser.c \
-server /dev/null \
-header mach_debug_U.h
--
2.39.2
From af67549b7c5da5970a9330d281bd8305e1f6e8ed Mon Sep 17 00:00:00 2001
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 16 May 2023 07:39:54 +0200
Subject: [PATCH 2/3] crossbuild: Cater for non-FHS shell.
---
buildrump.sh/src/tools/genassym/Makefile | 2 +-
buildrump.sh/src/tools/lorder/Makefile | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
diff --git a/buildrump.sh/src/tools/genassym/Makefile b/buildrump.sh/src/tools/genassym/Makefile
index e597c522b..96ca4ac21 100644
--- a/buildrump.sh/src/tools/genassym/Makefile
+++ b/buildrump.sh/src/tools/genassym/Makefile
@@ -17,7 +17,7 @@ ${TIMESTAMP}: genassym
${HOST_INSTALL_FILE} -m ${BINMODE} ${.ALLSRC} ${.TARGET}
genassym: genassym.sh
- ${TOOL_SED} -e "s,/bin/sh,${HOST_BSHELL},g" \
+ ${TOOL_SED} -e "s,\([ \!]\)/bin/sh,\1${HOST_BSHELL},g" \
-e "s,{AWK:=.*},{AWK:="${TOOL_AWK:Q}"}," \
< ${.ALLSRC} > ${.TARGET}
diff --git a/buildrump.sh/src/tools/lorder/Makefile b/buildrump.sh/src/tools/lorder/Makefile
index f3c599e12..92af83d51 100644
--- a/buildrump.sh/src/tools/lorder/Makefile
+++ b/buildrump.sh/src/tools/lorder/Makefile
@@ -17,7 +17,7 @@ ${TIMESTAMP}: lorder
${HOST_INSTALL_FILE} -m ${BINMODE} ${.ALLSRC} ${.TARGET}
lorder: lorder.sh
- ${TOOL_SED} -e "s,/bin/sh,"${HOST_BSHELL:Q}",g" \
+ ${TOOL_SED} -e "s,\([ \!]\)/bin/sh,\1"${HOST_BSHELL:Q}",g" \
-e "s,{JOIN:=.*},{JOIN:="${TOOL_JOIN:Q}"}," \
-e "s,{MKTEMP:=.*},{MKTEMP:="${TOOL_MKTEMP:Q}"}," \
-e "s,{NM:=.*},{NM:="${NM:Q}"}," \
--
2.39.2
From 9c8c93485e688bcc3db129bb56da03b18daae52c Mon Sep 17 00:00:00 2001
From: Janneke Nieuwenhuizen <janneke@gnu.org>
Date: Tue, 16 May 2023 08:55:51 +0200
Subject: [PATCH 3/3] squash! pci-userspace: Add acpi lookup of irqs with
fallback
---
debian/patches/acpi.diff | 5 +++--
1 file changed, 3 insertions(+), 2 deletions(-)
diff --git a/debian/patches/acpi.diff b/debian/patches/acpi.diff
index 8015a6e63..8e359b2c0 100644
--- a/debian/patches/acpi.diff
+++ b/debian/patches/acpi.diff
@@ -1,6 +1,6 @@
--- a/pci-userspace/src-gnu/Makefile.inc
+++ b/pci-userspace/src-gnu/Makefile.inc
-@@ -3,7 +3,7 @@
+@@ -3,8 +3,8 @@
PCIDIR:= ${.PARSEDIR}
.PATH: ${PCIDIR}
@@ -9,6 +9,7 @@
RUMPCOMP_USER_CPPFLAGS+=-I${PCIDIR} -I${DESTDIR}/usr/include
RUMPCOMP_CPPFLAGS+= -I${PCIDIR} -I${DESTDIR}/usr/include
CPPFLAGS+= -I${PCIDIR}
+ MIG=mig
@@ -16,3 +16,11 @@
-user mach_debugUser.c \
-server /dev/null \
@@ -17,7 +18,7 @@
+acpiUser.c:
+ echo '#include <hurd/acpi.defs>' \
+ | ${CC} -E -x c - -o - \
-+ | mig -cc cat - /dev/null -subrprefix __ \
++ | $(MIG) -cc cat - /dev/null -subrprefix __ \
+ -user acpiUser.c \
+ -server /dev/null \
+ -header acpi_U.h
--
2.39.2
|