1 |
commit: 6c01028ceb471bb8c22ac71656e7c07828fc2134 |
2 |
Author: Alexey Shvetsov <alexxy <AT> gentoo <DOT> org> |
3 |
AuthorDate: Thu May 21 18:29:32 2020 +0000 |
4 |
Commit: Michał Górny <mgorny <AT> gentoo <DOT> org> |
5 |
CommitDate: Thu May 21 19:31:50 2020 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=6c01028c |
7 |
|
8 |
kernel-{build,install}.eclass: more ARM support |
9 |
|
10 |
Signed-off-by: Alexey Shvetsov <alexxy <AT> gentoo.org> |
11 |
Signed-off-by: Michał Górny <mgorny <AT> gentoo.org> |
12 |
|
13 |
eclass/kernel-build.eclass | 19 +++++++++++++++++-- |
14 |
eclass/kernel-install.eclass | 12 ++++++++++++ |
15 |
2 files changed, 29 insertions(+), 2 deletions(-) |
16 |
|
17 |
diff --git a/eclass/kernel-build.eclass b/eclass/kernel-build.eclass |
18 |
index ba4b012dc4c..7d674fa9cf4 100644 |
19 |
--- a/eclass/kernel-build.eclass |
20 |
+++ b/eclass/kernel-build.eclass |
21 |
@@ -99,9 +99,13 @@ kernel-build_src_compile() { |
22 |
# from kernel-install.eclass with the correct paths. |
23 |
kernel-build_src_test() { |
24 |
debug-print-function ${FUNCNAME} "${@}" |
25 |
+ local targets=( modules_install ) |
26 |
+ if use arm || use arm64; then |
27 |
+ targets+=( dtbs_install ) |
28 |
+ fi |
29 |
|
30 |
emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \ |
31 |
- INSTALL_MOD_PATH="${T}" modules_install |
32 |
+ INSTALL_MOD_PATH="${T}" "${targets[@]}" |
33 |
|
34 |
kernel-install_test "${PV}" \ |
35 |
"${WORKDIR}/build/$(kernel-install_get_image_path)" \ |
36 |
@@ -117,8 +121,19 @@ kernel-build_src_install() { |
37 |
|
38 |
# do not use 'make install' as it behaves differently based |
39 |
# on what kind of installkernel is installed |
40 |
+ local targets=( modules_install ) |
41 |
+ if use arm || use arm64; then |
42 |
+ targets+=( dtbs_install ) |
43 |
+ fi |
44 |
+ |
45 |
emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \ |
46 |
- INSTALL_MOD_PATH="${ED}" modules_install |
47 |
+ INSTALL_MOD_PATH="${ED}" "${targets[@]}" |
48 |
+ |
49 |
+ # on arm or arm64 dtbs also needed |
50 |
+ if (use arm || use arm64); then |
51 |
+ emake O="${WORKDIR}"/build "${MAKEARGS[@]}" \ |
52 |
+ INSTALL_PATH="${ED}/boot" dtbs_install |
53 |
+ fi |
54 |
|
55 |
# note: we're using mv rather than doins to save space and time |
56 |
# install main and arch-specific headers first, and scripts |
57 |
|
58 |
diff --git a/eclass/kernel-install.eclass b/eclass/kernel-install.eclass |
59 |
index c26af5c2e88..efccd70608c 100644 |
60 |
--- a/eclass/kernel-install.eclass |
61 |
+++ b/eclass/kernel-install.eclass |
62 |
@@ -92,6 +92,12 @@ kernel-install_get_image_path() { |
63 |
amd64|x86) |
64 |
echo arch/x86/boot/bzImage |
65 |
;; |
66 |
+ arm64) |
67 |
+ echo arch/arm64/boot/Image.gz |
68 |
+ ;; |
69 |
+ arm) |
70 |
+ echo arch/arm/boot/zImage |
71 |
+ ;; |
72 |
*) |
73 |
die "${FUNCNAME}: unsupported ARCH=${ARCH}" |
74 |
;; |
75 |
@@ -176,6 +182,12 @@ kernel-install_get_qemu_arch() { |
76 |
x86) |
77 |
echo i386 |
78 |
;; |
79 |
+ arm) |
80 |
+ echo arm |
81 |
+ ;; |
82 |
+ arm64) |
83 |
+ echo aarch64 |
84 |
+ ;; |
85 |
*) |
86 |
die "${FUNCNAME}: unsupported ARCH=${ARCH}" |
87 |
;; |