Coder Social home page Coder Social logo

Comments (7)

fakhamatia avatar fakhamatia commented on August 17, 2024 1

Same problem with Linux 5.13.0-28 Ubuntu 21.10

from mt7601u.

stravi avatar stravi commented on August 17, 2024

Same for me:

make[2]: Entering directory '/usr/src/linux-headers-5.4.83-v7l+'
make[3]: *** No rule to make target 'arch/arm/tools/syscall.tbl', needed by 'arch/arm/include/generated/uapi/asm/unistd-common.h'.  Stop.
make[2]: *** [arch/arm/Makefile:325: archheaders] Error 2
make[2]: Leaving directory '/usr/src/linux-headers-5.4.83-v7l+'
make[1]: *** [Makefile:511: osutil] Error 2
make[1]: Leaving directory '/home/pi/Workspace/MT7601u/src'
make: *** [Makefile:2: all] Error 2

Do you think we need to build the kernel to make it work?

from mt7601u.

stravi avatar stravi commented on August 17, 2024

@sifr01 were you able to make this work? Did you find a working driver?

from mt7601u.

artynet avatar artynet commented on August 17, 2024

@stravi @sifr01 when applying this patch:

diff --git a/Makefile.inc b/Makefile.inc
index ed4b88f..31761cf 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -377,23 +377,23 @@ else
 
 ifeq ($(OSABL),YES)
        cp -f os/linux/Makefile.6.util $(RT28xx_DIR)/os/linux/Makefile
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 
        cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
 ifeq ($(PLATFORM),DM6446)
-       $(MAKE)  ARCH=arm CROSS_COMPILE=arm_v5t_le- -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE)  ARCH=arm CROSS_COMPILE=arm_v5t_le- -C  $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 else
 ifeq ($(PLATFORM),FREESCALE8377)
-       $(MAKE) ARCH=powerpc CROSS_COMPILE=$(CROSS_COMPILE) -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) ARCH=powerpc CROSS_COMPILE=$(CROSS_COMPILE) -C  $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 else
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 endif
 
 ifeq ($(OSABL),YES)
        cp -f os/linux/Makefile.6.netif $(RT28xx_DIR)/os/linux/Makefile
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 
 ifeq ($(RT28xx_MODE),AP)
@@ -498,7 +498,7 @@ ifneq (,$(findstring 2.4,$(LINUX_SRC)))
        $(MAKE) -C $(RT28xx_DIR)/os/linux/
 else
        cp -f os/linux/Makefile.libwapi.6 $(RT28xx_DIR)/os/linux/Makefile       
-       $(MAKE) -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules 
+       $(MAKE) -C  $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules       
 endif  
 
 osutil:
@@ -508,7 +508,7 @@ ifneq (,$(findstring 2.4,$(LINUX_SRC)))
        $(MAKE) -C $(RT28xx_DIR)/os/linux/
 else
        cp -f os/linux/Makefile.6.util $(RT28xx_DIR)/os/linux/Makefile
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 endif
 
@@ -519,7 +519,7 @@ ifneq (,$(findstring 2.4,$(LINUX_SRC)))
        $(MAKE) -C $(RT28xx_DIR)/os/linux/
 else
        cp -f os/linux/Makefile.6.netif $(RT28xx_DIR)/os/linux/Makefile
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 endif
 
@@ -529,7 +529,7 @@ ifneq (,$(findstring 2.4,$(LINUX_SRC)))
        $(MAKE) -C $(RT28xx_DIR)/os/linux/
 else
        cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 
 # Declare the contents of the .PHONY variable as phony.  We keep that information in a variable
diff --git a/src/Makefile b/src/Makefile
index ed4b88f..31761cf 100644
--- a/src/Makefile
+++ b/src/Makefile
@@ -377,23 +377,23 @@ else
 
 ifeq ($(OSABL),YES)
        cp -f os/linux/Makefile.6.util $(RT28xx_DIR)/os/linux/Makefile
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 
        cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
 ifeq ($(PLATFORM),DM6446)
