logo elektroda
logo elektroda
X
logo elektroda

Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface

Kamil 1 4974 19
Best answers

How can I get the RT5370 Wi‑Fi module working on my RK3066 board under Linaro when `make load` fails in the compat-drivers package?

No, this compat-drivers package is not the right fix here; the Makefile has no `load` target, so `make load` fails, and your current kernel is too old for modern Wi‑Fi support [#16800734] [#16831803] The board is running kernel 3.0.36+, which is described as too old for many newer programs and drivers, so the suggested solution is to build a newer stable longterm kernel from kernel.org instead [#16831803] RT5370 support is available in 4.x kernels through `CONFIG_RT2800USB_RT53XX` in `rt2800usb.c` for USB ID `148f:5370` [#16831803] For this board, use a board-specific `.config` such as `marsboard_rk3066_sdcard_defconfig`, then build with `make zImage`, `make modules`, and `make modules_install` rather than trying to cross-compile if you are building directly on the target [#16846878]
Generated by the language model.
ADVERTISEMENT
Treść została przetłumaczona polish » english Zobacz oryginalną wersję tematu
  • #1 16772146
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    Hi.

    If not this section, sorry. I would also like to point out right away that I am a very beginner in Linux.

    I have a board with the RK3066 processor on which I installed the linux system, namely Linaro, downloaded from this website http://www.haoyuelectronics.com/service/RK3066/Images/ubuntu/

    I communicate via the UART interface connected to the laptop adapter. Here's what the system looks like right out of the box

     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface

    Now to the point. The board has a RT5370 WiFi module on board. So I would like to be able to connect to wifi, but there is a problem, this system only has drivers for the 8188EU chip, which I don't have. However, the system detects the current module, because when I give the command "lsusb", I get

     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface

    I found a tutorial on YT where someone installs wifi card drivers in Kali Linux. The guide at this link https://www.youtube.com/watch?v=n3EJk44MOU4

    Unfortunately, I cannot download the compat wireless 2010 package mentioned in the movie, because the website where the packages were located has been "rebuilt" and the packages themselves are now called backports. Here is the link to these packages
    https://www.kernel.org/pub/linux/kernel/projects/backports/stable/
    But going back in the catalog of these packages, you can see the "2012" catalog there. In it I chose the directory "09" and then "18". Now the list with "compat drivers" packages has appeared, so I have downloaded the "compat-drivers-2012-09-18-p.tar" package.
    I put it on the SD card, mounted the medium in the linux system and performed the next steps according to the movie.
    So, I unpacked the package (to the compat2012 folder), entered its folder with the command "cd" and ran the command "make unload".

    So far, it is kind of in line with what they showed in the film. Because in response I got
     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface

    The problem starts now because when I do "make load" I have a bug
     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface

    Does that mean the driver cannot be installed?
  • ADVERTISEMENT
  • #2 16798868
    md37
    Level 10  
    Posts: 73
    Help: 1
    Rate: 9
    There should be a Makefile in that folder. Send its content.
  • ADVERTISEMENT
  • #3 16800708
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    Hello.

    Thank you for your interest in the topic.
    Here is the contents of the makefile

    #
    
    # Copyright (c) 2007-2012 Luis R. Rodriguez 
    #
    # Permission to use, copy, modify, and/or distribute this software for any
    # purpose with or without fee is hereby granted, provided that the above
    # copyright notice and this permission notice appear in all copies.
    #
    # THE SOFTWARE IS PROVIDED "AS IS" AND THE AUTHOR DISCLAIMS ALL WARRANTIES
    # WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF
    # MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR
    # ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES
    # WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN
    # ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF
    # OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
    
    export KMODDIR?= updates
    KMODDIR_ARG:= "INSTALL_MOD_DIR=$(KMODDIR)"
    ifneq ($(origin KLIB), undefined)
    KMODPATH_ARG:= "INSTALL_MOD_PATH=$(KLIB)"
    else
    export KLIB:= /lib/modules/$(shell uname -r)
    endif
    export KLIB_BUILD ?=	$(KLIB)/build
    export MAKE
    
    DESTDIR?=
    
    ifneq ($(KERNELRELEASE),)
    
    -include $(COMPAT_CONFIG)
    include $(COMPAT_CONFIG_CW)
    
    NOSTDINC_FLAGS := -I$(M)/include/ \
    	-include $(M)/include/linux/compat-2.6.h \
    	$(CFLAGS)
    
    obj-y := compat/
    
    obj-$(CONFIG_COMPAT_RFKILL) += net/rfkill/
    
    ifeq ($(BT),)
    obj-$(CONFIG_COMPAT_WIRELESS) += net/wireless/ net/mac80211/
    obj-$(CONFIG_COMPAT_WIRELESS_MODULES) += drivers/net/wireless/
    
    obj-$(CONFIG_COMPAT_NET_USB_MODULES) += drivers/net/usb/
    
    obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/ethernet/atheros/
    obj-$(CONFIG_COMPAT_NETWORK_MODULES) += drivers/net/ethernet/broadcom/
    
    obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/ssb/
    obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/bcma/
    obj-$(CONFIG_COMPAT_VAR_MODULES) += drivers/misc/eeprom/
    
    ifeq ($(CONFIG_STAGING_EXCLUDE_BUILD),)
    endif
    
    endif
    
    obj-$(CONFIG_COMPAT_BLUETOOTH) += net/bluetooth/
    obj-$(CONFIG_COMPAT_BLUETOOTH_MODULES) += drivers/bluetooth/
    
    else
    
    export PWD :=	$(shell pwd)
    
    # The build will fail if there is any space in PWD.
    ifneq (,$(findstring $() ,$(PWD)))
    $(error "The path to this compat-drivers directory has spaces in it." \
    	"Please put it somewhere where there is no space")
    endif
    
    export CFLAGS += \
    -DCOMPAT_BASE="\"$(shell cat $(PWD)/.compat_base)\"" \
    -DCOMPAT_BASE_TREE="\"$(shell cat $(PWD)/.compat_base_tree)\"" \
    -DCOMPAT_BASE_TREE_VERSION="\"$(shell cat $(PWD)/.compat_base_tree_version)\"" \
    -DCOMPAT_PROJECT="\"Compat-drivers\"" \
    -DCOMPAT_VERSION="\"$(shell cat $(PWD)/.compat_version)\""
    
    # These exported as they are used by the scripts
    # to check config and compat autoconf
    export COMPAT_CONFIG_CW=$(PWD)/config.mk
    export COMPAT_CONFIG=$(PWD)/.config
    export CONFIG_CHECK=$(PWD)/.config.mk_md5sum.txt
    export COMPAT_AUTOCONF=include/linux/compat_autoconf.h
    export CREL=$(shell cat $(PWD)/.compat_version)
    export CREL_PRE:=.compat_autoconf_
    export CREL_CHECK:=$(PWD)/$(CREL_PRE)$(CREL)
    
    all: modules
    
    $(COMPAT_CONFIG): ;
    
    modules: $(CREL_CHECK)
    	$(MAKE) -C $(KLIB_BUILD) M=$(PWD) modules
    	@touch $@
    
    bt: $(CREL_CHECK)
    	+@./scripts/check_config.sh
    	$(MAKE) -C $(KLIB_BUILD) M=$(PWD) BT=TRUE modules
    	@touch $@
    
    # We use a CREL_CHECK variable which will depend on the environment used to
    # build. If the environment requirements change it forces a reconfiguration
    # check. This means we force a new reconfiguration check if a the user gets a
    # new updates of compat-drivers or when the user updates the $(COMPAT_CONFIG)
    # file.
    # XXX: add kernel target to the CREL_CHECK mix, this would ensure we also
    # reconfigure and build again fresh if we detect a new target kernel is
    # being used.
    $(CREL_CHECK):
    	@# Force to regenerate compat autoconf
    	+@./compat/scripts/gen-compat-config.sh > $(COMPAT_CONFIG)
    	@rm -f $(CONFIG_CHECK)
    	+@./scripts/check_config.sh
    	@md5sum $(COMPAT_CONFIG_CW) > $(CONFIG_CHECK)
    	@touch $@
    
    btinstall: btuninstall bt-install-modules
    
    bt-install-modules: bt
    	$(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) BT=TRUE \
    		modules_install
    	@/sbin/depmod -ae
    	@echo
    	@echo Now run:
    	@echo
    	@echo sudo make btunload:
    	@echo
    	@echo And then load the needed bluetooth modules. If unsure reboot.
    	@echo
    
    btuninstall:
    	@# New location, matches upstream
    	@rm -rf $(KLIB)/$(KMODDIR)/net/bluetooth/
    	@rm -rf $(KLIB)/$(KMODDIR)/drivers/bluetooth/
    	@# Lets only remove the stuff we are sure we are providing
    	@# on the misc directory.
    	@/sbin/depmod -ae
    	@echo
    
    btclean:
    	$(MAKE) -C /lib/modules/$(shell uname -r)/build M=$(PWD) BT=TRUE clean
    	@rm -f $(CREL_PRE)*
    
    install: uninstall install-modules install-scripts
    
    install-modules: modules
    	$(MAKE) -C $(KLIB_BUILD) M=$(PWD) $(KMODDIR_ARG) $(KMODPATH_ARG) \
    		modules_install
    	@./scripts/update-initramfs
    
    install-scripts:
    	@# All the scripts we can use
    	@mkdir -p $(DESTDIR)/usr/lib/compat-drivers/
    	@install scripts/modlib.sh	$(DESTDIR)/usr/lib/compat-drivers/
    	@install scripts/madwifi-unload	$(DESTDIR)/usr/sbin/
    	@# This is to allow switching between drivers without blacklisting
    	@install scripts/athenable	$(DESTDIR)/usr/sbin/
    	@install scripts/b43enable	$(DESTDIR)/usr/sbin/
    	@install scripts/iwl-enable	$(DESTDIR)/usr/sbin/
    	@install scripts/athload	$(DESTDIR)/usr/sbin/
    	@install scripts/b43load	$(DESTDIR)/usr/sbin/
    	@install scripts/iwl-load	$(DESTDIR)/usr/sbin/
    	@if [ $(shell modinfo ath_pci > /dev/null 2>&1 && echo 1) ]; then \
    		echo -n "Note: madwifi detected, we're going to disable it. " ;\
    		echo "If you would like to enable it later you can run:" ;\
    		echo " sudo athenable madwifi" ;\
    		echo ;\
    		echo Running athenable ath5k...;\
    		$(DESTDIR)/usr/sbin/athenable ath5k ;\
    	fi
    	@if [ $(shell modinfo iwl4965 > /dev/null 2>&1 && echo 1) ]; then \
    		echo ;\
    		echo -n "Note: iwl4965 detected, we're going to disable it. " ;\
    		echo "If you would like to enable it later you can run:" ;\
    		echo " sudo iwl-load iwl4965" ;\
    		echo ;\
    		echo Running iwl-enable iwlagn...;\
    		$(DESTDIR)/usr/sbin/iwl-enable iwlagn ;\
    	fi
    	@if [ $(shell modinfo iwlagn > /dev/null 2>&1 && echo 1) ] \
    	 && [ $(shell modinfo iwlwifi > /dev/null 2>&1 && echo 1) ]; then \
    		echo ;\
    		echo -n "Note: iwlagn detected, we're going to disable it. " ;\
    		echo "If you would like to enable it later you can run:" ;\
    		echo " sudo iwl-load iwlagn" ;\
    		echo ;\
    		echo Running iwl-enable iwlwifi...;\
    		$(DESTDIR)/usr/sbin/iwl-enable iwlwifi ;\
    	fi
    	@# If on distributions like Mandriva which like to
    	@# compress their modules this will find out and do
    	@# it for you. Reason is some old version of modutils
    	@# won't know mac80211.ko should be used instead of
    	@# mac80211.ko.gz
    	@./scripts/compress_modules
    	@# Mandrake doesn't have a depmod.d/ conf file to prefer
    	@# the updates/ dir which is what we use so we add one for it
    	@# (or any other distribution that doens't have this).
    	@./scripts/check_depmod
    	@# Udev stuff needed for the new compat_firmware_class.
    	@./compat/scripts/compat_firmware_install
    	@/sbin/depmod -a
    	@echo 
    	@echo Now run:
    	@echo 
    	@echo sudo make unload to unload all: wireless, bluetooth and ethernet modules
    	@echo sudo make wlunload to unload wireless modules
    	@echo sudo make btunload to unload bluetooth modules
    	@echo
    	@echo Run sudo modprobe 'driver-name' to load your desired driver. 
    	@echo If unsure reboot.
    	@echo
    
    uninstall:
    	@# New location, matches upstream
    	@rm -rf $(KLIB)/$(KMODDIR)/compat/
    	@rm -rf $(KLIB)/$(KMODDIR)/net/mac80211/
    	@rm -rf $(KLIB)/$(KMODDIR)/net/rfkill/
    	@rm -rf $(KLIB)/$(KMODDIR)/net/wireless/
    	@rm -rf $(KLIB)/$(KMODDIR)/drivers/ssb/
    	@rm -rf $(KLIB)/$(KMODDIR)/drivers/net/usb/
    	@rm -rf $(KLIB)/$(KMODDIR)/drivers/net/wireless/
    	@rm -rf $(KLIB)/$(KMODDIR)/drivers/staging/
    	@rm -rf $(KLIB)/$(KMODDIR)/drivers/net/atl*
    	@find $(KLIB)/$(KMODDIR)/drivers/net/ -name "alx*.ko" -o -name "atl*.ko" 2>/dev/null |xargs rm -f
    	@# Lets only remove the stuff we are sure we are providing
    	@# on the misc directory.
    	@rm -f $(KLIB)/$(KMODDIR)/drivers/misc/eeprom/eeprom_93cx6.ko*
    	@rm -f $(KLIB)/$(KMODDIR)/drivers/misc/eeprom_93cx6.ko*
    	@rm -f $(KLIB)/$(KMODDIR)/drivers/net/b44.ko*
    	@/sbin/depmod -a
    	@./scripts/update-initramfs
    	@echo 
    
    clean:
    	@if [ -d net -a -d $(KLIB_BUILD) ]; then \
    		$(MAKE) -C $(KLIB_BUILD) M=$(PWD) clean ;\
    	fi
    	@rm -f $(CREL_PRE)*
    unload:
    	@./scripts/unload.sh
    
    btunload:
    	@./scripts/btunload.sh
    
    wlunload:
    	@./scripts/wlunload.sh
    
    
    .PHONY: all clean install uninstall unload btunload wlunload modules bt Makefile
    
    endif
    
    clean-files += Module.symvers Module.markers modules modules.order
    clean-files += $(CREL_CHECK) $(CONFIG_CHECK) $(COMPAT_CONFIG)
  • #4 16800734
    md37
    Level 10  
    Posts: 73
    Help: 1
    Rate: 9
    There is no "load" in the file, so this error pops up. Send the contents of /etc/apt/sources.list Do you have an Ethernet socket?
  • #5 16800753
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    This is about the "ect" folder on the system "drive"? Because if it is to be a folder where this makefile is (so in this folder with drivers, there is no such folder there).
  • ADVERTISEMENT
  • #6 16800763
    md37
    Level 10  
    Posts: 73
    Help: 1
    Rate: 9
    If you have a "/" in front of any path, it means it's in the root of your system drive.
  • ADVERTISEMENT
  • #7 16803285
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    I do not have an Ethernet socket, so I would probably deal with it. Here is the content of the file that a colleague mentioned, there is not much of it:

    deb http://ports.ubuntu.com/ubuntu-ports/ trusty main universe
    deb-src http://ports.ubuntu.com/ubuntu-ports/ trusty main universe
  • #8 16831803
    PDT
    Level 24  
    Posts: 511
    Help: 79
    Rate: 50
    Kamil 1 wrote:
    I have a board with the RK3066 processor,
     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface

    Kernel 3.0.36+ Sneaky Weasel is too old. Current versions of many programs will not work on it due to the lack of some new system functions (e.g. memfd).
    It is best to compile the latest stable kernel longterm from www.kernel.org.
    For a marsboard it shouldn't be difficult, at least the dts is ready.
    Kamil 1 wrote:
    The board has a RT5370 WiFi module on board.
     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface

    There is a WiFi driver in 4.x kernels:
    CONFIG_RT2800USB_RT53XX
    rt2800usb.c: {USB_DEVICE (0x148f, 0x5370)}
  • #9 16832876
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    Thank you for your message and advice :) Unfortunately, I have never dealt with the Linux kernel replacement, so it probably won't work out very well. But I will read out of curiosity how it is done ;)
  • Helpful post
    #10 16834802
    viaxa
    Level 22  
    Posts: 364
    Help: 55
    Rate: 73
    Maybe one of these will fit.
    rt2x00.7z (50.11 kB)You must be logged in to download this attachment.
  • #11 16834813
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    I am trying to compile the kernel in the newest version, 4.9.63. I use this guide: http://www.linuxportal.pl/wpisy/prosta-kompilacja-jadra-id182976
    So I downloaded the kernel archive from https://www.kernel.org/, unpacked it, and placed it in the / usr / src / directory. Then I follow step 6 of this tutorial and that's where the problems start. I skip the "make clean" and "make mrproper" commands (I also executed them the first time, but it started to warn, so I uploaded a fresh system image and on the second attempt to replace the kernel I skipped these commands).
    The problem appears already with the command "cp / boot / config-`uname -r` ./.config" because I do not have any configuration file in the boot directory.
    And running "make menuconfig" only gives me this:

     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface
  • Helpful post
    #12 16836572
    PDT
    Level 24  
    Posts: 511
    Help: 79
    Rate: 50
    Kamil 1 wrote:
    The problem appears already with the command "cp / boot / config-`uname -r` ./.config" ...


    The errors are caused by:
    1. libncurses5-dev package not installed
    2. it is necessary to set the date, e.g. date 20171120

    Then the initial configuration (due to missing config file):
    make multi_v7_defconfig
    and proper:
    make menuconfig

    kisses
  • #13 16837519
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    In fact, the date was not set, but it is a bit of a surprise to me that one of the mistakes was something so trivial :D
    As far as installing libncurses5-dev is concerned, I am not able to install this package automatically because I don't have internet, so I'm at the starting point ...
  • #14 16842461
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    I am still tired of this topic. I am currently in the process of manually reinstalling the "libncurses5-dev" mentioned by my colleague PDT. I downloaded the libncurses5-dev.deb package on a computer from some Debian website. Installing it with the command "dpkg" caused an error related to the lack of another package - libtinfo5. This one needs something else etc. etc. I skipped this installation on foot and downloaded the whole ncurses package (5.9-10) and if I understand correctly it should contain everything that is needed for this "libncurses5-dev", with him. The package is in the form of an archive that I unpacked.
    I found a guide on the Internet on how to install something like this - first the file or the "configure" command is called, then "make" at the end of "make install". When I gave the make command, everything went fine, beautiful, flooding the consoles with successive steps for a few minutes. Unfortunately, an error finally appeared:

    make [1]: warning: Clock skew detected. Your build may be incomplete.
    make [1]: Leaving directory `/mnt/karta/ncurses-5.9/c++ '
    make: warning: Clock skew detected. Your build may be incomplete.

    Anyone know what this means?
  • Helpful post
    #15 16843274
    PDT
    Level 24  
    Posts: 511
    Help: 79
    Rate: 50
    Kamil 1 wrote:
    Unfortunately, an error finally appeared:

    make [1]: warning: Clock skew detected. Your build may be incomplete.
    make [1]: Leaving directory `/mnt/karta/ncurses-5.9/c++ '
    make: warning: Clock skew detected. Your build may be incomplete.

    Anyone know what this means?

    I have previously signaled a problem with the time setting. This error is signaled when 'make' finds a file whose modification time is 'in the future'. Signals detection of system time rollback.
    Boards equipped with hardware RTC read the start time during startup. In this case you have to manually set the 'date'.
    After installing the network it will not be a problem, 'ntpdate' will be loaded from the net.
  • #16 16843971
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    Yes, I know my friend mentioned it before and I took it to heart, I set the time with the date command. It is nice that the error I wrote about appeared, so it probably won't be a problem of clock settings.

    Added after 3 [hours] 23 [minutes]:

    Ok, success. Once again I uploaded a fresh system to this board and I did everything in order, including setting the time and installing the ncurses-5.9 package and this time it worked - after issuing the command "make menuconfig" this kernel configuration window appeared :)

    I have such a question now, my colleague PDT mentioned the preconfiguration with the command "make multi_v7_defconfig", resulting in a .config file
    If now in this kernel configuration window, I load this generated configuration using the "load" option, will I not have to modify this kernel? However, would it be appropriate to change something? If you do without modifications, it's better for me because I can spoil something :P

    Added after 27 [minutes]:

    I am trying to compile the kernel without modifying the kernel configuration.
    In some tutorial I read that you should give the command " make all "to compile the kernel. I do so too, except that I redirect the result of the compilation to the file" result.txt "- I think that it will speed up the process a bit because the processor takes care of the compilation itself and not an additional push of the entire compilation run through the terminal the physical UART) Unfortunately, an error appeared on the good morning ... here it is:

     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface

    Forgive me for not dealing with these errors myself, but I do not have such knowledge, unfortunately ...
  • #17 16846878
    PDT
    Level 24  
    Posts: 511
    Help: 79
    Rate: 50
    I can see that you are making some progress and that for the first time there are also mistakes.
    NOTE: Many tips available on the net concern cross-compilation of the kernel (compile on PC and run on ARM). This is not the case.

    But shortly to the point, instead of make multi_v7_defconfig, you 'd better create a .config file with the contents:
    https://raw.githubusercontent.com/powermcu/ro...arm/configs/marsboard_rk3066_sdcard_defconfig
    This is the kernel 3.0.8+ configuration customized for this marsboard . Most of the settings have not changed.

    We compile with commands:
    make zImage fixed kernel, you need to copy it from arch / arm / boot / zImage to / boot (this is my case, the place depends on the loader)
    make modules loadable modules
    make modules_install install modules to target / lib / modules / ...
  • #18 16849094
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    I have a question, after creating this .config file with this content from the link, should I run "make menuconfig" and load this file there using the load option?

    If I do so, that I use the command "make menuconfig" and load the .config file with the load option, then exiting this configuration window by double pressing ESC, the question appears whether I want to save the current configuration, so I save. Then I run "make zImage" and get errors

     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface

    However, if I create this .config file with this content from the link and no longer use the "make menuconfig" command, I just run "make zImage" immediately then I have some additional configuration process in the terminal which looks like this:

     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface

    The question is which method is correct?
  • #19 16849573
    PDT
    Level 24  
    Posts: 511
    Help: 79
    Rate: 50
    From kernel 3.0.8 to 4.xx a few options have been added / changed, the first way takes them to default values, usually good ones.

    These two lines need to be removed from .config, they are for cross-compiling:
    CONFIG_CROSS_COMPILE = "arm-linux-gnueabi-"
    CONFIG_LOCALVERSION = "+"
  • #20 16849940
    Kamil 1
    Level 16  
    Posts: 434
    Help: 1
    Rate: 17
    Thanks for your involvement and help, I deleted these two entries from the .config file, however I still have a problem with this: /

    Maybe I will write again how I do it - I created a .config file with the content that is in the link posted by my friend. By the way, this file has the header:
    #
    # Automatically generated make config: don't edit
    # Linux / arm 3.0.8 Kernel Configuration
    #
    Then I execute the command "make menuconfig" and immediately load this file. Without modifying anything, I exit this editor and confirm that I want to save the changes.
    Now the file header looks like this:
    #
    # Automatically generated file; DO NOT EDIT.
    # Linux / arm 4.9.63 Kernel Configuration
    #
    So you can see that the file has been overwritten, so probably some new entries have been added to the file related to this kernel version 4.9.63
    Then I remove from the resulting .config file, these two entries related to cross-compilation. And compile with "make zImage" command.

    As a result, I get
     Linux Linaro Installation: Connect RK3066 Board with RT5370 WiFi Module and UART Interface
    At first it throws ngcc bugs, but goes on and asks ... what I deleted ...

    Or maybe it will be easier to do cross compilation on PC?

Topic summary

✨ The discussion revolves around installing Linux Linaro on an RK3066 board and connecting it to an RT5370 WiFi module via UART. The user, a beginner in Linux, faces challenges with driver compatibility, as the system only recognizes the 8188EU chip. Participants suggest checking the Makefile and the sources.list file, and highlight the need for a newer kernel version (4.x) to support the RT5370 driver. The user attempts to compile the kernel but encounters issues due to missing packages and configuration files. Solutions include manually installing dependencies like libncurses5-dev and setting the correct system date. The conversation also covers the process of creating and loading a .config file for kernel compilation, with advice on removing cross-compilation entries to avoid errors.
Generated by the language model.

FAQ

TL;DR: USB ID 148f:5370 confirms RT5370; “Kernel 3.0.36+ is too old.” Upgrade to a 4.x kernel and enable rt2800usb to get Wi‑Fi working. [Elektroda, PDT, post #16831803] Why it matters: This FAQ helps RK3066/Linaro users fix RT5370 Wi‑Fi over UART without Ethernet access.

Quick Facts

How do I fix RT5370 Wi‑Fi not working on an RK3066 with Linaro?

Move off 3.0.36+ and build a 4.x kernel that includes rt2800usb. Enable CONFIG_RT2800USB_RT53XX so the 148f:5370 device loads automatically. Copy the new zImage and install modules, then reboot and use modprobe rt2800usb. “Kernel 3.0.36+ is too old.” [Elektroda, PDT, post #16831803]

Why is my 3.0.36+ kernel considered too old?

It lacks newer kernel features required by modern userland (example cited: memfd). That breaks current utilities and backported drivers. The maintainer advice is to compile a recent stable longterm kernel from kernel.org for this board. “3.0.36+ is too old.” [Elektroda, PDT, post #16831803]

Which kernel option enables Ralink/MediaTek RT5370?

Enable CONFIG_RT2800USB_RT53XX in a 4.x kernel. The driver table lists USB vendor:product 0x148f:0x5370, which matches the RT5370 dongle. After building, the module autoloads when the device appears. [Elektroda, PDT, post #16831803]

make load fails with “No rule to make target ‘load’”. What now?

Your compat-drivers Makefile has no load target, so make load errors. Build modules, install them, run depmod, then modprobe the needed driver. Use modules_install instead of a non‑existent load target. [Elektroda, md37, post #16800734]

Why does make menuconfig fail or show a broken UI?

menuconfig requires libncurses5-dev. Also set the correct system date before building to avoid build logic errors. Install the ncurses dev package and run date YYYYMMDD, then rerun menuconfig. [Elektroda, PDT, post #16836572]

I don’t have /boot/config‑`uname -r`. How do I create a starter .config?

Run make multi_v7_defconfig to seed a baseline for ARMv7 boards. Then run make menuconfig to tailor options, including rt2800usb. Save and continue with the build. [Elektroda, PDT, post #16836572]

How do I compile and install the kernel on-device (not cross‑compiled)?

Run: make zImage; make modules; make modules_install. Copy arch/arm/boot/zImage to your boot location and reboot. If your loader expects a specific path, match it. 1) Build. 2) Install modules. 3) Copy zImage and reboot. [Elektroda, PDT, post #16846878]

What does “Clock skew detected. Your build may be incomplete.” mean?

Your file timestamps are in the future relative to system time. Make detects time going backward and warns about stale dependencies. Fix by setting the correct date before building or using NTP after networking works. [Elektroda, PDT, post #16843274]

No Ethernet on the board—can I still get ncurses and build?

Yes, but manual .deb installation triggers dependency chains, as you saw with libtinfo5. Without network, expect multiple packages to resolve. Setting date and using a complete ncurses 5.9 build succeeded for the OP. [Elektroda, Kamil 1, post #16842461]

Should I remove cross‑compile flags from the .config?

Yes. Delete CONFIG_CROSS_COMPILE="arm-linux-gnueabi-" and CONFIG_LOCALVERSION="+" when building natively. These entries are for cross‑compiling and caused build prompts and errors for the OP. [Elektroda, PDT, post #16849573]

Where is the built kernel image stored?

The ARM zImage outputs to arch/arm/boot/zImage. Copy that file to your boot partition or loader location after building. Then run depmod and reboot to test drivers. [Elektroda, PDT, post #16846878]

How can I confirm the system sees my RT5370 Wi‑Fi adapter?

Run lsusb and look for ID 148f:5370. That vendor:product ID confirms the RT5370 is present on USB and ready for the driver. [Elektroda, Kamil 1, post #16772146]

Is Linux 4.9.63 a reasonable target for this board?

Yes, the OP built 4.9.63 and reached configuration after fixing time and ncurses. Ensure the RT2800USB option is enabled, then compile zImage and modules. [Elektroda, Kamil 1, post #16834813]

What are UART and DTS on this RK3066 platform?

UART is a serial interface used here for console access. DTS (Device Tree Source) describes board hardware; a marsboard DTS exists, easing kernel updates. “For a marsboard…the dts is ready.” [Elektroda, PDT, post #16831803]
Generated by the language model.
ADVERTISEMENT