Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: bugzilla@busybox.net
To: buildroot@uclibc.org
Subject: [Buildroot] [Bug 15161] New: kernel can't support SUBDIR
Date: Wed, 30 Nov 2022 04:32:15 +0000	[thread overview]
Message-ID: <bug-15161-163@https.bugs.busybox.net/> (raw)

https://bugs.busybox.net/show_bug.cgi?id=15161

            Bug ID: 15161
           Summary: kernel can't support SUBDIR
           Product: buildroot
           Version: 2022.08.2
          Hardware: All
                OS: Linux
            Status: NEW
          Severity: normal
          Priority: P5
         Component: Other
          Assignee: unassigned@buildroot.uclibc.org
          Reporter: luffy.jiang@montage-lz.com
                CC: buildroot@uclibc.org
  Target Milestone: ---

My kernel path is top/kernel/linux-x.y.z
I must keep to relative path because of some special reason

the local.mk like this
LINUX_OVERRIDE_SRCDIR = ../kernel
LINUX_SUBDIR = linux-x.y.z

After run make, I found the build directory follow my idea, the
top/kernel/linux-x.y.z be copied as output/build/linux-custom/linux-x.y.z/

but make oldconfig failed, because it use LINUX_DIR, I hope it use LINUX_SRCDIR
in package/pkg-kconfig.mk, I saw this code:
$$($(2)_DIR)/$$($(2)_KCONFIG_STAMP_DOTCONFIG): $$($(2)_KCONFIG_FILE)
$$($(2)_KCONFIG_FRAGMENT_FILES)
        $$(call prepare-per-package-directory,$$($(2)_KCONFIG_DEPENDENCIES))
        $$(call
kconfig-package-merge-config,$(2),$$(@D)/$$($(2)_KCONFIG_DOTCONFIG),\
                $$($(2)_KCONFIG_FRAGMENT_FILES))
        $$(Q)touch $$(@D)/$$($(2)_KCONFIG_STAMP_DOTCONFIG)




build log:

lujiang@cn028lnx02:~/work/mt_sdk/symphony/Lznux/linux/buildroot $ make V=1
/usr/bin/install -m 0644 -D
../kernel/linux-x.y.z/arch/arm64/configs/symphony6_fpga_dbg_defconfig
/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom/.config
support/kconfig/merge_config.sh -m -O
/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom/
/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom/.config
Using
/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom/.config
as base
#
# merged configuration written to
/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom/.config
(needs make)
#
(yes "" |
PATH="/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/host/bin:/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/host/sbin:/home/lujiang/work/mt_sdk/symphony/Lznux/linux/build/script/mt-pkg-config-dir:/home/lujiang/bin:/home/lujiang/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin:/home/lujiang/crosstool-ng/crosstool-ng-1.24.0/bin:/home/lujiang/bin:/usr/local/crosstool-ng/gcc-9.3-glibc-2.28-mipsel-linux-gnu-rm2.0/bin:/usr/local/linaro/gcc-arm-8.3-2019.03-x86_64-arm-linux-gnueabihf/bin:/usr/local/linaro/gcc-arm-10.2-2020.11-x86_64-aarch64-none-linux-gnu/bin"
PKG_CONFIG="/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/host/bin/pkg-config"
PKG_CONFIG_SYSROOT_DIR="/" PKG_CONFIG_ALLOW_SYSTEM_CFLAGS=1
PKG_CONFIG_ALLOW_SYSTEM_LIBS=1
PKG_CONFIG_LIBDIR="/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/host/lib/pkgconfig:/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/host/share/pkgconfig"
BR_BINARIES_DIR=/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/images
KCFLAGS=-Wno-attribute-alias /usr/bin/make -j33 -C
/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom
HOSTCC="/usr/bin/gcc" HOSTCC="/usr/bin/gcc -O2
-I/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/host/include
-L/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/host/lib
-Wl,-rpath,/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/host/lib"
ARCH=arm64
INSTALL_MOD_PATH=/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/target
CROSS_COMPILE="/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/host/bin/aarch64-none-linux-gnu-"
WERROR=0
DEPMOD=/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/host/sbin/depmod
INSTALL_MOD_STRIP=1 HOSTCC="/usr/bin/gcc" oldconfig)
make[1]: Entering directory
'/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom'
make[1]: *** No rule to make target 'oldconfig'.  Stop.
make[1]: Leaving directory
'/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom'
linux/linux.mk:617: recipe for target
'/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom/.stamp_dotconfig'
failed
make: ***
[/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom/.stamp_dotconfig]
Error 2




you can see, the kernel config file be copied as
output/build/linux-custom/.config, but I want it be copied as
output/build/linux-custom/linux-x.y.z/.config

and make oldconfig in output/build/linux-custom/.config,
but I want to i run in output/build/linux-custom/linux-x.y.z





I print the var LINUX_SRCDIR and LINUX_DIR
$ make show-vars VARS=LINUX_SRCDIR
the value is
"/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom/linux-x.y.z"
$ make show-vars VARS=LINUX_DIR
the value is
"/home/lujiang/work/mt_sdk/symphony/Lznux/linux/buildroot/output/build/linux-custom"

-- 
You are receiving this mail because:
You are on the CC list for the bug.
_______________________________________________
buildroot mailing list
buildroot@buildroot.org
https://lists.buildroot.org/mailman/listinfo/buildroot

             reply	other threads:[~2022-11-30  4:32 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-11-30  4:32 bugzilla [this message]
2022-11-30  4:34 ` [Buildroot] [Bug 15161] kernel can't support SUBDIR bugzilla
2022-12-01 11:09 ` bugzilla
2022-12-01 11:49 ` bugzilla
2022-12-10  8:58 ` bugzilla

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=bug-15161-163@https.bugs.busybox.net/ \
    --to=bugzilla@busybox.net \
    --cc=buildroot@uclibc.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox