Forum des NAS

Tous les fabricants de NAS réunis sur un forum unique : Asustor, Qnap, Synology...

BitTorrent Sync, KODI, IPKG, NZBGet, pyLoad...

Modérateur : QoolBox

#99150
Hey Qoolbox!

Seems to work like a charme. At least the module is loaded correctly. Thanks again!!!
Could you please tell me more about the way to patch GPL / Compile module, if that not bother you too much. ;) The main lines could be enought.

Edit: Confirmed. Module is 100% working! :bounce: Thanks again for that.
#99221
Here are what I have done but still not work. What do I miss?


# Install Ubuntu 15.04

# Edit /etc/ apt/ sources.list

deb http://old-releases.ubuntu.com/ubuntu/ vivid main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ vivid main restricted
deb http://old-releases.ubuntu.com/ubuntu/ vivid-updates main restricted
deb-src http://old-releases.ubuntu.com/ubuntu/ vivid-updates main restricted

# Update packages and install dev tools
apt-get update
apt-get install make binutils gcc-4.9 libssl-dev libelf-dev libncurses5-dev

# Create directories in home dir
cd /home/user
mkdir build
mkdir build/kernel
mkdir build/qts
mkdir build/compiled

# Download and extract kernel sources
cd build/kernel
wget https://cdn.kernel.org/pub/linux/kernel ... 2.8.tar.xz
tar -xvzf linux-4.2.8.tar.xz

# Download and extract GPL sources
cd ../qts
wget https://sourceforge.net/projects/qosgpl ... 105.tar.gz
tar -xvzf GPL_QTS-4.3.5-20181105.tar.gz

# Copy config file
cd ..
cp qts/GPL_QTS/kernel_cfg/TS-X71/linux-4.2-x86_64.config kernel/linux-4.2.8/.config

# Compiling
cd linux-4.2.8
make menuconfig

Device Drivers --> USB Adapters ---> USB --> Serial --> CH341

make
make modules_install INSTALL_MOD_PATH=/home/user/build/compiled

# Compiled drivers
/home/user/build/compiled/lib/modules/4.2.8/kernel/drivers/usb/serial/ch341.ko


Thanks for your help.
Avatar de l’utilisateur
par QoolBox
#99222
there is an header to modify before compiling in Kernel 4.2.8 due to UTS Release

you can see the problem when loading your driver and immediatly do a dmesg

Code : Tout sélectionner
GPL_TS/src/linux-4.2/include/generated/utsrelease.h

modify

Code : Tout sélectionner
#define UTS_RELEASE "4.2.8+"

into

Code : Tout sélectionner
#define UTS_RELEASE "4.2.8"

mv linux-4.2-x86_64.config .config #config file provided from QNAP directory kernel source tree

Code : Tout sélectionner
make ARCH=x86_64 prepare
make ARCH=x86_64 scripts

ARCH=x86_64 make menuconfig  ..... etc , etc...

:mrgreen:
#99223
Yes but...

insmod ch341.ko
insmod: can't insert 'ch341.ko': invalid module format

dmesg
[441121.414530] Module len 16390 truncated

cat GPL_QTS_4.3.6/src/linux-4.2/include/generated/utsrelease.h
#define UTS_RELEASE "4.2.8"

cat kernel/linux-4.2.8/include/generated/utsrelease.h
#define UTS_RELEASE "4.2.8"

Still lock at the same point...

So I wonder if I have to compile inside the QTS folder? The kernel folder? Copy QTS to Kernel then compile?
#99328
Hey!
I have made some few other test on an Ubuntu 14.04 x64 server VM but still have

Code : Tout sélectionner
# insmod ch341.ko
insmod: can't insert 'ch341.ko': invalid module format

I'm using QNAP GPL 4.3.6 and latest Crosstool x86 from sourceforge.

What I need is only compling drivers.

What I have done

Code : Tout sélectionner
export CROSS=/to/crosstools/folder/cross-prefix

export CXX=${CROSS}-g++                 
export LD=${CROSS}-ld                 
export AS=${CROSS}-as               
export AR=${CROSS}-ar                  
export CC=${CROSS}-gcc

cp -af /to/qnap/gpl/kernel_cfg/model/linux-4.2-x86_64.config /to/qnap/gpl/src/linux-4.2.8/.config

cd /to/qnap/gpl/src/linux-4.2

make ARCH=x86_64 CROSS_COMPILE=${CROSS}- prepare
make ARCH=x86_64 CROSS_COMPILE=${CROSS}- scripts

