Author Archives: dllg

ssh proxy

A cool feature of ssh config is to use a proxy to ssh to another host. In this example I have connected a pi to a another pi:   .ssh/config Host proxypi 192.168.1.1 HostName 192.168.1.1 User pi UserKnownHostsFile /dev/null StrictHostKeyChecking … Continue reading

Posted in ssh | Tagged | Comments Off on ssh proxy

Generate a ext4 filesystem image in Yocto

An easy way to generate a ext4 filesystem image is to add the following to conf/local.conf IMAGE_FSTYPES_append=” ext4″

Posted in Linux commandline, Yocto | Tagged , | Comments Off on Generate a ext4 filesystem image in Yocto

Using bmap-tool with wic generated images

The FSL community repository now uses the wic tool to create images in the form of core-image-x11-$(MACHINE).wic.gz To flash this file to a SD-card do the following: Install bmap-tools $ apt-get install bmap-tools .. 2. Copy to sdcard $ sudo … Continue reading

Posted in Yocto | Comments Off on Using bmap-tool with wic generated images

Find all files containing phone numbers

To find all files in a folder containing phone numbers do Example files containing the phone numbers: +468 444 322, +472 422 5666, +4422 44 44 211 $ grep -r “^[+].[0-9]./s.*.[0-9]$”

Posted in Linux commandline | Leave a comment

Get size of all code files in a directory

I got a question on how to get all files in a directory listing containing code. This is what I used: find . \( -name ‘*.bb*’ -o -name ‘*.h*’ -o -name ‘*.c*’ -o -name ‘*akefile’ -o -name ‘*.sh’ -o -name … Continue reading

Posted in Linux commandline | Tagged , , , | Leave a comment

Getting UUID of a partition for use in /etc/fstab

To get UUID of a partition use the command blkid /dev/sdXX Example me@ubuntudevmach:~/$ blkid /dev/sdb1 /dev/sdb1: UUID=”405d2966-6826-4942-baa4-244f24aa31c3″ TYPE=”ext4″ PTUUID=”775559d3″ PTTYPE=”dos” This is useful when editing /etc/fstab to direct a partition to a folder Example of directing a partition to be … Continue reading

Posted in Linux commandline | Tagged , , | Leave a comment

Copying more files to an existing rootfs image

Check rootfs image e2fsck -f myimage.ext2 Resize it resize2fs myimage.ext2 400M mount it mkdir myimage mount myimage.ext2 myimage copy new content cp newcontent myimage

Posted in Linux commandline | Tagged , , | Leave a comment

Using your Linux host as a opkg package server

It is very useful to have your computer working as a opkg package server in the sence that you can install packages built and test instantly instead of rebuilding the entire image. To enable this I did the following: Install … Continue reading

Posted in Yocto | Tagged , , | Leave a comment

Adding ssh password to raspberry pi

Create ssh-key ssh-keygen -t rsa -b 4096 -C “your_email@example.com” Add id_rsa.pub content to the raspberry pi .ssh/authorized_keys echo ~/.ssh/id_rsa.pub | ssh pi@192.168.1.5 “cat >> .ssh/authorized_keys Add new login part in your .ssh/config file vi .ssh/config Host pi Hostname 192.168.1.5 User … Continue reading

Posted in Yocto | Tagged , , | Leave a comment

Gerrit workflow using git-repo

This is the workflow I use when working with gerrit and git-repo Create a git-repo branch cd ~/myrepo repo start mybranch myproject Make changes and commit vim myclass.cpp git add myclass.cpp git commit -s Push to gerrit to master branch … Continue reading

Posted in Yocto | Tagged , , | Leave a comment