[Fuego] [PATCH 04/10] kernel_build: add some pre_checks

Daniel Sangorrin daniel.sangorrin at toshiba.co.jp
Wed Mar 28 00:05:51 UTC 2018


> -----Original Message-----
> From: Tim.Bird at sony.com [mailto:Tim.Bird at sony.com]
> Sent: Wednesday, March 28, 2018 6:42 AM
> To: daniel.sangorrin at toshiba.co.jp; fuego at lists.linuxfoundation.org
> Subject: RE: [Fuego] [PATCH 04/10] kernel_build: add some pre_checks
> 
> OK - this is a bit different.
> 
> So if I understand correctly, you would have jobs like the following:
> docker.arm.Functional.kernel_build
> and
> docker.arm64.Functional.kernel_build
> 
> and something like:
> beaglebone.arm.Functional.kernel_build
> is not allowed.  That seems strange to me.
> 
> Why not just always build inside the container, but ignore the
> node name?  

The reason is because Fuego will try to ssh into the node name and
run the test there. Why don't want to build the kernel in the node,
we want to build it in docker. I know why you are confused, but please
notice that test_build here only _clones_ the initial source code, it does
not build anything. The real test (building the kernel) is done in "test_run"
which needs to run in docker, not in other nodes.

Previously I put everything in test_build, but that wasn't a good idea:
1) if the first time the build failed, the second time we would have to 
     clone the kernel from scratch again (slow).
2) if the first time the build was succesful, the second time it would skip
     the would phase and would do nothing. An we wouldn't be able to test
     the kernel incrementally either.

> Do you intend to ultimately support cross-building
> from other architectures?

No, that is too much I think.

> See more questions below.
> 
> 
> > -----Original Message-----
> > From: Daniel Sangorrin
> >
> > - The first precheck is about the node being docker. This can
> > be hard to understand at first, but this is a build test and
> > it occurs in docker for now.
> > - The second list of prechecks are regarding the SDK for the
> > x86_64 builds. This was pointed out by Tim on 22nov2017.
> > Sorry for the super slow answer.
> >
> > Signed-off-by: Daniel Sangorrin <daniel.sangorrin at toshiba.co.jp>
> > ---
> >  engine/tests/Functional.kernel_build/fuego_test.sh | 22
> > ++++++++++++++++++----
> >  1 file changed, 18 insertions(+), 4 deletions(-)
> >
> > diff --git a/engine/tests/Functional.kernel_build/fuego_test.sh
> > b/engine/tests/Functional.kernel_build/fuego_test.sh
> > index d8b3980..b88d07e 100755
> > --- a/engine/tests/Functional.kernel_build/fuego_test.sh
> > +++ b/engine/tests/Functional.kernel_build/fuego_test.sh
> > @@ -3,14 +3,28 @@ FUNCTIONAL_KERNEL_BUILD_PER_JOB_BUILD="true"
> >  function test_pre_check {
> >      echo "Doing a pre_check"
> >      # FIXTHIS: if making uImage, check for mkimage
> > -}
> >
> > -function test_build {
> > -    # Configuration
> > -    if [ -z ${FUNCTIONAL_KERNEL_BUILD_ARCH+x} ]; then
> > +    if [ "$NODE_NAME" != "docker" ]; then
> > +        abort_job "This test can only run on docker currently."
> > +    fi
> > +
> > +    if [ -z "$FUNCTIONAL_KERNEL_BUILD_ARCH" ]; then
> >          FUNCTIONAL_KERNEL_BUILD_ARCH="x86_64"
> >      fi
> >
> > +    if [ "$FUNCTIONAL_KERNEL_BUILD_ARCH" = "x86_64" ]; then
> > +        is_on_sdk libelf.a LIBELF /usr/lib/$FUNCTIONAL_KERNEL_BUILD_ARCH-
> > linux-*/
> > +        assert_define LIBELF
> > +        is_on_sdk libssl.a LIBSSL /usr/lib/$FUNCTIONAL_KERNEL_BUILD_ARCH-
> > linux-*/
> FUNCTIONAL_KERNEL_BUILD_ARCH is always x86_64, so why use a variable
> here?  I think the line reads easier without the variable.

No, ARCH is the variable that goes in the kernel compilation line (eg: make ARCH=arm CROSS_COMPILE=... uImage).
So it is not always x86_64. You can see in the spec.json.
 
> Is /usr/lib/arm-linux-*/libssl.a required for building the ARM kernel?

It is not, that is why the is_on_sdk are only checked for x86_64.

> That seems odd.  Does that code end up in the kernel image or in some
> tool?  If it's a tool, are you sure it isn't a host-side tool, that should
> be x86_64, and not $FUNCTIONAL_KERNEL)_BUILD_ARCH?
> 
> I'm a bit confused by this.
> 
> > +        assert_define LIBSSL
> > +        is_on_sdk bison PROGRAM_BISON /usr/bin/
> > +        assert_define PROGRAM_BISON
> > +        is_on_sdk flex PROGRAM_FLEX /usr/bin/
> These are obviously generic, and the same for any kernel.

I will check if they are actually needed for arm. Here i am only
checking for x86_64.

Thanks,
Daniel

> 
> > +        assert_define PROGRAM_FLEX
> > +    fi
> > +}
> > +
> > +function test_build {
> >      if [ -z ${FUNCTIONAL_KERNEL_BUILD_CONFIG+x} ]; then
> >          FUNCTIONAL_KERNEL_BUILD_CONFIG="defconfig"
> >      fi
> > --
> > 2.7.4
> >
> >
> > _______________________________________________
> > Fuego mailing list
> > Fuego at lists.linuxfoundation.org
> > https://lists.linuxfoundation.org/mailman/listinfo/fuego





More information about the Fuego mailing list