Optiboot for Atmega8 needed.

Yes I did.

I'm using an ATMEGA8-16AU 32pin SMD. If that make any difference. (For the fuses or something?)
Also using this setup: "Uploading Using an Arduino Board" section of this page http://arduino.cc/en/Tutorial/ArduinoToBreadboard

Well, I re-confirmed that it seems to work here, putting the mega8 into a duemilanove board.
I am having a hell of a time trying to get it to work in my SSS Arduino (with manual reset), however.
I'm going to check the timeouts and see if they are specified differently on mega8 vs mega328...

I see on another post that you add issues with atmega8 and resonators...I'm using a resonator.
Also do I need that .lst file?

IT WORKS!!!!

The problem was with the reset.

First I followed this example "Uploading Using an Arduino Board" section of this page http://arduino.cc/en/Tutorial/ArduinoToBreadboard
But after reading this http://www.instructables.com/id/Arduino-on-all-sorts-of-Atmels/step4/Program-MCUs-with-bootloader/
I tried it and added a wire between pin 1 of the onboard socket (wich has the MCU removed) and the reset pin of my atmega8 and it worked!

Thanks a million westfw.

I just programmed 4 32 pins atmega8 with blink to test them out and work just perfect.
Optiboot works great and it's fast!

Would it be possible to have a atmega8 optiboot compiled for 8MHz?

BUMP :~

I don't like to bump stuff......but I would also really like to have this!

a atmega8 optiboot compiled for 8MHz

While I lack the experience to help you directly I can tell you that everything you need to build a bootloader is already on your computer.

I can tell you that everything you need to build a bootloader is already on your computer.

The version of optiboot distributed with Arduino does not yet include support for atmega8.

Here's hex code for an 8MHz atmega8. Not tested this time; YMMV, and watch your fuse settings...
I'm calling this version 4.2 (calling the latest Arduino version, 4.0 being the source from mercurial, and .2 being two sets of significant edits by me.) If you look closely you'll see the number 0402 at the end of flash space.

:10000000112484B714BE81FFD3D085E08093810092
:1000100082E08093C00088E18093C10086E08093F5
:10002000C20080E18093C4008EE0BCD0259A86E0B7
:1000300020E33CEF91E0309385002093840096BB51
:10004000B09BFECF1D9AA8958150A9F7992493944F
:10005000A5E0AA2EF1E1BF2E9DD0813421F481E0EC
:10006000B2D083E01FC0823411F484E103C0853430
:1000700019F485E0A8D083C0853579F48BD0E82EBB
:10008000FF2488D0082F10E0102F00270E291F29E9
:10009000000F111F92D0680172C0863529F484E0E8
:1000A00092D080E06FD06BC0843609F042C072D02D
:1000B00071D0082F6FD080E0C81688E3D80620F4EE
:1000C00083E0F60187BFE895C0E0D1E063D0899373
:1000D0000C17E1F7F0E0CF16F8E3DF0620F083E03D
:1000E000F60187BFE89569D007B600FCFDCFA601F1
:1000F000A0E0B1E02C9130E011968C91119790E046
:10010000982F8827822B932B1296FA010C0197BE09
:10011000E89511244E5F5F4FF1E0A038BF0751F71B
:10012000F601A7BEE89507B600FCFDCFB7BEE8957F
:1001300026C08437B1F42ED02DD0F82E2BD03DD050
:10014000F601EF2C8F010F5F1F4F84911BD0EA94B3
:10015000F801C1F70894C11CD11CFA94CF0CD11C32
:100160000EC0853739F429D08EE10CD084E90AD04D
:1001700086E098CF813511F488E014D01ED080E15C
:1001800001D06ACF982F8091C00085FFFCCF90935B
:10019000C6000895A8958091C00087FFFCCF80918C
:1001A000C6000895E0E6F0E098E19083808308952A
:1001B00080E0F8DFEE27FF270994ECDF803209F0BA
:1001C000F7DF84E1DFCF1F93182FE4DF1150E9F749
:0601D000F4DF1F91089509
:021FFE000204DB
:00000001FF

Thanks for helping out again westfw.

Do I also need to add a section to me board.txt? (Like I did last time.)

Do I also need to add a section to me board.txt? (Like I did last time.)

