* Andy Hung(洪翊桓_Pegatron) <andy_h...@pegatroncorp.com> [151125 11:53]:
> Message: 2 > Date: Tue, 24 Nov 2015 14:25:14 +0100 > From: Anders Darander <and...@chargestorm.se> > To: yocto@yoctoproject.org > Subject: Re: [yocto] Header files in /usr/include of rootfs > Message-ID: <20151124132514.gb2...@ad.chargestorm.se> > Content-Type: text/plain; charset=utf-8 > * Andy Hung(???_Pegatron) <andy_h...@pegatroncorp.com> [151124 11:35]: > > I was trying to add some pre-built binaries and files by using a recipe. > > The recipe has something like this: > > SRC_URI = file://files<file:///\\files> ? > > do_install() { > > install ?d ${D} > > } > > What files are you installing? How does those look like? > The content of the folder has those sub-folders, sbin, root, lib, etc. > Those sub-folders contains files such as executable binaries, config > files, kernel modules, .so files ... > All these files are actually built from the source code of a specific > WiFi driver, > what I want to do is installing all pre-built binaries/files into > corresponding locations in rootfs. There's no way to build this using OE?... Though, sure, it's should work as long as the binaries and kernel modules actually loads and runs. > > FILES_${PN} = ?/*? > > Here you add say that anything that has been installed, but not put > into any other package, should be added to ${PN}. Is that what you want? > Yes, all files are installed in a package. > > ALLOW_EMPTY_${PN} = ?1? > > Remove this one unless ${PN} is going to be empty. > This line is removed. > > INSANE_SKIP_${PN} = ?debug-files dev-so? > > These might be needed if you get certain QA-warnings/error without > them. > Yes, got some QA-warnings when building so I keep this. > > The result was all the binaries and files installed and packages are > > created, But I also found kernel header files are also built in under > > /usr/include in rootfs image. > > For my understanding those header files should be used if I want to > > develop/debug applications on the target device but it is not the case. Could you check if any -dev packages gets installed into the image? If so which one? Do anything like kernel-src or something similar gets installed? > > Also I noticed the use of INSANE_SKIP_${PN} so I check the usage of > > debug-files and dev-so, And it turned out there are .debug folders in the > > WORKDIR/package folder so I thought that is why debug-files was used. > > See answer below. > > The questions are, > > Why are those kernel header files installed in rootfs? How do I prevent > > thisa? > > I assume that they aren't in the package you just created? Do you > have anything in your package that might have a dependency on the kernel > headers? Do you have anything in your IMAGE_FEATURES? > No, header files aren't in the package. > I checked the driver source code and many files include kernel headers > like this "#include <linux/xxx.h>" , is this what you meant by dependency on > kernel headers? Are the source code packaged installed and packaged? Can you inspect the generated package ${PN}, and see what it's depencies are? > IMAGE_FEATURES was not used in the recipe file. That would rather be in either local.conf, distro, or in your image. > > Why are there .debug in the package folder, it should only be in package > > ?dbg folder, right? > > Where are the .debug directories located? You should add them to: > > FILES_${PN}-dbg += "<location>/.debug" > I add this line and rebuild but the result seems unchanged. > the .debug folders are located in > ${WORKDIR}/package > ${WORKDIR}/package-split/<package name> - dbg I don't understand. Were the .debug directories located in packages-split/<package-name>-dbg? If so, that's where we want them. Which package do you add to your image? If you remove that package, do you still get the kernel headers installed? Cheers, Anders -- Anders Darander, Senior System Architect ChargeStorm AB / eStorm AB -- _______________________________________________ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto