디바이스 드라이버
글 수 70
2015.06.03 22:34:30 (*.134.169.166)
13657
buildroot-2015.02에서는 tslib가 single point 터치만을 지원하고 있습니다.
이것을 multiple point 터치를 지원하게 변경하는 방법입니다.
buildroot-2015.02 디렉토리에서 tslib package 관련 파일들을 수정합니다.
buildroot-2015.02$ cd package/tslib/
tslib$ sudo cp -a Config.in Config.in.org
tslib$ sudo cp -a tslib.mk tslib.mk.org
--------------------------------------------------------------------------
tslib$ sudo vi Config.in
config BR2_PACKAGE_TSLIB
bool "tslib"
depends on !BR2_STATIC_LIBS # dlopen
help
Tslib is an abstraction layer for touchscreen panel events.
https://github.com/kergoth/tslib
comment "tslib needs a toolchain w/ dynamic library"
depends on BR2_STATIC_LIBS
if BR2_PACKAGE_TSLIB
choice
prompt "touch point type"
default BR2_PACKAGE_TSLIB_LEGACY
config BR2_PACKAGE_TSLIB_LEGACY
bool "single point"
help
None.
config BR2_PACKAGE_TSLIB_MULTI
bool "multiple point"
help
None.
endchoice
endif
--------------------------------------------------------------------------
tslib$ sudo vi tslib.mk
################################################################################
#
# tslib/tslib-mt
#
################################################################################
ifeq ($(BR2_PACKAGE_TSLIB_LEGACY), y)
TSLIB_VERSION = 1.1
TSLIB_SITE = http://github.com/kergoth/tslib/tarball/$(TSLIB_VERSION)
TSLIB_LICENSE = GPL, LGPL
TSLIB_LICENSE_FILES = COPYING
TSLIB_AUTORECONF = YES
TSLIB_INSTALL_STAGING = YES
TSLIB_INSTALL_STAGING_OPT = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install
$(eval $(autotools-package))
else
TSLIB_VERSION = 1.0_mt
TSLIB_SOURCE = tslib-$(TSLIB_VERSION).rar
TSLIB_DL_PATH = $(BUILD_DIR)/tslib-$(TSLIB_VERSION)
TSLIB_CONF_FILE = $(TSLIB_DL_PATH)/etc/ts.conf
TSLIB_CONFIGURE_AC = $(TSLIB_DL_PATH)/configure.ac
TSLIB_SITE = http://downloads.sourceforge.net/project/tslib-mt/src
TSLIB_LICENSE = GPL, LGPL
TSLIB_LICENSE_FILES = COPYING
TSLIB_AUTORECONF = YES
TSLIB_INSTALL_STAGING = YES
TSLIB_INSTALL_STAGING_OPTS = DESTDIR=$(STAGING_DIR) LDFLAGS=-L$(STAGING_DIR)/usr/lib install
define TSLIB_EXTRACT_CMDS
unrar x $(DL_DIR)/$(TSLIB_SOURCE) $(BUILD_DIR);
endef
TSLIB_CONF_ENV = ac_cv_func_malloc_0_nonnull=yes
define TSLIB_AUTOGEN
(cd $(@D); \
$(shell sed -i -e 's/LT_RELEASE=0.0/LT_RELEASE=1.0/g' $(TSLIB_CONFIGURE_AC)) \
chmod 777 autogen.sh; ./autogen.sh; \
$(shell sed -i -e 's/module_raw input/module_raw input\nmodule_raw mtinput/g' $(TSLIB_CONF_FILE)) \
)
endef
TSLIB_PRE_CONFIGURE_HOOKS += TSLIB_AUTOGEN
$(eval $(autotools-package))
endif
--------------------------------------------------------------------------
위와 같이 수정하였으면 make 옵션에서 multiple point 옵션을 선택하고, 빌드합니다.
--------------------------------------------------------------------------
tslib$ cd ../../
buildroot-2015.02$ make menuconfig
Target packages --->
Libraries --->
Hardware handling --->
-*- tslib
touch point type (multiple point) --->
buildroot-2015.02$ make
--------------------------------------------------------------------------