Note: Build batch file for Phoenix Legacy BIOS

File: GenPart.bat in build tip fold


@ECHO # The file is automation genaration, see Build.bat > %TIP%\partnum.mak
@ECHO PARTNUMIDSTR = . >> %TIP%\partnum.mak
@ECHO PARTNUM = %PRJNAME% >> %TIP%\partnum.mak
@REM ECHO FULLLOGO = %_LOGO% >> %TIP%\partnum.mak


File: Build.bat in build tip fold, SET TIP=BUILD TIP PATH


@ECHO OFF

SET PRJNAME=IMG
SET CSTID=_D
SET FUNC=ALL
SET VER=

:parse
IF /I “%1″ == “-h" (
SET FUNC=help
SHIFT
GOTO parse
)

IF /I “%1″ == “-?" (
SET FUNC=help
SHIFT
GOTO parse
)

IF /I “%1″ == “help" (
SET FUNC=help
SHIFT
GOTO parse
)

IF /I “%1″ == “-CUSTOMER" (
SET CSTID=%2
SHIFT
SHIFT
GOTO parse
)

IF /I “%1″ == “-BUILDMETHOD" (
SET FUNC=%2
SHIFT
SHIFT
GOTO parse
)

IF /I “%1″ == “CLEAN" (
SET FUNC=CLEAN
SHIFT
GOTO parse
)

IF NOT “%1″ == “" (
SET VER=%1
SHIFT
GOTO parse
) ELSE (
IF /I “%FUNC%"=="help" (
GOTO Usage
) ELSE (
IF /I “%FUNC%"=="CLEAN" (
GOTO Clean
) ELSE (
GOTO Makerom
)
)
)

:Clean
makmaker
nmaker bb clean
makmaker
nmaker clean
goto Exit

:Makerom
REM Check Version
IF /I “%VER%" == “" goto Usage

call genpart.bat
call genver.bat
makmaker

IF /I “%FUNC%" == “ALL" (
nmaker bb
nmaker
SET FUNC=CPYIMAGE
)

IF /I “%FUNC%" == “BB" (
nmaker bb
)

IF /I “%FUNC%" == “BIOS" (
nmaker
SET FUNC=CPYIMAGE
)

IF /I “%FUNC%" == “QUICK" (
nmaker quick
SET FUNC=CPYIMAGE
)

IF /I “%FUNC%" == “CPYIMAGE" (
copy devel%PRJNAME%.rom %PRJNAME%%VER%%CSTID%.BIN
copy flashabl.rom %PRJNAME%%VER%%CSTID%.ROM
)

goto Exit

:Usage
@ECHO.
@ECHO ———————————————————————–
@ECHO Help message. Create By Kun-Yi
@ECHO Build.bat [VER] [-CUSTOMER ID] [-BUILDMETHOD option] [-h] [help] [-?] [CLEAN]
@ECHO -h, -?, help – Show the message
@ECHO VER – BIOS version
@ECHO CLEAN – Clean all template files
@ECHO -CUSTOMER – Customer ID, Default is _D
@ECHO -BUILDMETHOD – Build Method, Default is ALL
@ECHO Build options:
@ECHO ALL : Full Build, make BootBlock & BIOS
@ECHO BB : Build Boot Block
@ECHO BIOS : Build BIOS and make rom file
@ECHO QUICK : Just make rom file
@ECHO ———————————————————————–
@ECHO.

:Exit
SET VER=
SET FUNC=
SET CSTID=
SET PRJNAME=

廣告

發表迴響

在下方填入你的資料或按右方圖示以社群網站登入:

WordPress.com Logo

您的留言將使用 WordPress.com 帳號。 登出 / 變更 )

Twitter picture

您的留言將使用 Twitter 帳號。 登出 / 變更 )

Facebook照片

您的留言將使用 Facebook 帳號。 登出 / 變更 )

Google+ photo

您的留言將使用 Google+ 帳號。 登出 / 變更 )

連結到 %s

%d 位部落客按了讚: