Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Difficult to use make oldconfig #2794

Closed
rossburton opened this issue Mar 15, 2019 · 7 comments
Closed

Difficult to use make oldconfig #2794

rossburton opened this issue Mar 15, 2019 · 7 comments
Assignees
Labels
priority: P2-High status: implemented The issue has been implemented by developer type: bug Something isn't working

Comments

@rossburton
Copy link
Contributor

With 0.7 its harder than before to actually manipulate the kconfig without using menuconfig, which isn't an option for distribution-built packages that need to be customised.

Our EFI boot loader isn't at \\EFI\\org.clearlinux\\bootloaderx64.efi, which is the default. Thanks to some previous cleanups (see #2371) we can now use make oldconfig as is typical:

$ cat <<EOF >hypervisor/build/.config
CONFIG_BOARD="NUC7i7BNH"
CONFIG_UEFI_OS_LOADER_NAME="foobar"
EOF
$ make -C hypervisor oldconfig

As expected this populates the rest of the .config with all the missing values, preserving the values that I'd already set. However, this isn't then able to compile:

$ make -C hypervisor
...
cc  -Iinclude  -Iinclude/lib  -Iinclude/lib/crypto  -Iinclude/common  -Iinclude/arch/x86  -Iinclude/arch/x86/boot  -Iinclude/arch/x86/guest  -Iinclude/debug  -Iinclude/public  -Iinclude/dm  -Ibsp/include  -Iboot/include  -I/home/ross/Programming/acrn-hypervisor/hypervisor/build/include  -Iarch/x86/configs/NUC7i7BNH  -Ibsp/include/uefi -I. -c  -include /home/ross/Programming/acrn-hypervisor/hypervisor/build/include/config.h -Wall -W -ffunction-sections -fdata-sections -fshort-wchar -ffreestanding -fsigned-char -m64 -mno-mmx -mno-sse -mno-sse2 -mno-80387 -mno-fp-ret-in-387 -mno-red-zone -nostdinc -nostdlib -fno-common -Werror -fpie -fstack-protector-strong -DSTACK_PROTECTOR -DHV_DEBUG -DPROFILING_ON -fno-omit-frame-pointer  -gdwarf-2 arch/x86/configs/vm_config.c -o /home/ross/Programming/acrn-hypervisor/hypervisor/build/arch/x86/configs/vm_config.o -MMD -MT /home/ross/Programming/acrn-hypervisor/hypervisor/build/arch/x86/configs/vm_config.o
arch/x86/configs/vm_config.c:15:20: fatal error: sos_vm.h: No such file or directory
 #include <sos_vm.h>
                    ^

The important part is -Iarch/x86/configs/NUC7i7BNH, because the include directory is actually called arch/x86/configs/nuc7i7bnh. I can't use the lowercase form when running make oldconfig because then it doesn't match the CONFIG_BOARD in the Kconfig files.

The only way to build the hypervisor using a custom .config is to seed the file with CONFIG_BOARD="NUC7i7BNH" but also redundantly pass BOARD= nuc7i7bnh to make.

I believe that BOARD should only be needed when running defconfig or oldconfig, and that the CONFIG_BOARD name in the Kconfig should be canonical: i.e. the include directories renamed.

@Mingyuan18
Copy link

[External_System_ID] ACRN-3044

@Mingyuan18 Mingyuan18 added type: bug Something isn't working status: new The issue status: new for creation priority: P2-High labels Mar 18, 2019
@NanlinXie
Copy link
Contributor

Reproduced, @junjiemao1 will follow up.

junjiemao1 added a commit to junjiemao1/acrn-hypervisor that referenced this issue Mar 19, 2019
Currently board names are used inconsistently across the project.

* Name of defconfigs for various boards use lowercase.
* Directory of config files for various boards use lowercase.
* CONFIG_BOARD uses uppercase.

This confuses the configuration scripts and leads to unintended overwriting of
.config and missing of configuration file directories, as file and directory
names are case-sensitive.

This patch converts the default board names to lowercase to resolve such
issues. Users are still free to define their own boards in either uppercase or
lowercase as long as they keep the cases consistent.

Tracked-On: projectacrn#2794
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
junjiemao1 added a commit to junjiemao1/acrn-hypervisor that referenced this issue Mar 19, 2019
Currently board names are used inconsistently across the project.

* Name of defconfigs for various boards use lowercase.
* Directory of config files for various boards use lowercase.
* CONFIG_BOARD uses uppercase.

This confuses the configuration scripts and leads to unintended overwriting of
.config, as well as missing of board-specific headers during compilation because
the include paths are case-sensitive.

This patch converts the default board names to lowercase to resolve such
issues. Users are still free to define their own boards in either uppercase or
lowercase as long as they keep the cases consistent.

Tracked-On: projectacrn#2794
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
wenlingz pushed a commit that referenced this issue Mar 19, 2019
Currently board names are used inconsistently across the project.

* Name of defconfigs for various boards use lowercase.
* Directory of config files for various boards use lowercase.
* CONFIG_BOARD uses uppercase.

This confuses the configuration scripts and leads to unintended overwriting of
.config, as well as missing of board-specific headers during compilation because
the include paths are case-sensitive.

This patch converts the default board names to lowercase to resolve such
issues. Users are still free to define their own boards in either uppercase or
lowercase as long as they keep the cases consistent.

Tracked-On: #2794
Signed-off-by: Junjie Mao <junjie.mao@intel.com>
@Mingyuan18 Mingyuan18 added status: Assigned Assigned and removed status: new The issue status: new for creation labels Mar 21, 2019
@junjiemao1
Copy link
Contributor

@rossburton The board names have been unified so that the configuration files can be properly located. Would you please verify if it works for you?

@Mingyuan18
Copy link

@rossburton , The patch was merged, Would you please verify if it works for you?

@Mingyuan18
Copy link

Mingyuan18 commented Apr 16, 2019

@rossburton , This PR's tag is : acrn-2019w12.4-140000f; Please help to confirm fixed or not. Thanks!

@Mingyuan18 Mingyuan18 added status: implemented The issue has been implemented by developer and removed status: Assigned Assigned labels Apr 17, 2019
@fuzhongl
Copy link
Contributor

fuzhongl commented May 24, 2019

@rossburton The issue is fixed since CL 28510. Could you please close this ticket?
Thanks!

@fuzhongl
Copy link
Contributor

@rossburton
Any more concern, please update the comments. If no more feedback within two weeks, this ticket will be closed by default.
Appreciate for your understanding.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
priority: P2-High status: implemented The issue has been implemented by developer type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

5 participants