You could use the hdr.lua script, modify it, or create your own.
kisas is requesting the the camera actually produce the final HDR image. hdr.lua just does bracketing, it doesn't give you an "HDR" jpeg at the end.
Sorry for my ignorance, I don't think it's too difficult to implement.
It would be very difficult to implement well enough to be useful for general users. Keep in mind that the cameras are not capable of taking more than a few frames per second in still mode (at best, most struggle to reach 1 fps in normal shooting). That means that unless you are shooting with a tripod, there will be significant movement between shots. Even if you use a tripod, it will only work on a static scene.
Aside from that, there are the hardware limitations fe50 mentioned. There is not enough free ram to work with a whole image at once, and the CPU is quite slow. Setting up good workflow on your PC might take some effort, but once it's done the processing will be much faster than anything that could be done on camera.
Perhaps worse than the hardware is software. On a PC, if you want to write an image processing application you have access to a vast array of already written libraries. Smartphones are more limited, but there's still quite a bit available. CHDK is very different. Because it is hacked into an undocumented proprietary system, most normal software cannot be made run with a reasonable effort, even in the rare cases that would fit within the resource limits. What this means is that anything for CHDK has to be written from scratch.
As an ordinary user, I just want a OK picture in high dynamic range environment. I don't care about if the tone of the HDR is favorable in some professional photographer's eye.
Getting a good image is much harder than producing the over-saturated glop that gets called "HDR"....
As a final note, raw (including DNG) does give you a bit more dynamic range than camera jpegs. However, you will still have to spend a lot of effort on a PC based workflow to get results that are significantly better than camera jpegs. There is also Canon's icontrast on most recent models.