Category Archives: Uncategorized

change hostname

 

/etc/hostname file change:

put whatever name you want

Advertisements

Running qt app with fbv or egl

 

root@myDesk:/usr/local/bin# ./application -platform egl

Available platform plugins are: eglfs, kms, linuxfb, minimal, minimalegl, offscreen, xcb.

 

QT_QPA_GENERIC_PLUGINS=evdevmouse
QT_QPA_EVDEV_MOUSE_PARAMETERS=/dev/input/mouse1
QT_QPA_FB_HIDECURSOR=0

 

/dev/input/
event3 is mouse
event4 is kbd or read via by-id/usb

 

mice is also mouse and mouse1 is also mouse

/dev/input/mice

check where the mouse is

 

keyboard is working as expected no mouse though

 

./application -platform linuxfb:fb=/dev/fb0 -plugin evdevkeyboard:/dev/input/event4 -plugin evdevmouse:/dev/input/event3@

 

./application -platform linuxfb -plugin EvdevMouse -plugin EvdevKeyboard > ~/application.txt

./application -platform linuxfb -plugin EvdevMouse -plugin EvdevKeyboard > ~/application.txt

fb=/dev/fb0

 

 

drawing is very slow on /dev/fb0
each time a new frame is drawn We can see from top to bottom it is being drawn

 

Qt for embedded linux

http://www.360doc.com/content/14/1215/10/18578054_433033534.shtml

 

 

 

./configure -v -debug -opensource -confirm-license -no-use-gold-linker -nomake examples -nomake tests -nomake tools -no-cups -no-pch -no-linuxfb -skip qtquick1 -skip declarative -skip multimedia -opengl es2 -no-eglfs -system-xcb -sysroot $SUNXI_SYSROOT -device linux-sunxi-g++ -device-option CROSS_COMPILE=/home/name/gcc-linaro-arm-linux-gnueabihf-4.8-2014.04_linux/bin/arm-linux-gnueabihf- -prefix /opt/qt/sunxi

 

 

Ubuntu resolution change

ubuntu no resolution list higher than 1024p

xrandr -q

VGA1 connected 1024×768+0+0 (normal left inverted right x axis y axis) 0mm x 0mm
1024×768 60.0*
800×600 60.3 56.2
848×480 60.0
640×480 59.9

 

xrandr –newmode “1440x900_60.00” 106.50 1440 1528 1672 1904 900 903 909 934 -hsync +vsync

Code:

xrandr –addmode VGA1 1440x900_60.00

Code:

xrandr –output VGA1 –mode 1440x900_60.00

 

 

udev

 

First check the device info for udev rules
udevadm info -a -p $(udevadm info -q path -n /dev/video0)

root@Mysystem:/etc/udev/rules.d# udevadm info -a -p $(udevadm info -q path -n /dev/video0)

Udevadm info starts with the device specified by the devpath and then
walks up the chain of parent devices. It prints for every device
found, all possible attributes in the udev rules key format.
A rule to match, can be composed by the attributes of the device
and the attributes from one single parent device.

looking at device ‘/devices/platform/sunxi_vfe.0/video4linux/video0’:
KERNEL==”video0″
SUBSYSTEM==”video4linux”
DRIVER==””
ATTR{index}==”0″
ATTR{name}==”vfe_0″

looking at parent device ‘/devices/platform/sunxi_vfe.0’:
KERNELS==”sunxi_vfe.0″
SUBSYSTEMS==”platform”
DRIVERS==”sunxi_vfe”

looking at parent device ‘/devices/platform’:
KERNELS==”platform”
SUBSYSTEMS==””
DRIVERS==””

 

KERNEL==”video[0-9]*”, NAME=”v4l/video%n”, SYMLINK+=”video%n”, GROUP=”video”

/etc/udev/rules.d/83-webcam.rules

KERNEL==”video[0-9]*”, SUBSYSTEM==”video4linux”, SUBSYSTEMS==”usb”, ATTRS{idVendor}==”05a9″, ATTRS{idProduct}==”4519″, SYMLINK+=”video-cam1″

 

Procedure to rename or change username in Ubuntu

killall -u <current_username>
id <current_username>
usermod -l <new_username> <current_username>
groupmod -n <new_username> <current_username>
usermod -d /home/<current_username> -m <current_username>
usermod -c “<current_username>” <current_username>
id <current_username>

 

changing password (small password)

passwd root
cnx
passwd cnx
cnx

if it is not allowing to choose small password use sudo

 

Ethernet/WiFi not working

What worked
ifconfig wlan0 down

wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf

hangs: ctrl +c

