Mar 10 2014

list installed packages with theier size

dpkg-query -Wf '${Installed-Size}\t${Package}\n' | sort -n


Mar 9 2014

forkbomb – if you want to test watchdog or so

make sure, you do not have any important stuff running. The following lines will produce endless load to test watchdog etc…
: (){ :|:& };:


Mar 5 2014

resize an raspi sd card image

losetup -f –show my.img
-> we have now mounted image as loop0

partprobe /dev/loop0
-> we have now the partitions which is required for gparted

gparted /dev/loop0
-> resize as usual now and apply

losetup -d /dev/loop0
-> loop not needed anymore

fdisk -l my.img
->
Platte my.img: 8068 MByte, 8068792320 Byte
255 Köpfe, 63 Sektoren/Spur, 980 Zylinder, zusammen 15759360 Sektoren
Einheiten = Sektoren von 1 × 512 = 512 Bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Festplattenidentifikation: 0x000981cb

Gerät boot. Anfang Ende Blöcke Id System
my.img1 8192 122879 57344 c W95 FAT32 (LBA)
my.img2 122880 15759359 7818240 83 Linux


so, end is at 15759359 (*512 bs)

so:
truncate –size=$[(15759359+1)*512] my.img

this should work now. if not, let me know.

new created SD card can resized then again with gparted.


Feb 20 2014

fritzbox 7390 – module building – MIPS_24K vs MIPS32_R2

just change arch/mips/include/asm/module.h
from
#define MODULE_PROC_FAMILY “MIPS32_R2 ”
to
#define MODULE_PROC_FAMILY “MIPS_24K ”

————

building modules for a different system is not always an easy task.
required information’s and where to get:

1. cat /proc/cpuinfo to find out what kind of cpu (mips,arm,sh4 etc)
2. file busybox – any elf file and find out if LSB or MSB , also CPU type should be there.
3. get crosstool-chain prebuild or build one yourself -> crosstool-ng
4. get the kernel sources -> cat /proc/version / uname -a
5. make mrproper, make menuconfig, make < - after this you should have all required files like Module.symvers and .config 6. go in your module directory and create your makefile: obj-m += hello.o

all:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) modules

clean:
make -C /lib/modules/$(shell uname -r)/build M=$(PWD) clean

type make, close your eyes and press enter…


Feb 19 2014

make(-file) modules

obj-m = ati_remote.o
KVERSION = $(shell uname -r)
all:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) modules
clean:
make -C /lib/modules/$(KVERSION)/build M=$(PWD) clean


Jan 7 2014

oktolight.exe

here is the first version of okotlight.exe Beta v0.1.
feel free to use it in your _not_ commercial products.okto1

okto2

okto3

okto4

Download for Windows: oktolight Beta v0.1
For linux use boblight
For Enigma2 use Boblight-enigma2


Jan 4 2014

valgrind and gprof – performance messure tools

to create a graph of all call from your executable, use valgrind:

valgrind --tool=callgrind --dump-instr=yes --simulate-cache=yes --collect-jumps=yes program arguments

then open in kcachegrind (also available for Windows)

 

gprof: you need to compile with -pg. then a gmon.out file will be created.

open that file with:

gprof program gmon.out > gprof.txt
gprof program gmon.out | less


Dec 27 2013

cross compile – configure script

./configure CC=mipsel-unknown-linux-gnu-gcc CXX=mipsel-unknown-linux-gnu-g++ –host=mipsel-unknown-linux-gnu –prefix=/opt/tools/mipsel-unknown-linux-gnu/mipsel-unknown-linux-gnu/sysroot/usr/ CPPFLAGS=”-mhard-float -march=mips32 -mtune=mips32 -ffast-math -ggdb”

 

download last pack from http://crosstool-ng.org/
[21:24] hg clone http://crosstool-ng.org/hg/crosstool-ng
[21:24]
cd crosstool-ng
[21:24]
./bootstrap
[21:24]
./configure –enable-local
[21:24]
make
[21:24]
./ct-ng help
[21:24]
./ct-ng menuconfig
[21:24]
./ct-ng build

thanks speedy, always looking for it 🙂


Oct 6 2013

Digital portable power supply atmega168

1.25V – 30V 1A CC and CV.

powered by a 9V block battery if you like or up to 30V DC input. short safe due to CC. Limit your mA and it then the max CC.

20131006-012755.jpg

20131006-012819.jpg

20131006-013404.jpg


Oct 6 2013

433MHz USB sender

Usb sender 433MHz incl antenna

20131006-012343.jpg

20131006-012441.jpg