yes, of course, because sketches will also need to be compiled taking into account the correct clock rate. (one begins to understand why the "project setup" phase of "real" development environments is so much more complex than the Arduino selection of a "board." Things like the chip, the clock rate, whether there is an external crystal or not, etc are all SEPARATE options that aren't necessarily related to one another...)

OK but to create a valid section in the board.txt for this new chip/bootloader I guess I need to know what fuse setting you chose to build the .hex file?

Last time you gave me this for the 16mhz atmega8:
opti8.name=Arduino Optiboot8
opti8.upload.protocol=stk500
opti8.upload.maximum_size=7680
opti8.upload.speed=115200
opti8.bootloader.low_fuses=0xbf
opti8.bootloader.high_fuses=0xdc
opti8.bootloader.path=optiboot
opti8.bootloader.file=optiboot_mega8.hex
opti8.bootloader.unlock_bits=0x3F
opti8.bootloader.lock_bits=0x0F
opti8.build.mcu=atmega8
opti8.build.f_cpu=16000000L
opti8.build.core=arduino

So would this work for a atmega8 at 8mhz? Red sections are what I've changed
opti8.name=Arduino Optiboot8 (8mhz)
opti8.upload.protocol=stk500
opti8.upload.maximum_size=7680
opti8.upload.speed=57600
opti8.bootloader.low_fuses=0xa4
opti8.bootloader.high_fuses=0xdc
opti8.bootloader.path=optiboot
opti8.bootloader.file=optiboot_mega8_8mhz.hex
opti8.bootloader.unlock_bits=0x3F
opti8.bootloader.lock_bits=0x0F
opti8.build.mcu=atmega8
opti8.build.f_cpu=8000000L
opti8.build.core=arduino

I guess I need to know what fuse setting you chose to build the .hex file?

No, I don't think so. The bootloader doesn't actually know about the fuse settings, it only knows about the clock speed and where it needs to be in memory. The new low fuse byte of A4 sounds right for the internal oscillator, but the upload speed should still be 115200; it would only be 57600 if you were using the old bootloader that thought it was still running at 16MHz.

Thanks for the atmega8 8MHz optiboot. Will try it out.

westfw:
The version of optiboot distributed with Arduino does not yet include support for atmega8.

Here's hex code for an 8MHz atmega8. Not tested this time; YMMV, and watch your fuse settings...
I'm calling this version 4.2 (calling the latest Arduino version, 4.0 being the source from mercurial, and .2 being two sets of significant edits by me.) If you look closely you'll see the number 0402 at the end of flash space.

:10000000112484B714BE81FFD3D085E08093810092

:1000100082E08093C00088E18093C10086E08093F5
:10002000C20080E18093C4008EE0BCD0259A86E0B7
:1000300020E33CEF91E0309385002093840096BB51
:10004000B09BFECF1D9AA8958150A9F7992493944F
:10005000A5E0AA2EF1E1BF2E9DD0813421F481E0EC
:10006000B2D083E01FC0823411F484E103C0853430
:1000700019F485E0A8D083C0853579F48BD0E82EBB
:10008000FF2488D0082F10E0102F00270E291F29E9
:10009000000F111F92D0680172C0863529F484E0E8
:1000A00092D080E06FD06BC0843609F042C072D02D
:1000B00071D0082F6FD080E0C81688E3D80620F4EE
:1000C00083E0F60187BFE895C0E0D1E063D0899373
:1000D0000C17E1F7F0E0CF16F8E3DF0620F083E03D
:1000E000F60187BFE89569D007B600FCFDCFA601F1
:1000F000A0E0B1E02C9130E011968C91119790E046
:10010000982F8827822B932B1296FA010C0197BE09
:10011000E89511244E5F5F4FF1E0A038BF0751F71B
:10012000F601A7BEE89507B600FCFDCFB7BEE8957F
:1001300026C08437B1F42ED02DD0F82E2BD03DD050
:10014000F601EF2C8F010F5F1F4F84911BD0EA94B3
:10015000F801C1F70894C11CD11CFA94CF0CD11C32
:100160000EC0853739F429D08EE10CD084E90AD04D
:1001700086E098CF813511F488E014D01ED080E15C
:1001800001D06ACF982F8091C00085FFFCCF90935B
:10019000C6000895A8958091C00087FFFCCF80918C
:1001A000C6000895E0E6F0E098E19083808308952A
:1001B00080E0F8DFEE27FF270994ECDF803209F0BA
:1001C000F7DF84E1DFCF1F93182FE4DF1150E9F749
:0601D000F4DF1F91089509
:021FFE000204DB
:00000001FF

this is wrong code because it's located at 0 address not 0x1E00

Most of the conversation was back in 2011. These days, the optiboot distribution DOES include an Atmega8 .hex file.
(Releases · Optiboot/optiboot · GitHub)

I wanted a optiboot for ATmega8 (with external oscillator) at 8MHz and serial port to 38400 but was not able to compile the project with WinAVR,

I instead found one ready for ATmega8 8 MHz 57600, okay to try it, it works, but I found that when using my pre-programmed application provoked by a watchdog reset (I press a combination of keys on the keyboard) does not understand avrdudess never the bootloader, but if provoked an external reset understand it, so I can not use it, sorry because occupies very little space, you can re-enter the bootloader after a WD reset?

can you re-enter the bootloader after a WD reset?

No, that won't work. The bootloader uses WD reset to reset the chip and start the application, so any other WD reset will also start the application immediately rather than enter the bootloader.

ah, then I understood right :), how to re-enter into BL from my application without an external RESET ?