@echo off

set base_dir=%~dp0  
%base_dir:~0,2%  

cd %base_dir%

copy ..\dts\rk-kernel.dtb 

copy ..\dts\logo.bmp

copy ..\dts\logo_kernel.bmp

copy ..\dts\battery_0.bmp
copy ..\dts\battery_1.bmp
copy ..\dts\battery_2.bmp
copy ..\dts\battery_3.bmp
copy ..\dts\battery_4.bmp
copy ..\dts\battery_5.bmp
copy ..\dts\battery_fail.bmp
resource_tool rk-kernel.dtb logo.bmp logo_kernel.bmp battery_0.bmp battery_1.bmp battery_2.bmp battery_3.bmp battery_4.bmp^
			battery_5.bmp battery_fail.bmp

if %errorlevel% EQU 0 (
	echo Info:dts to dtb success.
)else (
	echo Error:dts to dtb error.
)

del ..\Temp\Android\Image\resource.img
 
copy resource.img ..\Temp\Android\Image\resource.img 

del rk-kernel.dtb
del logo.bmp
del logo_kernel.bmp
del ..\dts\battery_0.bmp
del ..\dts\battery_1.bmp
del ..\dts\battery_2.bmp
del ..\dts\battery_3.bmp
del ..\dts\battery_4.bmp
del ..\dts\battery_5.bmp
del ..\dts\battery_fail.bmp
del resource.img

:exit

@echo on
