Yocto defines two variables: PREMIRRORS and SOURCE_MIRROR_URL for source mirroring.
What is the difference between both variables?
SOURCE_MIRROR_URL is used in own-mirrors.bbclass to populate PREMIRRORS. Thus, using SOURCE_MIRROR_URL and inherit += own-mirrors is just a shorthand to populate PREMIRRORS for all different fetchers (protocols).
See SOURCE_MIRROR_URL in the Yocto Project Reference Manual
Related
I have some self written yocto recipes, which create issues with the yocto sstate-cache mechanism (like not rebuilding the recipe when dependencies have changed). Is there a way to disable sstate-caching on a per recipe basis?
Searching the interwebs I can only find very old and by now broken mechanisms:
https://patchwork.openembedded.org/patch/17039/
Or only partial disable functions:
https://patchwork.openembedded.org/patch/130719/
My Yocto version is Zeus and above.
Thanks and cheers!
In the recipe:
SSTATE_SKIP_CREATION = "1"
or, from outside the recipe (e.g. local.conf):
SSTATE_SKIP_CREATION_pn-recipefoo = "1"
SSTATE_SKIP_CREATION_pn-recipebar = "1"
You can verify if sstate exists for a recipe, using oe-check-sstate, e.g.:
oe-check-sstate yourimage | grep recipefoo
and you can remove sstate for a recipe using:
bitbake -c cleansstate recipefoo
However, it is concerning that your recipe interferes with the sstate mechanism. Ensure that you are correctly setting & updating the version and revision of your packages whenever the source code changes.
If your recipe source is stored alongside your Yocto metadata, consider using externalsrc to reference it, allowing Yocto to better track changes.
In my chip vendors recipe they define
SRC_URI += "file://defconfig"
In my own layer, I want to override their defconfig and use my own.
I have a bbappend file in my recipe-kernel layer that adds my own defconfig file. My bbappend file:
SECTION = "kernel"
SUMMARY = "Kernel config and device tree customization"
FILESEXTRAPATHS_prepend := "${THISDIR}/files:"
SRC_URI += "file://defconfig"
SRC_URI += "file://tree_changes.diff"
The tree_changes.diff file is being applied so my bbappend file is being used at least for that.
The problem is that the vendor defconfig is always used. I dont really want to touch the vendors recipes, is there any better way of overriding the defconfig?
The chip vendor (Atmel/Microchip) bbfile is here:
https://github.com/linux4sam/meta-atmel/blob/dunfell/recipes-kernel/linux/linux-at91_5.4.bb
Could it be that your defconfig file is not located under ${THISDIR}/files/<machine> in your layer but rather under ${THISDIR}/files ?
${THISDIR}/files/<distro> or ${THISDIR}/files/<machine> have a higher priority than just ${THISDIR}/files.
The different defconfig files are located in
${THISDIR}/files/at91sam9
${THISDIR}/files/sam9x60
${THISDIR}/files/sama5
${THISDIR}/files/sama5d4
in vendor meta-layer, so they would still be used.
So you would need to move your defconfig file to ${THISDIR}/files/<your_machine> in your custom layer. Note that FILESEXTRAPATHS_prepend = "${THISDIR}/files:" remains the same in the recipe. Yocto takes care of extending the path.
In the Yocto build I can able to inherit a class globally to all recipes from local.conf adding
INHERIT += "<class-name>"
For this I need to edit the local.conf manually before the build. How to inherit the class globally for all recipes from image recipe (.bb) tried adding "inherit as mentioned in Yocto bitbake user manual but that doesn't work it results in build error.
How do I include a shared library in another bitbake recipe that makes use of a makefile to compile a program depending on the shared library?
So i have:
bitbake recipe for compiling a shared library(mylib.so)
bitbake recipe for a small program(myprog) depending on the library(mylib.so)
How do link the shared library to this small program?
You need to set up proper dependency. If mylib.so is required to compile myprog, add package that supplies mylib.so to compile time dependencies of myprog.
Usually package name is the same as corresponding recipe's name, so if the recipe that produces mylib.so is named mylib_1.0.bb, add the following line to the recipe for myprog:
DEPENDS += "mylib"
If mylib.so is used only at runtime, use
RDEPENDS_${PN} += "mylib"
Looking at http://www.scala-sbt.org/release/docs/Howto/scaladoc.html there are examples for giving scaladoc options such -groups and -implicits.
Where is the information regarding the scaladoc (2.10) options? Like a man page. I can't seem to find it, neither of docs.scala-lang.org, nor on wiki.scala-lang.org...
I don't use a Scala installation besides managed by sbt, so I really would like an online resource.
scaladoc -help gives:
Usage: scaladoc <options> <source files>
where possible scaladoc options include:
-diagrams Create inheritance diagrams for classes, traits and packages.
-diagrams-dot-path <path> The path to the dot executable used to generate the inheritance diagrams. Eg: /usr/bin/dot
-diagrams-dot-restart <n> The number of times to restart a malfunctioning dot process before disabling diagrams (default: 5)
-diagrams-dot-timeout <n> The timeout before the graphviz dot util is forcefully closed, in seconds (default: 10)
-diagrams-max-classes <n> The maximum number of superclasses or subclasses to show in a diagram
-diagrams-max-implicits <n> The maximum number of implicitly converted classes to show in a diagram
-doc-footer <footer> A footer on every ScalaDoc page, by default the EPFL/Typesafe copyright notice. Can be overridden with a custom footer.
-doc-format:<format> Selects in which format documentation is rendered (html) default:html
-doc-generator <class-name> The fully qualified name of a doclet class, which will be used to generate the documentation
-doc-no-compile <path> A directory containing sources which should be parsed, no more (e.g. AnyRef.scala)
-doc-root-content <path> The file from which the root package documentation should be imported.
-doc-source-url <url> A URL pattern used to build links to template sources; use variables, for example: ?{TPL_NAME} ('Seq'), ?{TPL_OWNER} ('scala.collection'), ?{FILE_PATH} ('scala/collection/Seq')
-doc-title <title> The overall name of the Scaladoc site
-doc-version <version> An optional version number, to be appended to the title
-expand-all-types Expand all type aliases and abstract types into full template pages. (locally this can be done with the #template annotation)
-groups Group similar functions together (based on the #group annotation)
-implicits Document members inherited by implicit conversions.
-implicits-hide:<implicit(s)> Hide the members inherited by the given comma separated, fully qualified implicit conversions. Add dot (.) to include default conversions.
-implicits-show-all Show members inherited by implicit conversions that are impossible in the default scope. (for example conversions that require Numeric[String] to be in scope)
-no-link-warnings Avoid warnings for ambiguous and incorrect links.
-no-prefixes Prevents generating prefixes in types, possibly creating ambiguous references, but significantly speeding up scaladoc.
-raw-output For each html file, create another .html.raw file containing only the text. (can be used for quickly diffing two scaladoc outputs)
-skip-packages <<package1>:...:<packageN>> A colon-delimited list of fully qualified package names that will be skipped from scaladoc.
Additional debug settings:
-diagrams-debug Show debugging information for the diagram creation process.
-implicits-debug Show debugging information for members inherited by implicit conversions.
Standard scalac options also available:
-Dproperty=value Pass -Dproperty=value directly to the runtime system.
-J<flag> Pass <flag> directly to the runtime system.
-P:<plugin>:<opt> Pass an option to a plugin
-X Print a synopsis of advanced options.
-bootclasspath <path> Override location of bootstrap class files.
-classpath <path> Specify where to find user class files.
-d <directory|jar> destination for generated classfiles.
-dependencyfile <file> Set dependency tracking file.
-deprecation Emit warning and location for usages of deprecated APIs.
-doc-external-doc:<external-doc> comma-separated list of classpath_entry_path#doc_URL pairs describing external dependencies.
-encoding <encoding> Specify character encoding used by source files.
-explaintypes Explain type errors in more detail.
-extdirs <path> Override location of installed extensions.
-external-urls:<externalUrl(s)> (deprecated) comma-separated list of package_names=doc_URL for external dependencies, where package names are ':'-separated
-feature Emit warning and location for usages of features that should be imported explicitly.
-g:<level> Set level of generated debugging info. (none,source,line,vars,notailcalls) default:vars
-help Print a synopsis of standard options
-implicits-sound-shadowing Use a sound implicit shadowing calculation. Note: this interacts badly with usecases, so only use it if you haven't defined usecase for implicitly inherited members.
-javabootclasspath <path> Override java boot classpath.
-javaextdirs <path> Override java extdirs classpath.
-language:<feature> Enable one or more language features.
-no-specialization Ignore #specialize annotations.
-nobootcp Do not use the boot classpath for the scala jars.
-nowarn Generate no warnings.
-optimise Generates faster bytecode by applying optimisations to the program
-print Print program with Scala-specific features removed.
-sourcepath <path> Specify location(s) of source files.
-target:<target> Target platform for object files. All JVM 1.5 targets are deprecated. (jvm-1.5,jvm-1.5-fjbg,jvm-1.5-asm,jvm-1.6,jvm-1.7,msil) default:jvm-1.6
-toolcp <path> Add to the runner classpath.
-unchecked Enable additional warnings where generated code depends on assumptions.
-uniqid Uniquely tag all identifiers in debugging output.
-usejavacp Utilize the java.class.path in classpath resolution.
-verbose Output messages about what the compiler is doing.
-version Print product version and exit.
#<file> A text file containing compiler arguments (options and source files)
Deprecated settings:
-make:<policy> Recompilation detection policy (all,changed,immediate,transitive,transitivenocp) default:all
deprecated: this option is unmaintained. Use sbt or an IDE for selective recompilation.
Beside from that I don't know of any other information sites. The only thing available for sure is the source code that contains all settings.