After extensive Googling/noodling I came up with this:
#!/bin/bash
mencoder -noidx -oac copy -ovc copy -o tmp.avi $1
ffmpeg -i tmp.avi -f avi -vcodec mpeg4 -b 1700000 -g 300 -bf 2 -vtag divx -acodec copy $1_divx.avi
rm tmp.avi
(copy that to a script file on you pc and run: "./yourscript your_video_file.mkv")
ffmepg alone did not work due to some time stamp bug. By first transferring from mkv to avi container with mencoder and then encoding to DivX with ffmpeg I finally got the video to play on my Bravia TV.
ffmpeg can be used alone but then the audio also has to be recoded:
ffmpeg -i your_input_file.mkv -f avi -vcodec mpeg4 -b 1700000 -acodec ac3 -ab 128000 -vtag divx out_divx4.avi
Using mencoder alone should also be possible but for some reason it just did not work. There was a warning about aspect ratio not been set and thus some header was not written. This probably stopped Bravia from playing the file.
If anyone has an idea how to get subtitles from mkv to the avi please let me know.