Skip to contentSkip to conversation

Adding src files to 2.6.18 kernel and build failure query

Q pradeep singh rautela 3 participants 6 messages Sep 10, 2007 – Sep 11, 2007

lore
Share & tools
lore
#0 lore raw

Hi,

I am facing some problem understanding and using the kernel Kbuild system. I tried googling but not much of help.

Thanks to a good kbuild documentation in the tree. It looks like $(LD) -r is not able to do what it is supposed to do. May be i am doing something wrong?

here is a brief summary of what i am doing -

I added some .c files to a new dir under net/foo/ . Added corresponding .h files to a new dir under include/foo/

Create a Kconfig and Makefile in net/foo/ directory. Added corresponding entries to Makefile and Kconfig in the net/ dir.

I happily executed a make with a beaming face after selecting the foo option after doing a
$make menuconfig.

To my surprise i got this error :-

make[1]: *** No rule to make target arch/i386/kernel/vmlinux.lds', needed by __build'. Stop

So , here is the question in short...

What do i need to change and where to make sure this thing vanishes away and kernel compiles as usual like it always did earlier?

Any pointers?
PS:- I am not subscribed to the LKML,please CC me while replying to the list.

thanks
--pradeep

--
pradeep singh rautela

"question = ( to ) ? be : ! be;"
-- Wm. Shakespeare

#1 lore raw
Quoted 5 lines · pradeep singh rautela

So , here is the question in short...

What do i need to change and where to make sure this thing vanishes away and kernel compiles as usual like it always did earlier?

Perhaps post a patch that demonstrates the problem in short.

Quoted 1 line

Any pointers?

void *.

Quoted 4 lines

pradeep singh rautela

"question = ( to ) ? be : ! be;"
-- Wm. Shakespeare

More like

	$? = (${"2b"} || !${"2b"});

since : does not mean "or", but "else".

Jan

#2 lore raw
In reply to pradeep singh rautela
Quoted 17 lines · pradeep singh rautela

Hi,

I am facing some problem understanding and using the kernel Kbuild system. I tried googling but not much of help.

Thanks to a good kbuild documentation in the tree. It looks like $(LD) -r is not able to do what it is supposed to do. May be i am doing something wrong?

here is a brief summary of what i am doing -

I added some .c files to a new dir under net/foo/ . Added corresponding .h files to a new dir under include/foo/

Create a Kconfig and Makefile in net/foo/ directory. Added corresponding entries to Makefile and Kconfig in the net/ dir.

Quoted 8 lines

I happily executed a make with a beaming face after selecting the foo option after doing a
$make menuconfig.

To my surprise i got this error :-

make[1]: *** No rule to make target arch/i386/kernel/vmlinux.lds', needed by __build'. Stop

Did the kernel build before you started adding your stuff?
It looks like you broke something non-obvious when adding your stuff since the above failure should not happen just by adding a new directory under net/

Sam

#3 lore raw

On 9/10/07, Sam Ravnborg <[email protected]> wrote:
[...]

Quoted 10 lines
Quoted 10 lines

I added some .c files to a new dir under net/foo/ . Added corresponding .h files to a new dir under include/foo/

Create a Kconfig and Makefile in net/foo/ directory. Added corresponding entries to Makefile and Kconfig in the net/ dir.

I happily executed a make with a beaming face after selecting the foo option after doing a
$make menuconfig.

Quoted 8 lines
Quoted 4 lines

To my surprise i got this error :-

make[1]: *** No rule to make target arch/i386/kernel/vmlinux.lds', needed by __build'. Stop

Did the kernel build before you started adding your stuff?
It looks like you broke something non-obvious when adding your stuff since the above failure should not happen just by adding a new directory under net/

Went home and tried again. It builds fine in git repo, but again whenever i make an archive using git-archive --format=tar --prefix=linux-2.6.18/ HEAD | bzip2 > linux-2.6.18.tar.bz2 , i get the problem with this bzipped tree.

I removed .gitignore file from the my git repo and added manually rules to .git/info/exclude instead. This did the trick and git-archiv'ing did not result in a broken bzipped tree.

Perhaps i did something silly or may be something to do with git. ??