-       $(MAKE)  ARCH=arm CROSS_COMPILE=arm_v5t_le- -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE)  ARCH=arm CROSS_COMPILE=arm_v5t_le- -C  $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 else
 ifeq ($(PLATFORM),FREESCALE8377)
-       $(MAKE) ARCH=powerpc CROSS_COMPILE=$(CROSS_COMPILE) -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) ARCH=powerpc CROSS_COMPILE=$(CROSS_COMPILE) -C  $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 else
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 endif
 
 ifeq ($(OSABL),YES)
        cp -f os/linux/Makefile.6.netif $(RT28xx_DIR)/os/linux/Makefile
diff --git a/Makefile.inc b/Makefile.inc
index ed4b88f..31761cf 100644
--- a/Makefile.inc
+++ b/Makefile.inc
@@ -377,23 +377,23 @@ else
 
 ifeq ($(OSABL),YES)
        cp -f os/linux/Makefile.6.util $(RT28xx_DIR)/os/linux/Makefile
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 
        cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
 ifeq ($(PLATFORM),DM6446)
-       $(MAKE)  ARCH=arm CROSS_COMPILE=arm_v5t_le- -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE)  ARCH=arm CROSS_COMPILE=arm_v5t_le- -C  $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 else
 ifeq ($(PLATFORM),FREESCALE8377)
-       $(MAKE) ARCH=powerpc CROSS_COMPILE=$(CROSS_COMPILE) -C  $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) ARCH=powerpc CROSS_COMPILE=$(CROSS_COMPILE) -C  $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 else
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
        $(MAKE) -C $(RT28xx_DIR)/os/linux/
 else
        cp -f os/linux/Makefile.6.netif $(RT28xx_DIR)/os/linux/Makefile
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 endif
 
@@ -529,7 +529,7 @@ ifneq (,$(findstring 2.4,$(LINUX_SRC)))
        $(MAKE) -C $(RT28xx_DIR)/os/linux/
 else
        cp -f os/linux/Makefile.6 $(RT28xx_DIR)/os/linux/Makefile
-       $(MAKE) -C $(LINUX_SRC) SUBDIRS=$(RT28xx_DIR)/os/linux modules
+       $(MAKE) -C $(LINUX_SRC) M=$(RT28xx_DIR)/os/linux modules
 endif
 
 # Declare the contents of the .PHONY variable as phony.  We keep that information in a variable
diff --git a/src/os/linux/config.mk b/src/os/linux/config.mk
index 1d3b5ab..dc4036b 100644
--- a/src/os/linux/config.mk
+++ b/src/os/linux/config.mk
@@ -1320,7 +1320,7 @@ ifeq ($(PLATFORM),PC)
        export CFLAGS
     else
        # Linux 2.6
-       EXTRA_CFLAGS := $(WFLAGS) 
+       EXTRA_CFLAGS := $(WFLAGS) -Wno-return-type -Wno-incompatible-pointer-types -Wno-implicit-function-declaration
     endif
 endif

to keep up-to-date with kernel v5.x.x series out-of-tree build I still get this error :

  CC [M]  /root/MT7601u/src/os/linux/../../os/linux/rt_linux.o
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c: In function ‘__RTMP_OS_Init_Timer’:
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c:124:9: error: ‘OS_NDIS_MINIPORT_TIMER’ {aka ‘struct timer_list’} has no member named ‘data’
   pTimer->data = (unsigned long)data;
         ^~
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOsUsDelay’:
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c:182:8: warning: unused variable ‘i’ [-Wunused-variable]
  ULONG i;
        ^
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpDrvAllRFPrint’:
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c:2164:22: warning: unused variable ‘macValue’ [-Wunused-variable]
  UINT32 macAddr = 0, macValue = 0;
                      ^~~~~~~~
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c:2164:9: warning: unused variable ‘macAddr’ [-Wunused-variable]
  UINT32 macAddr = 0, macValue = 0;
         ^~~~~~~
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOSIRQRelease’:
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c:2300:21: warning: unused variable ‘net_dev’ [-Wunused-variable]
  struct net_device *net_dev = (struct net_device *)pNetDev;
                     ^~~~~~~
