Build Help?

Discuss the technical details of Gargoyle and ongoing development

Moderator: Moderators

Statik
Posts: 118
Joined: Mon Sep 28, 2009 9:38 am

Re: Build Help?

Post by Statik »

I don't know how to write a patch. I've done basic programming in C and C++ before, and I've muggled my way around building this, but I'd need some help writing a patch. The main change was in the post I linked. The other change I can list here. I only changed 3 files: rtl8366s.c rtl8366rb.c and mach-wzr-hp-g300nh.c, where I changed line 273 from

Code: Select all

platform_device_register(&wzrhpg300nh_rtl8366s_device);
to

Code: Select all

	
	if (hasrtl8366rb)
		platform_device_register(&wzrhpg300nh_rtl8366rb_device);
	else
		platform_device_register(&wzrhpg300nh_rtl8366s_device);
I'll see if google will tell me how to write a patch.

Statik

Statik
Posts: 118
Joined: Mon Sep 28, 2009 9:38 am

Re: Build Help?

Post by Statik »

gargoyle_1.5.x_modified_files.zip
Modified mach to allow for proper detection of rtl8366rb or rtl8366s chipset. Modified rtl8366s.c and rtl8366rb.c to use generic PHY driver
(14.8 KiB) Downloaded 419 times
I'm attaching the three patched files. I don't have the originals here to run a diff on them. :oops:

Hopefully that will make it possible to make a patch.

Statik

hnl_dk
Moderator
Posts: 408
Joined: Mon Aug 29, 2011 12:37 pm

Re: Build Help?

Post by hnl_dk »

Statik wrote:
gargoyle_1.5.x_modified_files.zip
I'm attaching the three patched files. I don't have the originals here to run a diff on them. :oops:

Hopefully that will make it possible to make a patch.

Statik
You can make a git diff, that make a patch file compared to what is in the git repository.
Router: TL-WR1043ND - Gargoyle 1.5.4
AP: TL-WR1043ND - Gargoyle 1.5.4

Statik
Posts: 118
Joined: Mon Sep 28, 2009 9:38 am

Re: Build Help?

Post by Statik »

I'm not sure why but git diff does not return anything when run in the working directory. I'm really out of my element here.

Statik

hnl_dk
Moderator
Posts: 408
Joined: Mon Aug 29, 2011 12:37 pm

Re: Build Help?

Post by hnl_dk »

Statik wrote:I'm not sure why but git diff does not return anything when run in the working directory. I'm really out of my element here.

Statik
An example...
I stand in the main Gargoyle directory and have made some changes to ./full-build.sh. I want to make a patch file that is going to be placed created as ~/gargoyle/built.diff
To do that, will I run this:

Code: Select all

git diff ./full-build.sh >~/gargoyle/built.diff
If you want to make a patch file, called ~/gargoyle/patch.diff, from the whole directory, simply run the following, from the main Gargoyle directory:

Code: Select all

git diff ./ >~/gargoyle/patch.diff
Router: TL-WR1043ND - Gargoyle 1.5.4
AP: TL-WR1043ND - Gargoyle 1.5.4

Statik
Posts: 118
Joined: Mon Sep 28, 2009 9:38 am

Re: Build Help?

Post by Statik »

Tried git diff ./ >~/gargoyle/patch.diff and got an empty file. Weird.

hnl_dk
Moderator
Posts: 408
Joined: Mon Aug 29, 2011 12:37 pm

Re: Build Help?

Post by hnl_dk »

Statik wrote:Tried git diff ./ >~/gargoyle/patch.diff and got an empty file. Weird.
How did you "get" the Gargoyle sources?
Was it through git or svn?
Router: TL-WR1043ND - Gargoyle 1.5.4
AP: TL-WR1043ND - Gargoyle 1.5.4

Statik
Posts: 118
Joined: Mon Sep 28, 2009 9:38 am

Re: Build Help?

Post by Statik »

It was through git.
I'm thinking that the files I modified came from backfire. I'm going to look into svn for the original backfire files and compare them. If the same files are there, I'll diff the two directories.

hnl_dk
Moderator
Posts: 408
Joined: Mon Aug 29, 2011 12:37 pm

Re: Build Help?

Post by hnl_dk »

Statik wrote:It was through git.
I'm thinking that the files I modified came from backfire. I'm going to look into svn for the original backfire files and compare them. If the same files are there, I'll diff the two directories.
ah, yes ,you are right. I did not think of the fact that you made the change in OpenWRT.
Go the the main OpenWRT directory in Downloaded and run the following

Code: Select all

svn diff -r 30338 --old svn://svn.openwrt.org/openwrt/branches/backfire/ ./ >~/openwrt_patch.diff
Then you should get a patch file with all your changes in OpenWRT. replace 30338 with the revision number that you are using - look in line 20 of full-build.sh
Router: TL-WR1043ND - Gargoyle 1.5.4
AP: TL-WR1043ND - Gargoyle 1.5.4

Statik
Posts: 118
Joined: Mon Sep 28, 2009 9:38 am

Re: Build Help?

Post by Statik »

I was using 30338, as in the command, but the command seems to have missed that and used as the patchfile starts with:

Code: Select all

Index: target/linux/generic-2.4/patches/630-netfilter_comment.patch
===================================================================
--- target/linux/generic-2.4/patches/630-netfilter_comment.patch	(revision 30338)
+++ target/linux/generic-2.4/patches/630-netfilter_comment.patch	(revision 30655)
The file does not contain the changes I made so I'm assuming that they are patched in 30655 in the same way I have changed them. So, to verify, I svn checked out backfire, and the version I got is not changed.

I'm not having much luck producing the patch files. I can tell you where the files are in the tree and I already uploaded the modified files. Perhaps that can help you?

Statik

Post Reply