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

Harold Lapprich hlapprich at pixel-velocity.com
Thu Jul 2 14:28:35 PDT 2015


Edward,

Ran into an issue when executing the commands in Section 5.8.3 in an attempt to create the patch file:


1. Change the working directory: Change to where the kernel source code is before making your edits to the calibrate.c file:
     $ cd ~/poky/build/tmp/work/qemux86-poky-linux/linux-yocto-${PV}-${PR}/linux


Because you are working in an established Git repository, you must be in this directory in order to commit your changes and create the patch file.


Note
The PV and PR variables represent the version and revision for the linux-yocto recipe. The PV variable includes the Git meta and machine hashes, which make the directory name longer than you might expect.

2.Edit the source file: Edit the init/calibrate.c file to have the following changes:
     void calibrate_delay(void)
     {
         unsigned long lpj;
         static bool printed;
         int this_cpu = smp_processor_id();

         printk("*************************************\n");
         printk("*                                   *\n");
         printk("*        HELLO YOCTO KERNEL         *\n");
         printk("*                                   *\n");
         printk("*************************************\n");

        if (per_cpu(cpu_loops_per_jiffy, this_cpu)) {
               .
               .
               .



3.Stage and commit your changes: These Git commands display the modified file, stage it, and then commit the file:
     $ git status
     $ git add init/calibrate.c
     $ git commit -m "calibrate: Add printk example"



4.Generate the patch file: This Git command creates the a patch file named 0001-calibrate-Add-printk-example.patch in the current directory.
     $ git format-patch -1


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?

hlapprich at haroldDeskTop:~/sven/poky/build/tmp/work/zx3_pm3_zynq7-poky-linux-gnueabi/linux-xlnx/3.14-xilinx+git2b48a8aeea7367359f9eebe55c4a09a05227f32b-r0/git/drivers/net/ethernet/xilinx$

***Edited the File: changes are extensive***

git status
HEAD detached at 2b48a8a
Changes not staged for commit:
  (use "git add <file>..." to update what will be committed)
  (use "git checkout -- <file>..." to discard changes in working directory)

        modified:   xilinx_emacps.c

Untracked files:
  (use "git add <file>..." to include in what will be committed)

        ../../../../zx3-pm3-zynq7

no changes added to commit (use "git add" and/or "git commit -a")
hlapprich at haroldDeskTop:~/sven/poky/build/tmp/work/zx3_pm3_zynq7-poky-linux-gnueabi/linux-xlnx/3.14-xilinx+git2b48a8aeea7367359f9eebe55c4a09a05227f32b-r0/git/drivers/net/ethernet/xilinx$ git add xilinx_emacps.c
hlapprich at haroldDeskTop:~/sven/poky/build/tmp/work/zx3_pm3_zynq7-poky-linux-gnueabi/linux-xlnx/3.14-xilinx+git2b48a8aeea7367359f9eebe55c4a09a05227f32b-r0/git/drivers/net/ethernet/xilinx$ git commit -m "IEEE1588 PTP Slave Synchronization Updates"

*** Please tell me who you are.

Run

  git config --global user.email "you at example.com"
  git config --global user.name "Your Name"

to set your account's default identity.
Omit --global to set the identity only in this repository.

fatal: unable to auto-detect email address (got 'hlapprich at haroldDeskTop.(none)')
hlapprich at haroldDeskTop:~/sven/poky/build/tmp/work/zx3_pm3_zynq7-poky-linux-gnueabi/linux-xlnx/3.14-xilinx+git2b48a8aeea7367359f9eebe55c4a09a05227f32b-r0/git/drivers/net/ethernet/xilinx$ git format-patch -1
0001-time-Fixup-fallout-from-recent-clockevent-tick-chang.patch


Thanks,
Harold


s0001-time-Fixup-fallout-from-recent-clockevent-tick-chang.patch


From 2b48a8aeea7367359f9eebe55c4a09a05227f32b Mon Sep 17 00:00:00 2001
From: Thomas Gleixner <tglx at linutronix.de>
Date: Fri, 25 Apr 2014 08:32:12 -0700
Subject: [PATCH] time: Fixup fallout from recent clockevent/tick changes

Make the stub function static inline instead of static and move the
clockevents related function into the proper ifdeffed section.

Reported-by: Fengguang Wu <fengguang.wu at intel.com>
Signed-off-by: Thomas Gleixner <tglx at linutronix.de>
Cc: Soren Brinkmann <soren.brinkmann at xilinx.com>
Cc: Preeti U Murthy <preeti at linux.vnet.ibm.com>
(cherry picked from commit f1689bb7abec8e2e670d8ad11eaa86d54bad8cfd)
Signed-off-by: Michal Simek <michal.simek at xilinx.com>
---
 kernel/time/tick-internal.h | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/kernel/time/tick-internal.h b/kernel/time/tick-internal.h
index 26f1c0b..259eaf8 100644
--- a/kernel/time/tick-internal.h
+++ b/kernel/time/tick-internal.h
@@ -155,8 +155,9 @@ static inline int tick_device_is_functional(struct clock_event_device *dev)
        return !(dev->features & CLOCK_EVT_FEAT_DUMMY);
 }

+int __clockevents_update_freq(struct clock_event_device *dev, u32 freq);
+
 #endif

-int __clockevents_update_freq(struct clock_event_device *dev, u32 freq);
 extern void do_timer(unsigned long ticks);
 extern void update_wall_time(void);
--
1.9.1



-----Original Message-----
From: Edward Wingate [mailto:edwingate8 at gmail.com]
Sent: Thursday, July 02, 2015 10:48 AM
To: Harold Lapprich
Cc: Nathan Rossi; meta-xilinx at yoctoproject.org
Subject: Re: [meta-xilinx] bitbake new version of xilinx_emacps.c

Use git to create the patch.  See section 5.8.3 here:
http://www.yoctoproject.org/docs/1.8/dev-manual/dev-manual.html#patching-the-kernel


On Thu, Jul 2, 2015 at 6:18 AM, Harold Lapprich <hlapprich at pixel-velocity.com<mailto:hlapprich at pixel-velocity.com>> wrote:
> Nathan,
>
> Thanks for the quick reply. Was able to identify 'file append' or 'file patch' as the approach to take yesterday. Have read a number of documents on the topic:
>
>         1. Yocto Project Development Manual,
>         2. Embedded Linux Development with Yocto Project (Otavio Salvador, Daiane Angolini),
>         3. and Yocto Project Linux Kernel Development Manual, 2.2.2 Adding Patches.
>
>
> Very experienced in Unix/Linux for embedded systems but just started using Yocto about 5 months ago (seems to be the way to go, very nice architecture for embedded Linux).
>
> Identifed the version of 'xilinx_emacps.c' that I need to update to
> URL:
> https://github.com/Xilinx/linux-xlnx/tree/master/drivers/net/ethernet/
> xilinx and have done a comparison between the current version and the
> update version via 'windiff' but have no experience with creating a patch file. There must be a Yocto tool for generating the patch file or a cookbook procedure since it is key to the Yocto architecture, do you know where I might find this tool?
>
> Thanks,
> Harold
>
>
> -----Original Message-----
> From: Nathan Rossi [mailto:nathan at nathanrossi.com]
> Sent: Thursday, July 02, 2015 12:59 AM
> To: Harold Lapprich
> Cc: meta-xilinx at yoctoproject.org<mailto:meta-xilinx at yoctoproject.org>
> Subject: Re: [meta-xilinx] bitbake new version of xilinx_emacps.c
>
> On Thu, Jul 2, 2015 at 7:53 AM, Harold Lapprich <hlapprich at pixel-velocity.com<mailto:hlapprich at pixel-velocity.com>> wrote:
>> To Whom It May Concern,
>>
>>
>>
>> Currently working with Yocto 'daisy' xlnx-3.14 for an embedded
>> project and need to upgrade 'xilinx_emacps.c' and looking for
>> directions or insight on how best to do this, does anyone have a
>> cookbook example that I can look at (haven't been able to identify
>> the layer for the driver and since it is a devicetree attribute I am guessing meta-xlinx)?
>>
>
> The emacps driver is part of the linux-xlnx kernel. You will need to patch the kernel to change xilinx_emacps.c. The easiest way to go about doing that is to create a patch against the kernel source and then use a .bbappend to get yocto to apply the patch during the build of the linux-xlnx kernel.
>
> There is some documentation around this topic here:
> http://www.yoctoproject.org/docs/current/kernel-dev/kernel-dev.html#ap
> plying-patches
>
> Regards,
> Nathan
>
>>
>>
>> Thanks,
>>
>> Harold
>>
>>
>> --
>> _______________________________________________
>> meta-xilinx mailing list
>> meta-xilinx at yoctoproject.org<mailto:meta-xilinx at yoctoproject.org>
>> https://lists.yoctoproject.org/listinfo/meta-xilinx
>>
> --
> _______________________________________________
> meta-xilinx mailing list
> meta-xilinx at yoctoproject.org<mailto:meta-xilinx at yoctoproject.org>
> https://lists.yoctoproject.org/listinfo/meta-xilinx

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


More information about the meta-xilinx mailing list