Applying a patch

Applying a patch on Linux

To apply a patchfile or a pre-processed patchfile from within the command prompt (opened with the "Shell Environment" shortcut in the eCosPro group) on Linux using the patch application follow these commands:

Figure 28-4. Application of a patch on Linux

test@ubuntu:~$ cd $ECOS_REPOSITORY
test@ubuntu:/opt/ecospro/ecos-3.1.19/packages$ patch -p0 < /tmp/download/issue-1001234-new.pat
patching file net/common/current/include/bootp.h
patching file net/common/current/src/bootp_support.c
test@ubuntu:/opt/ecospro/ecos-3.1.19/packages$

Replace /tmp/download/issue-1001234-new.pat with the path and filename to the downloaded or pre-processed patchfile.

Applying a patch on Windows

To apply a patchfile or a pre-processed patchfile from within the command prompt (opened with the "Shell Environment" shortcut in the eCosPro group) on Windows using the patch application follow these commands:

Figure 28-5. Application of a patch on Windows

C:\> cd %ECOS_REPOSITORY%
C:\eCosPro\ecos-3.1.19\packages> patch -p0 < C:\TEMP\issue-1001234-new.pat
patching file net/common/current/include/bootp.h
patching file net/common/current/src/bootp_support.c
C:\eCosPro\ecos-3.1.19\packages>

Replace C:\TEMP\issue-1001234-new.pat with the path and filename to the downloaded or pre-processed patchfile.

Note: On Windows XP in earlier releases of the eCosPro 3.1 host tools the environment variable %ECOS_REPOSITORY% will not be recognised as it used forward instead of backward slashes as directory name seperators. To work around this issue, alter the %ECOS_REPOSITORY% variable by changing forward to backward slashes.

Figure 28-6. Application of a patch on Windows XP

C:\> echo %ECOS_REPOSITORY%
C:/eCosPro/ecos-3.1.19/packages
C:\> set ECOS_REPOSITORY=C:\eCosPro\ecos-3.1.19\packages
C:\> cd %ECOS_REPOSITORY%
C:\eCosPro\ecos-3.1.19\packages> patch -p0 < C:\TEMP\issue-1001234-new.pat
patching file net/common/current/include/bootp.h
patching file net/common/current/src/bootp_support.c
C:\eCosPro\ecos-3.1.19\packages>
2017-02-09
Documentation license for this page: eCosPro License