All posts by Nandan Dubey

About Nandan Dubey

I am from a small village in Bihar. Currently, I am studying in Indian Institute of Technology(Kanpur) with Computer Science as major.

change hostname


/etc/hostname file change:

put whatever name you want


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.




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


mice is also mouse and mouse1 is also mouse


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




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




./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


xrandr –addmode VGA1 1440x900_60.00


xrandr –output VGA1 –mode 1440x900_60.00





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’:

looking at parent device ‘/devices/platform/sunxi_vfe.0’:

looking at parent device ‘/devices/platform’:


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


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
passwd 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


wlan0 not shown


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


no ip

dhclient -v &




dhclient eth0
ifconfig eth0 down
ifconfig eth0 up

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

ip route add default via dev eth0

route -n

gives you routing



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


dhclient eth0

Kernel changes

Now compiled kernel by disabling boot messages
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

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

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

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

copied S01splash
copied splash


dmesg -n 1



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

Android qt

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