Thanks!!! now it work!!
I did had a little problem with the colors but I used bmap_blit and it now work perfect, I didn't know about bmap_for_texture, thanks.

here is the code for anyone that want make this:
Code:
BMAP* tex2 = bmap_create("madera_01.bmp");//source texture

bmap_blit (bmap_for_texture("piso_01"), tex2, vector(0,0,0), vector(512,512,0 )); 

bmap_to_mipmap(bmap_for_texture("piso_01"));//to updates the mipmaps.