Showing posts with label trick. Show all posts
Showing posts with label trick. Show all posts

Tuesday, September 3, 2019

Linux: Implementing tftpboot with Linux u-boot

If your u-boot is not running tftpboot, for any reason as is the case with my board, you can always fool it into doing tftpboot for you by leveraging the run support in the u-boot bootloader.

U-boot is a very popular bootloader and you can learn more about it here: http://www.denx.de/wiki/U-Boot

Here is the trick to implement it:
setenv bootcmd 'dhcp; run cmd'
setenv cmd 'tftp LOADADDR PATH_TO_TFTPIMAGE'

 In the above set of commands you will have to replace LOADADDR with the correct address in memory where you want to load the image. The PATH_TO_TFTPIMAGE is the path to the image on the tftpserver.

Monday, August 26, 2019

Linux: Why to drop caches and how? Host or virtual machine

Repost of an old post

Excerpt from stackoverflow: "The reason to drop caches like this is for benchmarking disk performance, and is the only reason it exists. When running an I/O-intensive benchmark, you want to be sure that the various settings you try are all actually doing disk I/O, so Linux allows you to drop caches rather than do a full reboot."

How to drop caches on the host?

Tuesday, June 18, 2019

Linux: Compare if two files are the same

Quick script I wrote in my .bashrc to check if two files are the same:


#md5sum
function md5comp()
{
    a=$(md5sum $1 | awk '{print $1}')
    b=$(md5sum $2 | awk '{print $1}')
    echo "Comparing $1 and $2"
    [ "$a" = "$b" ] && echo  "Equal" || echo "Not Equal"


}

Friday, November 13, 2015

Tutorial: 4 simple steps to create a quick heatmap in excel

  • Setup the data in your excel file:

  • Select your table and follow the next step