Как подружить Debian amd64 и ltmodem

Форум предназначен для новичков. В нем предполагается рассматривать вопросы, которые встают на первых этапах освоения Linux
Аватара пользователя
*Sasha*
Неотъемлемая часть форума
Сообщения: 258
Зарегистрирован: 12 мар 2005, 01:50
Откуда: Минск
Контактная информация:

Как подружить Debian amd64 и ltmodem

Сообщение *Sasha* »

To begin compilation of lt_modem.o and lt_serial.o, Enter

To avoid faulting Systems with an Enviromental setting: make -e
make
is the compiling command used with build_module.
To modify "make" invocation on your System, if desirable,
edit the build_module line below: MAKEE

/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:33:5: warning: "FORCEMODVERSIONS" is not defined
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:43:5: warning: "FORCEMODVERSIONS" is not defined
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:210: error: expected ‘)’ before string constant
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:212: error: expected ‘)’ before string constant
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:217: error: expected ‘)’ before string constant
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:221: error: expected ‘)’ before string constant
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c: In function ‘lt_pci_find_device’:
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:261: error: ‘PCI_DEVICE_ID_ATT_L56XMF’ undeclared (first use in this function)
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:261: error: (Each undeclared identifier is reported only once
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:261: error: for each function it appears in.)
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c: In function ‘SetLtModemInterface’:
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:684: warning: implicit declaration of function ‘inter_module_get’
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:684: warning: cast to pointer from integer of different size
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:691: warning: ‘inter_module_put’ is deprecated (declared at include/linux/module.h:567)
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c: In function ‘init_module’:
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:714: warning: ‘inter_module_register’ is deprecated (declared at include/linux/module.h:563)
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:715: warning: ‘inter_module_register’ is deprecated (declared at include/linux/module.h:563)
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c: In function ‘cleanup_module’:
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:723: warning: ‘inter_module_unregister’ is deprecated (declared at include/linux/module.h:564)
/home/sasha/1/ltmodem-8.31a10/source/ltmodem.c:724: warning: ‘inter_module_unregister’ is deprecated (declared at include/linux/module.h:564)
make[2]: *** [/home/sasha/1/ltmodem-8.31a10/source/ltmodem.o] Ошибка 1
make[1]: *** [_module_/home/sasha/1/ltmodem-8.31a10/source] Ошибка 2
make: *** [all] Ошибка 2
make M=`pwd` -C /lib/modules/2.6.17-2-amd64/build modules
make[1]: Entering directory `/usr/src/linux-headers-2.6.17-2-amd64'
CC [M] /home/sasha/1/ltmodem-8.31a10/source/ltmodem.o
make[1]: Leaving directory `/usr/src/linux-headers-2.6.17-2-amd64'

Checking for driver products:

Compilation of lt_modem.ko failed,
Do assess whether your utilities are up to date as listed within 1ST-READ!
Read Compile_properly.txt from DOCs/.
If you cannot solve the problem, send BLDrecord.txt to: discuss@linmodems.org

debian:/home/sasha/1/ltmodem-8.31a10#
Debian

Аватара пользователя
*Sasha*
Неотъемлемая часть форума
Сообщения: 258
Зарегистрирован: 12 мар 2005, 01:50
Откуда: Минск
Контактная информация:

Сообщение *Sasha* »

Нашел драйвера для x86-64 тут http://martian.barrelsoutofbond.org/ , но всё ровно не могу поставить

