Thursday, February 12, 2009

2009-02-12 log


cat /home/adam/Desktop/work_log/0212.log
svn export - export a clean tree from repository or a work copy.

svn branches:

- create a branch:

$ svn copy http://svn.example.com/repos/calc/trunk \
http://svn.example.com/repos/calc/branches/my-calc-branch \
-m "Creating a private branch of /calc/trunk."

Committed revision 341.

This command causes a near-instantaneous commit in the repository, creating a new directory in revision 341. The new directory is a copy of /calc/trunk. This is shown in Figure 4.3, “Repository with new copy”. [20] While it's also possible to create a branch by using svn copy to duplicate a directory within the working copy, this technique isn't recommended. It can be quite slow, in fact! Copying a directory on the client side is a linear-time operation, in that it actually has to duplicate every file and subdirectory on the local disk. Copying a directory on the server, however, is a constant-time operation, and it's the way most people create branches.

- run svn log -r 9238 to read about the exact changeset that fixed the bug, and run svn diff -c 9238 to see the patch itself.

GDB:

It is often useful to do `display/i $pc' when stepping by machine instructions. This makes GDB automatically display the next instruction to be executed, each time your program stops. See section Automatic Display.

GCC manual on inline asm:

5.37 Assembler Instructions with C Expression Operands
http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Extended-Asm.html#Extended-Asm


patch:
-N or --forward
Ignore patches that seem to be reversed or already applied. See also -R.

adam@adam-desktop:~$ cat /home/adam/Desktop/work_log/0212.log
svn export - export a clean tree from repository or a work copy.

svn branches:

- create a branch:

$ svn copy http://svn.example.com/repos/calc/trunk \
http://svn.example.com/repos/calc/branches/my-calc-branch \
-m "Creating a private branch of /calc/trunk."

Committed revision 341.

This command causes a near-instantaneous commit in the repository, creating a new directory in revision 341. The new directory is a copy of /calc/trunk. This is shown in Figure 4.3, “Repository with new copy”. [20] While it's also possible to create a branch by using svn copy to duplicate a directory within the working copy, this technique isn't recommended. It can be quite slow, in fact! Copying a directory on the client side is a linear-time operation, in that it actually has to duplicate every file and subdirectory on the local disk. Copying a directory on the server, however, is a constant-time operation, and it's the way most people create branches.

- run svn log -r 9238 to read about the exact changeset that fixed the bug, and run svn diff -c 9238 to see the patch itself.

GDB:

It is often useful to do `display/i $pc' when stepping by machine instructions. This makes GDB automatically display the next instruction to be executed, each time your program stops. See section Automatic Display.

GCC manual on inline asm:

5.37 Assembler Instructions with C Expression Operands
http://gcc.gnu.org/onlinedocs/gcc-4.3.3/gcc/Extended-Asm.html#Extended-Asm


patch:
-N or --forward
Ignore patches that seem to be reversed or already applied. See also -R.

Monday, February 09, 2009

2009-02-09 log

plat_nand.c driver for BF537-STAMP nand flash driver:

http://docs.blackfin.uclinux.org/doku.php?id=linux-kernel:drivers:bfin_async_nand

Clockevents and dyntick
http://lwn.net/Articles/223185/
linux/Documentation/timers/
http://kernelnewbies.org/Linux_2_6_21#head-8547911895fda9cdff32a94771c8f5706d66bba0

Monday, February 02, 2009

fstab

Key points:

One can use Label, UUID, besides the device nodes to mount a device.

More information can be found at http://ubuntuforums.org/showthread.php?t=283131


Understanding fstab

Sorry this is such a long post.

I added much of this information to the Ubuntu wiki.

Ubuntu Wiki : fstab

There are essentially 5 sections:

1. Introduction / Mount.
2. "fstab syntax" - Syntax and fstab options.
3. How to label, FAT and Linux file systems.
4. Examples, FAT and Linux native file systems.
5. References


Scroll down to the section you need.

Introduction

/etc/fstab is a system configuration file and is used to tell the Linux kernel which partitions (file systems) to mount and where on the file system tree.

/etc/mtab is an index of all mounted partitions/file systems.

Note: See references section at the end of this how to for useful links.

How to mount

The mount command and fstab go hand in hand:

1. Options for mount and fstab are similar.
2. If a device/partition is not listed in fstab ONLY ROOT may mount the device/partition.
3. Users can mount a removable device using pmount.
4. Users may mount a device/partition if the device is in fstab with the proper options.


How to mount
Mount Partitions Automatically (At BOOT).
Filesystems and Mounting Thanks Hermanzone

mount has a multitude of options. Manpage: man mount

pmount: Pmount allows a user to mount removable media.
pmount uses /media/ as the mount point.

Syntax:
Quote:
pmount
Example:
Code:

pmount /dev/dsa1 data

This creates a directory "data" in /media (mount point is /media/data) and mounts your removable device there.

To unmount:
Code:

pumount

Note: pmount does not like to mount to an existing directory in /media.

* For example, if you have a directory /media/usb ; pmount /dev/sda1 usb may fail.
* If you are having problems with gnome-volume-manager or pmount check the contents of /media and delete directories as needed.
* Obviously do not delete a directory in /media if a device is mounted to this mount point.


Configure pmount for internal drives

To show your partitions/usb devices, first plug in your usb card.

To list your mounted partitions:
Code:

mount

To list all your partitions, mounted or not:
Code:

sudo fdisk -l

To list all your partitions by UUID:
First connect all your devices, then:
Code:

ls /dev/disk/by-uuid -alh

============== END OF INTRODUCTION ===============


fstab Syntax

Quote:
[Device] [Mount Point] [File_system] [Options] [dump] [fsck order]
Device = Physical location.

/dev/hdxy or /dev/sdxy.

x will be a letter starting with a, then b,c,....
y will be a number starting with 1, then 2,3,....

Thus hda1 = First partition on the master HD.

See Basic partitioning for more information

Note: zip discs are always numbered "4".
Example: USB Zip = /dev/sda4.

Note: You can also identify a device by udev, volume label (AKA LABEL), or uuid.

These fstab techniques are helpful for removable media because the device (/dev/sdxy) may change. For example, sometimes the USB device will be assigned /dev/sda1, other times /dev/sdb1. This depends on what order you connect USB devices, and where (which USB slot) you use to connect. This can be a major aggravation as you must identify the device before you can mount it. fstab does not work well if the device name keeps changing.

To list your devices, first put connect your USB device (it does not need to be mounted).
By volume label:
Code:

ls /dev/disk/by-label -lah

By id:
Code:

ls /dev/disk/by-id -lah

By uuid:
Code:

ls /dev/disk/by-uuid -lah

IMO, LABEL is easiest to use as you can set a label and it is human readable.

The format to use instead of the device name in the fstab file is:

LABEL=

Blog Archive