@echo off

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

cd %base_dir%

copy ..\..\Temp\Boot\dts\rk-kernel.dtb 
copy ..\..\Temp\Boot\dts\logo.bmp
copy ..\..\Temp\Boot\dts\logo_kernel.bmp
copy ..\..\Temp\Boot\dts\battery_0.bmp
copy ..\..\Temp\Boot\dts\battery_1.bmp
copy ..\..\Temp\Boot\dts\battery_2.bmp
copy ..\..\Temp\Boot\dts\battery_3.bmp
copy ..\..\Temp\Boot\dts\battery_4.bmp
copy ..\..\Temp\Boot\dts\battery_5.bmp
copy ..\..\Temp\Boot\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\Boot\Boot\second

copy resource.img ..\..\Temp\Boot\Boot\second

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

:exit

@echo on