make -C kmodule/ modules
make[1]: Entering directory `/home/sasha/1/164x/kmodule'
make -C /lib/modules/2.6.17-2-amd64/build M="/home/sasha/1/164x/kmodule" module
s
make[2]: Entering directory `/usr/src/linux-headers-2.6.17-2-amd64'
CC [M] /home/sasha/1/164x/kmodule/martian.o
/home/sasha/1/164x/kmodule/martian.c: In function ‘martian_isr’:
/home/sasha/1/164x/kmodule/martian.c:138: warning: value computed is not used
CC [M] /home/sasha/1/164x/kmodule/marsio.o
/home/sasha/1/164x/kmodule/marsio.c: In function ‘mdual_port_rx’:
/home/sasha/1/164x/kmodule/marsio.c:57: warning: unused variable ‘lastptr’
CC [M] /home/sasha/1/164x/kmodule/mfifo.o
LD [M] /home/sasha/1/164x/kmodule/martian_drv.o
Building modules, stage 2.
MODPOST
CC /home/sasha/1/164x/kmodule/martian_drv.mod.o
LD [M] /home/sasha/1/164x/kmodule/martian_drv.ko
make[2]: Leaving directory `/usr/src/linux-headers-2.6.17-2-amd64'
make[1]: Leaving directory `/home/sasha/1/164x/kmodule'
make -C helper/ all
make[1]: Entering directory `/home/sasha/1/164x/helper'
gcc -Wall -DUSE_DEV -DMSTAMP=20061005 -c -o main.o main.c
main.c: In function ‘monitor_state’:
main.c:458: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘lo
ng int’
main.c:459: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘lo
ng int’
main.c:460: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘lo
ng int’
main.c:461: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘lo
ng int’
main.c:462: warning: format ‘%d’ expects type ‘int’, but argument 4 has type ‘lo
ng int’
gcc -Wall -DUSE_DEV -c -o dumpers.o dumpers.c
gcc -Wall -DUSE_DEV -c -o log.o log.c
log.c:34: warning: ‘do_logmsg_std_old’ defined but not used
gcc -Wall -DUSE_DEV -c -o session.o session.c
session.c: In function ‘session_run’:
session.c:571: warning: label ‘l_recalc’ defined but not used
gcc -Wall -DUSE_DEV -c -o mport.o mport.c
mport.c: In function ‘mport_init’:
mport.c:427: warning: cast to pointer from integer of different size
mport.c: At top level:
mport.c:217: warning: ‘realtime_setup’ defined but not used
gcc -Wall -DUSE_DEV -c -o pty.o pty.c
gcc -Wall -DUSE_DEV -c -o sysdep.o sysdep.c
sysdep.c: In function ‘linux_timer_create’:
sysdep.c:17: warning: implicit declaration of function ‘syscall’
gcc -Wall -DUSE_DEV -c -o isr.o isr.c
isr.c: In function ‘serve_interrupts’:
isr.c:57: warning: cast from pointer to integer of different size
isr.c: In function ‘launch_isr_thread’:
isr.c:178: warning: cast to pointer from integer of different size
gcc -Wall -DUSE_DEV -c -o smp.o smp.c
gcc -Wall -DUSE_DEV -c -o core_if.o core_if.c
core_if.c: In function ‘Get_PCI_BASE_ADDRESS_IO_MASK’:
core_if.c:170: warning: large integer implicitly truncated to unsigned type
core_if.c: At top level:
core_if.c:186: warning: ‘struct lt_pci_dev_info’ declared inside parameter list
core_if.c:186: warning: its scope is only this definition or declaration, which
is probably not what you want
gcc -Wall -DUSE_DEV -c -o coresubst.o coresubst.c
coresubst.c: In function ‘mio_dual_port_rx’:
coresubst.c:57: warning: unused variable ‘io_pdm_rx_rptr’
gcc -Wall -DUSE_DEV -c -o link.o link.c
link.c: In function ‘link_to_driver’:
link.c:99: warning: cast from pointer to integer of different size
link.c:103: warning: cast from pointer to integer of different size
link.c:111: warning: cast from pointer to integer of different size
gcc -Wall -DUSE_DEV -c -o tweakrelocsdynamic.o tweakrelocsdynamic.c
tweakrelocsdynamic.c: In function ‘tweak_areloc’:
tweakrelocsdynamic.c:178: warning: cast to pointer from integer of different siz e
tweakrelocsdynamic.c:182: warning: cast to pointer from integer of different siz e
tweakrelocsdynamic.c:223: warning: cast to pointer from integer of different siz e
tweakrelocsdynamic.c: In function ‘relocate_symbol’:
tweakrelocsdynamic.c:303: warning: cast from pointer to integer of different siz e
tweakrelocsdynamic.c: In function ‘locate_map_using_proc’:
tweakrelocsdynamic.c:331: warning: cast to pointer from integer of different siz e
tweakrelocsdynamic.c: At top level:
tweakrelocsdynamic.c:155: warning: ‘fill_idx_symbols’ defined but not used
gcc -Wall -DUSE_DEV -c -o coreadd.o coreadd.c
gcc -Wall elf386tweakrelocs.c -o elf386tweakrelocs
ld -r --defsym do_UART_cd_on=UART_cd_on --defsym do_UART_cd_off=UART_cd_off \
-o marscore.o ltmdmobj.o coreadd.o
ld: Relocatable linking with relocations from format elf32-i386 (ltmdmobj.o) to format elf64-x86-64 (marscore.o) is not supported
make[1]: *** [marscore.o] Ошибка 1
make[1]: Leaving directory `/home/sasha/1/164x/helper'
make: *** [all] Ошибка 2
debian:/home/sasha/1/164x#
Debian

Аватара пользователя
*Sasha*
Неотъемлемая часть форума
Сообщения: 258
Зарегистрирован: 12 мар 2005, 01:50
Откуда: Минск
Контактная информация:

Сообщение *Sasha* »

В чём ошибка, helper/Makefile выглядит так:

# leave the relocations in



CC := gcc

CFLAGS := -Wall
MCFLAGS += -DUSE_DEV
MCFLAGS += -DUSE_DEV
#CPPFLAGS += -DMSTAMP=20061005

-ifeq ("$(shell uname -i)", "x86_64")
+#if eq ("$(shell uname -i)", "x86_64")
MCMACHFLAGS += -m32
CORELDFLAGS := -m elf_i386
OCFLAGS := -O elf32-i386
-endif
+#endif

#CFLAGS += -DMARTIAN_CORE_DEBUG
#CFLAGS += -DDYNAMICRELOC_DEBUG
#CFLAGS += -DRELOCFIX_DEBUG # to debug elf386tweakrelocs

MLDFLAGS := $(MCMACHFLAGS) -Wl,-q -lpthread -lrt
MCFLAGS += $(MCMACHFLAGS)

mhelper_source_objs := main.o \
dumpers.o log.o \
session.o mport.o \
pty.o sysdep.o \
isr.o smp.o \
core_if.o coresubst.o \
link.o tweakrelocsdynamic.o

martian_helper_OBJS := $(mhelper_source_objs) marscore.o
#$(mhelper_source_objs) coreadd.o: %.o: %.c
# $(CC) $(CPPFLAGS) $(MCFLAGS) $(CFLAGS) -c $<

$(mhelper_source_objs) coreadd.o: CFLAGS += $(MCMACHFLAGS)
$(mhelper_source_objs) coreadd.o: CPPFLAGS += -DUSE_DEV


core_if.o main.o session.o mport.o sysdep.o pty.o: sysdep.h
main.o pty.o session.o mport.o: mport.h sysdep.h
main.o mport.o link.o dumpers.o isr.o coresubst.o: ../martian.h
session.o main.o smp.o: watch.h common.h
log.o main.o coresubst.o link.o mport.o pty.o: common.h
main.o pty.o mport.o link.o dumpers.o isr.o smp.o log.o session.o tweakrelocsdynamic.o sysdep.o: log.h common.h

main.o: CPPFLAGS += -DMSTAMP=20061005

marscore.o: ltmdmobj.o coreadd.o elf386tweakrelocs
ld -r --defsym do_UART_cd_on=UART_cd_on --defsym do_UART_cd_off=UART_cd_off \
$(CORELDFLAGS) -o marscore.o ltmdmobj.o coreadd.o
objcopy --weaken-symbol=UART_cd_on --weaken-symbol=UART_cd_off \
--weaken-symbol=io_init_dce_rx_fifo $(OCFLAGS) marscore.o
sh tweakcore.sh marscore.o

