Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
240 changes: 240 additions & 0 deletions KernelCompilation_ErrRecord.md
Original file line number Diff line number Diff line change
Expand Up @@ -239,3 +239,243 @@ comment
(1) drivers/media/video/uvc/uvc_status.c:236: fatal error: opening dependency file drivers/media/video/uvc/.uvc_status.o.d: No such file or directory
```


#### Eddition 2.6.30 (Netgear-VER_01.00.24-linux-2.6.30)

```
(1) cc1: warnings being treated as errors
[arch/mips/math-emu/cplemu.o] Error 1
```

```
comment
EXTRA_CFLAGS += -Werror
in arch/mips/math-emu/Makefile
```

```
(2) Can't use 'defined(@array)' (Mabye you should just omit the defined()?) at kernel/timeconst.pl line 373
```

```
omit the defined(), only keep @array
```

```
(3) No rule to make target '/home/yjq/Fulirong/Tools/cheq/deadline-arm/code/objs/linux-stable-2.6.30.k/firmware/cis/', needed by 'firmware/cis/LA-PCM.cis.gen.S'.
And other similiar firmware/***
```

```
comment in firmware/Makefile
```

```
(4) arch/mips/lib/delay.c: 54: error: 'us' undeclared
```

```
change us to ns in arch/mips/lib/delay.c line 54
```

```
(5) [preparebrcmdriver] Error 2
```

```
Error when use firmware's Makefile for linux kernel. preparebrcmdriver only needed by firmware, so comment.
```

```
(6) IRgen
include/sound/soc-dai.h:224:25: error: member of anonyous union redeclares 'codec'
'unused'
```

```
Redeclare indeed. rename the codec in the union to p_codec, in include/sound/soc-dai.h line 224.
其他redeclare in union问题也类似解决
```

```
(7) IRgen
crypto/testmgr.c:1234:9: error: fields must have a constant size: 'variable length array in structure' extension will never be supported.
```

```
!UNSOLVED!
indeed variable length array.
```

```
(8) IRgen
fs/proc/kcore.c:163:16: error: use of undeclared identifier 'ELF_DATA' 'SPSTR' 'DPSTR'

```

```
ELF_DATA is defined in arch/mips/include/asm/elf.h, only defined either for MIPSEB or MIPSEL.
使用大端的设置,copy到#else情况下。
类似: SPSTR DPSTR arch/mips/math-emu/ieee754.c 没有#else的设置
```

```
(9) Firmware config
symbol value '' invalid for BCM_SVHED_RT_PERIOD
```

```
allyesconfig没有设置firmware一些必须的设置项,手动修改.config文件设置为1
```

```
(10) Firmware build
arch/mips/bcm963xx/irq.c: error bcm_map_part.h: no such file or directory
```

```
comment bcm963xx
```

```
(11) Firmware build
kernel/sched.c: error: implicit declaration of function ...
```

```
comment sched.o
```

```
(12) Assembler messages:
Error: Branch out of range
```

```
comment
```

```
(13) crypto/vmac.c: error: dereferencing pointer to incomplete type
```

```
comment vmac.o
```

```
(14) crypto/xor.c: error: '__GFP_NOTRACK' undeclared
```

```
comment xor.o
```

```
(15) conflict function 'async_trigger_callback'
```

```
comment
indeed different declaration async_trigger_callback from kernel.
```

```
(16) drivers/mtd/brcmnand/brcmnand_base.c: error: 'NAND_REG_BASE' undeclared
```

```
comment brcmnand. only exist in firmware, not exist in kernel.
```

```
(17) Permission not able to create /modules.order
```

```
!!!UNSOLVED!!!
No vmlinux, but have *.o
```

#### Eddition 4.9.198 (dd-wrt-universal-linux-4.9.198)

```
(1) Firmware config
drivers/net/wireless/Kconfig:32: can't open file "drivers/net/wireless/rt3352/rt2860v2_ap/Kconfig"
```

```
comment line 32 in drivers/net/wireless/Kconfig
```

```
(2) Firmware build
kernel/crashlog.c:151: error: 'struct module' has no member named 'module_core' ...
```

```
comment line 151,152 in kernel/crashlog.c
```

```
(3) fs/squashfs-dd/inode.c:1041 ... : error: 'struct squashfs_super_block' has no member named 'bytes_used_2'
```

```
comment inode.o in Makefile
```

```
(4) security/apparmor/apparmorfs.c:103:error: too many arguments to function 'kvmalloc'
```

```
Frimware的kernel/mm.h中定义了有2个参数的kvmalloc函数,原linux kernel的mm.h中没有该函数。
Firmware的apparmor.h中和原linux kernel中有相同的一个参数的kvmalloc定义。
Firmware中的调用都是两个参数的。
因此将Firmware的security/apparmor/include/apparmor.h中的kvmalloc定义注释掉。
```

```
(5) drivers/leds/trigger/ledtrig-morse.c:34: leds.h: No such file or directory
```

```
存在drivers/leds/leds.h,复制到drivers/leds/trigger/目录下
```

```
(6) drivers/mmc/host/mtk-mmc/sd.c:34: error: 'HOST_MAX_MCLK' undeclared ...
896:error: implicit declaration of function 'mmc_suspend_host'
```

```
sd.c中,HOST_MAX_MCLK是有条件#define的,在#else中也define以下。
hclks也相同。
注释了896和918行
```

```
(7) drivers/usb/dwc3/gadget.c:3171: error: too few arguments to function 'dwc3_gadget_run_stop'
```

```
dwc3_gadget_run_stop应用3个参数,3171行和3174行只有两个,根据其他位置的调用,添加第3个参数false
```

```
(8) drivers/usb/dwc3/gadget.c:3171: error: implicitdeclaration of function 'AL_REG_FIELD_GET'
```

```
AL_REG_FIELD_GET在arch/arm/mach-alpine/include/al_hal/al_hal_reg_utils.h中有定义,copy到drivers/usb/dwc3目录下
```

```
(9) multiple definition of 'crc8'
```

```
!!!UNSOLVED!!!
没能编译出vmlinux.o 但是其他*.o存在
```