좋은 날 되시기 바랍니다,
나는 이것에 익숙하지 않고 내 상황에 대해 검색하고 검색했지만 대답이 없습니다. 여기 저기 스레드가 40개 정도 있는데 아무도 나를 도와주지 않아서 이 질문을 하기가 부끄럽지만 해야 합니다.
내 안드로이드 장치용 커널을 컴파일하려고 합니다. 체인 도구를 컴파일하고 커널을 수정했지만, 컴파일하면 다음과 같은 112 오류가 표시됩니다.
CC arch/arm/mm/alignment.o
CC fs/open.o
CC kernel/fork.o
CC fs/read_write.o
In file included from include/linux/printk.h:6:0,
from include/linux/kernel.h:13,
from arch/arm/mm/rodata.c:15:
arch/arm/mm/rodata.c: In function 'set_page_attributes':
include/linux/kern_levels.h:4:18: warning: format '%lx' expects argument of type 'long unsigned int', but argument 4 has type 'pmd_t {aka unsigned int}' [-Wformat=]
#define KERN_SOH "\001" /* ASCII Start Of Header */
^
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
^
include/linux/printk.h:216:9: note: in expansion of macro 'KERN_ERR'
printk(KERN_ERR pr_fmt(fmt), ##__VA_ARGS__)
^
arch/arm/mm/rodata.c:91:4: note: in expansion of macro 'pr_err'
pr_err("%s: pmd %p=%08lx for %08lx not page table\n",
^
CC mm/filemap.o
CC mm/mempool.o
CC mm/oom_kill.o
AS arch/arm/mm/abort-ev7.o
AS arch/arm/mm/pabort-v7.o
In file included from arch/arm/mm/dma-mapping.c:20:0:
include/linux/dma-contiguous.h: In function 'dev_get_cma_area':
include/linux/dma-contiguous.h:72:16: error: 'struct device' has no member named 'cma_area'
if (dev && dev->cma_area)
^
include/linux/dma-contiguous.h:73:13: error: 'struct device' has no member named 'cma_area'
return dev->cma_area;
^
include/linux/dma-contiguous.h: In function 'dev_set_cma_area':
include/linux/dma-contiguous.h:80:6: error: 'struct device' has no member named 'cma_area'
dev->cma_area = cma;
^
AS arch/arm/mm/cache-v7.o
CC arch/arm/mm/copypage-v6.o
CC kernel/exec_domain.o
CC arch/arm/mm/context.o
In file included from /home/tareq/Kernel/arch/arm/include/asm/sec/sec_debug.h:21:0,
from include/asm-generic/emergency-restart.h:4,
from arch/arm/include/generated/asm/emergency-restart.h:1,
from include/linux/reboot.h:56,
from arch/arm/kernel/process.c:21:
include/soc/sprd/hardware.h:40:2: error: #error "Unknown architecture specification"
#error "Unknown architecture specification"
^
CC security/apparmor/apparmorfs.o
CC ipc/util.o
CC crypto/api.o
arch/arm/mm/dma-mapping.c: At top level:
include/linux/dma-contiguous.h:66:28: error: 'CONFIG_CMA_AREAS' undeclared here (not in a function)
#define MAX_CMA_AREAS (1 + CONFIG_CMA_AREAS)
^
arch/arm/mm/dma-mapping.c:396:54: note: in expansion of macro 'MAX_CMA_AREAS'
static struct dma_contig_early_reserve dma_mmu_remap[MAX_CMA_AREAS] __initdata;
^
AS arch/arm/mm/tlb-v7.o
CC fs/file_table.o
AS arch/arm/mm/proc-v7.o
arch/arm/mm/dma-mapping.c:396:40: warning: 'dma_mmu_remap' defined but not used [-Wunused-variable]
static struct dma_contig_early_reserve dma_mmu_remap[MAX_CMA_AREAS] __initdata;
^
In file included from /home/tareq/Kernel/arch/arm/include/asm/sec/sec_debug.h:21:0,
from include/asm-generic/emergency-restart.h:4,
from arch/arm/include/generated/asm/emergency-restart.h:1,
from include/linux/reboot.h:56,
from arch/arm/kernel/machine_kexec.c:8:
include/soc/sprd/hardware.h:40:2: error: #error "Unknown architecture specification"
#error "Unknown architecture specification"
^
CC fs/super.o
CC mm/fadvise.o
scripts/Makefile.build:308: recipe for target 'arch/arm/mm/dma-mapping.o' failed
make[1]: *** [arch/arm/mm/dma-mapping.o] Error 1
make[1]: *** Waiting for unfinished jobs....
CC fs/char_dev.o
CC ipc/msgutil.o
CC mm/maccess.o
In file included from /home/tareq/Kernel/arch/arm/include/asm/sec/sec_debug.h:21:0,
from arch/arm/kernel/traps.c:39:
include/soc/sprd/hardware.h:40:2: error: #error "Unknown architecture specification"
#error "Unknown architecture specification"
^
In file included from arch/arm/kernel/process.c:44:0:
/home/tareq/Kernel/arch/arm/include/asm/sec/sec_log.h:24:20: warning: function declaration isn't a prototype [-Wstrict-prototypes]
static inline void sec_debug_panic_message(en) { }
^
/home/tareq/Kernel/arch/arm/include/asm/sec/sec_log.h: In function 'sec_debug_panic_message':
/home/tareq/Kernel/arch/arm/include/asm/sec/sec_log.h:24:20: warning: type of 'en' defaults to 'int' [-Wimplicit-int]
CC ipc/msg.o
In file included from arch/arm/mm/init.c:23:0:
include/linux/dma-contiguous.h: In function 'dev_get_cma_area':
include/linux/dma-contiguous.h:72:16: error: 'struct device' has no member named 'cma_area'
if (dev && dev->cma_area)
^
include/linux/dma-contiguous.h:73:13: error: 'struct device' has no member named 'cma_area'
return dev->cma_area;
^
include/linux/dma-contiguous.h: In function 'dev_set_cma_area':
include/linux/dma-contiguous.h:80:6: error: 'struct device' has no member named 'cma_area'
dev->cma_area = cma;
^
CC kernel/panic.o
CC ipc/sem.o
In file included from /home/tareq/Kernel/arch/arm/include/asm/sec/sec_debug.h:21:0,
from arch/arm/mm/fault.c:34:
include/soc/sprd/hardware.h:40:2: error: #error "Unknown architecture specification"
#error "Unknown architecture specification"
^
CC kernel/printk.o
CC ipc/shm.o
arch/arm/kernel/traps.c: In function 'cp_abort':
arch/arm/kernel/traps.c:829:8: warning: format '%s' expects argument of type 'char *', but argument 2 has type 'void *' [-Wformat=]
panic("CP Crash : %s", debug_info);
^
scripts/Makefile.build:308: recipe for target 'arch/arm/kern /machine_kexec.o' failed
make[1]: *** [arch/arm/kernel/machine_kexec.o] Error 1
make[1]: *** Waiting for unfinished jobs....
CC kernel/cpu.o
scripts/Makefile.build:308: recipe for target 'arch/arm/kernel/process.o' failed
make[1]: *** [arch/arm/kernel/process.o] Error 1
CC ipc/ipcns_notifier.o
scripts/Makefile.build:308: recipe for target 'arch/arm/mm/fault.o' failed
make[1]: *** [arch/arm/mm/fault.o] Error 1
CC kernel/exit.o
scripts/Makefile.build:308: recipe for target 'arch/arm/kernel/traps.o' failed
make[1]: *** [arch/arm/kernel/traps.o] Error 1
CC security/apparmor/audit.o
GEN security/apparmor/capability_names.h
CC security/apparmor/context.o
CC kernel/itimer.o
LD arch/arm/common/built-in.o
HZFILE kernel/hz.bc
scripts/Makefile.build:308: recipe for target 'arch/arm/mm/init.o' failed
make[1]: *** [arch/arm/mm/init.o] Error 1
CC kernel/softirq.o
CC ipc/syscall.o
CC kernel/resource.o
그리고 컴파일이 끝나면:
CC [M] fs/ocfs2/dlm/dlmdomain.o
CC [M] fs/ocfs2/cluster/tcp.o
In file included from /home/tareq/Kernel/arch/arm/include/asm/sec/sec_debug.h:21:0,
from include/asm-generic/emergency-restart.h:4,
from arch/arm/include/generated/asm/emergency-restart.h:1,
from include/linux/reboot.h:56,
from fs/ocfs2/cluster/quorum.c:48:
include/soc/sprd/hardware.h:40:2: error: #error "Unknown architecture specification"
#error "Unknown architecture specification"
^
scripts/Makefile.build:308: recipe for target 'fs/ocfs2/cluster/quorum.o' failed
make[3]: *** [fs/ocfs2/cluster/quorum.o] Error 1
make[3]: *** Waiting for unfinished jobs....
CC [M] fs/xfs/xfs_ialloc_btree.o
CC [M] fs/ocfs2/dlm/dlmdebug.o
CC [M] fs/xfs/xfs_inode.o
CC [M] fs/ocfs2/dlm/dlmthread.o
CC [M] fs/xfs/xfs_log_recover.o
In file included from /home/tareq/Kernel/arch/arm/include/asm/sec/sec_debug.h:21:0,
from include/asm-generic/emergency-restart.h:4,
from arch/arm/include/generated/asm/emergency-restart.h:1,
from include/linux/reboot.h:56,
from fs/ocfs2/stack_user.c:25:
include/soc/sprd/hardware.h:40:2: error: #error "Unknown architecture specification"
#error "Unknown architecture specification"
^
scripts/Makefile.build:308: recipe for target 'fs/ocfs2/stack_user.o' failed
make[2]: *** [fs/ocfs2/stack_user.o] Error 1
make[2]: *** Waiting for unfinished jobs....
CC [M] fs/xfs/xfs_mount.o
CC [M] fs/xfs/xfs_symlink.o
CC [M] fs/ocfs2/dlm/dlmrecovery.o
CC [M] fs/ocfs2/dlm/dlmmaster.o
CC [M] fs/xfs/xfs_trans.o
CC [M] fs/ocfs2/dlm/dlmast.o
CC [M] fs/xfs/xfs_log.o
CC [M] fs/xfs/xfs_log_cil.o
CC [M] fs/xfs/xfs_buf_item.o
CC [M] fs/xfs/xfs_extfree_item.o
CC [M] fs/xfs/xfs_inode_item.o
CC [M] fs/xfs/xfs_trans_ail.o
CC [M] fs/ocfs2/dlm/dlmconvert.o
CC [M] fs/xfs/xfs_trans_buf.o
CC [M] fs/ocfs2/dlm/dlmlock.o
CC [M] fs/xfs/xfs_trans_extfree.o
CC [M] fs/ocfs2/dlm/dlmunlock.o
CC [M] fs/xfs/xfs_trans_inode.o
CC [M] fs/xfs/xfs_dquot.o
CC [M] fs/xfs/xfs_dquot_item.o
CC [M] fs/xfs/xfs_trans_dquot.o
CC [M] fs/ocfs2/dlm/dlmver.o
CC [M] fs/xfs/xfs_qm_syscalls.o
CC [M] fs/xfs/xfs_qm_bhv.o
CC [M] fs/xfs/xfs_qm.o
CC [M] fs/xfs/xfs_quotaops.o
LD [M] fs/nfs/blocklayout/blocklayoutdriver.o
CC [M] fs/xfs/xfs_rtalloc.o
CC [M] fs/xfs/xfs_acl.o
CC [M] fs/xfs/xfs_stats.o
CC [M] fs/xfs/xfs_sysctl.o
LD [M] fs/nfs/objlayout/objlayoutdriver.o
LD [M] fs/cifs/cifs.o
LD fs/ext4/ext4.o
LD fs/ext4/built-in.o
scripts/Makefile.build:455: recipe for target 'fs/ocfs2/cluster' failed
make[2]: *** [fs/ocfs2/cluster] Error 2
LD [M] fs/nfs/nfs_layout_nfsv41_files.o
LD [M] fs/nfs/nfsv4.o
LD [M] fs/nfs/nfsv2.o
LD [M] fs/nfs/nfsv3.o
LD [M] fs/nfs/nfs.o
LD [M] fs/xfs/xfs.o
LD [M] fs/ocfs2/dlm/ocfs2_dlm.o
scripts/Makefile.build:455: recipe for target 'fs/ocfs2' failed
make[1]: *** [fs/ocfs2] Error 2
Makefile:798: recipe for target 'fs' failed
make: *** [fs] Error 2
ERROR: An error occured. Kernel was not compiled.
그건 불가능해요.
하나의 커널에 있는 모든 오류를 믿기 어렵습니다.
그러니 왜 이런 오류가 발생하는지 설명하기 위해 누구든지 저를 도와주실 수 있나요? 오류 없이 작동하려면 어떻게 해야 합니까?
답변1
죄송합니다. 저는 문제를 알아냈습니다. 그것은 defconfig 파일의 이름이었습니다. 제가 한 일은 예: 처음에는 다음과 같습니다: anyname_defconfig, 이름을 bravo_defconfig로 바꿨습니다. 오류가 사라집니다. 하지만 여전히 문제가 있습니다. [오류가 나를 사랑합니다 ㅋㅋㅋ:(] 내가 가진 것은 다음과 같습니다.
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
include/linux/kern_levels.h:10:18: note: in expansion of macro 'KERN_SOH'
#define KERN_ERR KERN_SOH "3" /* error conditions */
scripts/Makefile.build:441: recipe for target 'drivers/misc/mdbg/mdbgdrv.o' failed
make[3]: *** [drivers/misc/mdbg/mdbgdrv.o] Error 1
scripts/Makefile.build:455: recipe for target 'drivers/misc/mdbg'failed
make[2]: *** [drivers/misc/mdbg] Error 2
make[2]: *** Waiting for unfinished jobs....
drivers/media/sprd_scale/common/img_scale.c: In function 'scale_k_read':
drivers/media/sprd_scale/common/img_scale.c:110:10: warning: format '%ld' expects argument of type 'long int', but argument 2 has type 'size_t {aka unsigned int}' [-Wformat=]
printk("scale_k_read error: wrong size of u_data: %ld \n", cnt);
scripts/Makefile.build:455: recipe for target 'drivers/misc' failed
make[1]: *** [drivers/misc] Error 2
make[1]: *** Waiting for unfinished jobs....
scripts/Makefile.build:387: recipe for target 'kernel/trace/built-in.o' failed
make[2]: *** [kernel/trace/built-in.o] Error 1
scripts/Makefile.build:455: recipe for target 'kernel/trace' failed
make[1]: *** [kernel/trace] Error 2
Makefile:798: recipe for target 'kernel' failed
make: *** [kernel] Error 2
drivers/input/keyboard/tc350k.c: In function 'tc300k_power':
drivers/input/keyboard/tc350k.c:367:27: warning: format '%s' expects a matching 'char *' argument [-Wformat=]
dev_err(&client->dev, "%s regulator_get error \n");
Makefile:798: recipe for target 'drivers' failed
make: *** [drivers] Error 2
scripts/Makefile.build:387: recipe for target 'fs/built-in.o' failed
make[1]: *** [fs/built-in.o] Error 1
Makefile:798: recipe for target 'fs' failed
make: *** [fs] Error 2
ERROR: An error occured. Kernel was not compiled.
이 오류에 대해 도움을 줄 수 있는 사람이 있으면 부탁드립니다.
이 오류를 해결하는 방법은 무엇입니까?