ifconfig

wlan0 not shown

 

wpa_supplicant -i wlan0 -c /etc/wpa_supplicant/wpa_supplicant.conf &

ifconfig

no ip

dhclient -v &

done

ifconfig

 

dhclient eth0
ifconfig eth0 down
ifconfig eth0 up

network unreachable and
ip route show
gives you:
192.168.100.0/24 dev eth0 proto kernel scope link

ip route add default via 192.168.0.1 dev eth0

route -n

gives you routing

 

 

error:
dhclient -v wlan0
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/wlan0/00:0f:more numbers
Sending on LPF/wlan0/00:0f:more numbers
Sending on Socket/fallback
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 5
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 14
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 18
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 11
DHCPDISCOVER on wlan0 to 255.255.255.255 port 67 interval 13

 

dhclient eth0

Kernel changes

Now compiled kernel by disabling boot messages
like
Kernel hacking —>
1. Early printk => No visible benefit
2. message level from 7 to 1 => didn’t helped
3. Compile kernel with debug info
4. Tracers
5. debug memory initialization
6. Doesn’t boot if kernel low level debuggging message is diabled

 

make menuconfig

compile kernel with debug info

kernel low level debugging via functions
tracer

stacktrace
debug memory initialization

enable stack unwinding support
I suggest you alter your /etc/sysctl.conf. Specifcally, you want to tweak the kernel.printk line.
# Uncomment the following to stop low-level messages on consolekernel.printk = 3 4 1 3

 

The framebuffer console can be enabled by using your favorite kernel configuration tool. It is under Device Drivers→Graphics Support→Support for framebuffer devices→Framebuffer Console Support. Select ‘y’ to compile support statically, or ‘m’ for module support. The module will be fbcon.

 

All of console buffer support there are two suboption uncheck all and uncheck parent to make it work

All this is not disabling kernel logs.

 

Reset everything then just disabled two option/parent for console buffer support and also enabled camera.

 

Now disabling many things:
General setup–>
Prompt for development and/or incomplete code/drivers
Control Group support
Freezer cgroup subsystem
Enable perf_event per-cpu per-container group (cgroup) monitoring
Cpuset support
OProfile system profiling

tracers
early printk
Verbose BUG() reporting (adds 70K)
Compile the kernel with debug info

Stacktrace
Collect kernel timers statistics

Collect scheduler statistics
Debug Filesystem
Magic SysRq key

 

shutup kernel => console framebuffer

 

Changing splash image

splash specific changes in /opt/bootsplash /etc/init.d/ and /etc/rcS.d

 

ln -s ../init.d/splash S01splash

 

##Change splash

change splash
writing on /dev/fb0
cat file when something is diplsyed then write same file to fb0
X11 will also go to fb0 but this accelarated

splash specific changes in opt/bootsplash /etc/init.d/ and /etc/rcS.d

 

ln -s ../init.d/splash S01splash

 

 

/etc/rcS.d folder you can create a script which runs in order this script will write file

 

fbv copied

/etc/rcS.d
copied S01splash
/etc/init.d
copied splash

 

dmesg -n 1
inside
/etc/init.d/splash

 

 

try moving the fb splash script even before rcS.d
may be try at each run level ?

Android qt

https://github.com/think-free/QtAndroidHelper

https://github.com/bbernhard/qtandroidservices_example

Android with qt eyeris compilation

in tools options set the ndk sdk and java jvm

sometime because of version of java ndk and sdk error will happen

external libraries packing opencv dependencies

In build setting select the
Build android apk android build sdk version to 19

 

 

 

 

opdk – 8 on ubuntu 14.04

OpenJDK 8 was released in March 2014. It’s available in Ubuntu Software Center for Ubuntu 14.10 and Ubuntu 15.04. Someone has reported in launchpad asking for packaging openjdk-8 in Ubuntu 14.04, but no luck so far.

As a workaround, you can install OpenJDK 8 from a PPA repository:

1. Open terminal from the Dash or by pressing Ctrl+Alt+T. When it opens, run the command below to add PPA:

sudo add-apt-repository ppa:openjdk-r/ppa

 

2. After that, update system package cache and install OpenJDK 8:

sudo apt-get update

sudo apt-get install openjdk-8-jdk

3. If you have more than one Java versions installed on your system. Run below command set the default Java:

sudo update-alternatives –config java

 

 

https://accounts.google.com/ServiceLogin?service=androiddeveloper&passive=1209600&continue=https://play.google.com/apps/publish%23&followup=https://play.google.com/apps/publish#identifier

http://doc.qt.io/qt-5/publishtogoogleplay.html