diff mbox series

[v2,1/2] automation: Change build script to use arch defconfig

Message ID a949070e4730f55ac214e22a3dea92a5cc6ec7fa.1695754185.git.sanastasio@raptorengineering.com (mailing list archive)
State Superseded
Headers show
Series Fix Power CI build | expand

Commit Message

Shawn Anastasio Sept. 26, 2023, 6:54 p.m. UTC
Change automation build script to call the make defconfig target before
setting CONFIG_DEBUG and extra options. This fixes issues on Power where
the build fails without using the ppc64_defconfig.

Reported-by: Jan Beulich <jbeulich@suse.com>
Signed-off-by: Shawn Anastasio <sanastasio@raptorengineering.com>
---
v2: No changes.

 automation/scripts/build | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

--
2.30.2

Comments

Andrew Cooper Sept. 26, 2023, 7:56 p.m. UTC | #1
On 26/09/2023 7:54 pm, Shawn Anastasio wrote:
> diff --git a/automation/scripts/build b/automation/scripts/build
> index b4edcf010e..19dd9e8270 100755
> --- a/automation/scripts/build
> +++ b/automation/scripts/build
> @@ -22,7 +22,12 @@ if [[ "${RANDCONFIG}" == "y" ]]; then
>      # RANDCONFIG implies HYPERVISOR_ONLY
>      HYPERVISOR_ONLY="y"
>  else
> -    echo "CONFIG_DEBUG=${debug}" > xen/.config
> +    # Start off with arch's defconfig
> +    make -C xen defconfig
> +
> +    # Drop existing CONFIG_DEBUG and replace with value of ${debug}
> +    sed -i 's/^CONFIG_DEBUG=[yn]//g' xen/.config
> +    echo "CONFIG_DEBUG=${debug}" >> xen/.config

Kconfig is latest-takes precedence, which is why we always append for
this and the other related options.  There's no need for sed to drop the
old value.

~Andrew
Stefano Stabellini Sept. 26, 2023, 9:18 p.m. UTC | #2
On Tue, 26 Sep 2023, Andrew Cooper wrote:
> On 26/09/2023 7:54 pm, Shawn Anastasio wrote:
> > diff --git a/automation/scripts/build b/automation/scripts/build
> > index b4edcf010e..19dd9e8270 100755
> > --- a/automation/scripts/build
> > +++ b/automation/scripts/build
> > @@ -22,7 +22,12 @@ if [[ "${RANDCONFIG}" == "y" ]]; then
> >      # RANDCONFIG implies HYPERVISOR_ONLY
> >      HYPERVISOR_ONLY="y"
> >  else
> > -    echo "CONFIG_DEBUG=${debug}" > xen/.config
> > +    # Start off with arch's defconfig
> > +    make -C xen defconfig
> > +
> > +    # Drop existing CONFIG_DEBUG and replace with value of ${debug}
> > +    sed -i 's/^CONFIG_DEBUG=[yn]//g' xen/.config
> > +    echo "CONFIG_DEBUG=${debug}" >> xen/.config
> 
> Kconfig is latest-takes precedence, which is why we always append for
> this and the other related options.  There's no need for sed to drop the
> old value.

+1
Shawn Anastasio Sept. 26, 2023, 10:25 p.m. UTC | #3
On 9/26/23 2:56 PM, Andrew Cooper wrote:
> On 26/09/2023 7:54 pm, Shawn Anastasio wrote:
>> diff --git a/automation/scripts/build b/automation/scripts/build
>> index b4edcf010e..19dd9e8270 100755
>> --- a/automation/scripts/build
>> +++ b/automation/scripts/build
>> @@ -22,7 +22,12 @@ if [[ "${RANDCONFIG}" == "y" ]]; then
>>      # RANDCONFIG implies HYPERVISOR_ONLY
>>      HYPERVISOR_ONLY="y"
>>  else
>> -    echo "CONFIG_DEBUG=${debug}" > xen/.config
>> +    # Start off with arch's defconfig
>> +    make -C xen defconfig
>> +
>> +    # Drop existing CONFIG_DEBUG and replace with value of ${debug}
>> +    sed -i 's/^CONFIG_DEBUG=[yn]//g' xen/.config
>> +    echo "CONFIG_DEBUG=${debug}" >> xen/.config
> 
> Kconfig is latest-takes precedence, which is why we always append for
> this and the other related options.  There's no need for sed to drop the
> old value.
>

Thank you for the confirmation. I'll go ahead and drop the sed.

> ~Andrew

Thanks,
Shawn
diff mbox series

Patch

diff --git a/automation/scripts/build b/automation/scripts/build
index b4edcf010e..19dd9e8270 100755
--- a/automation/scripts/build
+++ b/automation/scripts/build
@@ -22,7 +22,12 @@  if [[ "${RANDCONFIG}" == "y" ]]; then
     # RANDCONFIG implies HYPERVISOR_ONLY
     HYPERVISOR_ONLY="y"
 else
-    echo "CONFIG_DEBUG=${debug}" > xen/.config
+    # Start off with arch's defconfig
+    make -C xen defconfig
+
+    # Drop existing CONFIG_DEBUG and replace with value of ${debug}
+    sed -i 's/^CONFIG_DEBUG=[yn]//g' xen/.config
+    echo "CONFIG_DEBUG=${debug}" >> xen/.config

     if [[ -n "${EXTRA_XEN_CONFIG}" ]]; then
         echo "${EXTRA_XEN_CONFIG}" >> xen/.config