diff --git a/recipes-support/GPIO/fintek-f75111-console-util_1.7.0.bb b/recipes-support/GPIO/fintek-f75111-console-util_1.7.0.bb new file mode 100644 index 00000000..6d16e5d2 --- /dev/null +++ b/recipes-support/GPIO/fintek-f75111-console-util_1.7.0.bb @@ -0,0 +1,54 @@ +FILESEXTRAPATHS:prepend := "${THISDIR}/fintek-f75111:" + +LICENSE = "Apache-2.0" +LIC_FILES_CHKSUM="\ + file://${COMMON_LICENSE_DIR}/MIT;md5=0835ade698e0bcf8506ecda2f7b4f302 \ +" + +## use SRC_URI as below if you wanto to use pre-compiled binary +#SRC_URI = "\ +# file://CIO_Utility_Console_L_Bin_v${PV}.zip \ +#" + +# otherwise the following SRC_URI is needed +# (note the patch which is required to avoid a dupulicated symbol which is +# defined in main.c as well as f75111.c, the latter being part of the f75111.a +# library together with the SMBus stuff in SMBus/SMBus.c) +SRC_URI = "\ + file://CIO_Utility_Console_L_Src_v${PV}.zip \ + file://console-util-main.patch \ +" + +# if you want to use the pre-compiled binary S needs to be defined as below +# and do_compile would become a nop +# S = "${WORKDIR}/CIO_Utility_Console_L_Bin_v${PV}" +# +# do_compile() { +# : +# } + +# to really build from sources the following setting for S and do_compile() is +# required +S = "${WORKDIR}/CIO_Utility_Console_L_Src_v${PV}/CIO_Utility_Console" + +do_compile() { + # at first create library + $CC -c SMBus/SMBus.c -o SMBus.o + $CC -c f75111.c -o f75111.o + $AR rvs libf75111.a f75111.o SMBus.o + + # now compile main file + $CC -c main.c -o main.o + + # now link everything together + $CC -v -static -pthread main.o -o CIO_Utility_Console -l pthread -L. -l f75111 +} + +# next line is only necessary if binary tool from binary archive gets installed +# INSANE_SKIP:${PN} += "already-stripped" + +do_install() { + install -D -m 0755 ./CIO_Utility_Console ${D}${sbindir}/CIO_Utility_Console +} + +FILES:${PN} = "${sbindir}/CIO_Utility_Console" \ No newline at end of file diff --git a/recipes-support/GPIO/fintek-f75111/CIO_Utility_Console_L_Bin_v1.7.0.zip b/recipes-support/GPIO/fintek-f75111/CIO_Utility_Console_L_Bin_v1.7.0.zip new file mode 100644 index 00000000..ad992fc4 Binary files /dev/null and b/recipes-support/GPIO/fintek-f75111/CIO_Utility_Console_L_Bin_v1.7.0.zip differ diff --git a/recipes-support/GPIO/fintek-f75111/CIO_Utility_Console_L_Src_v1.7.0.zip b/recipes-support/GPIO/fintek-f75111/CIO_Utility_Console_L_Src_v1.7.0.zip new file mode 100644 index 00000000..b117cef5 Binary files /dev/null and b/recipes-support/GPIO/fintek-f75111/CIO_Utility_Console_L_Src_v1.7.0.zip differ diff --git a/recipes-support/GPIO/fintek-f75111/console-util-main.patch b/recipes-support/GPIO/fintek-f75111/console-util-main.patch new file mode 100644 index 00000000..f425115a --- /dev/null +++ b/recipes-support/GPIO/fintek-f75111/console-util-main.patch @@ -0,0 +1,11 @@ +--- a/main.c 2025-08-12 15:21:01.903424114 +0000 ++++ b/main.c 2025-08-12 15:21:21.184665414 +0000 +@@ -16,7 +16,7 @@ + : (optarg != NULL)) + + //extern platform Platform; +-F75111_Address m_F75111; ++extern F75111_Address m_F75111; + BYTE addr; + + char program_name[100] = "Sample";