WangNan0 / kbuild-standalone

Standalone kconfig and kbuild
GNU General Public License v2.0
54 stars 18 forks source link

.source/scripts/check-local-export and .kernel.exec.cmd files are not found #4

Open masalkhi opened 1 year ago

masalkhi commented 1 year ago

I have tried to configure and build the example provided in the tree, I have been able to configure it with menuconfig, but when try to build the example I receive the following error:

$ make O=build make -f .source/scripts/Makefile.build obj=arch \ need-builtin=1 CC arch/x86_64/arch.o /bin/sh: 1: .source/scripts/check-local-export: not found make[3]: [.source/scripts/Makefile.build:252: arch/x86_64/arch.o] Error 127 make[3]: Deleting file 'arch/x86_64/arch.o' make[2]: [.source/scripts/Makefile.build:504: arch/x86_64] Error 2 make[1]: [/home/masalkhi/devel/kbuild-standalone/kbuild/Makefile.main:31: _build_arch] Error 2 make: *** [/home/masalkhi/devel/kbuild-standalone/kbuild/Makefile.output:48: sub-make] Error 2

I have look for the kbuild-standalone/kbuild/scripts/check-local-export i did not find it.

One other thing. the example/kbuild/Makefile.main Makefile contain the following:

# Manually include cmd file because we are not in Makefile.build.
# It is required to make if_changes works
-include .kernel.exec.cmd

.kernel.exec.cmd, I did not find this file too

WangNan0 commented 1 year ago

.kernel.exec.cmd is a generated file, which can be found after you run 'make' once.

masalkhi commented 1 year ago

I have run make several time, one in the standalone-kbuild tree with the follwoing commands:

 $ mkdir build
 $ cd build
 $ make -C ../ -f Makefile.sample O=`pwd` -j

and twice in the example directory

$ make menuconfig O=build
make: *** No rule to make target 'menuconfig'.  Stop.

I have received an error, so I have edited the makefile.kconfig to add the following:

KBUILD_MCONF = $(abs_kbuildtree)/../build/kconfig/mconf
KBUILD_CONF = $(abs_kbuildtree)/../build/kconfig/conf

I was able to run the menuconfig after that change and them I have run the following:

$ make O=build and I have run into that problem

AndreiCherniaev commented 2 days ago

I also can't use examples... I read @masalkhi msg "I was able to run the menuconfig" but even I tried I can't repeat his success. @masalkhi can you edit your post to add path (relative to repo) inside your bash code, not $ mkdir build but for example build$ mkdir build First of all I don't understand path which README.example.md using. Is it example/?

 $ mkdir build
 $ cd build
 $ make ARCH=x86_64 -C ../ O=`pwd` alldefconfig
 $ make ARCH=x86_64 -C ../ O=`pwd` kernel.exec

My steps:

$ git clone https://github.com/WangNan0/kbuild-standalone.git
$ cd kbuild-standalone
$ mkdir build
$ cd build
build$ make -C ../ -f Makefile.sample O=`pwd` -j
build$ ls ./kconfig/*conf
./kconfig/conf  ./kconfig/mconf
build$ cd ../example/
example$ mkdir build && cd $_
build$ make ARCH=x86_64 -C ../ O=`pwd` alldefconfig
make: Entering directory '/home/user/kbuild-standalone/example'
make: *** No rule to make target 'alldefconfig'.  Stop.
make: Leaving directory '/home/user/kbuild-standalone/example'
build$ make ARCH=x86_64 -C ../ O=`pwd` kernel.exec
make: Entering directory '/home/user/kbuild-standalone/example'
make: *** No rule to make target 'kernel.exec'.  Stop.
make: Leaving directory '/home/user/kbuild-standalone/example'