-
Posts
11879 -
Joined
-
Last visited
Reputation Activity
-
Igor reacted to Cyryllo in 1wire on Cybieboard2
I use one free gpio in [gpio_para] and now working
THX
-
Igor reacted to luca219 in Cubietruck Battery monitor with nagios
hi all,
if someone need, I adapted for nagios the script to monitor battery cubietruck.
The script is pnp4nagios friendly.
#!/bin/bash ###################################################################################### # # Battery info # /usr/sbin/i2cset -y -f 0 0x34 0x82 0xC3 # read power OPERATING MODE register @01h POWER_OP_MODE=$(/usr/sbin/i2cget -y -f 0 0x34 0x01) BAT_EXIST=$(($(($POWER_OP_MODE&0x20))/32)) # divide by 32 is like shifting rigth 5 times CHARG_IND=$(($(($POWER_OP_MODE&0x40))/64)) # divide by 64 is like shifting rigth 6 times ######################################################################################## #read battery voltage 79h, 78h 0 mV -> 000h, 1.1 mV/bit FFFh -> 4.5045 V BAT_VOLT_LSB=$(/usr/sbin/i2cget -y -f 0 0x34 0x79) BAT_VOLT_MSB=$(/usr/sbin/i2cget -y -f 0 0x34 0x78) BAT_BIN=$(( $(($BAT_VOLT_MSB << 4)) | $(($(($BAT_VOLT_LSB & 0xF0)) >> 4)) )) BAT_VOLT=$(echo "($BAT_BIN*1.1)"|bc) # store maximum battery voltage to compare to if [ -f "/etc/default/battery" ]; then source "/etc/default/battery" else echo "MAX=$BAT_VOLT" > /etc/default/battery echo "MIN=3484" >> /etc/default/battery fi # integer is enough, cut down the decimals MAX=${MAX%.*} BAT_VOLT=${BAT_VOLT%.*} # mainline kernel shows battery existence even if not exists. this is walkaround if [ "$BAT_VOLT" -ge "3200" ]; then # if we have new max value, alter defaults if [ "$BAT_VOLT" -gt "$MAX" ]; then MAX=$BAT_VOLT sed -e 's/MAX=.*/MAX='$BAT_VOLT'/g' -i /etc/default/battery fi # if we have new min value, alter defaults if [ "$BAT_VOLT" -lt "$MIN" ]; then MIN=$BAT_VOLT sed -e 's/MIN=.*/MIN='$BAT_VOLT'/g' -i /etc/default/battery fi # calculate percentage percent=$(echo "($BAT_VOLT-$MIN)*100/($MAX-$MIN)"|bc) fi # define output format output="Load : $percent% | Load_Batt=$percent;80;35;3.4;4.2;" # if load% in range 80-10 ok if [ "$percent" -ge 80 -a "$percent" -le 100 ]; then echo "OK- $output" exit 0 # if load % in range 40-79 warning elif [ "$percent" -ge 40 -a "$percent" -le 79 ]; then echo "WARNING - $output" exit 1 # if load % in range 0-39 critical elif [ "$percent" -ge 0 -a "$percent" -le 39 ]; then echo "CRITICAL - $output" exit 2 # if check non riceve data else echo "UNKNOW" exit 3 fi if run script for non admin user need add permission to /usr/sbin/iscget
ex:
chmod 777 /usr/sbin/iscget and change default permission for /dev/i2c-0
ex:
sudo nano /lib/udev/rules.d/60-i2c-tools.rules KERNEL=="i2c-0" , GROUP="i2c", MODE="0660" to
KERNEL=="i2c-0" , GROUP="i2c", MODE="0666" and reboot
-
Igor got a reaction from cibomato in Problem with new update script
If you still have a running system, than you don't need to use that procedure but directly:
apt-get install linux-image-next-sunxi linux-headers-next-sunxi linux-firmware-image-next-sunxi apt-get install linux-trusty-root-cubietruck apt-get install linux-u-boot-next-cubietruck -
-
Igor reacted to jobenvil in Banana Pi Pro /boot script.bin linked with bananapi and sun7i-a20-bananapro.dtb
I got it, shame on me! thanx, thanx!!
and thanx!
this looks like much better now:
[ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Initializing cgroup subsys cpuset [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Initializing cgroup subsys cpuacct [ 0.000000] Linux version 4.2.3-sunxi (root@production) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4) ) #2 SMP S un Oct 11 14:12:18 CEST 2015 [ 0.000000] CPU: ARMv7 Processor [410fc074] revision 4 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine model: LeMaker Banana Pro <=======================THANKS!!=================================== [ 0.000000] Memory policy: Data cache writealloc [ 0.000000] On node 0 totalpages: 262144 [ 0.000000] free_area_init_node: node 0, pgdat c0a2c800, node_mem_map eeef8000 -
Igor got a reaction from jobenvil in Banana Pi Pro /boot script.bin linked with bananapi and sun7i-a20-bananapro.dtb
There is one image for all bananas and DTB file is encoded into u-boot.
For bananapro you only need to change:
ext4load mmc 0 0x49000000 /boot/dtb/${fdtfile} || fatload mmc 0 0x49000000 /dtb/${fdtfile} to
ext4load mmc 0 0x49000000 /boot/dtb/sun7i-a20-bananapro.dtb || fatload mmc 0 0x49000000 /dtb/sun7i-a20-bananapro.dtb and recompile the boot.cmd to boot.scr as stated in file. reboot and you are done.
-
Igor got a reaction from cibomato in new? boot problem
http://apt.armbian.com/pool/main/l/
Get the one for your board.
NEXT in name is for mainline kernel 4.x.
-
Igor got a reaction from falcon03 in Debian Jessie on Bananapi, logging performance
Good! The concept is simple, yes ... just persistence is the key to get it working under all conditions
Just keep it going.
I buy a beer when done
-
Igor reacted to ytn in CRC failed error extracting Jessie zip
I cleaned all my folders, synched libs to the latest and kicked off a new build and it seems to be fine now. Not sure what was causing the hiccup before, but all is good now.
-
Igor got a reaction from petrmaje in GMAC TX status: VLAN frame
apt-get update & upgrade will solve everything.
It takes some time that all servers are populated so files might not yet be available in next minutes
-
Igor reacted to luca219 in CPU core is only recognized one
sorry Igor, I do not want to waste your time.
i have add repo
echo "deb http://apt.armbian.com $(lsb_release -cs) main" > /etc/apt/sources.list.d/armbian.list apt-key adv --keyserver keys.gnupg.net --recv-keys 0x93D6889F9F0E78D5 apt-get update and install
apt-get install linux-u-boot-cubietruck after reboot I do not understand what happened
any suggestion?
solved sorry
-
Igor got a reaction from wildcat_paris in GMAC TX status: VLAN frame
https://github.com/igorpecovnik/lib/commit/0b4f6424b60b00cf088810e7f8387552ad9ae61d
Sources are fixed, kernel recompilation and repository update will follow asap.
-
Igor got a reaction from wildcat_paris in GMAC TX status: VLAN frame
Yes, it's a bug ... I'll fix it asap.
-
Igor got a reaction from Narkozzz in Revert from SATA to SD on R1
No, there is no script for that ... if you already set the system than do a rysnc copy from current root which is on /dev/sda1 to /dev/mmcblk01 ... this will take some time.
Than edit boot scripts /boot/boot.cmd and change root to /dev/mmcblk0p1
And do a backup of your data before starting this.
If your modifications are minor, rather start over.
-
Igor got a reaction from petrmaje in GMAC TX status: VLAN frame
https://github.com/igorpecovnik/lib/commit/0b4f6424b60b00cf088810e7f8387552ad9ae61d
Sources are fixed, kernel recompilation and repository update will follow asap.
-
Igor got a reaction from petrmaje in GMAC TX status: VLAN frame
Yes, it's a bug ... I'll fix it asap.
-
Igor reacted to t3l3m4k0 in no mouse pointer ubuntu trusty
Solved, Bunyu at Orangepi forums sayed:
"I have time to play some with my pi last week. You have to switch off the HWMouse and render it via software.
Modify your xorg configration
In the device section write:
Option "HWCursor" "false" Copy the Code
Regards,
Bunyu
"
-
Igor reacted to bombobrudi in Network not coming up
Many thanks to you Igor. I had the same problem, but now with version 4.5 with kernel 4.2.3 the problem is gone.
Nice work!
-
Igor reacted to ytn in Getting stuck generating image
I think I got to the bottom of the problem.... I don't believe it is related to Armbian at all or the httpredir URL.
I think the problem is related to my upgrading pfsense to the latest 2.3 Alpha and one of the firewall rules for DNS starting behaving strangely. I have removed the rule and the problems seemed to have gone away.
Just in case anyone else is running pfsense and running into similar issues....
-
Igor reacted to wildcat_paris in [request] zram kernel module available ?
Igor,
Thanks it is fine with http://mirror.igorpecovnik.com/test/linux-image-next-sunxi_4.5_armhf.deb
gr@bpi:~$ cat /proc/version Linux version 4.2.3-sunxi (root@kitchen) (gcc version 4.8.2 (Ubuntu/Linaro 4.8.2-16ubuntu4) ) #16 SMP Fri Oct 9 23:08:18 CEST 2015 gr@bpi:~$ lsmod [...] zram 17790 2 lz4_compress 3201 1 zram gr@bpi:~$ swapon -s Filename Type Size Used Priority /home2/swap file 4999996 0 -1 /dev/zram0 partition 256980 0 5 /dev/zram1 partition 256980 0 5 ok, now testing... compiling thunderbird 42b1 on my "labomo-r1" FTTH home router
Edit : Igor, this is an awesome piece of work! :-)
Edit 2 : I am not sure if it is really useful here
CONFIG_CLEANCACHE=y CONFIG_FRONTSWAP=y Edit 3 :
compared to :
- (arm) Raspbian : zsmalloc seems to be missing
- (x86-amd64) Ubuntu 14.04 : the same as armbian : modules zram + lz4_compress
pi@pi ~ $ lsmod Module Size Used by zram 20112 0 lz4_compress 3100 1 zram zsmalloc 10430 1 zram pi@pi ~ $ cat /proc/version Linux version 4.1.10-v7+ (dc4@dc4-XPS13-9333) (gcc version 4.8.3 20140303 (prerelease) (crosstool-NG linaro-1.13.1+bzr2650 - Linaro GCC 2014.03) ) #820 SMP PREEMPT Sun Oct 4 16:26:51 BST 2015 Edit 4:
zsmalloc is probably useful : allocate small object to reduce memory fragmentation
http://lwn.net/Articles/477067/
zsmalloc is builtin, so ok
gr@bpi:~$ sudo modprobe --show-depends zram insmod /lib/modules/4.2.3-sunxi/kernel/lib/lz4/lz4_compress.ko insmod /lib/modules/4.2.3-sunxi/kernel/drivers/block/zram/zram.ko gr@bpi:~$ sudo modprobe --show-depends -v zsmalloc builtin zsmalloc -
Igor got a reaction from wildcat_paris in [request] zram kernel module available ?
I already found and build a kernel ... Will be inside next build. Over and out
Thanks!
-
Igor reacted to PaceyIV in Freezing problem with Olimex A20 Lime 2
There is nothing powered near the board.
The board is new, it has about 1 month.
Maybe the easier thing is just try the olimex image, copy the kernel firmware from the microsd to the rootfs on the sata, an try a couple of week this settings. So I can use the olimex kernel and uboot, but my actually rootfs.
In the weekend I will try.
-
Igor reacted to apollon77 in 3.4.109 Kernel upgrade (cubietruck) from 3.4.108 not available through ap-get upgrade?!
Great, worked :-)
-
Igor reacted to pschasch in build image : R1-> Jessy-> with_XFCE-> kernel_3.4.x fails on ubuntu 14.04
good morning,
just for info.
Today i was able to compile r1.jesse,with xfce,3.4 on the 14.04.
Maybe network problems in the past.
Thanks!
-
Igor reacted to Decker in Latest image (kernel?) for Bananapi does not boot
Yes, I see now. Sorry for posting this, I have downloaded zip from http://www.armbian.com/banana-pi/so I have could not see the warning on www.armbian.com
Thank you for the answer. (And lot of new work, one can see it everywhere! )
