diff mbox

[OSSTEST] support XSM/FLASK via Kconfig

Message ID 1450810834-14886-1-git-send-email-cardoe@cardoe.com (mailing list archive)
State New, archived
Headers show

Commit Message

Douglas Goldstein Dec. 22, 2015, 7 p.m. UTC
In antcipation of XSM and FLASK migrating to Kconfig add support for
building them via Kconfig or the existing mechanism.

Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
---
I have not tested this because I'm honestly not sure and I'm not sure if
this is correct. I'm just trying to write something to prevent a failure
once XSM/FLASK gets changed to Kconfig and education for myself on how
to do these patches in the future.
---
 ts-xen-build | 3 +++
 1 file changed, 3 insertions(+)

Comments

Ian Campbell Jan. 4, 2016, 12:47 p.m. UTC | #1
On Tue, 2015-12-22 at 13:00 -0600, Doug Goldstein wrote:
> In antcipation of XSM and FLASK migrating to Kconfig add support for
> building them via Kconfig or the existing mechanism.
> 
> Signed-off-by: Doug Goldstein <cardoe@cardoe.com>
> ---
> I have not tested this because I'm honestly not sure and I'm not sure if
> this is correct. I'm just trying to write something to prevent a failure
> once XSM/FLASK gets changed to Kconfig and education for myself on how
> to do these patches in the future.

The general shape looks plausible, but it needs to continue working even
with Xen 4.6 and older.

Not sure how best to achieve that, perhaps checking for the existence of
some well known piece of the Kconfig infrastructure and behaving
accordingly?

Another alternative would be to add a runvar (see osstest.git/README for
the terminology) which controls whether Kconfig is to be used expected, but
given that this is static and per branch I'm not sure there is too much
point in this case (and it would be more complex for a newcomer).

Ian J probably has an opinion.

> ---
>  ts-xen-build | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/ts-xen-build b/ts-xen-build
> index 80b1faa..6616ed3 100755
> --- a/ts-xen-build
> +++ b/ts-xen-build
> @@ -55,6 +55,8 @@ sub checkout () {
>  	echo >>.config KERNELS=''
>  END
>                 (nonempty($r{enable_xsm}) ? <<END : '').
> +	echo >>xen/.config CONFIG_XSM='${build_xsm}'
> +	echo >>xen/.config CONFIG_FLASK='${build_xsm}'
>  	echo >>.config XSM_ENABLE='${build_xsm}'
>  END
>                 (nonempty($r{tree_qemu}) ? <<END : '').
> @@ -126,6 +128,7 @@ END
>  END
>  #/;
>      buildcmd_stamped_logged(9000, 'build', '',<<END,'');
> +            $make_prefix make -C xen olddefconfig
>              $make_prefix make $makeflags @ARGV
>  END
>
Ian Jackson Jan. 5, 2016, 3:34 p.m. UTC | #2
Ian Campbell writes ("Re: [OSSTEST PATCH] support XSM/FLASK via Kconfig"):
> On Tue, 2015-12-22 at 13:00 -0600, Doug Goldstein wrote:
> > In antcipation of XSM and FLASK migrating to Kconfig add support for
> > building them via Kconfig or the existing mechanism.
...
> The general shape looks plausible, but it needs to continue working even
> with Xen 4.6 and older.

Indeed.

> Not sure how best to achieve that, perhaps checking for the existence of
> some well known piece of the Kconfig infrastructure and behaving
> accordingly?

Yes.  This shouldn't be too hard and can probably be done entirely on
the target (rather than expliictly testing in osstest and adjusting
the rune).

> >      buildcmd_stamped_logged(9000, 'build', '',<<END,'');
> > +            $make_prefix make -C xen olddefconfig

Ie,

   if something; then
       $make_prefix make -C xen olddefconfig
   fi

> Another alternative would be to add a runvar (see osstest.git/README for
> the terminology) which controls whether Kconfig is to be used expected, but
> given that this is static and per branch I'm not sure there is too much
> point in this case (and it would be more complex for a newcomer).

I would definitely prefer not to do that.

Ian.
diff mbox

Patch

diff --git a/ts-xen-build b/ts-xen-build
index 80b1faa..6616ed3 100755
--- a/ts-xen-build
+++ b/ts-xen-build
@@ -55,6 +55,8 @@  sub checkout () {
 	echo >>.config KERNELS=''
 END
                (nonempty($r{enable_xsm}) ? <<END : '').
+	echo >>xen/.config CONFIG_XSM='${build_xsm}'
+	echo >>xen/.config CONFIG_FLASK='${build_xsm}'
 	echo >>.config XSM_ENABLE='${build_xsm}'
 END
                (nonempty($r{tree_qemu}) ? <<END : '').
@@ -126,6 +128,7 @@  END
 END
 #/;
     buildcmd_stamped_logged(9000, 'build', '',<<END,'');
+            $make_prefix make -C xen olddefconfig
             $make_prefix make $makeflags @ARGV
 END