In file included from /root/MT7601u/src/include/rtmp_os.h:48,
                 from /root/MT7601u/src/include/rtmp_comm.h:69,
                 from /root/MT7601u/src/os/linux/../../os/linux/rt_linux.c:35:
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOsGetPid’:
/root/MT7601u/src/include/os/rt_linux.h:524:71: error: ‘struct task_struct’ has no member named ‘pids’; did you mean ‘pid’?
 #define RT_GET_OS_PID(_x, _y)  do{rcu_read_lock(); _x=(ULONG)current->pids[PIDTYPE_PID].pid; rcu_read_unlock();}while(0)
                                                                       ^~~~
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c:4596:2: note: in expansion of macro ‘RT_GET_OS_PID’
  RT_GET_OS_PID(*pDst, PID);
  ^~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:279: /root/MT7601u/src/os/linux/../../os/linux/rt_linux.o] Error 1
make[2]: *** [Makefile:1804: /root/MT7601u/src/os/linux] Error 2
make[2]: uscita dalla directory "/usr/src/linux-headers-5.10.17-v7+"
make[1]: *** [Makefile:511: osutil] Error 2
make[1]: uscita dalla directory "/root/MT7601u/src"
make: *** [Makefile:2: all] Error 2

any ideas ?

from mt7601u.

artynet avatar artynet commented on August 17, 2024

adding this another patch :

--- a/src/os/linux/rt_linux.c
+++ b/src/os/linux/rt_linux.c
@@ -120,9 +120,10 @@ static inline VOID __RTMP_OS_Init_Timer(
        IN PVOID data)
 {
        if (!timer_pending(pTimer)) {
-               init_timer(pTimer);
-               pTimer->data = (unsigned long)data;
-               pTimer->function = function;
+               // init_timer(pTimer);
+               // pTimer->data = (unsigned long)data;
+               // pTimer->function = function;
+               timer_setup(pTimer, function, (unsigned long)data);
        }
 }

and getting this last-step error:

  CC [M]  /root/MT7601u/src/os/linux/../../common/rt_os_util.o
  CC [M]  /root/MT7601u/src/os/linux/../../os/linux/rt_linux_symb.o
  CC [M]  /root/MT7601u/src/os/linux/../../os/linux/rt_rbus_pci_util.o
  CC [M]  /root/MT7601u/src/os/linux/../../os/linux/rt_usb_util.o
  CC [M]  /root/MT7601u/src/os/linux/../../os/linux/rt_linux.o
In file included from /root/MT7601u/src/include/rtmp_os.h:48,
                 from /root/MT7601u/src/include/rtmp_comm.h:69,
                 from /root/MT7601u/src/os/linux/../../os/linux/rt_linux.c:35:
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c: In function ‘RtmpOsGetPid’:
/root/MT7601u/src/include/os/rt_linux.h:525:71: error: ‘struct task_struct’ has no member named ‘pids’; did you mean ‘pid’?
 #define RT_GET_OS_PID(_x, _y)  do{rcu_read_lock(); _x=(ULONG)current->pids[PIDTYPE_PID].pid; rcu_read_unlock();}while(0)
                                                                       ^~~~
/root/MT7601u/src/os/linux/../../os/linux/rt_linux.c:4597:2: note: in expansion of macro ‘RT_GET_OS_PID’
  RT_GET_OS_PID(*pDst, PID);
  ^~~~~~~~~~~~~
make[3]: *** [scripts/Makefile.build:279: /root/MT7601u/src/os/linux/../../os/linux/rt_linux.o] Error 1
make[2]: *** [Makefile:1804: /root/MT7601u/src/os/linux] Error 2
make[2]: uscita dalla directory "/usr/src/linux-headers-5.10.17-v7+"
make[1]: *** [Makefile:511: osutil] Error 2
make[1]: uscita dalla directory "/root/MT7601u/src"
make: *** [Makefile:2: all] Error 2

but I can't figure out how to fix the struct...any ideas @muratdemirtas ?

from mt7601u.

arunelias avatar arunelias commented on August 17, 2024

Yes it is giving a lot of errors. Seems it will not work in new kernels

from mt7601u.

Related Issues (18)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.