Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

tgt不能编绎 #12143

Open
1 task done
Nichunhua opened this issue May 8, 2024 · 2 comments
Open
1 task done

tgt不能编绎 #12143

Nichunhua opened this issue May 8, 2024 · 2 comments

Comments

@Nichunhua
Copy link

详细叙述

版本:1531aa758eed60b556d3e0b2731f7b743c43c51a
tgt版本:1.0.83
默认配置中只选tgt一个,编绎失败

重复 issue

  • 没有类似的 issue

具体型号

X86_X64

详细日志

util.c: In function 'backed_file_open':
util.c:88:23: error: storage size of 'st' isn't known
88 | struct stat64 st;
| ^~
util.c:96:15: error: implicit declaration of function 'fstat64'; did you mean 'fstatat'? [-Werror=implicit-function-declaration]
96 | err = fstat64(fd, &st);
| ^~~~~~~
| fstatat
util.c:88:23: error: unused variable 'st' [-Werror=unused-variable]
88 | struct stat64 st;
| ^~
cc1: all warnings being treated as errors

@WYC-2020
Copy link
Contributor

WYC-2020 commented May 9, 2024

这种错误 不是非常多的嘛 也说过方法 自己都不搜索一下,真是懒 #11771
image
如此

@Nichunhua
Copy link
Author

感谢 WYC-2020
目前我已在tgt的Makefile中添加了如下代码
8E2BC512-B719-4d1c-BDB8-03F724673533

ifeq ($(CONFIG_USE_MUSL),y)
TARGET_CFLAGS += -D_LARGEFILE64_SOURCE
endif
EXTRA_CFLAGS=$(TARGET_CPPFLAGS)

重新编绎成功

另外由于我的NAS用的是LSI Raid 磁盘阵列卡,目前的包中没有相关的驱动,设备启动后无法识别到磁盘,所以我在block.mk添加了如下代码
D91D5C90-32FD-40f5-8214-A6A5D883709B

define KernelPackage/megaraid
SUBMENU:=$(BLOCK_MENU)
TITLE:=megaraid device support
DEPENDS:=@TARGET_x86
KCONFIG:=CONFIG_MEGARAID_MM
CONFIG_MEGARAID_MAILBOX
CONFIG_MEGARAID_SAS
FILES:= $(LINUX_DIR)/drivers/scsi/megaraid/megaraid_sas.ko
AUTOLOAD:=$(call AutoLoad,40,megaraid_sas,1)
endef

$(eval $(call KernelPackage,megaraid))

经编绎测试后能正常加载成功,不知这样是不是有问题,建议在项目中添加megaraid 的驱动支持

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants