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

Parameters from Kraftfile do not reach the final image #2093

Open
Shimimas opened this issue Jan 24, 2025 · 1 comment
Open

Parameters from Kraftfile do not reach the final image #2093

Shimimas opened this issue Jan 24, 2025 · 1 comment
Assignees
Labels
kind/bug Something isn't working

Comments

@Shimimas
Copy link

Describe the bug

When building the image, my Kraftfile has the line CONFIG_LIBUKDEBUG: 'n'. The .config.app_x64_86 file contains the line CONFIG_LIBUKDEBUG: 'y'.

Steps to reproduce

I used this kraft configuration

spec: v0.6

template:
source: https://github.com/unikraft/app-elfloader.git
version: staging

rootfs: ./Dockerfile

cmd: ["/bin/mcu"]

volumes:

  • ./mcu_unikernel/logs:/logs

unikraft:
source: /home/timophey/unikraft
version: staging
kconfig:
# Configurations options for app-elfloader
# (they can't be part of the template atm)
CONFIG_APPELFLOADER_ARCH_PRCTL: 'y'
CONFIG_APPELFLOADER_BRK: 'y'
CONFIG_APPELFLOADER_CUSTOMAPPNAME: 'y'
CONFIG_APPELFLOADER_STACK_NBPAGES: 128
CONFIG_APPELFLOADER_VFSEXEC: 'y'
CONFIG_APPELFLOADER_VFSEXEC_EXECBIT: 'y'
CONFIG_APPELFLOADER_VFSEXEC_ENVPWD: 'y'
CONFIG_APPELFLOADER_VFSEXEC_ENVPATH: 'y'
CONFIG_APPELFLOADER_AUTOGEN: 'y'
CONFIG_APPELFLOADER_AUTOGEN_ETCRESOLVCONF: 'y'
CONFIG_APPELFLOADER_AUTOGEN_ETCHOSTS: 'y'
CONFIG_APPELFLOADER_AUTOGEN_ETCHOSTS_LOCALHOST4: 'y'
CONFIG_APPELFLOADER_AUTOGEN_ETCHOSTNAME: 'y'
CONFIG_APPELFLOADER_AUTOGEN_REPLACEEXIST: 'y'

# Unikraft options
CONFIG_HAVE_PAGING_DIRECTMAP: 'y'
CONFIG_HAVE_PAGING: 'y'
CONFIG_I8042: 'y'
CONFIG_LIBDEVFS_AUTOMOUNT: 'y'
CONFIG_LIBDEVFS_DEV_NULL: 'y'
CONFIG_LIBDEVFS_DEV_STDOUT: 'y'
CONFIG_LIBDEVFS_DEV_ZERO: 'y'
CONFIG_LIBDEVFS: 'y'
CONFIG_LIBPOSIX_ENVIRON: 'y'
CONFIG_LIBPOSIX_ENVIRON_ENVP0: "PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
CONFIG_LIBPOSIX_ENVIRON_ENVP1: "LD_LIBRARY_PATH=/usr/local/lib:/usr/lib:/lib"
CONFIG_LIBPOSIX_ENVIRON_ENVP2: "HOME=/"
CONFIG_LIBPOSIX_ENVIRON_ENVP3: "PWD=/"
CONFIG_LIBPOSIX_ENVIRON_LIBPARAM: 'y'
CONFIG_LIBPOSIX_EVENTFD: 'y'
CONFIG_LIBPOSIX_FDIO: 'y'
CONFIG_LIBPOSIX_FDTAB: 'y'
CONFIG_LIBPOSIX_FUTEX: 'y'
CONFIG_LIBPOSIX_MMAP: 'y'
CONFIG_LIBPOSIX_NETLINK: 'y'
CONFIG_LIBPOSIX_PIPE: 'y'
CONFIG_LIBPOSIX_POLL: 'y'
CONFIG_LIBPOSIX_PROCESS_CLONE: 'y'
CONFIG_LIBPOSIX_SOCKET: 'y'
CONFIG_LIBPOSIX_SYSINFO: 'y'
CONFIG_LIBPOSIX_TIME: 'y'
CONFIG_LIBPOSIX_TIMERFD: 'y'
CONFIG_LIBPOSIX_UNIXSOCKET: 'y'
CONFIG_LIBPOSIX_USER_GID: 0
CONFIG_LIBPOSIX_USER_GROUPNAME: "root"
CONFIG_LIBPOSIX_USER_UID: 0
CONFIG_LIBPOSIX_USER_USERNAME: "root"
CONFIG_LIBPOSIX_USER: 'y'
CONFIG_LIBRAMFS: 'y'
CONFIG_LIBSYSCALL_SHIM_HANDLER_ULTLS: 'y'
CONFIG_LIBSYSCALL_SHIM_HANDLER: 'y'
CONFIG_LIBSYSCALL_SHIM_LEGACY_VERBOSE: 'y'
CONFIG_LIBSYSCALL_SHIM: 'y'
CONFIG_LIBUKALLOCPOOL: 'y'
CONFIG_LIBUKBLKDEV_SYNC_IO_BLOCKED_WAITING: 'y'
CONFIG_LIBUKBLKDEV: 'y'
CONFIG_LIBUKBOOT_BANNER_MINIMAL: 'y'
CONFIG_LIBUKBOOT_HEAP_BASE: '0x400000000'
CONFIG_LIBUKBOOT_MAINTHREAD: 'y'
CONFIG_LIBUKBOOT_SHUTDOWNREQ_HANDLER: 'y'
CONFIG_LIBUKLIBPARAM: 'y'
CONFIG_LIBUKCPIO: 'y'
CONFIG_LIBUKDEBUG: 'n'
CONFIG_LIBUKDEBUG_PRINTD: 'n'
CONFIG_LIBUKDEBUG_PRINTK_INFO: 'n'
CONFIG_LIBSYSCALL_SHIM_STRACE: 'n'
CONFIG_LIBSYSCALL_SHIM_DEBUG: 'n'
CONFIG_LIBNOLIBC_UKDEBUG_ASSERT: 'n'
CONFIG_LIBUKDEBUG_PRINTK: 'n'
CONFIG_LIBUKDEBUG_PRINTK_ERR: 'n'
CONFIG_LIBUKDEBUG_REDIR_PRINTD: 'n'
CONFIG_LIBUKDEBUG_PRINT_TIME: 'n'
CONFIG_LIBUKDEBUG_ENABLE_ASSERT: 'n'
CONFIG_DEBUG_SYMBOLS_LVL3: 'n'
CONFIG_LIBSYSCALL_SHIM_LEGACY_VERBOSE: 'n'
CONFIG_LIBUKFALLOC: 'y'
CONFIG_LIBUKMPI: 'n'
CONFIG_LIBUKSIGNAL: 'y'
CONFIG_LIBUKRANDOM_DEVFS: 'y'
CONFIG_LIBUKRANDOM: 'y'
CONFIG_LIBUKRANDOM_GETRANDOM: 'y'
CONFIG_LIBUKRANDOM_CMDLINE_SEED: 'y'
CONFIG_LIBUKRANDOM_LCPU: 'y'
CONFIG_LIBUKVMEM_DEFAULT_BASE: '0x0000001000000000'
CONFIG_LIBUKVMEM_DEMAND_PAGE_IN_SIZE: 12
CONFIG_LIBUKVMEM_PAGEFAULT_HANDLER_PRIO: 4
CONFIG_LIBUKVMEM: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT_CI_EINITRD: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT_CI: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT_FB: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT_FB0_DEV: "embedded"
CONFIG_LIBVFSCORE_AUTOMOUNT_FB0_DRIVER: "extract"
CONFIG_LIBVFSCORE_AUTOMOUNT_FB0_MP: "/"
CONFIG_LIBVFSCORE_AUTOMOUNT_UP: 'y'
CONFIG_LIBVFSCORE_AUTOMOUNT: 'y'
CONFIG_LIBVFSCORE_NONLARGEFILE: 'y'
CONFIG_LIBVFSCORE: 'y'
CONFIG_LIBUK9P: 'y'
CONFIG_OPTIMIZE_DEADELIM: 'y'
CONFIG_OPTIMIZE_LTO: 'y'
CONFIG_PAGING: 'y'
CONFIG_STACK_SIZE_PAGE_ORDER: 4 # 128 * 4K = 512K
CONFIG_UKPLAT_KSP_SIZE: 32768
CONFIG_UKPLAT_MEMREGION_MAX_COUNT: 64
CONFIG_LIBUKNETDEV: 'y'
CONFIG_LIBUKNETDEV_EINFO_LIBPARAM: 'y'
CONFIG_LIBNOLIBC_FD_SETSIZE: 32768
CONFIG_LIBPOSIX_FDTAB_MAXFDS: 32768

libraries:
lwip:
source: https://github.com/unikraft/lib-lwip.git
version: staging
kconfig:
CONFIG_LWIP_LOOPIF: 'y'
CONFIG_LWIP_UKNETDEV: 'y'
CONFIG_LWIP_LOOPBACK: 'y'
CONFIG_LWIP_TCP: 'y'
CONFIG_LWIP_UDP: 'y'
CONFIG_LWIP_RAW: 'y'
CONFIG_LWIP_WND_SCALE: 'y'
CONFIG_LWIP_TCP_KEEPALIVE: 'y'
CONFIG_LWIP_THREADS: 'y'
CONFIG_LWIP_HEAP: 'y'
CONFIG_LWIP_SOCKET: 'y'
CONFIG_LWIP_AUTOIFACE: 'y'
CONFIG_LWIP_IPV4: 'y'
CONFIG_LWIP_DHCP: 'y'
CONFIG_LWIP_WAITIFACE: 'y'
# Lwip's DNS support is not used for bin compat programs (elfloader)
# HINT: Native builds with musl should set CONFIG_LIBMUSL_NETWORK_LWIP_DNS together with CONFIG_LWIP_DNS
CONFIG_LWIP_DNS: 'n'
CONFIG_LWIP_NUM_TCPCON: 32768
CONFIG_LWIP_NUM_TCPLISTENERS: 32768
CONFIG_LWIP_ICMP: 'y'
libelf:
source: https://github.com/unikraft/lib-libelf.git
version: staging

targets:

  • qemu/x86_64

Expected behavior

All declared parameters will be added to the image

Which architectures were you using or does this bug affect?

x86_64

Which operating system were you using or does this bug affect?

linux/debian

Relevant log output

@Shimimas Shimimas added the kind/bug Something isn't working label Jan 24, 2025
@craciunoiuc craciunoiuc self-assigned this Jan 28, 2025
@craciunoiuc
Copy link
Member

There can be a number of reasons why this happens, for example:

  • The work directory contained an existing .config file which overwrote your settings (sometimes happens) -> try deleting all .config-* files and retry
  • There is an option in there that selects/implies the UKDEBUG option -> run the build once and then run kraft menuconfig and look for LIBUKDEBUG (you can use / key to search if I remember correctly)

If none are true, then I'll need to also try it out. For this, please use triple backticks for the kraftfile that you posted, so I can easily copy paste it and try it out. (these: ```)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind/bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants