-
Posts
5462 -
Joined
Content Type
Forums
Store
Crowdfunding
Applications
Events
Raffles
Community Map
Posts posted by tkaiser
-
-
In any case, what problems did it give on Jessie in addition to the init script to be ported to systemd?
As far as I understand it's about the order of started services (ramlog has to be the very first and the last daemon started/stopped so that all other daemon's output will be inside the ramdisk). The parallelisms introduced with systemd make this a bit hard to achieve.
Anyway: You can run jessie with SysV init instead of systemd. I tried to summarize the way Bananian does it here: https://olimex.wordpress.com/2015/08/26/devuan-jessie-for-olinuxino-images/#comments
-
My only remaining idea is to use both .dts/.dtsi from the kernel sources as well as the included dtc command: http://elinux.org/Device_Tree#Tools
-
What do the following commands return?
dpkg -s device-tree-compiler | grep Version dtc -v
-
The example above was rather old and I would suspect some stuff has changed in the meantime. I just had a short look into the .dts file from kernel 4.1.x and there sun4i-a10.dtsi is included.
Maybe it helps to add the definition there:
uart2_pins_a: uart2@0 { allwinner,pins = "PC18", "PC19"; allwinner,function = "uart2"; allwinner,drive = <SUN4I_PINCTRL_10_MA>; allwinner,pull = <SUN4I_PINCTRL_NO_PULL>; };
And then reference it from the Lime's .dts as
uart2: { pinctrl-names = "default"; pinctrl-0 = <&uart2_pins_a>; status = "okay"; };
?
-
Running hadoop on hardware lacking ECC RAM is simply insane (applies to every task that needs data integrity): http://web.archive.org/web/20080916092736/http://mail-archives.apache.org/mod_mbox/hadoop-core-dev/200705.mbox/%3C465C3065.9050501@dragonflymc.com%3E
-
i want to know about the additional requirements for cross-compiling armhf software on a X86 machine!
It's already answered. Over and out (since Igor made it so unbelievable easy to 'just do it' that any more words are just a waste of time)
-
The only thing I need to know, what addition packages from UBUNTU are required to compile your nicely prepared images on my on!
It's just git since all the other requirements get installed in the build process. It's that easy, just follow these steps somewhere with 20 GB free -- see https://github.com/igorpecovnik/lib
apt-get -y install git git clone https://github.com/igorpecovnik/lib cp lib/compile.sh . chmod +x compile.sh ./compile.sh
-
Ok, so now I would assume that you neither want bridging nor NAT but simple routing instead. Since the onboard Wi-Fi is crappy I wouldn't use it. Then you end up with something like:
auto lo iface lo inet loopback auto eth0.101 iface eth0.101 inet dhcp pre-up swconfig dev eth0 set reset 1 pre-up swconfig dev eth0 set enable_vlan 1 pre-up swconfig dev eth0 vlan 101 set ports '3 8t' pre-up swconfig dev eth0 set apply 1 auto eth0.102 iface eth0.102 inet manual pre-up swconfig dev eth0 vlan 102 set ports '0 1 2 4 8t' pre-up swconfig dev eth0 set apply 1 address 192.168.2.1 netmask 255.255.255.0 network 192.168.0.0 broadcast 192.168.2.255
You would've to add an IP configuration for the eth0.102 entry (different subnet as in your LAN! If you use there 192.168.1.0/24 for example then use 192.168.2.0/24 as in the example above) and then you install dnsmasq and configure it to be active only on eth0.102. If clients in both nets should be able to talk to each other (routing between WAN and LAN VLANs on the R1) then you do
sysctl net.ipv4.ip_forward=1 echo "net.ipv4.ip_forward=1" >>/etc/sysctl.conf
If the devices on R1's LAN ports should also be able to reach the internet then there's more to do. But I would configure dnsmasq as a simple DNS forwarder and that's it. Mosqitto running on the R1 is able to talk to all connected devices in any case.
-
Sorry, I only mentioned it in the topic title: It is Debian 8 / Jessie ...
Sorry, I've overseen that. If you're using the forking method to start FHEM I would uncomment/adjust $PIDFile in /etc/systemd/system/fhem.service as well set
attr global pidfilename /path/to/fhem.pid
in fhem.cfg. And let that point to a mountpoint not residing on a tmpfs. Or you add a simple
[ -d /var/run/fhem ] || mkdir -p /var/run/fhem
to the startscript or in your case systemd service (I assume you're using systemd and not SysV init -- it seems to be possible to use Jessie with the latter too)
-
A tmpfs is empty after reboot by design. So unless you populate it eg. from /etc/rc.local (which distro do you use? Wheezy, jessie, trusty?) or use daemons like tmpfs-populate another approach would be to let the PID file reside somewhere else (again: without details which distro you're using it's impossible to help).
-
I want to use the Bpi R1 as a DHCP-Server in a separate network bridged to my local network over the BPi's WAN-Port. [...] router setup
You're talking about two different things :-)
Routing is not bridging. In short words: Unless you get a clue what you really want to do you won't succeed.
If you want the R1 to act as a bridge between your LAN and the devices connected to the R1's so called "LAN ports" then all you've to do is to setup one VLAN connecting all 6 ports (SoC and the 5 external ports) and you're done (since then the R1 acts as a switch which is nothing more or less than a multi-port bridge). In this case it's a really bad idea to setup a DHCP server on the R1 unless it has absolutely the same config as the already present DHCP server in your LAN.
Igor ships already such a config, all you've to do is a "ln -sf /etc/network/interfaces.r1switch /etc/network/interfaces && reboot"
I suppose you want a NAT/router setup instead? In this case you use 2 different VLANs, one for the so called 'WAN port' that is connected to your LAN and another one connecting all the other ports together to work in switch mode. Again: Igor ships such a config already: https://github.com/igorpecovnik/lib/blob/next/config/interfaces.r1(should be the default)
And then you set up DHCP (I would prefer dnsmasq for this task) and in case the devices connected to the R1's LAN ports should be able to reach your LAN behind the 'WAN port' you would setup NAT also. If you do a google search for "debian nat dnsmasq" or something like that you get tons of tutorials. All you've take care of is that your external interface is eth0.101 and the 'internal' eth0.102 instead.
And if you don't want to use the R1's Wi-Fi you would've to remove the br0 definition in the interfaces file and adjust settings (static settings for eth0.102 and eth0.101 getting an address via the DHCP server in your real LAN for example)
-
-
It depends on the kernel you use. Igor currently provides both images with 3.4.x (fex/script.bin) and mainline (dts/dtb). Can you provide the ouput of
uname -a dmesg | egrep "serial|uart" sudo cat /proc/tty/driver/serial
-
Small addendum: I just tried this out with an externally connected LED that was defined in script.bin. Works the same way as with the board's internal LEDs so you could use the convenient timer trigger or BananaLEDd to show average load or disk activity also with external LEDs since these populate sysfs when defined in script.bin. I just added a small section to the linux-sunxi wiki: http://linux-sunxi.org/Fex_Guide#external_leds
-
Just a hint. You will need to write a mini application / script / daemon.
Not in any case. You could also do some redirect/filter magic and let the output of a specific command lead to different triggers that modify blink frequency based on load or something like that.
On page 4 of this thread there are many examples using iostat (one line in /etc/rc.local). Also the BananaLEDd project that has been started in the aforementioned thread should be usable starting with v1.2 on Cubietruck using the LED=cubietruck:orange:usr syntax.
A simple daemon approach would be something like this (saved as eg. /usr/local/bin/diskblink.sh and started from within /etc/rc.local):
#!/bin/bash export PATH=/usr/local/bin:/usr/bin:/bin MyLed="/sys/class/leds/green:ph24:led1" PartitionUUID=a7747356-feed-432a-81a3-7caea67c8cb8 PartitionDevice=$(ls -l /dev/disk/by-uuid/${PartitionUUID} | awk -F"/" '{print $7}') echo timer >${MyLed}/trigger while true ; do PartitionUseage=$(df -k | awk -F" " "/\/dev\/${PartitionDevice}/ {print \$5}" | tr -d '%') echo ${PartitionUseage} >${MyLed}/delay_on echo $(( ( 100 - ${PartitionUseage} ) * 100 )) >${MyLed}/delay_off # echo $(( 10000 - ${PartitionUseage} * ${PartitionUseage} )) >${MyLed}/delay_off sleep 10 done
Since LED blinking is rather annoying I would also adjust brightness in the loop by something like this (value is in the range 0-255, with the following formula you get 2 with 10%, 62 with 50%, 202 with 90% and 245 with 99% -- so you will notice the LED only when it gets critical):echo $(( ${PartitionUseage} * ${PartitionUseage} / 40 )) >${MyLed}/brightness
You've to define $MyLed and of course $PartitionUUID (lookup with blkid). The script uses the timer trigger and adjust on/off cycles based on df's percentage output for the partition in question.
@Igor: Request for enhancement: please add BananaLEDd to /usr/local/bin for the A20 boards and ship with a disabled config for all supported boards :-)
-
Here is a thread regarding VoIP clients on Banana Pi and this is the output of "apt-cache show linphone-nogtk" running Armbian Wheezy:
Package: linphone-nogtk Source: linphone Version: 3.5.2-10 Installed-Size: 125 Maintainer: Debian VoIP Team <pkg-voip-maintainers@lists.alioth.debian.org> Architecture: armhf Depends: libc6 (>= 2.13-28), liblinphone4 (>= 3.5.2), libmediastreamer1 (>= 3.5.2), libncurses5 (>= 5.5-5~), libortp8 (>= 3.5.2), libosip2-7, libreadline6 (>= 6.0), libspeex1 (>= 1.2~beta3-1), libtinfo5, libx11-6, linphone-common (= 3.5.2-10), host Description-en: SIP softphone - console-only client Linphone is an audio and video internet phone using the SIP protocol. It has a GTK+ and console interface, includes a large variety of audio and video codecs, and provides IM features. . This package contains the console version of linphone, which saves space as it doesn't link to the gtk libraries. It does however still link to libx11 for video support. . Console Tools: . . linphonec is a command line interface that can use readline on Linux to get completion, history, such as bash. . linphonecsh is another command line tool to remotely control a linphonec daemon. Unlike linphonec, linphonecsh immediately exits once the command is executed. Homepage: http://www.linphone.org/ Description-md5: ea9dc85daac50c5af653e397210d4f6b Tag: uitoolkit::ncurses Section: sound Priority: optional Filename: pool/main/l/linphone/linphone-nogtk_3.5.2-10_armhf.deb Size: 50982 MD5sum: 968a6c149225e059c406aa0dd82f8beb SHA1: 86e3fa464b6e820b877f996789a6e5c755b72d9c SHA256: 44ee11f2fb6a3ced5d8cb103a1da05575e9a1b5228107efc5efbbdb518e4e938
-
can I export gpio pins for general purpose usage...
Since it seems you're using kernel 3.4 this might be a good starting point: http://linux-sunxi.org/GPIO#Accessing_the_GPIO_pins_through_sysfs_on_sunxi-3.4
-
Since you want to use a Banana Pro it should read CONFIG_SPI_SUN7I instead? It's not defined in Igor's config and maybe that's the reason: http://will-tm.com/spi-on-the-cubieboard2/
Regarding mainline kernel, SPI and device tree have a look at http://linux-sunxi.org/SPIdev
-
My usual suspect spi_bcm2708 is not available. I once used it on Banana Pi M2 from other manufacturer (SinoVOIP?) with Raspbian
Very unlikely since the M2 is also not a board using a BroadCom SoC. Have you tried a 'modprobe spidev' already? To check whether kernel support is present I would've a look at the output of
zgrep CONFIG_SPI /proc/config.gz
-
Testing it, looks great, if it could be expanded with more monitoring featires - would be great!
RPi-Monitor can be extended nearly unlimited since version 1.2 or 1.3 regarding custom data sources and various output types and starting with 2.10 also to customize the web pages extensively and include every stuff you like.
The focus of my additions was simply to address the different data sources on sunxi devices regarding thermal things and power consumption (and some sort of a daemon to collect data since in my test setups -- torturing the devices under full load -- RPi-Monitor often failed to collect some stuff due to timeouts: ie querying a disk for its internal temperature under full load --> takes often more than a second to respond and in the meantime RPi-Monitor already gave up).
If you want add the stuff you mentioned you can start directly. Just become familiar with RRD data collection types (GAUGE vs. COUNTER vs. DERIVE and so on) and how you apply regex to filter raw data and you're done. There are plenty of examples available on the web and you get many ideas by reading the full post including comments/links here: http://rpi-experiences.blogspot.fr/2013/06/rpi-monitor-version-20-advance-usage.html
But since it sounds you like to monitor a router I would suggest checking better options first (eg. fully blown monitoring solutions that know alerts and triggers like OpenNMS or OMD -- prebuilt for ARMv7)
-
I believe I don't get your setup. Is there an external DHCP server behind the WAN interface or should the R1 play both NAT router, DHCP server (and of course caching DNS server)?
If it's the latter I would do a web search for "dnsmasq nat howto": basically dnsmasq will serve dhcp/dns purposes and the NAT stuff will be handled by uncommenting 'net.ipv4.ip_forward=1' in /etc/sysctl.conf amd the iptables stuff taken from Tido's manual. But maybe the whole thing is already covered by Tido in his manual...
-
The only OpenWRT image recommended can be found here: http://www.bananapi.com/index.php/forum/general/1157-openwrt-chaos-calmer-3rd-test-version-gigabit-and-temp-sensors-10-08-15?limitstart=0
If you still want to go the Armbian route (recommended if you want to learn to improve your skills) then start with Tido's tutorial.
-
When you divide by 100 do not use "$1/100" but "sprintf("%.1f", $1/100)" instead as regex. As a reference my whole config that deals with A20/AXP209, several sensor sources and now also CPU stats: http://pastebin.com/ARcjtjzL
I do not read out the sensors directly but let my temperature daemon preprocess the raw data (sanitizes numbers if sensors report anomal values as it happens sometimes and does some averaging to get smoother graphs):
For CPU stats I use a function that will be called every 20 seconds and processes the counters present in /proc/stat and writes the 6 values I'm interested in (see last graph above) into /tmp/cpustat from where they were picked up by a RPI-Monitor regex:
ProcessStats() { set $(awk -F" " '/^cpu / {print $2"\t"$3"\t"$4"\t"$5"\t"$6"\t"$7"\t"$8}' </proc/stat) UserStat=$1 NiceStat=$2 SystemStat=$3 IdleStat=$4 IOWaitStat=$5 IrqStat=$6 SoftIrqStat=$7 UserDiff=$(( ${UserStat} - ${LastUserStat} )) NiceDiff=$(( ${NiceStat} - ${LastNiceStat} )) SystemDiff=$(( ${SystemStat} - ${LastSystemStat} )) IdleDiff=$(( ${IdleStat} - ${LastIdleStat} )) IOWaitDiff=$(( ${IOWaitStat} - ${LastIOWaitStat} )) IrqDiff=$(( ${IrqStat} - ${LastIrqStat} )) SoftIrqDiff=$(( ${SoftIrqStat} - ${LastSoftIrqStat} )) Total=$(( ${UserDiff} + ${NiceDiff} + ${SystemDiff} + ${IdleDiff} + ${IOWaitDiff} + ${IrqDiff} + ${SoftIrqDiff} )) CPULoad=$(( ( ${Total} - ${IdleDiff} ) * 100 / ${Total} )) UserLoad=$(( ${UserDiff} *100 / ${Total} )) SystemLoad=$(( ${SystemDiff} *100 / ${Total} )) NiceLoad=$(( ${NiceDiff} *100 / ${Total} )) IOWaitLoad=$(( ${IOWaitDiff} *100 / ${Total} )) IrqCombinedLoad=$(( ( ${IrqDiff} + ${SoftIrqDiff} ) *100 / ${Total} )) echo "${CPULoad} ${SystemLoad} ${UserLoad} ${NiceLoad} ${IOWaitLoad} ${IrqCombinedLoad}" >/tmp/cpustat LastUserStat=${UserStat} LastNiceStat=${NiceStat} LastSystemStat=${SystemStat} LastIdleStat=${IdleStat} LastIOWaitStat=${IOWaitStat} LastIrqStat=${IrqStat} LastSoftIrqStat=${SoftIrqStat} } # ProcessStats
-
Just a small follow-up: To get an idea what's going on inside enclosures I added one DS1820 externally to get ambient temperature and one DHT11 inside the server's enclosure close to the PSU (took me some time to patch the programm to read out the DHT11 without a pull-up resistor and to realize that it's not enough to add w1-gpio and w1_therm to /etc/modules when w1_sunxi is missing to be able to talk to the DS1820).
Since the device is some sort of a surveillance server (feeds 5 RPi B+ with camera module via PoE and both records their video streams and 'transcodes' to be accessible in realtime via VLC) I also added the ability to record the internal temperature of all 5 PiSpy cams:
RPi-Monitor is really great to realize obvious relationships otherwise invisible :-)
Hd-idle for Lamobo-R1
in Allwinner sunxi
Posted
Unfortunately there are a couple of drives that simply ignore "hdparm -B" settings. Then a daemon approach might help: http://pastebin.com/issrNdcP