martian_helper: $(martian_helper_OBJS)
gcc -o martian_helper $(martian_helper_OBJS) $(MLDFLAGS)

# elf386tweakrelocs: elf386tweakrelocs.o

.PHONY: clean all install uninstall
clean:
rm -f $(martian_helper_OBJS) coreadd.o
rm -f martian_helper elf386tweakrelocs


all: martian_helper elf386tweakrelocs

install: all
install martian_helper /usr/sbin/martian_helper

uninstall:
rm /usr/sbin/martian_helper


В итоге вот что:

debian:/home/sasha/1/164x# make all
make -C kmodule/ modules
make[1]: Entering directory `/home/sasha/1/164x/kmodule'
make -C /lib/modules/2.6.17-2-amd64/build M="/home/sasha/1/164x/kmodule" modules
make[2]: Entering directory `/usr/src/linux-headers-2.6.17-2-amd64'
CC [M] /home/sasha/1/164x/kmodule/martian.o
/home/sasha/1/164x/kmodule/martian.c: In function ‘martian_isr’:
/home/sasha/1/164x/kmodule/martian.c:138: warning: value computed is not used
CC [M] /home/sasha/1/164x/kmodule/marsio.o
/home/sasha/1/164x/kmodule/marsio.c: In function ‘mdual_port_rx’:
/home/sasha/1/164x/kmodule/marsio.c:57: warning: unused variable ‘lastptr’
CC [M] /home/sasha/1/164x/kmodule/mfifo.o
LD [M] /home/sasha/1/164x/kmodule/martian_drv.o
Building modules, stage 2.
MODPOST
CC /home/sasha/1/164x/kmodule/martian_drv.mod.o
LD [M] /home/sasha/1/164x/kmodule/martian_drv.ko
make[2]: Leaving directory `/usr/src/linux-headers-2.6.17-2-amd64'
make[1]: Leaving directory `/home/sasha/1/164x/kmodule'
make -C helper/ all
make[1]: Entering directory `/home/sasha/1/164x/helper'
Makefile:12: *** пропущен разделитель. Останов.
make[1]: Leaving directory `/home/sasha/1/164x/helper'
make: *** [all] Ошибка 2
debian:/home/sasha/1/164x#
Debian

Аватара пользователя
*Sasha*
Неотъемлемая часть форума
Сообщения: 258
Зарегистрирован: 12 мар 2005, 01:50
Откуда: Минск
Контактная информация:

Сообщение *Sasha* »

