Monday, 20 March 2017

Raspberry Pi DBus

http://dev.iachieved.it/iachievedit/exploring-networkmanager-d-bus-systemd-and-raspberry-pi/

Tuesday, 21 February 2017

Small Linux Distros

http://arm.slitaz.org/rpi/

https://agentoss.wordpress.com/2011/02/27/how-to-create-a-very-small-linux-system-using-buildroot/

http://www.ibm.com/developerworks/linux/tutorials/l-embedded-distro/

Sunday, 19 February 2017

20 Linux commands to manage your raspberry pi

20 Linux commands to manage your raspberry pi

1. Configuration settings
raspi-config

2. Staring UI/X11
startx

3. Know your CPU
cat /proc/cpuinfo

4. Show Memory Details
cat /proc/meminfo

5. Show Partitions
cat /proc/partitions

6. Check Pi Version
cat /proc/version

7. Show USB devices info:
lsusb

8. Shutdown device immediately:
sudo shutdown -r now

(you can also issue this command from ssh)

9. Search text in files
grep

10. Search files
find

11. Check system logs
dmesg

12. Check process, cpu usage etc.
top, ps

13. Check disks, usages etc.
df -h

14. Text editor for geeks
vi, nano

15. How long has the system has been running/up ?
uptime

16. History of user login success
last

17. Kill/stop a process
kill <process-id>

18. Memory stats
free -m

19. Show current date/time
date

20. Check network connection, IP address etc.
ifconfig

Enable audio jack/headhone on raspberry pi

Go to raspberry pi configuration settings by running following command:-

sudo raspi-config

And follow these screenshots




Build Linux For Raspberry Pi 2/3

Building Linux Kernel


Checkout cross compiler toolchain:-
git clone https://github.com/raspberrypi/tools

and export path for tools/arm-bcm2708/gcc-linaro-arm-linux-gnueabihf-raspbian/bin/

better put it in your .bashrc

You can also build 64 bit, however, at the moment, default/recommended is 32 bit.


Check out the latest source of kernel from:-
git clone --depth=1 https://github.com/raspberrypi/linux


Configure for Rapsberry Pi 2/3 boards:-
cd linux
KERNEL=kernel7
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- bcm2709_defconfig


Build the kernel source:-
make ARCH=arm CROSS_COMPILE=arm-linux-gnueabihf- zImage modules dtbs


References:-
https://www.raspberrypi.org/documentation/linux/kernel/building.md

Saturday, 18 February 2017

Change keyboard layout of raspberry pi

Go to raspberry pi configuration settings with following command:-

sudo raspi-config

Go to "Internationalisation Option" -> "Change Keyboard Layout"

And then select your desired layout.

Following are some  screenshots for reference.






Adding script to raspberry pi boot, startup, or initialization

At command to run your script at the end of /etc/rc.local.

Don't forget to return it with exit 0 at the end of script.

Blocking/long time taking scripts should be forked (with &)

python <absolute-path-to-my-script> &

The script /etc/rc.local is executed after all the normal system services are started or when all boot scripts have been executed.

rc means "run-control"

local is for all the local services/scripts you want to start.