Disable laptop build-in keyboard

本文介绍如何使用XInput命令来记住虚拟核心键盘ID和AT键盘ID,并提供了禁用和启用AT键盘的具体命令实例。

check input device ID:

  xinput list      ;by this you should remeber vitual core keyboard ID(master ID, 3 in my laptop), and AT keyboard ID(13 in my laptop).

Disable:

  xinput float $(ATkeyboard ID)      ;command as "xinput float 13" for me.

Enable:

  xinput reattach $(AT keyboard ID) $(master ID)    ;command as "xinput reattach 13 3" for me.

 

转载于:https://www.cnblogs.com/kpos/p/9220033.html

.PHONY:curl curl: @echo "build curl" cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e Makefile && $(MAKE) clean && rm -rf ./install && rm Makefile || echo "no makefile" cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e configure || ./buildconf ifeq ($(INCLUDE_CLOUD_ACCOUNT), y) ifeq ($(INCLUDE_SSL_OPENSSL), y) cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e Makefile || (export LDFLAGS="-Wl,-rpath=$(PUBLIC_APPS_PATH)/openssl-1.0.2q/lib" &&\ ./configure shared --prefix=$(PUBLIC_APPS_PATH)/curl-7.66.0/install \ --build=i686-linux --host=$(HOST) \ --disable-ftp --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict \ --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher \ --disable-ipv6 --disable-sspi --disable-crypto-auth --disable-ntlm-wb --disable-tls-srp \ --disable-cookies --disable-soname-bump --disable-threaded-resolver --disable-pthreads \ --with-ssl=$(PUBLIC_APPS_PATH)/openssl-1.0.2q \ --without-zlib) endif ifeq ($(INCLUDE_SSL_MBEDTLS), y) cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e Makefile || (export LDFLAGS="-Wl,-rpath=$(PUBLIC_APPS_PATH)/mbedtls-2.17/install/lib" && export CPPFLAGS=" -I$(PUBLIC_APPS_PATH)/mbedtls-2.17/crypto/include" && \ ./configure shared --prefix=$(PUBLIC_APPS_PATH)/curl-7.66.0/install \ --build=i686-linux --host=$(HOST) \ --disable-ftp --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict \ --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher \ --disable-ipv6 --disable-sspi --disable-crypto-auth --disable-ntlm-wb --disable-tls-srp \ --disable-cookies --disable-soname-bump --disable-threaded-resolver --disable-pthreads \ --with-mbedtls=$(PUBLIC_APPS_PATH)/mbedtls-2.17/install \ --without-zlib) endif else cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e Makefile || \ ./configure --prefix=$(PUBLIC_APPS_PATH)/curl-7.66.0/install \ --build=i686-linux --host=$(HOST) \ --disable-ftp --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict \ --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher \ --disable-ipv6 --disable-sspi --disable-crypto-auth --disable-ntlm-wb --disable-tls-srp \ --disable-cookies --disable-soname-bump --disable-threaded-resolver --disable-pthreads \ --without-ssl --without-zlib endif cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && $(MAKE) install .PHONY: curl_install curl_install: @echo "install curl" cp --no-dereference -p $(PUBLIC_APPS_PATH)/curl-7.66.0/install/lib/*.so* $(PUBLIC_APPS_PATH)/install/lib/ .PHONY: curl_clean curl_clean: @echo "clean curl" cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && $(MAKE) clean && rm -rf ./install
09-20
你提供了一个完整的 `Makefile` 片段,用于交叉编译 **curl-7.66.0** 并集成 OpenSSL 或 mbedTLS。当前问题依然是: > ❌ `configure: error: OpenSSL could not be detected` > 原因是:`ld: cannot find -lcrypto` 我们已经确认: - `libcrypto.a` 存在 ✅ - `HMAC_Init_ex` 符号存在 ✅ - `.pc` 文件路径基本正确 ✅ - 但 `pkg-config` 可能自动添加了 `/sysroot` 导致路径错误 ❌ --- ## ✅ 当前 Makefile 的问题分析 ### 🔍 关键片段(启用 OpenSSL): ```makefile ifeq ($(INCLUDE_SSL_OPENSSL), y) cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e Makefile || \ (export LDFLAGS="-Wl,-rpath=$(PUBLIC_APPS_PATH)/openssl-1.0.2q/lib" && \ ./configure shared \ --prefix=$(PUBLIC_APPS_PATH)/curl-7.66.0/install \ --build=i686-linux --host=$(HOST) \ --with-ssl=$(PUBLIC_APPS_PATH)/openssl-1.0.2q \ --without-zlib) endif ``` ### ⚠️ 存在以下问题: | 问题 | 描述 | |------|------| | 1. 没设置 `PKG_CONFIG_PATH` | `configure` 依赖 `pkg-config --libs openssl` 查找库,但未指定路径 | | 2. 没设置 `PKG_CONFIG_SYSROOT_DIR=""` | 导致 `pkg-config` 自动加 `/sysroot`,拼出非法路径 | | 3. `LDFLAGS` 中的 `-rpath` 路径不对 | 应该指向 `install/lib`,不是源码下的 `lib` | | 4. 缺少 `LIBS="-lpthread -ldl -lrt"` | `libcrypto` 依赖这些库,否则链接失败 | --- ## ✅ 正确修复后的 Makefile(推荐版本) ```makefile .PHONY: curl curl: @echo "build curl" cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e Makefile && $(MAKE) clean && rm -rf ./install && rm Makefile || echo "no makefile" cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e configure || ./buildconf ifeq ($(INCLUDE_CLOUD_ACCOUNT), y) ifeq ($(INCLUDE_SSL_OPENSSL), y) # 设置环境变量防止 pkg-config 添加 /sysroot 前缀 cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e Makefile || \ (PKG_CONFIG_PATH="$(PUBLIC_APPS_PATH)/openssl-1.0.2q/install/lib/pkgconfig" \ PKG_CONFIG_SYSROOT_DIR="" \ LIBS="-lpthread -ldl -lrt" \ CFLAGS="-I$(PUBLIC_APPS_PATH)/openssl-1.0.2q/install/include" \ LDFLAGS="-L$(PUBLIC_APPS_PATH)/openssl-1.0.2q/install/lib -Wl,-rpath,\\\$$ORIGIN/../lib" \ ./configure shared \ --prefix="$(PUBLIC_APPS_PATH)/curl-7.66.0/install" \ --build=i686-linux \ --host=$(HOST) \ --disable-ftp --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict \ --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher \ --disable-ipv6 --disable-sspi --disable-crypto-auth --disable-ntlm-wb --disable-tls-srp \ --disable-cookies --disable-soname-bump --disable-threaded-resolver --disable-pthreads \ --with-ssl="$(PUBLIC_APPS_PATH)/openssl-1.0.2q/install" \ --without-zlib) endif ifeq ($(INCLUDE_SSL_MBEDTLS), y) cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e Makefile || \ (PKG_CONFIG_PATH="$(PUBLIC_APPS_PATH)/mbedtls-2.17/install/lib/pkgconfig" \ PKG_CONFIG_SYSROOT_DIR="" \ CPPFLAGS="-I$(PUBLIC_APPS_PATH)/mbedtls-2.17/crypto/include" \ LDFLAGS="-L$(PUBLIC_APPS_PATH)/mbedtls-2.17/install/lib -Wl,-rpath,\\\$$ORIGIN/../lib" \ ./configure shared \ --prefix="$(PUBLIC_APPS_PATH)/curl-7.66.0/install" \ --build=i686-linux \ --host=$(HOST) \ --disable-ftp --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict \ --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher \ --disable-ipv6 --disable-sspi --disable-crypto-auth --disable-ntlm-wb --disable-tls-srp \ --disable-cookies --disable-soname-bump --disable-threaded-resolver --disable-pthreads \ --with-mbedtls="$(PUBLIC_APPS_PATH)/mbedtls-2.17/install" \ --without-zlib) endif else # 不启用 SSL cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && test -e Makefile || \ ./configure \ --prefix="$(PUBLIC_APPS_PATH)/curl-7.66.0/install" \ --build=i686-linux \ --host=$(HOST) \ --disable-ftp --disable-ldap --disable-ldaps --disable-rtsp --disable-proxy --disable-dict \ --disable-telnet --disable-tftp --disable-pop3 --disable-imap --disable-smtp --disable-gopher \ --disable-ipv6 --disable-sspi --disable-crypto-auth --disable-ntlm-wb --disable-tls-srp \ --disable-cookies --disable-soname-bump --disable-threaded-resolver --disable-pthreads \ --without-ssl --without-zlib endif # 编译并安装 cd $(PUBLIC_APPS_PATH)/curl-7.66.0 && $(MAKE) install ``` --- ## ✅ 关键修改说明 | 修改点 | 解释 | |--------|------| | `PKG_CONFIG_PATH=.../install/lib/pkgconfig` | 让 `pkg-config` 找到 `.pc` 文件 | | `PKG_CONFIG_SYSROOT_DIR=""` | 阻止自动添加 `/sysroot` 前缀(最重要!)✅ | | `LIBS="-lpthread -ldl -lrt"` | 补全 `libcrypto` 所需依赖库 | | `CFLAGS/LDFLAGS` 显式指定头文件和库路径 | 绕过 `pkg-config` 不可靠的问题 | | `--with-ssl=.../install` | 必须指向 `make install` 后的目录,不是源码目录 | | `\\\$$ORIGIN/../lib` | 转义 `$ORIGIN`,使 `.so` 运行时能加载同级 `lib` 下的依赖库 | --- ## ✅ 确保 OpenSSL 已正确安装到 `install` 目录 运行以下命令验证: ```bash ls -l $(PUBLIC_APPS_PATH)/openssl-1.0.2q/install/lib/libcrypto.a ls -l $(PUBLIC_APPS_PATH)/openssl-1.0.2q/install/lib/pkgconfig/libcrypto.pc ``` 如果没有,请先执行 OpenSSL 安装: ```bash cd $(PUBLIC_APPS_PATH)/openssl-1.0.2q make install INSTALL_PREFIX=$(PUBLIC_APPS_PATH)/openssl-1.0.2q/install ``` --- ## ✅ 最终验证方法 手动测试 `pkg-config` 是否返回正确路径: ```bash PKG_CONFIG_PATH=$(PUBLIC_APPS_PATH)/openssl-1.0.2q/install/lib/pkgconfig \ PKG_CONFIG_SYSROOT_DIR="" \ pkg-config --libs openssl ``` 输出应为: ``` -L/home/bba/work/BBA1_5/MBB_Platform/apps/public/openssl-1.0.2q/install/lib -lssl -lcrypto ``` 不能包含 `/sysroot`! --- ## ✅ 总结:Makefile 中必须设置的环境变量 | 环境变量 | 作用 | |---------|------| | `PKG_CONFIG_PATH` | 指定 `.pc` 文件位置 | | `PKG_CONFIG_SYSROOT_DIR=""` | 禁用自动 sysroot 拼接 ✅(关键) | | `LIBS` | 添加 `-lpthread -ldl -lrt` | | `CFLAGS/LDFLAGS` | 显式传入路径,提高可靠性 | ---
评论
成就一亿技术人!
拼手气红包6.0元
还能输入1000个字符  | 博主筛选后可见
 
红包 添加红包
表情包 插入表情
 条评论被折叠 查看
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值