欢迎您访问程序员文章站本站旨在为大家提供分享程序员计算机编程知识!
您现在的位置是: 首页

生成Uboot Image时碰到的问题记录

程序员文章站 2022-04-24 14:23:30
...

make不了的问题缺少宏包

sudo apt-get install ncurses-dev
Reading package lists... Done
Building dependency tree
Reading state information... Done
Note, selecting 'libncurses5-dev' instead of 'ncurses-dev'
libncurses5-dev is already the newest version.
0 upgraded, 0 newly installed, 0 to remove and 238 not upgraded.

 

 

drivers/mtd/nand/nand_base.c:740:3: error: implicit declaration of function ‘dmb’ [-Werror=implicit-function-declaration]
cc1: some warnings being treated as errors
make[3]: *** [drivers/mtd/nand/nand_base.o] Error 1
make[2]: *** [drivers/mtd/nand] Error 2
make[1]: *** [drivers/mtd] Error 2
make: *** [drivers] Error 2

  

查找相应的Makefile.am 文件,删除AM_CXXFLAGS这一行后面的 -Werror选项,然后就可以了。

原错误: variable ‘ion_charge’ set but not used [-Werror=unused-but-set-variable]

原配置文件,Makefile.am 中的前几行:

AM_CXXFLAGS = -Wall -W -Werror $(USEDOUBLES) $(USEDARWIN) $(SEARCH_ENABLED) \
            -D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE

修改后,能股正确通过的:

AM_CXXFLAGS = -Wall -W $(USEDOUBLES) $(USEDARWIN) $(SEARCH_ENABLED) \
-D_LARGEFILE_SOURCE=1 -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE

 -Werror-implicit-function-declaration \

 

 

drivers/net/igbvf/igbvf.h:129:15: error: duplicate member ‘page’ make[3]: *** [drivers/net/igbvf/ethtool.o] Error 1

SOLUTION:
---------
SOLUTION:
---------
struct igbvf_buffer {
dma_addr_t dma;
struct sk_buff *skb;`enter code here`
union {
/* Tx */
struct {
unsigned long time_stamp;
u16 length;
u16 next_to_watch;
u16 mapped_as_page;
};
/* Rx */
struct {
struct page *page; <--------------- No 1
u64 page_dma;
unsigned int page_offset;
};
};
struct page *page; <------------ No 2
};
Hmm conflict of a member with a transparent union.
Maybe older gccs didn't catch that. But it looks very broken
Comment second pointer.

 

drivers/power/pda_power.c:307:2: error: too few arguments to function ‘otg_get_transceiver’

In file included from drivers/power/pda_power.c:22:0:

include/linux/usb/otg.h:170:32: note: declared here

make[2]: *** [drivers/power/pda_power.o] Error 1

 找到otg.h文件里的otg_get_transceiver函数体声明,去掉int id 

 

drivers/scsi/osd/osd_initiator.c: In function ‘build_test’:
drivers/scsi/osd/osd_initiator.c:67:2: error: negative width in bit-field ‘<anonymous>’
drivers/scsi/osd/osd_initiator.c:68:2: error: negative width in bit-field ‘<anonymous>’
make[3]: *** [drivers/scsi/osd/osd_initiator.o] Error 1
make[2]: *** [drivers/scsi/osd] Error 2
make[1]: *** [drivers/scsi] Error 2
make: *** [drivers] Error 2

 

 make uImage

---------

sudo apt-get可以解决

You can install uboot-mkimage package to get it working.

make O=object-directory CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm make_target_from_table_above
make O=am37x CROSS_COMPILE=arm-arago-linux-gnueabi- ARCH=arm omap3_evm