UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer senkoo
Observer
504 Views
Registered: ‎08-28-2018

Petalinux Project overrides edited files

Jump to solution

Hello,

 

My name is Senna. I am working on a project with ZC702 dev kit. But my board does NOT have a phyiscal ethernet switch.

 

So i made changes in xilinx_emacps.c and fixed_phy.c so i wanted to test them.

 

But when i put them in: /data/projects/aet/senkoo/Ets-Prg/Firmware/ets-prg-firmware/petalinux/ets-prg$ cd build/tmp/work-shared/plnx_arm/kernel-source/drivers/net/ethernet/xilinx/

 

They seem to get overriden. When i run: petalinux-build and program the kernel to SPI flash and boot. The log does not show my prints i put in the file. So i was wondering do i need to place the modified files somewhere else where it can include them or i need to set some configuration some where?

 

I also included the files for clarification.

 

Thanks in advance.

 

Greetings,

Senna

0 Kudos
1 Solution

Accepted Solutions
Moderator
Moderator
462 Views
Registered: ‎02-07-2018

Re: Petalinux Project overrides edited files

Jump to solution

Hi @senkoo

 

You should not modify anything that build directory, that will be overwritten  every time when it builds.

You can follow below methods, if you would like to add any changes in driver, this will be reflected in your code while building and you can check in the board.

 

Method1:

1. Download same kernel tag from repository

2. modify your changes and create patch using git

3. follow the steps mentioned in this link :http://www.wiki.xilinx.com/PetaLinux+Yocto+Tips section "Patching the Linux Kernel of a PetaLinux Project "

4. petalinux-build

 

 

Method 2:

You can build kernel as External kernel source option

Build steps for External source using petalinux:
1. petalinux-config and go to -> Linux Components Selection ---> linux-kernel (ext-local-src)
External linux-kernel local source settings --->/aravind_working_dir/source_code/my_xlnx (EXternal linux-kernel local source path)

2. Go to -> Auto Config Settings and select Specify a manual device tree include directory and enter the path to the new kernel include directory.

Auto Config Settings ---> [*] Specify a manual device tree include directory
(/aravind_working_dir/source_code/my_xlnx/arch/arm64/boot/dts/include) Manual device tree include directory

3. Save and exit petalinux-config

4. Do a petalinux-build

 

 

Thanks & regards

Aravind

 

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

0 Kudos
2 Replies
Moderator
Moderator
463 Views
Registered: ‎02-07-2018

Re: Petalinux Project overrides edited files

Jump to solution

Hi @senkoo

 

You should not modify anything that build directory, that will be overwritten  every time when it builds.

You can follow below methods, if you would like to add any changes in driver, this will be reflected in your code while building and you can check in the board.

 

Method1:

1. Download same kernel tag from repository

2. modify your changes and create patch using git

3. follow the steps mentioned in this link :http://www.wiki.xilinx.com/PetaLinux+Yocto+Tips section "Patching the Linux Kernel of a PetaLinux Project "

4. petalinux-build

 

 

Method 2:

You can build kernel as External kernel source option

Build steps for External source using petalinux:
1. petalinux-config and go to -> Linux Components Selection ---> linux-kernel (ext-local-src)
External linux-kernel local source settings --->/aravind_working_dir/source_code/my_xlnx (EXternal linux-kernel local source path)

2. Go to -> Auto Config Settings and select Specify a manual device tree include directory and enter the path to the new kernel include directory.

Auto Config Settings ---> [*] Specify a manual device tree include directory
(/aravind_working_dir/source_code/my_xlnx/arch/arm64/boot/dts/include) Manual device tree include directory

3. Save and exit petalinux-config

4. Do a petalinux-build

 

 

Thanks & regards

Aravind

 

----------------------------------------------------------------------------------------------
Kindly note- Please mark the Answer as "Accept as solution" if information provided is helpful.
Give Kudos to a post which you think is helpful and reply oriented.
----------------------------------------------------------------------------------------------

 

0 Kudos
Observer senkoo
Observer
451 Views
Registered: ‎08-28-2018

Re: Petalinux Project overrides edited files

Jump to solution

HI @aravindb,

 

Thank you so much ! :)

 

Cheers

0 Kudos