[meta-xilinx] bitbake new version of xilinx_emacps.c

Harold Lapprich hlapprich at pixel-velocity.com
Mon Jul 6 12:18:04 PDT 2015


Edward,

Thanks for the update, after performing the steps you listed the patch file was created.

However I then applied  the patch as specified and the 'xilinx_emacps.c' is built with the creation of 'xlinux_emacps.o' but the patch was not applied to 'xilinx_emacps.c' ('more xilinx_emacps.c' and the patch wasn't there).


        5.8.4. Set Up Your Layer for the Build¶

        These steps get your layer set up for the build:

        1.Create additional structure: Create the additional layer structure:
         $ cd ~/poky/meta-mylayer
         $ mkdir conf
         $ mkdir recipes-kernel
        $ mkdir recipes-kernel/linux
        $ mkdir recipes-kernel/linux/linux-yocto


        The conf directory holds your configuration files, while the recipes-kernel directory holds your append file and your patch file.


        2.Create the layer configuration file: Move to the meta-mylayer/conf directory and create the layer.conf file as follows:
        # We have a conf and classes directory, add to BBPATH
        BBPATH .= ":${LAYERDIR}"

        # We have recipes-* directories, add to BBFILES
        BBFILES += "${LAYERDIR}/recipes-*/*/*.bb \
                        ${LAYERDIR}/recipes-*/*/*.bbappend"

        BBFILE_COLLECTIONS += "mylayer"
        BBFILE_PATTERN_mylayer = "^${LAYERDIR}/"
        BBFILE_PRIORITY_mylayer = "5"


        Notice mylayer as part of the last three statements.


        3.Create the kernel recipe append file: Move to the meta-mylayer/recipes-kernel/linux directory and create the linux-yocto_3.4.bbappend file as follows:
        FILESEXTRAPATHS_prepend := "${THISDIR}/${PN}:"

        SRC_URI += "file://0001-calibrate-Add-printk-example.patch"


        The FILESEXTRAPATHS and SRC_URI statements enable the OpenEmbedded build system to find the patch file. For more information on using append files, see the "Using .bbappend Files" section.


        4.Put the patch file in your layer: Move the 0001-calibrate-Add-printk-example.patch file to the meta-mylayer/recipes-kernel/linux/linux-yocto directory.



        5.8.5. Set Up for the Build¶

        Do the following to make sure the build parameters are set up for the example. Once you set up these build parameters, they do not have to change unless you change the target architecture of the machine you are building:


        •Build for the correct target architecture: Your selected MACHINE definition within the local.conf file in the Build Directory specifies the target architecture used when building the Linux kernel. By default, MACHINE is set to qemux86, which      specifies a 32-bit Intel® Architecture target machine suitable for the QEMU emulator.


        •Identify your meta-mylayer layer: The BBLAYERS variable in the bblayers.conf file found in the poky/build/conf directory needs to have the path to your local meta-mylayer layer. By default, the BBLAYERS variable contains paths to meta, meta-      yocto, and meta-yocto-bsp in the poky Git repository. Add the path to your meta-mylayer location:
        BBLAYERS ?= " \
        $HOME/poky/meta \
         $HOME/poky/meta-yocto \
         $HOME/poky/meta-yocto-bsp \
        $HOME/poky/meta-mylayer \
         "


        5.8.6. Build the Modified QEMU Kernel Image¶

        The following steps build your modified kernel image:


        1.Be sure your build environment is initialized: Your environment should be set up since you previously sourced the oe-init-build-env script. If it is not, source the script again from poky.
        $ cd ~/poky
         $ source oe-init-build-env



        2.Clean up: Be sure to clean the shared state out by using BitBake to run from within the Build Directory the do_cleansstate task as follows:
        $ bitbake -c cleansstate linux-yocto


        Note
        Never remove any files by hand from the tmp/deploy directory inside the Build Directory. Always use the various BitBake clean tasks to clear out previous build artifacts. For information on the clean tasks, see the "do_clean", "do_cleanall", and   "do_cleansstate" sections all in the Yocto Project Reference Manual.



        3.Build the image: Next, build the kernel image using this command:
         $ bitbake -k linux-yocto


What am I missing (tried 'bitbake -c cleansstate linux-yocto' and 'bitbake -k linux-yocto' as well)?


Thanks,
Harold


PS. Expected to see the patch applied and 'xlinux_emacps.c' changed.

-----Original Message-----
From: Edward Wingate [mailto:edwingate8 at gmail.com]
Sent: Friday, July 03, 2015 1:58 AM
To: Harold Lapprich; meta-xilinx at yoctoproject.org
Subject: Re: [meta-xilinx] bitbake new version of xilinx_emacps.c

On Thu, Jul 2, 2015 at 2:28 PM, Harold Lapprich <hlapprich at pixel-velocity.com<mailto:hlapprich at pixel-velocity.com>> wrote:
>
> Thanks for the quick response and pointing me to 5.8.3 of the
> document. Would you want me to commit the upgraded 'xlinix_emacps.c'
> when I am not the author of the driver (the changes are need for IEEE1588 PTP Slave Synchronization and work in 3.14)?

You will be committing only to your local repository and only to create the patch.  It won't be pushed anywhere or even retained locally (Yocto will apply your patch during the build), so you're fine.

> Ran into an issue when executing the commands in Section 5.8.3 in an
> attempt to create the patch file:
>
> When attempting to create the patch I got another patch in response
> (s0001-time-Fixup-fallout-from-recent-clockevent-tick-chang.patch. The
> patch in response is irrelevant in this case so what should I do since
> a patch file wasn't created?

Your commit failed because git wasn't configured with your name and email.  When you went ahead and performed the git format-patch, it created a patch from I don't know what.  I was going to say from the last commit in the repo, but the patch seemed to be created from a commit back in 2014 which sounds implausible to be the last commit.
So I don't know what the rules are there.

> *** Please tell me who you are.
>
> Run
>
>   git config --global user.email "you at example.com<mailto:you at example.com>"
>   git config --global user.name "Your Name"
>

So go ahead and run those commands to configure git, filling in your info.  Then do the git commit again and everything following that in the instructions.  You should be able to create your patch now.

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.yoctoproject.org/pipermail/meta-xilinx/attachments/20150706/e2e43213/attachment.html>


More information about the meta-xilinx mailing list