[linux-yocto] External kernel module - new git commits are not recognized (possible an RTFM problem ???)
Hi For my image I build several external kernel modules (drivers). I followed the model in the hello_mod.bb example, except that the SRC_URI is a git repository and SRCREV= "${AUTOREV} Here is one of the driver recipes called: highspeedrs422.bb SUMMARY = "High speed Rs422 DRIVER for Robovator" LICENSE = "GPLv2" LIC_FILES_CHKSUM = "file://COPYING;md5=12f884d2ae1ff87c09e5b7ccc2c4ca7e" # hispeedRS422 for Robovator, based on highspeedV10 #branch Pokybuild should always be used here BRANCH = "Pokybuild" inherit module SRC_URI =" git:///${ESERVER}/GIT/hispeedV10/;branch=${BRANCH};" SRCREV= "${AUTOREV}" PV = "1.0.0+gitr${SRCPV}" S = "${WORKDIR}/git" # Do not autoload the driver when running "V1.9" mode #KERNEL_MODULE_AUTOLOAD += "hispeedRS422"/ (the variable ESERVER is set externally via BB_ENV_EXTRAWHITE) /This is the makefile/ /ifneq ($(KERNELRELEASE),) obj-m := hispeedRS422.o else all: $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install: $(MAKE) -C $(KERNEL_SRC) M=$(SRC) modules_install clean: rm -f *.o *~ core .depend .*.cmd *.ko *.mod.c rm -f Module.markers Module.symvers modules.order rm -rf .tmp_versions Modules.symvers endif / /In my image recipe I do : PACKAGE_INSTALL_append() = "kernel-module-highspeedrs422 .." If I make changes and push a new revision to the git repo , it is not discovered by bitbake, it keeps building the older version it already has checked out. All my application level recipes are similar and they do detect git changes Adding MACHINE_ESSENTIAL_EXTRA_... to local.conf does not solve it the only way I can make it build is doing a rm -rf tmp For the record if it try a : /bitbake -c cleanall -f //highspeedrs422//,/ or any other forced command//then on next image build I get a trillion errors like: "/the basehash value changed from fbd0f0b2f1269319d4f84d79e76bef0a to a36cd622aeb0840d670f8b01d9ed041d. The metadata is not deterministic and this needs to be fixed." / I'm pretty sure it's a RTFM problem but which one ?? B.R Lars -- Best Regards Lars Larsen F.Poulsen Engineering Aps Tjørnager 16 4330 Hvalsø Denmark +45 29802784 www.visionweeding.com -- ___ linux-yocto mailing list linux-yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/linux-yocto
[yocto] How do I "remove" my application from ROOTFS and add it to INITRD ?
I have a recipie that builds and work fine. It producue a rootfs.img and an initrd, all nicely wrapped in bootable ISO and hdd images It all ends in rootfs.img , but I would like it to end in initrd. (this would makes my update procedure towards costumers simpler, since we only have handle distribution of the initrd file) My main recipe uses IMAGE__INSTALL to add my application - that contains a bunch of recipes for compiled modules, and a directory structure with a number of scripts. So after analyzing bootimg.bbclass I can see, that I need to add a cpio.gz image of my application to get the INITRD variable, and remove it from ROOTFS But how do I achieve this, in a compatible manor ? -Lars -- Best Regards Lars Larsen F.Poulsen Engineering Aps Tjørnager 16 4330 Hvalsø Denmark +45 29802784 www.visionweeding.com -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] how to add files to boot media hddimg/ISO SOLVED
I manage to solve it, with a not so elegant solution I any one has an "authorized" solution please let me know in my local .conf I have INHERIT += "rootfsdebugfiles" ROOTFS_DEBUG_FILES += "\ ${TOPDIR}/[path to file]/sektionnumber.dat ${ISODIR}/sektionnumber.dat; \ ${TOPDIR}/[path to file]/sektionnumber.dat ${HDDDIR}/sektionnumber.dat; \ " -Lars On 2016-10-26 15:22, Lars Larsen wrote: Hello yocto world I have a recipe that produce an ISO image and a hddimg image. I need to add a file to the boot media root, alongside rootfs.img and intrd - so it is NOT a part of the rootfs inspired by bootimg.bbclass, I tried to add the following recipe to my build /DESCRIPTION = "Provide a sektionnumber.dat file on bootmedia (ISO and hdd)"// // //LICENSE = "CLOSED"// //BRANCH ?= "develop"// //SRC_URI ="file://sektionnumber.dat;"// //FILESEXTRAPATHS_prepend := "${THISDIR}/files:" // // // //do_bootimg_prepend(){// //install -d ${ISODIR}// //install -m 0644 "${THISDIR}/files/sektionnumber.dat ${ISODIR}/sektionnumber.dat// // install -d ${HDDDIR}// // install -m 0644 "${THISDIR}/files/sektionnumber.dat ${HDDDIR}/sektionnumber.dat// //} /but it is not recognized any suggestions ? BR Lars -- Best Regards Lars Larsen F.Poulsen Engineering Aps Tjørnager 16 4330 Hvalsø Denmark +45 29802784 www.visionweeding.com -- Best Regards Lars Larsen F.Poulsen Engineering Aps Tjørnager 16 4330 Hvalsø Denmark +45 29802784 www.visionweeding.com -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] how to add files to boot media hddimg/ISO
Hello yocto world I have a recipe that produce an ISO image and a hddimg image. I need to add a file to the boot media root, alongside rootfs.img and intrd - so it is NOT a part of the rootfs inspired by bootimg.bbclass, I tried to add the following recipe to my build /DESCRIPTION = "Provide a sektionnumber.dat file on bootmedia (ISO and hdd)"// // //LICENSE = "CLOSED"// //BRANCH ?= "develop"// //SRC_URI ="file://sektionnumber.dat;"// //FILESEXTRAPATHS_prepend := "${THISDIR}/files:" // // //do_bootimg_prepend(){// //install -d ${ISODIR}// //install -m 0644 "${THISDIR}/files/sektionnumber.dat ${ISODIR}/sektionnumber.dat// // install -d ${HDDDIR}// // install -m 0644 "${THISDIR}/files/sektionnumber.dat ${HDDDIR}/sektionnumber.dat// //} /but it is not recognized any suggestions ? BR Lars -- Best Regards Lars Larsen F.Poulsen Engineering Aps Tjørnager 16 4330 Hvalsø Denmark +45 29802784 www.visionweeding.com -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] yocto linux syslinux and intramfs
Hello yocto world I desperately need some help It spawns off my yocto build, so I guess (hope) there is a wise guy or two,that can give me some pointers I realize is not 100% yocto related but, lean towards generic Linux - so please forgive me. I want to be able to boot up from flash, using a rw ramdisk that 'vanish' when I reboot. I use SYSLINUX to boot the target. I have a recipe that can build an image, that works fine. Now I want it convoluted in an intramfs. my image recipe mybase.bb: DESCRIPTION = "A base image that boots and work" ALL_MY_APPS= " app1 app2 app3" ## all the software i want on target" IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ ${CORE_IMAGE_EXTRA_INSTALL} ${ALL_MYAPPS}" inherit core-image It creates a nice mybase-image-genericxx86..hdd image and I copy the contents to my flash card. All very nice it gets booted,with these lines in syslinux.cfg LABEL boot KERNEL /vmlinuz APPEND initrd=/rootfs.img LABEL=boot root=/dev/ram0 But If I make a new conf/initramfs.conf: IMAGE_FSTYPES = "cpio.gz" INITRAMFS_IMAGE = "mybase" INITRAMFS_IMAGE_BUNDLE = "1" and then run the command bitbake -R conf/initramfs.conf mybase I as expected get an bzImage-initramfs-genericx86.bin I presume this file contains the kernel as well as my rootfs as the initrd But what to put in syslinux.cfg ? The logical choise seems to be: LABEL boot KERNEL /bzImage-initramfs-genericx86.bin APPEND LABEL=boot root=/dev/ram0 but it doesn't boot at all. Only flicker on the console, seems to be invalid code. Any advice any one ? BR Lars -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] yocto linuc, initramfs and syslinx.cfg
Hello yocto world I desperately need some help It spawns off my yocto build, so I guess (hope) there is a wise guy or two,that can give me some pointers I realize is not 100% yocto related, but lean towards generic Linux - so please forgive me. I want to be able to boot up from flash, using a rw ramdisk that 'vanish' when I reboot. I use SYSLINUX to boot the target. I have a recipe that can build an image, that works fine. Now I want it convoluted in an intramfs. my image recipe mybase.bb: DESCRIPTION = "A base image that boots and work" ALL_MY_APPS= " app1 app2 app3" ## all the software i want on target" IMAGE_INSTALL = "packagegroup-core-boot ${ROOTFS_PKGMANAGE_BOOTSTRAP} \ ${CORE_IMAGE_EXTRA_INSTALL} ${ALL_MYAPPS}" inherit core-image It creates a nice mybase-image-genericxx86.hdd image , I copy the contents to my flash card - All very nice it gets booted,with these lines in syslinux.cfg LABEL boot KERNEL /vmlinuz APPEND initrd=/rootfs.img LABEL=boot root=/dev/ram0 But If I make a new conf/initramfs.conf: IMAGE_FSTYPES = "cpio.gz" INITRAMFS_IMAGE = "mybase" INITRAMFS_IMAGE_BUNDLE = "1" and then run the command bitbake -R conf/initramfs.conf mybase As expected I get an bzImage-initramfs-genericx86.bin I presume this file contains the kernel as well as my rootfs as the initrd But what to put in syslinux.cfg ? The logical choice seems to be: LABEL boot KERNEL /bzImage-initramfs-genericx86.bin APPEND LABEL=boot root=/dev/ram0 but it doesn't boot at all. Only flicker on the console, seems to be invalid code. advice any one ? BR Lars -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
Re: [yocto] Manipulating code and Building in offline environment
On 2016-04-27 14:21, Gary Thomas wrote: On 2016-04-27 13:38, Lars Larsen wrote: Hello I have 2 questions I have finally managed to build an image like I want it. I consists of a kernel. The ROS framework. And our proprietary software under git control What I want to achieve is the following: When online it should fetch the latest commit (or what ever branch/tag) from our git repo. It should be possible to take a laptop with a fresh checkout of all the software, go to the field where the is NO INTERNET access, and be able to patch our code on the spot ,and build fresh images, for the target. When online in our office environment all our own software is correctly checked out from our git repo. and build. Beautifully. But when offline ( I disconnect the LAN ) I continually gets errors like “Failure expanding variable SRCPV” on our software modules. I have following in build/conf/local.conf BB_GENERATE_MIRROR_TARBALLS = "1" INHERIT += "own-mirrors" SOURCE_MIRROR_URL = "file://${DL_DIR}" and I experimented with BB_FETCH_PREMIRRORONLY = "1" with no appearent effect So question 1: How do I achieve the offline building. ? Is should be possible - right ? Question 2: Where in the tree is the checked out source code located, that bitbake compiles from. I do this all the time successfully. What is your target and what recipe(s) are having issues? Note setting BB_NO_NETWORK = "1" in local.conf can help diagnose these issues Thanks for the quick response, I will be happy if you can help me solve this, since it's the last stone in our shoes before we go all in on yocto. My target (at this time) is just a plain vanilla X86 platform - i might change in the furture. The recipes that cause troubles, are those who examine my git repos one example, I have several made from this template ($BRANCH is set by envoking scripts): /DESCRIPTION = "Reflector deamon- from local GIT"// //# The initscript reflectord.sh that starts the deamon is installed with basic-framwork-files// //HOMEPAGE = "www.visionweeding.com"// //LICENSE = "CLOSED"// //FPE_PATH = "/opt/fpe"// //BRANCH ?="develop"// //SRC_URI = "git:///eserver/GIT/autodiscover/;branch=${BRANCH};;name=discover " // //SRCREV_discover= "${AUTOREV}"// //SRCREV_FORMAT= "discover"// //PV = "1.0.0+gitr${SRCPV}"// //S = "${WORKDIR}/git"// //inherit cmake// //FILESEXTRAPATHS_prepend := "${THISDIR}/files:"// //FILES_${PN} += "${FPE_PATH}/bin/reflectord \// //${FPE_PATH}/bin/SearchBeam \// // "// //do_install_append() {// // //bbnote "Branch test BRANCH= ${BRANCH}"// // install -d ${D}${FPE_PATH}/bin// //rm -rf ${FPE_PATH}/bin/.debug/*// //install -d ${D}${sysconfdir}/init.d // //install -m 0755 ${WORKDIR}/SearchBeam ${D}${FPE_PATH}/bin // //install -m 0755 ${WORKDIR}/reflectord ${D}${FPE_PATH}/bin// }// // // / -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Manipulating code and Building in offline environment
Hello I have 2 questions I have finally managed to build an image like I want it. I consists of a kernel. The ROS framework. And our proprietary software under git control What I want to achieve is the following: When online it should fetch the latest commit (or what ever branch/tag) from our git repo. It should be possible to take a laptop with a fresh checkout of all the software, go to the field where the is NO INTERNET access, and be able to patch our code on the spot ,and build fresh images, for the target. When online in our office environment all our own software is correctly checked out from our git repo. and build. Beautifully. But when offline ( I disconnect the LAN ) I continually gets errors like “Failure expanding variable SRCPV” on our software modules. I have following in build/conf/local.conf BB_GENERATE_MIRROR_TARBALLS = "1" INHERIT += "own-mirrors" SOURCE_MIRROR_URL = "file://${DL_DIR}" and I experimented with BB_FETCH_PREMIRRORONLY = "1" with no appearent effect So question 1: How do I achieve the offline building. ? Is should be possible - right ? Question 2: Where in the tree is the checked out source code located, that bitbake compiles from. Kind regards Lars Larsen -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto
[yocto] Adding SCM'ed files to image
Hello world I've been struggling a bit, but I'm sure there must be a generic solution to my problem (as a bbclass perhaps ??) I'm building a bootable image (NOT a distribution) for our product. But I need a simple recipe to copy some files I have a bunch of files (scripts, configuration files etc) these files are under git control, I want the directory structure in the repository, populated on to the image so in my git I have something that could look like this . ├── bin ├── etc │ └── file_in-etc └── usr I want it overlayed on the target image, It proved surprisingly difficult when the files are not a precanned part of the recipe (in a files directory). the recipe doesn't know the dirs & files in advance. I managed to get the structure checked out in WORKDIR/git but getting from her to the image still troubles me I'm sure somebody else had the same issues, but I can t find an elegant solution any pointers will be highly appreciated BR -Lars -- ___ yocto mailing list yocto@yoctoproject.org https://lists.yoctoproject.org/listinfo/yocto