Undefined reference to ‘fopen’ in cboot

I add md5.c into cboot. And when i use fopen,fread,fcose, i have #include <stdio.h> in md5.c.But cboot compiles failed.

cboot_src_t19x/bootloader/partner/common/lib/linuxboot/md5.c:333:Undefined reference to ‘fopen’
/home/gaozejun/gaozejun/nvidia_jetson_32.3.1-dev/sources/cboot_src_t19x/bootloader/partner/common/lib/linuxboot/md5.c:337:Undefined reference to ‘fread’
/home/gaozejun/gaozejun/nvidia_jetson_32.3.1-dev/sources/cboot_src_t19x/bootloader/partner/common/lib/linuxboot/md5.c:341:Undefined reference to ‘fclose’

Hi,

I think that issue is because your rules.mk does not include the path to stdio.h.

In bootloader/partner/common/lib/linuxboot/rules.mk,I have add the path to stdio.h–“bootloader/partner/t18x/cboot/include/stdio.h into rules.mk”, but the error is still there.

GLOBAL_INCLUDES +=
$(LOCAL_DIR) \

$(LOCAL_DIR)/../../include \

$(LOCAL_DIR)/../../include/lib \

$(LOCAL_DIR)/../../include/soc/$(TARGET) \

$(LOCAL_DIR)/../../../$(TARGET_FAMILY)/common/include/lib \

$(LOCAL_DIR)/../../../$(TARGET_FAMILY)/common/include/soc/$(TARGET) \

$(LOCAL_DIR)/../../../$(TARGET_FAMILY)/common/include/drivers \

$(LOCAL_DIR)/../../../$(TARGET_FAMILY)/nvtboot/common/soc/$(TARGET)/include \

$(LOCAL_DIR)/../../../$(TARGET_FAMILY)/nvtboot/bpmp/soc/$(TARGET)/include \

$(LOCAL_DIR)/../../../t18x/cboot/lib/lwip/include \

$(LOCAL_DIR)/../../../t18x/cboot/include

In cboot,fopen(fcose),fwrite(fread) can not be used .