Thanks for the hint Sam.
--pradeep
--
pradeep singh rautela

"question = ( to ) ? be : ! be;"
-- Wm. Shakespeare

#4 lore raw
Quoted 26 lines · pradeep singh rautela

On 9/10/07, Sam Ravnborg <[email protected]> wrote:
[...]

Quoted 10 lines
Quoted 10 lines

I added some .c files to a new dir under net/foo/ . Added corresponding .h files to a new dir under include/foo/

Create a Kconfig and Makefile in net/foo/ directory. Added corresponding entries to Makefile and Kconfig in the net/ dir.

I happily executed a make with a beaming face after selecting the foo option after doing a
$make menuconfig.

Quoted 8 lines
Quoted 4 lines

To my surprise i got this error :-

make[1]: *** No rule to make target arch/i386/kernel/vmlinux.lds', needed by __build'. Stop

Did the kernel build before you started adding your stuff?
It looks like you broke something non-obvious when adding your stuff since the above failure should not happen just by adding a new directory under net/

Went home and tried again. It builds fine in git repo, but again whenever i make an archive using git-archive --format=tar --prefix=linux-2.6.18/ HEAD | bzip2 > linux-2.6.18.tar.bz2 , i get the problem with this bzipped tree.

Quoted 5 lines

I removed .gitignore file from the my git repo and added manually rules to .git/info/exclude instead. This did the trick and git-archiv'ing did not result in a broken bzipped tree.

Perhaps i did something silly or may be something to do with git. ??

You where hit by a problem in the top-level .gitignore. See commit: eaf729c8a8bfc9c7a5ff5659e3b2584bf2ef22e1

Use: git show eaf729c8a8bfc9c7a5ff5659e3b2584bf2ef22e1

This commit is most likely not in your tree.
It just do:

.gitignore +1 -0
index 8d15830..a232295 100644
@@ -22,6 +22,7 @@
 tags
 TAGS
 vmlinux*
+!vmlinux.lds.S
 System.map
 Module.symvers
 

Sam

#5 lore raw

Hi Sam,

found the commit in my fresh 2.6 git repo.
Thanks a lot for help.

Best Regards
--pradeep

Quoted 55 lines · Sam Ravnborg
Quoted 26 lines · pradeep singh rautela

On 9/10/07, Sam Ravnborg <[email protected]> wrote:
[...]

Quoted 10 lines
Quoted 10 lines

I added some .c files to a new dir under net/foo/ . Added corresponding .h files to a new dir under include/foo/

Create a Kconfig and Makefile in net/foo/ directory. Added corresponding entries to Makefile and Kconfig in the net/ dir.

I happily executed a make with a beaming face after selecting the foo option after doing a
$make menuconfig.

Quoted 8 lines
Quoted 4 lines

To my surprise i got this error :-

make[1]: *** No rule to make target arch/i386/kernel/vmlinux.lds', needed by __build'. Stop

Did the kernel build before you started adding your stuff?
It looks like you broke something non-obvious when adding your stuff since the above failure should not happen just by adding a new directory under net/

Went home and tried again. It builds fine in git repo, but again whenever i make an archive using git-archive --format=tar --prefix=linux-2.6.18/ HEAD | bzip2 > linux-2.6.18.tar.bz2 , i get the problem with this bzipped tree.

Quoted 5 lines

I removed .gitignore file from the my git repo and added manually rules to .git/info/exclude instead. This did the trick and git-archiv'ing did not result in a broken bzipped tree.

Perhaps i did something silly or may be something to do with git. ??

You where hit by a problem in the top-level .gitignore. See commit: eaf729c8a8bfc9c7a5ff5659e3b2584bf2ef22e1

Use: git show eaf729c8a8bfc9c7a5ff5659e3b2584bf2ef22e1

This commit is most likely not in your tree.
It just do:

.gitignore +1 -0
index 8d15830..a232295 100644
@@ -22,6 +22,7 @@
 tags
 TAGS
 vmlinux*
+!vmlinux.lds.S
 System.map
 Module.symvers
 

Sam

Signature · 5 lines
--
pradeep singh rautela

"question = ( to ) ? be : ! be;"
                -- Wm. Shakespeare