debian:/home/sasha/2/164x# make all
make -C kmodule/ modules
make[1]: Entering directory `/home/sasha/2/164x/kmodule'
make -C /lib/modules/2.6.17-2-amd64/build M="/home/sasha/2/164x/kmodule" module
s
make[2]: Entering directory `/usr/src/linux-headers-2.6.17-2-amd64'
CC [M] /home/sasha/2/164x/kmodule/martian.o
/home/sasha/2/164x/kmodule/martian.c: In function ‘martian_isr’:
/home/sasha/2/164x/kmodule/martian.c:138: warning: value computed is not used
CC [M] /home/sasha/2/164x/kmodule/marsio.o
/home/sasha/2/164x/kmodule/marsio.c: In function ‘mdual_port_rx’:
/home/sasha/2/164x/kmodule/marsio.c:57: warning: unused variable ‘lastptr’
CC [M] /home/sasha/2/164x/kmodule/mfifo.o
LD [M] /home/sasha/2/164x/kmodule/martian_drv.o
Building modules, stage 2.
MODPOST
CC /home/sasha/2/164x/kmodule/martian_drv.mod.o
LD [M] /home/sasha/2/164x/kmodule/martian_drv.ko
make[2]: Leaving directory `/usr/src/linux-headers-2.6.17-2-amd64'
make[1]: Leaving directory `/home/sasha/2/164x/kmodule'
make -C helper/ all
make[1]: Entering directory `/home/sasha/2/164x/helper'
make[1]: Warning: File `Makefile' has modification time 1,4e+03 s in the future
gcc -Wall -m32 -DUSE_DEV -DMSTAMP=20061005 -c -o main.o main.c
gcc -Wall -m32 -DUSE_DEV -c -o dumpers.o dumpers.c
gcc -Wall -m32 -DUSE_DEV -c -o log.o log.c
log.c:34: warning: ‘do_logmsg_std_old’ defined but not used
gcc -Wall -m32 -DUSE_DEV -c -o session.o session.c
session.c: In function ‘session_run’:
session.c:571: warning: label ‘l_recalc’ defined but not used
gcc -Wall -m32 -DUSE_DEV -c -o mport.o mport.c
mport.c:217: warning: ‘realtime_setup’ defined but not used
gcc -Wall -m32 -DUSE_DEV -c -o pty.o pty.c
gcc -Wall -m32 -DUSE_DEV -c -o sysdep.o sysdep.c
sysdep.c: In function ‘linux_timer_create’:
sysdep.c:17: warning: implicit declaration of function ‘syscall’
gcc -Wall -m32 -DUSE_DEV -c -o isr.o isr.c
gcc -Wall -m32 -DUSE_DEV -c -o smp.o smp.c
gcc -Wall -m32 -DUSE_DEV -c -o core_if.o core_if.c
core_if.c:186: warning: ‘struct lt_pci_dev_info’ declared inside parameter list
core_if.c:186: warning: its scope is only this definition or declaration, which
is probably not what you want
gcc -Wall -m32 -DUSE_DEV -c -o coresubst.o coresubst.c
coresubst.c: In function ‘mio_dual_port_rx’:
coresubst.c:57: warning: unused variable ‘io_pdm_rx_rptr’
gcc -Wall -m32 -DUSE_DEV -c -o link.o link.c
gcc -Wall -m32 -DUSE_DEV -c -o tweakrelocsdynamic.o tweakrelocsdynamic.c
tweakrelocsdynamic.c:155: warning: ‘fill_idx_symbols’ defined but not used
gcc -Wall -m32 -DUSE_DEV -c -o coreadd.o coreadd.c
gcc -Wall elf386tweakrelocs.c -o elf386tweakrelocs
ld -r --defsym do_UART_cd_on=UART_cd_on --defsym do_UART_cd_off=UART_cd_off \
-m elf_i386 -o marscore.o ltmdmobj.o coreadd.o
objcopy --weaken-symbol=UART_cd_on --weaken-symbol=UART_cd_off \
--weaken-symbol=io_init_dce_rx_fifo -O elf32-i386 marscore.o
sh tweakcore.sh marscore.o
processing relocation section .rel.text
0xc3b9: dp_int_regread -> mars_read_reg_subst
0xc3ed: dp_int_regwrite -> mars_stub
0xc66f: Write_mdm_word -> mars_stub
processing relocation section .rel.rodata
processing relocation section .rel.data
gcc -o martian_helper main.o dumpers.o log.o session.o mport.o pty.o sysdep.o is r.o smp.o core_if.o coresubst.o link.o tweakrelocsdynamic.o marscore.o -m32 -W l,-q -lpthread -lrt
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libpthread.so when searching for -lpthread
/usr/bin/ld: skipping incompatible /usr/bin/../lib/libpthread.a when searching f or -lpthread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lp thread
/usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpt hread
/usr/bin/ld: cannot find -lpthread
collect2: ld returned 1 exit status
make[1]: *** [martian_helper] Ошибка 1
make[1]: Leaving directory `/home/sasha/2/164x/helper'
make: *** [all] Ошибка 2
debian:/home/sasha/2/164x#
Debian

Аватара пользователя
*Sasha*
Неотъемлемая часть форума
Сообщения: 258
Зарегистрирован: 12 мар 2005, 01:50
Откуда: Минск
Контактная информация:

Сообщение *Sasha* »

Запустил, нужно было установить libc6-dev-i386, но осле перегрузки компа не хочет
покуда не выполнишь:
modprobe martian_drv
martian_helper
ln -s /dev/ttySM0 /dev/modem
Подскажите, пожалуйста, как бы это автоматизировать.
Debian

Ответить