Jump to content

turkerali

Members
  • Posts

    8
  • Joined

  • Last visited

Everything posted by turkerali

  1. Hi Yu, If you could setup a git repository and backport latest MGLRU to at least: - Last stable kernel (5.18.10 at the moment) - Last LTS kernel (5.15.53 at the moment) it would be really beneficial for people who want to test MLGRU. Regards.
  2. Yes, I am using the linux-image-current-rockchip64 (5.8.x) on nanopc-t4. There is one more possibility that might have resolved the issue for me. When you install the "linux-headers" package, apt runs "make scripts" command at the end of installation, which builds some helper utilities inside the linux-headers package. I believe these helper utilities are responsible for module compilation and the "modpost" errors. As a workaround, before you install the linux-headers package, make sure to upgrade the gcc version to gcc-9 or gcc-10 from ppa:ubuntu-toolchain-r/test repo. Then install the linux-headers package. If you do this, the binary utilites in the scripts folder will be built with the upgraded gcc, and will be able to build & link the zfs modules. I may be wrong, but it's worth trying.
  3. I am using Armbian Bionic. I have upgraded the GCC from ppa:ubuntu-toolchain-r/test repo to gcc-10, but I was having the same error message until today: ERROR: modpost: "__stack_chk_guard" [/root/zfs/zfs-0.8.5/module/zfs/zfs.ko] undefined! ERROR: modpost: "__stack_chk_guard" [/root/zfs/zfs-0.8.5/module/zcommon/zcommon.ko] undefined! ... Today Armbian upgraded the kernel&header package (#20.08.8) and zfs compiles without any errors. I checked the changelog from https://docs.armbian.com/Release_Changelog/ but could not see any related changes. Most probably Armbian is now building the kernel with a newer GCC version, because I did not change anything since the build failed.
  4. Fair enough. I've just sent a pull request for this small change. Hope I won't break anything
  5. I had to recompile the Armbian kernel for the DS1307 RTC Module. The details are in this thread: https://forum.armbian.com/topic/8856-solved-how-to-add-an-external-rtc-module-to-rock64-board/
  6. ROCK64 is a RK3328 Quad-Core ARM Cortex A53 board with up to 4 GB of RAM. Unfortunately it has a non-functional RTC (/dev/rtc0), which is not battery backed. If your board is not connected to internet 7/24, you can not use the NTP or systemd-timesyncd. Therefore you need to connect a battery-backed external RTC module to the ROCK64 header, and get the time via the i2c protocol. The good news is, the GPIO headers on ROCK64 is compatible with Raspberry Pi headers. Therefore almost any Raspberry Pi RTC module will work on ROCK64. But you need to do some tweaking to communicate with the RTC module. I will explain the required steps which worked for me. 1. Buy an external RTC module for Raspberry Pi, preferably with DS1307 chip. Here is an example: https://www.abelectronics.co.uk/p/70/rtc-pi 2. Install i2c-tools package: sudo apt-get install i2c-tools 3. Connect the RTC module to the board as in the attached picture. 4. Right now, you can not probe the RTC module, because most of the GPIO headers on ROCK64 board is disabled by default. (See https://github.com/ayufan-rock64/linux-build/blob/master/recipes/additional-devices.md for details.) Therefore if you try to probe i2c-0, you will get the error below: root@rock64:~# sudo i2cdetect -y 0 Error: Could not open file `/dev/i2c-0' or `/dev/i2c/0': No such file or directory Ayufan wrote a nice script named "enable_dtoverlay" to enable the GPIO headers on-the-fly. Here is the link: https://raw.githubusercontent.com/ayufan-rock64/linux-package/master/root/usr/local/sbin/enable_dtoverlay Download this script and copy it under /bin and make it executable. We will enable "i2c-0" with this script, which we need for the RTC module. The command to enable i2c-0 is as follows: /bin/enable_dtoverlay i2c0 i2c@ff150000 okay After you run this command, /dev/i2c-0 becomes available, and we can probe it via the command below: root@rock64:~# sudo i2cdetect -y 0 0 1 2 3 4 5 6 7 8 9 a b c d e f 00: -- -- -- -- -- -- -- -- -- -- -- -- -- 10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- 60: -- -- -- -- -- -- -- -- 68 -- -- -- -- -- -- -- 70: -- -- -- -- -- -- -- -- If you see the number 68, you are on the right track. 5. Now we need the kernel driver for DS1307. Unfortunately DS1307 driver is not available with armbian kernel (see below). root@rock64:~# cat /boot/config-4.4.162-rockchip64 | grep DS1307 # CONFIG_RTC_DRV_DS1307 is not set So we need to recompile the Armbian kernel with this option enabled. I will not cover the steps to compile the kernel, you can find it here: https://docs.armbian.com/Developer-Guide_Build-Preparation/ Let's hope @Igor or any other Armbian developer will enable this module by default, and save us from this burden. After we compile the kernel with DS1307 driver, we are almost done. We need to tell the kernel that a DS1307 chip is using the i2c-0. Here is the way to do that: echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device After we execute this command, /dev/rtc1 becomes available, and points to our external RTC module. Please note that /dev/rtc0 is the onboard RTC, which does not work, and should be avoided. We need to update the date/time information from the system for the first time. Here is the command to do that: hwclock --rtc /dev/rtc1 --systohc Now our external RTC clock is set, and ready to take over NTP. 6. Edit /lib/udev/hwclock-set. Find the lines below, and update as shown: if [ -e /run/systemd/system ] ; then # exit 0 /bin/enable_dtoverlay i2c0 i2c@ff150000 okay echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-0/new_device fi 7. Edit /etc/rc.local, add the following lines to set the system clock for every boot: /lib/udev/hwclock-set /dev/rtc1 8. Disable the below services, as we don't need them anymore: systemctl stop systemd-timesyncd.service systemctl disable systemd-timesyncd.service systemctl stop fake-hwclock.service systemctl disable fake-hwclock.service 9. Reboot and enjoy your RTC module.
  7. I have an external RTC module, which I bought from from AB electronics for my Rasberry Pi (see https://www.abelectronics.co.uk/p/70/rtc-pi). As the pinouts for Raspberry Pi and Rock64 are same, I can connect this RTC module to the ROCK 64 board and i2cdetect detects the module with some minor tweaks. The only missing part is the DS1307 kernel driver. I can change the armbian config and compile my own kernel, but I don't want to do that again and again whenever the kernel gets updated. Therefore if the CONFIG_RTC_DRV_DS1307 option is set to "m" in the default config, every ROCK64 owner can use DS1307 based external RTC modules with the default armbian kernel. I can even write a howto for that.
  8. Gentlemen, I have a rock64 board, and I would like to use an external RTC module with DS1307 chip. Unfortunately the armbian kernel does not provide DS1307 driver by default: root@rock64:~# cat /boot/config-4.4.162-rockchip64 | grep DS1307 # CONFIG_RTC_DRV_DS1307 is not set I don't have the programming skills for sending a pull request to enable this module. Could you please enable this module for ROCK64? I believe other ROCK64 owners may also benefit from this driver, as the board does not expose a working RTC, and DS1307 is a very common RTC chip. Thanks in advance.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines