核心編譯遇到的一些問題

2022-08-17 02:18:19 字數 3446 閱讀 5463

我在編譯核心的時候也不知道是我的編譯方式有問題還是其他的原因(使用的是天嵌e8的開發板附帶的原始碼,cpu是三星的s5pv210,核心版本3.0.8),遇到了很多的問題,下面就是我遇到的一些問題和解決方案,有些方案是我在網上找,有些是我自己想的,如果有什麼不對的,請告知,謝謝!

問題1:

drivers/gpio/janz-ttl.c

implicit declaration of function 'iowrite16be'

解決方案:

新增巨集定義:#define iowrite16be(v, addr) iowrite16(be16_to_cpu(v), (addr))

問題2:

drivers/char/s3c_mem.c中沒有mach/map.h

解決方案:

去掉該檔案中#include

問題3:

drivers/input/touchscreen/eeti_ts.c:65: error: implicit declaration of function 'irq_to_gpio'

解決方案:

a、raumfeld.c

static struct eeti_ts_platform_data eeti_ts_pdata = ;

b、/drivers/input/touchscreen/eeti_ts.c

struct eeti_ts_priv ;

static inline int eeti_ts_irq_active(struct eeti_ts_priv *priv)

if (pdata)

priv->irq_active_high = pdata->irq_active_high;

替換為if (pdata)

c、/include/linux/input/eeti_ts.h

struct eeti_ts_platform_data ;

問題4:

drivers/mfd/ezx-pcap.c:205: error: implicit declaration of function 'irq_to_gpio'

解決方案:

這個因為沒有找到解決的辦法,所以就自己定義了這個變數

問題5:

drivers/mmc/core/mmc_ops.c:20:22: error: plat/cpu.h: no such file or directory

解決方案:

將標頭檔案去掉

問題6:

drivers/mmc/host/sdhci.c中:s3c64xx_sdhci_control4,s3c64xx_sdhci_control4_busy未定義

解決方案:

標頭檔案所在arch/arm/plat-samsung/include/plat/regs-sdhci.h中

實在不行就將定義拷過去

問題7:

drivers/scsi/osd/osd_initiator.c:67: error: size of array 'type name' is negative

解決方案:

注釋掉報錯的行,該內容定義以後並未被使用

問題8:

drivers/scsi/advansys.c:8376: error: implicit declaration of function 'dma_cache_sync'

解決方案:

該函式已經被放棄了,直接注釋

問題9:

eabi版本不一致,鏈結失敗

解決方案:

這個是由編譯器版本過高導致的,在核心編譯選項中選擇kernel features中的use the arm eabi to compile the kernel

問題10:

drivers/staging/dt3155v4l/dt3155v4l.c:434: error: implicit declaration of function 'kzalloc'

解決方案:

新增標頭檔案

問題11:

drivers/staging/iio/accel/lis3l02dq_core.c:708: error: implicit declaration of function 'irq_to_gpio'

drivers/staging/iio/accel/lis3l02dq_ring.c:297: error: implicit declaration of function 'irq_to_gpio'

drivers/staging/iio/accel/sca3000_core.c:1169: error: implicit declaration of function 'irq_to_gpio'

drivers/staging/iio/imu/adis16400_core.c:822: error: implicit declaration of function 'irq_to_gpio'

解決方案:

這幾個檔案中的引用標頭檔案中包含了該函式的定義

問題12:

drivers/staging/solo6x10/core.c:140: error: implicit declaration of function 'kzalloc'

drivers/staging/solo6x10/p2m.c:52: error: implicit declaration of function 'kzalloc'

drivers/staging/solo6x10/enc.c:101: error: implicit declaration of function 'kzalloc'

drivers/staging/solo6x10/g723.c:139: error: implicit declaration of function 'kzalloc'

解決方案:

新增標頭檔案#include

問題13:

drivers/staging/vme/bridges/vme_tsi148.c:130: error: implicit declaration of function 'ioread32be'

drivers/staging/vme/bridges/vme_tsi148.c:133: error: implicit declaration of function 'ioread32be'

drivers/tty/serial/uartlite.c:79: error: implicit declaration of function 'ioread32be'

drivers/tty/serial/uartlite.c:125: error: implicit declaration of function 'iowrite32be'

解決方案:

#define iowrite32be(v, addr) iowrite32(be32_to_cpu(v), (addr))

#define ioread32be(addr) be32_to_cpu(ioread32(addr))

vs編譯ffmeg遇到的一些問題總結

f fmpeg官網上有vs編譯ffmeg的教程,主要的流程就是根據官網上給出的教程一步步編譯,但是在編譯過程中遇到了很多的坑,所以把自己遇到的一些坑寫出來讓其他的人少走彎路。這個建議直接參考 windows 下基於 mingw 編譯 ffmpeg 這裡是乙個大坑,在yasm官網上有乙個vs版本的ya...

遇到的一些問題心得

一.專案的版本管理。1 gnu 風格的版本號命名格式 主版本號 子版本號 修正版本號 編譯版本號 major version number.minor version number revision number build number 示例 1.2.1,2.0,5.0.0 build 13124...

ubantu遇到的一些問題

給hackywit可以通過sudo提公升root許可權 hackywit cxb hostname cxbhackywit cxb sudo vim etc hosts sudo hackywit 的密碼 127.0.0.1 localhost cxbhackywit cxb sudo apt ge...