make M=drivers/usb/serial ARCH=x86_64 \
CROSS_COMPILE=${HOST}- \
CONFIG_USB_SERIAL=m \
CONFIG_USB_SERIAL_CH341=m \
modules 

I think I am almost at my goal but I do have missing a little things...

@qoolbox: I have compare with modinfo my ch34x.ko and the on you have provided and the difference is the depends fiel. Mine have usbserial and yours have anythings. How did you do that? Maybe it is on of the cause of my issue?

Thanks for helping.

Avatar de l’utilisateur
par QoolBox
#99376
found my old archives

was :

Code : Tout sélectionner
RIAL DRIVER

make ARCH=x86_64 prepare
make ARCH=x86_64 scripts

make M=drivers/usb/serial ARCH=x86_64    \
CONFIG_USB_SERIAL_AIRCABLE=m 		\
CONFIG_USB_SERIAL_ARK3116=m    \
CONFIG_USB_SERIAL_BELKIN=m	     \
CONFIG_USB_SERIAL_CH341=m         \
CONFIG_USB_SERIAL_CP210X=m        \
CONFIG_USB_SERIAL_CYBERJACK=m	      \
CONFIG_USB_SERIAL_CYPRESS_M8=m       \
CONFIG_USB_SERIAL_DEBUG=m	        \
CONFIG_USB_SERIAL_DIGI_ACCELEPORT=m       \
CONFIG_USB_SERIAL_EDGEPORT=m        	\
CONFIG_USB_SERIAL_EDGEPORT_TI=m	       \
CONFIG_USB_SERIAL_EMPEG=m      	 \
CONFIG_USB_SERIAL_F81232=m     \
CONFIG_USB_SERIAL_F8153X=m	             \
CONFIG_USB_SERIAL_FTDI_SIO=m         	\
CONFIG_USB_SERIAL_GARMIN=m          	\
CONFIG_USB_SERIAL_IPAQ=m           	\
CONFIG_USB_SERIAL_IPW=m	          \
CONFIG_USB_SERIAL_IR=m	             \
CONFIG_USB_SERIAL_IUU=m            	\
CONFIG_USB_SERIAL_KEYSPAN=m             \
CONFIG_USB_SERIAL_KEYSPAN_PDA=m            \
CONFIG_USB_SERIAL_KLSI=m              	\
CONFIG_USB_SERIAL_KOBIL_SCT=m          \
CONFIG_USB_SERIAL_MCT_U232=m      	\
CONFIG_USB_SERIAL_METRO=m	        \
CONFIG_USB_SERIAL_MOS7720=m               \
CONFIG_USB_SERIAL_MOS7840=m	            \
CONFIG_USB_SERIAL_MXUPORT=m	            \
CONFIG_USB_SERIAL_NAVMAN=m          	\
CONFIG_USB_SERIAL_OMNINET=m	            \
CONFIG_USB_SERIAL_OPTICON=m	       \
CONFIG_USB_SERIAL_OPTION=m           	\
CONFIG_USB_SERIAL_OTI6858=m         	\
CONFIG_USB_SERIAL_PL2303=m        	\
CONFIG_USB_SERIAL_QCAUX=m	        \
CONFIG_USB_SERIAL_QUALCOMM=m              	\
CONFIG_USB_SERIAL_QT2=m	          \
CONFIG_USB_SERIAL_SAFE=m           	\
CONFIG_USB_SERIAL_SIERRAWIRELESS=m	           \
CONFIG_USB_SERIAL_SIMPLE=m	       \
CONFIG_USB_SERIAL_SPCP8X5=m	             \
CONFIG_USB_SERIAL_SSU100=m              	\
CONFIG_USB_SERIAL_SYMBOL=m            	\
CONFIG_USB_SERIAL_WWAN=m          	\
CONFIG_USB_SERIAL_TI=m           	\
CONFIG_USB_SERIAL_UPD78F0730=m          	\
CONFIG_USB_SERIAL_VISOR=m        	\
CONFIG_USB_SERIAL_WISHBONE=m           	\
CONFIG_USB_SERIAL_WHITEHEAT=m             	\
CONFIG_USB_SERIAL_XIRCOM=m              	\
CONFIG_USB_SERIAL_XSENS_MT=m          	\
  • 1
  • 21
  • 22
  • 23
  • 24
  • 25

Salut, Ton watchtower est bien a jour ?

Pool et Volume

Bonjour @emi, pas sûr de comprendre ton pro[…]

J'ai bien compris ca, mais sauf que l'application […]

Bonsoir, J'ai un nas, exactement dans cette confi[…]

Site hébergé sur un serveur IKOULA

Ikoula