I went to the playground and also did some searching on the forum and assembled what I thought was all the info I needed to burn bootloader to bare ATmega168s with Mac OSX and an AVRISP MKII. I followed the instructions, downloaded and built usblib (0.1.2) and avrdude (5.4). I took the script offered and followed some other web links and got the fuses set up right ... my script is below:
#!/bin/sh
IPATH=echo $0 | sed s/[^\/]*$//
;
CMD="$IPATH/bin/avrdude"
OPTS="-p m168 -b 115200 -P usb -c avrispmkII"
Erase chip write lock and fuses
$CMD $OPTS -e -U lock:w:0x3f:m -U hfuse:w:0xdf:m -U lfuse:w:0xff:m -U efuse:w:0x00:m
Upload bootloader code
$CMD $OPTS -D -U flash:w:ATmegaBOOT_168.hex:i
Lock boot section
$CMD $OPTS -U lock:w:0x0f:m
The result below ... Now I never set the port, I left the generic term "usb" ... the reason for this nothing ever shows up in /dev/tty ... I look ("ls /dev/tty*" shows nothing added, I rebooted as one suggested) but nothing. I go to "About This Mac" and "More Info" and Apple System Profiler says it has "AVRISP mkii" on its USB bus. The AVRISP MKII has the small green light on indicating it is happy with the NG board and its power and connection. As soon as I start the script the larger green light near the USB becomes active and various blinks and a couple of minutes later I get the results below ....
Golem:/Applications/arduino-0008/bootloader-usb brian$ ./burn.command
avrdude: stk500v2_getsync(): error communicating with programmer: (0)
avrdude: AVR device initialized and ready to accept instructions
Reading | ################################################## | 100% 0.10s
avrdude: Device signature = 0x1e9406
avrdude: erasing chip
avrdude: reading input file "0x3f"
avrdude: writing lock (1 bytes):
Writing | ################################################## | 100% 0.03s
avrdude: 1 bytes of lock written
avrdude: verifying lock memory against 0x3f:
avrdude: load data lock data from input file 0x3f:
avrdude: input file 0x3f contains 1 bytes
avrdude: reading on-chip lock data:
Reading | ################################################## | 100% 0.03s
avrdude: verifying ...
avrdude: 1 bytes of lock verified
avrdude: reading input file "0xdf"
avrdude: writing hfuse (1 bytes):
Writing | ################################################## | 100% 0.03s
avrdude: 1 bytes of hfuse written
avrdude: verifying hfuse memory against 0xdf:
avrdude: load data hfuse data from input file 0xdf:
avrdude: input file 0xdf contains 1 bytes
avrdude: reading on-chip hfuse data:
Reading | ################################################## | 100% 0.03s
avrdude: verifying ...
avrdude: 1 bytes of hfuse verified
avrdude: reading input file "0xff"
avrdude: writing lfuse (1 bytes):
Writing | ################################################## | 100% 0.03s
avrdude: 1 bytes of lfuse written
avrdude: verifying lfuse memory against 0xff:
avrdude: load data lfuse data from input file 0xff:
avrdude: input file 0xff contains 1 bytes
avrdude: reading on-chip lfuse data:
Reading | ################################################## | 100% 0.04s
avrdude: verifying ...
avrdude: 1 bytes of lfuse verified
avrdude: reading input file "0x00"
avrdude: writing efuse (1 bytes):
Writing | ################################################## | 100% 0.03s
avrdude: 1 bytes of efuse written
avrdude: verifying efuse memory against 0x00:
avrdude: load data efuse data from input file 0x00:
avrdude: input file 0x00 contains 1 bytes
avrdude: reading on-chip efuse data:
Reading | ################################################## | 100% 0.03s
avrdude: verifying ...
avrdude: 1 bytes of efuse verified
avrdude: safemode: Fuses OK
avrdude done. Thank you.
I am lost at this point! Any one tell me where I have gone wrong.
cheers ... BBR