I know there is package for my board.
But I just get binary file.
I found source code
http://downloads.openwrt.org/sources/mt … rig.tar.gz
And I "make it"
But when I type mtd_debug --help, it show

usage: mtd_debug info <device>
       mtd_debug read <device> <offset> <len> <dest-filename>
       mtd_debug write <device> <offset> <len> <source-filename>
       mtd_debug erase <device> <offset> <len>

But if I use the package's mtd, it show

Usage: mtd [<options> ...] <command> [<arguments> ...] <device>
 
The device is in the format of mtdX (eg: mtd4) or its label.
mtd recognizes these commands:
        unlock                  unlock the device
        erase                   erase all data on device
        write <imagefile>|-     write <imagefile> (use - for stdin) to device
Following options are available:
        -q                      quiet mode (once: no [w] on writing,
                                           twice: no status messages)
        -r                      reboot after successful command
        -f                      force write without trx checks
        -e <device>             erase <device> before executing the command
 
Example: To write linux.trx to mtd4 labeled as linux and reboot afterwards
         mtd -r write linux.trx linux

Then QUESTION.
How can I build my own mtd util?
Am I get the right source code?