Wednesday, 16 July 2014

erasing mmc card in u-boot

i played little bit with beaglebone black and fedora rawhide images.
i was not able to boot from sd card, because of u-boot on emmc, even i used sd card boot button.
so i looked for something like 'dd if=/dev/zero of=/dev/mmcblk0', but in uboot to erase partition table on emmc and also MLO and uboot placed somewhere on first mb of emmc.
author of u-boot recommended me to use mw + mmc write. and some good hints regarding size of words for 'mw' and size of blocks which uses 'mmc write'.
this worked perfectly:

mw $scriptaddr 0 40000;mmc write $scriptaddr 0 800

but...

fedora's u-boot has by default as first mmc device sdcard, not emmc.
i somehow forgot this small detail.
and i was supprised, that i still see 'U-Boot 2014.04" instead of 'U-Boot 2013.10' after few resets and repeating command above.

is always good to check, which mmc device is active :)

Wednesday, 11 December 2013

/dev/loopN on fedora

for some reason loop module is not compiled in and systemd doesn't create nodes for loop devices.
if you need to mount/dump some partition on some image, let say on dump of mmcblk0 from embedded device, there is a way to do it:


  • create loop device (must be repeated before any additional file processed by kpartx):

'losetup -f'

  • create "looped" partitions

'kpartx -av some_dump_file'

  • now you can do whatever you want on disk image and partitions like:

'sgdisk -p /dev/loopN'or
'dd if=/dev/mapper/loopNpNN of=dump_of_partition'

  • when finished remove maps:

'kpartx -dv some_dump_file'


Friday, 15 November 2013

scp - ssh = brackets

i tried figure out how to transfer file from from laptop to ifc6410 board hooked to laptop via utp cable. using tcpdump i identified ipv6 address of ifc6410 board and connected using ssh.

connecting to remote machine is easy:

'ssh username@ipv6::ugly:addr:esss%ethN'

for scp that's not enough. scp needs brackets:

'scp filename username@[ipv6::ugly:addr:esss%ethN]:'

Sunday, 20 October 2013

multiple tty opened in one screen session

while i was playing with 'console' as serial line i/o, i found nice feature:
'ctrl-a :' and typing 'screen /dev/ttyUSB0 115200' and then 'ctrl-a :' and typing 'screen /dev/ttyACM0 115200' i got 2 serial devices attached.
using 'ctrl-a "' i listed all screens:
###########
Num Name                                                                                                                                                   Flags

  0 ttyUSB0
  1 ttyACM0                                                                                                                                                  
###########

Thursday, 19 January 2012

yum 'snippet'

yum reinstall @Some\ Group - yum enters to group mode and reinstall whole group