[GSoC 2020]: Need help in writing sed alternative in Python for RSB recipes

Chris Johns chrisj at rtems.org
Thu Aug 20 03:21:39 UTC 2020


On 20/8/20 8:09 am, Mritunjay Sharma wrote:
> [UPDATE]: Finally modified the RSB recipes to make them work with make utility
> and EPICS was built successfully.

Great you have had some success but there is a lot more work before it is usable.

> iff --git a/source-builder/config/epics-7-1.cfg b/source-builder/config/epics-7-1.cfg
> index f51c6582..a9581a2e 100644
> --- a/source-builder/config/epics-7-1.cfg
> +++ b/source-builder/config/epics-7-1.cfg
> @@ -21,7 +21,6 @@ URL: 	  https://epics.mpg.de/
>  #
>  %source set epics --rsb-file=epics-base-%{epics_version}.tar.gz https://gitlab.fhi.mpg.de/junkes/epics-base/-/archive/%{epics_version}/epics-base-%{epics_version}.tar.gz
>  
> -
>  #
>  # Prepare the source code.
>  #
> @@ -31,20 +30,9 @@ URL: 	  https://epics.mpg.de/
>    source_dir_epics="epics-base-%{epics_version}"
>  
>    %source setup epics -q -n epics-base-%{epics_version}
> -#
> -# Changing the RTEMS Version in epics-base/configure/os/CONFIG_SITE.Common.RTEMS
> -#
> -sed -i 's/RTEMS_VERSION = .*/RTEMS_VERSION = 5/g' configure/os/CONFIG_SITE.Common.RTEMS
> -
> -#
> -# Changing the RTEMS Base in epics-base/configure/os/CONFIG_SITE.Common.RTEMS
> -#
> -sed -i "s/^RTEMS_BASE .*/RTEMS_BASE = \/home\/mritunjay\/development\/rtems\/\$\(RTEMS_VERSION\)\-arm/g" configure/os/CONFIG_SITE.Common.RTEMS
>  
>    cd ${build_top}
>  
> -
> -
>  %build
>    build_top=$(pwd)
>  
> @@ -52,7 +40,7 @@ sed -i "s/^RTEMS_BASE .*/RTEMS_BASE = \/home\/mritunjay\/development\/rtems\/\$\
>  
>    %{build_build_flags}
>  
> -  %{__make} PREFIX=%{_prefix}
> +  %{__make} PREFIX=%{_prefix} RTEMS_BASE=$HOME/development/rtems/5-arm RTEMS_VERSION=5 CROSS_COMPILER_TARGET_ARCHS=RTEMS-xilinx_zynq_a9_qemu
>  
>    cd ${build_top}
>  
> @@ -62,6 +50,6 @@ sed -i "s/^RTEMS_BASE .*/RTEMS_BASE = \/home\/mritunjay\/development\/rtems\/\$\
>    rm -rf $SB_BUILD_ROOT
>  
>    cd ${source_dir_epics}
> -  %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} install
> +  %{__make} DESTDIR=$SB_BUILD_ROOT PREFIX=%{_prefix} RTEMS_BASE=$HOME/development/rtems/5-arm RTEMS_VERSION=5 CROSS_COMPILER_TARGET_ARCHS=RTEMS-xilinx_zynq_a9_qemu

Mritunjay, can you see what is wrong here? Lets have a look ...

$ stat $HOME/development/rtems/5-arm
stat: /home/chris/development/rtems/5-arm: stat: No such file or directory

This will not work for me and it will not work for an RSB vertical stack build.
This last requirement is important.

You cannot hard code values. The RSB provides the RTEMS version, BSP details and
paths as RSB macro variables. Please review these by using the --trace option
and log file and please ask if you have any questions.

Chris


More information about the devel mailing list