eBUS / ttyebus

Real time linux kernel module for the ebusd using the PL011 UART on a Rasperry Pi

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

How to compile on Ubuntu?

codeaholics opened this issue · comments

I'm trying to compile on Ubuntu 20.04.5 LTS (Focal Fossa), kernel version 5.4.0-139-generic, and I'm getting the following error:

$ make
make -C /lib/modules/5.4.0-139-generic/build M=/tmp/ttyebus modules
make[1]: Entering directory '/usr/src/linux-headers-5.4.0-139-generic'
  CC [M]  /tmp/ttyebus/ttyebusm.o
/tmp/ttyebus/ttyebusm.c: Assembler messages:
/tmp/ttyebus/ttyebusm.c:264: Error: expecting operand after ','; got nothing
/tmp/ttyebus/ttyebusm.c:264: Error: expecting operand after ','; got nothing
make[2]: *** [scripts/Makefile.build:270: /tmp/ttyebus/ttyebusm.o] Error 1
make[1]: *** [Makefile:1767: /tmp/ttyebus] Error 2
make[1]: Leaving directory '/usr/src/linux-headers-5.4.0-139-generic'
make: *** [Makefile:24: all] Error 2

Line 264 is the asm statement here:

// ===============================================================================================
//
//                                    delay
//
// ===============================================================================================
static inline void delay(int32_t count)
    {
        asm volatile("__delay_%=: subs %[count], %[count], #1; bne __delay_%=\n"
            : "=r"(count): [count]"0"(count) : "cc");
    }

I'm not really a C programmer so I'm out of my depth here.