How to build a custom kernel is well described on the Radxa wiki: https://wiki.radxa.com/Zero/dev/kernel
If you need help with that, I suggest you open another thread, rather than continue posting on this one which should be limited to the enc28j60 modules specifically.
Oh, I needed to have a look at the device and I nearly forgot about you, sorry. But I see they have taken care of youâŚ
Yes, the wiring seems OK. But you definitely need the module, as stated by others. I did compile the module in a âdirty wayâ just by downloading the appropriate directory enc28j60 with the module sources from the large kernel source tree (ideally the very same kernel version you are running). It is basically just one source file. I do not remember exactly how I compiled it using make (so stupid not to write down things!), but I found the proper command to compile just a single kernel module somewhere. The Makefile only contains a single line: obj-m = enc28j60.o. Of course, one needs at least the current kernel headers package installed to compile the module against.
Oh, yes. The instructions from https://docs.kernel.org/kbuild/modules.html seem to work. The original directory only has three files, the Makefile mentioned above and two source files: enc28j60.c and enc28j60_hw.h. When I run make -C /lib/modules/`uname -r`/build M=$PWD, I get the module compiled. I suppose that the next step would then install it: make -C /lib/modules/`uname -r`/build M=$PWD modules_install.
Did you type all those nonsense characters, or is that because of a poor serial connection? If the latter, try booting without the uart cable. The bootloader thinks youâre trying to interrupt the boot sequence.
I did not type anything.
I only flash the image to a SD card and install the SD card to the Radxa Zero 2.
The text came out from the HDMI screen.
I used a USB hub with a USB keyboard and a mouse
I unplugged the USB hub. There was only HDMI cable connected between Radxa and the monitor. The Radxa image stuck at the bootloader with random characters.
You can see on your screen it says âHit any key to stop autobootâ. You either have input from serial port or USB keyboard (they display the same console) that interrupt the boot process.
Please take a picture of your connections so we can check what might causing the issue.
Oops, something spilling garbage to your USB serial!
The radxa-ubuntu images used to be defect out-of-the-box since last summer, but I reported elsewhere how to fix them. But the debian images worked, just used a different kernel and overlay system. @RadxaYuntian posted a special image above. Are you testing that one?
(Sending my working image would be desperate indeed. Remember it is expanded to the whole SD card and may contain just any additional rubbish and my personal data.)
Once you get past the serial garbage problem, you can check the serial output, whether the overlay gets actually loaded or not. In the dmesg I can see the module loading:
@RadxaYuntian I had UART_A0_A_TXD and UART_A0_A_TXD (pin-8, pin-10) pins were connected. I removed them, the kernel could boot up.
I logged in using: radxa, radxa.
However the kernel could not load the enc28j60. When I searched for âenc28â from the dmesg, it responded -> ânot foundâ.
According to the ENC28J60 datasheet, the VDD pin is rated for an absolute maximum of +3.6V. If youâve got it connected to +5V, youâve probably fried your chip unless youâre using a module of some sort that is stepping the VCC voltage down to +3.3V.
Install the updated kernel:
sudo dpkg -i linux-image-5.10.156-1-stable_5.10.156-1-6d46ef50b_arm64.deb
copy the ./usr/lib/modules/5.10.165-1-stable/kernel/drivers/net/ethernet/microchip/enc28j60.ko
to: ./usr/lib/modules/5.10.165-1-stable/enc28j60.ko
load the module:
sudo modprobe enc28j60
copy *.dtbo from: ./usr/lib/linux-image-5.10.165-1-stable/amlogic/overlays/
to: ./usr/lib/linux-image-5.10.165-1-stable/amlogic/overlay/
Somehow the subfolder name changed from âoverlayâ to âoverlays"
edit /boot/uEnv.txt
overlays=meson-g12a-spi-gpio-enc28j60
Make sure the file name is correct.
Hi all,
The enc28j60 overlay seems to work but it is not stable. The enc28j60 LAN ethernet hung after about 10 minutes.
I used the eth0 to ping another device, after a while, it hung. I could not do another ping nor using ssh to connect to it.
I attached the dmesg log file.
Please advice!
Thanks enc28j60_up_down.zip (14.4 KB)
The SPI circuitry or the enc28j60 driver is sluggish and un-reliable.
I let the Radxa zero ran overnight - Wi-Fi disabled, the ec28j26 LAN Ethernet connection hung. My router still recognized the enc28j60 LAN ethernet ip address; however, I could ssh/network connect to the device.