Jump to content

Marko Buršič

Members
  • Posts

    60
  • Joined

  • Last visited

Everything posted by Marko Buršič

  1. Hi, I wonder if there exists one method to make the end user a friendly way to access the web server. So I have Armbian with hotspot enabled, if I want to look at specific web page running on the board, I have to know the IP of the wlan0 and specific port of the web server. For example in google chrome I have to insert: http://172.24.1.1:3000 This is very difficult for end user, who has minimal knowledge. Is there any way, that for example you log on the hotspot, then open google chrome and start browse for any arbitrary page (let's say www.google.com) at port 80 and then it's automatically redirected to port 3000, except for all other web servers on the same IP. If I write 172.24.1.1:9090 it may not redirect.
  2. I know and I am using it. apt-get install cockpit apt-get install -y cockpit-networkmanager apt-get install cockpit-storaged Running on Armbian Buster.
  3. Is there any new solution about this? I do think I have similar issue in this post :
  4. Hi, I am doing some overlay for fbtft LCD driver - SSD1322. I did compile an add my patch, now I would like to load the LCD driver with DT overlay. This is what I have done: /dts-v1/; /plugin/; / { compatible = "rockchip,rk3399"; fragment@0 { target = <&spi1>; __overlay__ { status = "okay"; }; }; fragment@1 { target = <&spi1>; __overlay__ { /* needed to avoid dtc warning */ #address-cells = <1>; #size-cells = <0>; status = "okay"; mytft@0{ compatible = "solomon,ssd1322"; reg = <0>; spi-max-frequency = <1000000>; buswidth = <8>; rotate = <0>; bgr = <0>; fps = <20>; reset-gpios = <0>, <1 21 1 0xae>; dc-gpios = <0>, <1 21 1 0xae>; debug = <0>; status = "okay"; }; }; }; }; Now the problem is, that I haven't found any information on how those GPIOs are defined. I took pieces of code here and there, the gpio declaration comes from user @martinayotte cs-gpio = <0>, <1 21 1 0xae>; // csgpio = <&gpio1 21 1 0xae>; // csgpio = <&pinctrl/gpio1@ff730000 21 1 0xae>; He uses several ways to declare them, but what really means <0>, <1 21 1 0xae> ? How can I compute this kind of coding for arbitrary RK3399 Gpio? 0001-Signed-off-by-root-marko.bursic73-gmail.com.patch EDIT: I have found this https://forum.radxa.com/t/how-to-control-the-gpio/148/32 So my assumption is to control GPIO4_D5 it should be dc-gpios = <&gpio4 29 1 0xae>; Since D=3, then 3*8+5=29. Still don't know what 1 and 0xae means, but obviously is wrong. The dmesg reveals invalid GPIO . Call trace: [ 81.742210] gpio_to_desc+0xa8/0xf0 [ 81.742222] write_vmem+0x38/0x190 [ 81.742232] fbtft_update_display+0xd0/0x218 [ 81.742241] fbtft_deferred_io+0xc0/0xd8 [ 81.742250] fb_deferred_io_work+0xdc/0x158 [ 81.742261] process_one_work+0x1e0/0x338 [ 81.742270] worker_thread+0x40/0x440 [ 81.742282] kthread+0x120/0x128 [ 81.742294] ret_from_fork+0x10/0x18 [ 81.742301] ---[ end trace 8a7abacfafe1f15a ]--- [ 81.945879] ------------[ cut here ]------------ [ 81.945890] invalid GPIO -257459296 [ 81.945950] WARNING: CPU: 4 PID: 507 at drivers/gpio/gpiolib.c:126 gpio_to_desc+0xa8/0xf0
  5. I did a new overlay nano /boot/dtb-5.4.33-rockchip64/rockchip/overlay/ds1307.dts /dts-v1/; /plugin/; / { compatible = "rockchip,rk3399"; fragment@0 { target = <&i2c7>; __overlay__ { #address-cells = <1>; #size-cells = <0>; ds1307@68 { compatible = "dallas,ds1307"; reg = <0x68>; status = "okay"; }; }; }; }; Compile the overlay: dtc -O dtb -I dts -o rockchip-ds1307.dtbo ds1307.dts edit the armbianEnv.txt: nano /boot/armbianEnv.txt Add the overlay, store and exit: overlays=i2c7 ds1307 Result: dmesg | grep rtc [ 54.358163] rtc-ds1307 7-0068: registered as rtc0 [ 55.518913] rtc-ds1307 7-0068: setting system clock to 2020-04-20T12:58:31 UTC (1587387511) [ 55.759178] rk808-rtc rk808-rtc: registered as rtc1 [ 57.790975] [drm] Cannot find any crtc or sizes [ 58.822993] [drm] Cannot find any crtc or sizes
  6. Well, tried as you said, but unfortunately it doesn't work. root@rockpi-4b:~# dmesg | grep rtc [ 55.118141] hctosys: unable to open rtc device (rtc0) [ 55.345382] rk808-rtc rk808-rtc: registered as rtc0 [ 56.365297] [drm] Cannot find any crtc or sizes [ 57.377581] [drm] Cannot find any crtc or sizes You can see that rk808-rtc is still registered as rtc0 and ds1307 isn't registered at all. 1st - how to tell the compiler that my DS-1307 has an address of 68 and it is connected to I2c-7 ? 2nd - how to enable I2C-7 in compiler without device tree overlay? 3rd - how to tell the compiler that DS-1307 is the rtc0?
  7. I have compiled Armbian buster with Linux 5.4.32-rockchip64 with additional option in RTC clock and enabled DS1307. Everything is fine, the board can communicate with DS1307, but I am unable to use this /dev/rtc1 as the main hwclock instead on /dev/rtc (it points at /dev/rtc0 which is built in RTC). I have read many forums on Raspberry, this forum but it doesn work. I did: https://forum.armbian.com/topic/5346-rtc-ds1307-i2c-for-tinkerboard/ 1) Add "echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-7/new_device" to /etc/rc.local, above the "exit 0" line at the bottom 2) In /lib/udev/hwclock-set comment out the lines below if [ -e /run/systemd/system ]; then exit 0 fi if [ -e /run/udev/hwclock-set ]; then exit 0 fi then change the HCTOSYS_DEVICE=rtc0 line to be HCTOSYS_DEVICE=rtc1 3) In /lib/udev/rules.d/50-udev-default.rules change the SUBSYSTEM=="rtc" line to: SUBSYSTEM=="rtc", KERNEL=="rtc1", SYMLINK+="rtc", OPTIONS+="link_priority=-100" 4) In your hwclock udev rule make sure you have (/lib/udev/rules.d/85-hwclock.rules): KERNEL=="rtc1", RUN+="/lib/udev/hwclock-set $root/$name" When the board starts the system time is taken from rtc0 (default value year 2013,...) then loads drivers for DS1307 and links it to rtc1. Is there any clean tutroial for Linux, Debian,...Armbian on how to make this simple feature to work correctly. It has to: -at startup: read from rtc1 (battery backed) and sync to system -if at any time the clock is set by means of ntp it has to adjust the rtc1 I think that this is all it has to do, but it does all others than that.
  8. Unfortunately I already deployed my RockPi 4B v1.3 in a project. Maybe I will get a new one (currently still thinking which one would better suit NanoPi M4V2 or RockPi 4), but I would like to advise something: The RockPi 4 has a flash on SPI1 and not on SPI0. The flash wasn't soldered on my board. I enabled the SPI1 with overlays=spi-spidev param_spidev_spi_bus=1 GPIO1_B0 = SPI1 TXD GPIO1_A7 = SPI1 RXD GPIO1_B1 = SPI1 CLK GPIO1_B2 = SPI1 CS0 And it was working OK. IMO, the good candidate for CS1 is GPIO4_D5 to get SPI1.1 device. So please, don't mess things that are already working properly. I don't understand why user @p-i-u.de messed up with renumbering the SPI channels and it gets /dev/spidev0.0 , SPI0 is already shared with ETH-PHY on RockPi 4.
  9. When building a kernel the device driver configuration asks which rtc should a system use for NTP and startup synchronisation . By default this is rtc0. The question is: In case there are more hardware RTCs in one embedded system ( in my case onboard RK808 and Dallas DS1307 over I2C), which one would be numbered as rtc0? Threre are several RTC device drivers available and checked by default, some marked as M and other as '*' , supposing 'module' or 'driver' respectively. Now if I have two hardware RTCs, I presume they should load as rtc0 and rtc1, but which part does numbering? I can't know this 'a priori' , I would like to use DS1307 for synchronisation.
  10. I don't really know if this is related to Armbian, but I have a USB disk that is not recognised when plugged into USB 3 (blue port) but it works in USB2.0 port. I have also tried SanDisk Ultra USB3.0 and it works. Shouldn't the USB3.1 also support USB3.0 if it supports USB2.0 ?
  11. I ran out of disk error. I did the "vagrant plugin install vagrant-disksize", as mentione in the tutotial, but nowhere is mentioned that you also have to edit file Vargantfile and add: config.disksize.size = '25GB' I put 25GB as minimal requirement from tutorial, we'll see, it seems consuming lots of CPU and memory to build this OS.
  12. Yes, it works now. I had to "apt-get update" before doing "apt-get install dialog". Perhaps I am going to make it, we'll see. Thank you for your help, I don't know how would I find this missing step by myself, really helpful.
  13. I had tried, but it doesn't show the interactive window when executing ./compile.sh . The main.sh runs without getting directives, so it quits with error. I think it has to do with interactive shell, somehow it's blocked. https://github.com/armbian/build/issues/1658
  14. grep DS13 /boot/config* CONFIG_RTC_DRV_DS1307=y # CONFIG_RTC_DRV_DS1374 is not set # CONFIG_RTC_DRV_DS1302 is not set # CONFIG_RTC_DRV_DS1305 is not set # CONFIG_RTC_DRV_DS1343 is not set # CONFIG_RTC_DRV_DS1347 is not set # CONFIG_RTC_DRV_DS1390 is not set Sorry, I didn't see the star, this is the result after I have changed the conifg_xxxx file. You mean I have to build a kernel on my own?
  15. "grep DS13 /boot/config" as well "grep DS1307 /boot/config" as well "grep ds1307 /boot/config" gives "No such file or directory". Also there is no config file in the directory /boot, rather /boot/config-5.3.11-rockchip64. # I2C RTC drivers # # CONFIG_RTC_DRV_ABB5ZES3 is not set # CONFIG_RTC_DRV_ABEOZ9 is not set # CONFIG_RTC_DRV_ABX80X is not set # CONFIG_RTC_DRV_DS1307 is not set # CONFIG_RTC_DRV_DS1374 is not set # CONFIG_RTC_DRV_DS1672 is not set # CONFIG_RTC_DRV_HYM8563 is not set # CONFIG_RTC_DRV_MAX6900 is not set CONFIG_RTC_DRV_MAX77686=y CONFIG_RTC_DRV_RK808=y # CONFIG_RTC_DRV_RS5C372 is not set # CONFIG_RTC_DRV_ISL1208 is not set # CONFIG_RTC_DRV_ISL12022 is not set CONFIG_RTC_DRV_ISL12026=m # CONFIG_RTC_DRV_X1205 is not set # CONFIG_RTC_DRV_PCF8523 is not set # CONFIG_RTC_DRV_PCF85063 is not set # CONFIG_RTC_DRV_PCF85363 is not set # CONFIG_RTC_DRV_PCF8563 is not set # CONFIG_RTC_DRV_PCF8583 is not set # CONFIG_RTC_DRV_M41T80 is not set # CONFIG_RTC_DRV_BD70528 is not set # CONFIG_RTC_DRV_BQ32K is not set # CONFIG_RTC_DRV_S35390A is not set # CONFIG_RTC_DRV_FM3130 is not set # CONFIG_RTC_DRV_RX8010 is not set # CONFIG_RTC_DRV_RX8581 is not set # CONFIG_RTC_DRV_RX8025 is not set # CONFIG_RTC_DRV_EM3027 is not set CONFIG_RTC_DRV_RV3028=m # CONFIG_RTC_DRV_RV8803 is not set CONFIG_RTC_DRV_S5M=y CONFIG_RTC_DRV_SD3078=m changed to # I2C RTC drivers # # CONFIG_RTC_DRV_ABB5ZES3 is not set # CONFIG_RTC_DRV_ABEOZ9 is not set # CONFIG_RTC_DRV_ABX80X is not set CONFIG_RTC_DRV_DS1307=y # CONFIG_RTC_DRV_DS1374 is not set # CONFIG_RTC_DRV_DS1672 is not set # CONFIG_RTC_DRV_HYM8563 is not set # CONFIG_RTC_DRV_MAX6900 is not set # CONFIG_RTC_DRV_MAX77686=y CONFIG_RTC_DRV_RK808=y # CONFIG_RTC_DRV_RS5C372 is not set # CONFIG_RTC_DRV_ISL1208 is not set # CONFIG_RTC_DRV_ISL12022 is not set CONFIG_RTC_DRV_ISL12026=m # CONFIG_RTC_DRV_X1205 is not set # CONFIG_RTC_DRV_PCF8523 is not set # CONFIG_RTC_DRV_PCF85063 is not set # CONFIG_RTC_DRV_PCF85363 is not set # CONFIG_RTC_DRV_PCF8563 is not set # CONFIG_RTC_DRV_PCF8583 is not set # CONFIG_RTC_DRV_M41T80 is not set # CONFIG_RTC_DRV_BD70528 is not set # CONFIG_RTC_DRV_BQ32K is not set # CONFIG_RTC_DRV_S35390A is not set # CONFIG_RTC_DRV_FM3130 is not set # CONFIG_RTC_DRV_RX8010 is not set # CONFIG_RTC_DRV_RX8581 is not set # CONFIG_RTC_DRV_RX8025 is not set # CONFIG_RTC_DRV_EM3027 is not set CONFIG_RTC_DRV_RV3028=m # CONFIG_RTC_DRV_RV8803 is not set CONFIG_RTC_DRV_S5M=y CONFIG_RTC_DRV_SD3078=m but no change.
  16. I am struggling to make an external RTC work. "i2cdetect -y 7" reports that RTC at address 68 is alive. I have added in the following lines: echo ds1307 0x68 > /sys/class/i2c-adapter/i2c-7/new_device hwclock -f /dev/rtc -s Could be a possible reason that hwclock is already linked with internal RTC? Is it possible that DS1307 is not recognised? If I do "modprobe ds-1307" I got the answer: "modprobe: FATAL: Module rtc-ds1307 not found in directory /lib/modules/5.3.11-rockchip64" Could this be the reason? The driver for ds-1307 doesn't exist? How can I get it? P.S. : The OS is Armbian Buster with Linux 5.3.11-rockchip64 Before getting the /dev/i2c-7 I had to modify /boot/armbianEnv.txt and add: overlays=spi-spidev i2c7 param_spidev_spi_bus=1 I had tested both I2C7 and SPI1.0 works as expected.
  17. I use the u-boot that comes on image file. How to install "this" tpl/spl u-boot?
  18. It switches sometimes also with correct view: I don't know how it looks in your GNOME, but if it's a bug it is a welcome bug.
  19. I have a RockPi 4, installed Armbian Buster Server 5.3.11. same problem, more than 30s to unpack, while on 4.4 kernel I haven't noticed so long times at boot up.
  20. Thank you @martinayotte very much. Although your procedure doesn't work for me, because the downloaded file I got was a html doc file. But I have found this link: https://github.com/rm-hull/spidev-test It is described in step by step. I did patch the code with /dev/spi1.0 , compiled and run the test with jumper wires. This is the result, The loopback works great. root@rockpi:/spidev-test# ./spidev_test -v spi mode: 0x0 bits per word: 8 max speed: 500000 Hz (500 KHz) TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....▒..................▒. RX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....▒..................▒.
  21. Sorry my ignorance, I am noob in building the code. Can you please give me an advice how should I proceed?
  22. Thank you. At this time I don't have SPI flash and the CE0 is free, that's why I was asking in case I would need cs-gpio for CE1.
  23. OK. Have tried: verbosity=1 overlay_prefix=rockchip rootdev=UUID=a6a7d2a3-adf5-4eeb-8d46-077de81311c5 rootfstype=ext4 overlays=spi-spidev i2c7 param_spidev_spi_bus=1 usbstoragequirks=0x2537:0x1066:u,0x2537:0x1068:u the usbstoragequirks was added automatically. I got /dev/SPI1.0 and /dev/i2c-7 The I2C works, as I can detect the RTC connected, don't know if SPI is working, but at least now is added as device.
  24. Can you give an advice how to properly configure armbianEnv.txt? From this post: You have written: OK, so if I want i2c7 and spi1, this have to be: overlays=spi-spidev i2c7 param spidev spi bus=1 Is this correct? However I don't understand if for example the board could have more spi enbled at the same time, what would the configuration look like?
  25. OK. I have downloaded Armbian buster server 5.3.11. It has overlays scripts for this, but I don't know hot to use them. Is there any example if I want to enable SPI1 and have two CS : predifined one for channel 0 and channel 1 aka cs-gpios?
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines