Build kdump only for 64-bit
It doesn't support 32-bit target. Build crashdump, kexec, and the kernel only for 64-bit and disable the 32-bit variant. Bug: N/A Test: build for aosp_x86 and full Change-Id: I3fafff4a1a45ab808aa3b8cd720925c6b8f4fef3
This commit is contained in:
parent
2a00e9998d
commit
9e5ae63ae9
|
@ -90,9 +90,6 @@ android_system_image {
|
||||||
"microdroid_property_contexts",
|
"microdroid_property_contexts",
|
||||||
"microdroid_service_contexts",
|
"microdroid_service_contexts",
|
||||||
|
|
||||||
"microdroid_kexec",
|
|
||||||
"microdroid_crashdump_kernel",
|
|
||||||
|
|
||||||
// TODO(b/195425111) these should be added automatically
|
// TODO(b/195425111) these should be added automatically
|
||||||
"libcrypto", // used by many (init_second_stage, microdroid_manager, toybox, etc)
|
"libcrypto", // used by many (init_second_stage, microdroid_manager, toybox, etc)
|
||||||
"liblzma", // used by init_second_stage
|
"liblzma", // used by init_second_stage
|
||||||
|
@ -113,6 +110,8 @@ android_system_image {
|
||||||
"apkdmverity",
|
"apkdmverity",
|
||||||
"authfs",
|
"authfs",
|
||||||
"authfs_service",
|
"authfs_service",
|
||||||
|
"microdroid_crashdump_kernel",
|
||||||
|
"microdroid_kexec",
|
||||||
"microdroid_manager",
|
"microdroid_manager",
|
||||||
"zipfuse",
|
"zipfuse",
|
||||||
],
|
],
|
||||||
|
|
|
@ -7,6 +7,7 @@ cc_binary {
|
||||||
stem: "kexec",
|
stem: "kexec",
|
||||||
srcs: ["kexec.c"],
|
srcs: ["kexec.c"],
|
||||||
installable: false,
|
installable: false,
|
||||||
|
compile_multilib: "64",
|
||||||
}
|
}
|
||||||
|
|
||||||
cc_binary {
|
cc_binary {
|
||||||
|
@ -15,11 +16,16 @@ cc_binary {
|
||||||
srcs: ["crashdump.c"],
|
srcs: ["crashdump.c"],
|
||||||
static_executable: true,
|
static_executable: true,
|
||||||
installable: false,
|
installable: false,
|
||||||
|
compile_multilib: "64",
|
||||||
}
|
}
|
||||||
|
|
||||||
android_filesystem {
|
android_filesystem {
|
||||||
name: "microdroid_crashdump_initrd",
|
name: "microdroid_crashdump_initrd",
|
||||||
deps: ["microdroid_crashdump"],
|
multilib: {
|
||||||
|
lib64: {
|
||||||
|
deps: ["microdroid_crashdump"],
|
||||||
|
},
|
||||||
|
},
|
||||||
dirs: [
|
dirs: [
|
||||||
"dev",
|
"dev",
|
||||||
"proc",
|
"proc",
|
||||||
|
|
|
@ -80,7 +80,7 @@ int main() {
|
||||||
if (fstat(vmcore, &statbuf) == -1) {
|
if (fstat(vmcore, &statbuf) == -1) {
|
||||||
FAIL("Failed to stat %s", DUMP_SOURCE);
|
FAIL("Failed to stat %s", DUMP_SOURCE);
|
||||||
}
|
}
|
||||||
printf("Size is %ld bytes\n", (long)statbuf.st_size);
|
printf("Size is %ld bytes\n", statbuf.st_size);
|
||||||
|
|
||||||
// sendfile(2) is faster, can't be used because /proc/vmcore doesn't support splice_read
|
// sendfile(2) is faster, can't be used because /proc/vmcore doesn't support splice_read
|
||||||
size_t dumped = 0;
|
size_t dumped = 0;
|
||||||
|
|
|
@ -12,7 +12,7 @@ license {
|
||||||
|
|
||||||
prebuilt_etc {
|
prebuilt_etc {
|
||||||
name: "microdroid_crashdump_kernel",
|
name: "microdroid_crashdump_kernel",
|
||||||
src: "empty", // for other 32-bit architectures like x86 and arm
|
compile_multilib: "64",
|
||||||
arch: {
|
arch: {
|
||||||
arm64: {
|
arm64: {
|
||||||
src: "arm64/kernel-5.15",
|
src: "arm64/kernel-5.15",
|
||||||
|
|
Loading…
Reference in New Issue