Yes, I'm begging for a test build

Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2, 3  Next
Author Message
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Thu Dec 15, 2011 15:54    Post subject: Yes, I'm begging for a test build Reply with quote
Hi folks,

For the past year or so I tried to create a build environment without success to compile my own builds in order to test patches to support a flashchip I replaced in 2010 to debrick a router I bought bricked.

Eko was kind enough to try my patches a few times, but I don't want to waste his time as I'm not a programmer and my patches couldn't work.

I've also ask Kong one time and he was also kind enough to compile a build for me.

As I wasn't having success I decided to create a ticket for the patches and again, Eko backported it with 90% of success, as now the flashchip is detected but it still complains about cmdset.

When I saw that I was excited to compile my own builds, but again, no luck.

I then got back to a topic I've created in mtd mailing list, responsible to support flashchips in kernel, and they suggested me to backport a few more lines in the file I'm attaching here.

To be objective: All I want is test build K26 mini non-nv60k of at least 17995 with the file attached to put an end on this.

I tried to send it to Fractal via PM, also for Eko, but I don't know, PM system seems buggy, messages doesn't go.

So now I'm trying with this topic.

I'm sorry if it seems too much, I'm just ancious to see what's going to happen this time.


Last edited by fggs on Tue Dec 20, 2011 1:49; edited 1 time in total
Sponsor
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Thu Dec 15, 2011 17:51    Post subject: Re: Yes, I'm begging for a test build Reply with quote
I will compile that now for you and link the bin..
or a link for download.

1 mini K26 non nv60 bin coming up with your mod


-Fractal
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Thu Dec 15, 2011 18:10    Post subject: Reply with quote
ok, with your file put in place over the original, the kernel fails to compile, I can restore old file, and it works... so I am thinking we need to dissect your change.

The failing code is:

Code:
net/ipv4/netfilter/ipt_TRIGGER.c: In function 'trigger_check':
net/ipv4/netfilter/ipt_TRIGGER.c:303: warning: unused variable 'e'
  CC      net/ipv4/netfilter/ipt_REDIRECT.o
  CC      net/ipv4/netfilter/ipt_NETMAP.o
  CC      net/ipv4/netfilter/ipt_SAME.o
  CC      net/ipv4/netfilter/ipt_LOG.o
  CC      net/ipv4/netfilter/ipt_ULOG.o
  CC      net/ipv4/netfilter/ipt_CLUSTERIP.o
  CC      net/ipv4/netfilter/ipt_TTL.o
  CC      net/ipv4/netfilter/ipt_ROUTE.o
  LD      net/ipv4/netfilter/nf_conntrack_ipv4.o
  LD      net/ipv4/netfilter/nf_nat.o
  LD      net/ipv4/netfilter/built-in.o
  LD      net/ipv4/built-in.o
  LD      net/built-in.o
make: *** [kernel] Error 2


-Fractal
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Thu Dec 15, 2011 18:15    Post subject: Reply with quote
when I diff the file, here is the changeset:

Code:
345a346,371
> static void cfi_fixup_major_minor(struct cfi_private *cfi,
>               struct cfi_pri_amdstd *extp)
> {
>    if (cfi->mfr == CFI_MFR_SAMSUNG) {
>       if ((extp->MajorVersion == '0' && extp->MinorVersion == '0') ||
>           (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
>          /*
>           * Samsung K8P2815UQB and K8D6x16UxM chips
>           * report major=0 / minor=0.
>           * K8D3x16UxC chips report major=3 / minor=3.
>           */
>          printk(KERN_NOTICE "  Fixing Samsung's Amd/Fujitsu"
>                 " Extended Query version to 1.%c\n",
>                 extp->MinorVersion);
>          extp->MajorVersion = '1';
>       }
>    }
>
>    /*
>     * SST 38VF640x chips report major=0xFF / minor=0xFF.
>     */
>    if (cfi->mfr == CFI_MFR_SST && (cfi->id >> 4) == 0x0536) {
>       extp->MajorVersion = '1';
>       extp->MinorVersion = '0';
>    }
> }
374,378d399
<       /*
<        * It's a real CFI chip, not one for which the probe
<        * routine faked a CFI structure. So we read the feature
<        * table from it.
<        */
383,386c404,409
<       if (!extp) {
<          kfree(mtd);
<          return NULL;
<       }
---
>       if (extp) {
>          /*
>           * It's a real CFI chip, not one for which the probe
>           * routine faked a CFI structure.
>           */
>          cfi_fixup_major_minor(cfi, extp);
389,412c412,420
<         (extp->MinorVersion < '0' || extp->MinorVersion > '4')) {
<             if (cfi->mfr == CFI_MFR_SAMSUNG &&
<               (extp->MajorVersion == '3' && extp->MinorVersion == '3')) {
<                printk(KERN_NOTICE "  Newer Samsung flash detected, "
<                       "should be compatibile with Amd/Fujitsu.\n");
<             }
<             else if (cfi->mfr == CFI_MFR_SAMSUNG && extp->MajorVersion == '0') {
<                printk(KERN_NOTICE "  Newer Samsung flash detected, "
<                       "should be compatibile with Amd/Fujitsu.\n");
<                switch (cfi->id) {
<                   case 0x257e:
<                   case 0x22e2:
<                   extp->MajorVersion = '1';
<                   break;
<                }
<             }
<             else {
<                printk(KERN_ERR "  Unknown Amd/Fujitsu Extended Query "
<                    "version %c.%c.\n",  extp->MajorVersion,
<                    extp->MinorVersion);
<                kfree(extp);
<                kfree(mtd);
<                return NULL;
<             }
---
>              (extp->MajorVersion == '1' && (extp->MinorVersion < '0' || extp->MinorVersion > '4'))) {
>             printk(KERN_ERR "  Unknown Amd/Fujitsu Extended Query "
>                    "version %c.%c (%#02x/%#02x).\n",
>                    extp->MajorVersion, extp->MinorVersion,
>                    extp->MajorVersion, extp->MinorVersion);
>             kfree(extp);
>             kfree(mtd);
>             return NULL;
>          }
415,416c423,424
<       /* Install our own private info structure */
<       cfi->cmdset_priv = extp;
---
>          /* Install our own private info structure */
>          cfi->cmdset_priv = extp;
418,419c426,427
<       /* Apply cfi device specific fixups */
<       cfi_fixup(mtd, cfi_fixup_table);
---
>          /* Apply cfi device specific fixups */
>          cfi_fixup(mtd, cfi_fixup_table);
422,423c430,431
<       /* Tell the user about it in lots of lovely detail */
<       cfi_tell_features(extp);
---
>          /* Tell the user about it in lots of lovely detail */
>          cfi_tell_features(extp);
426,442c434,438
<       bootloc = extp->TopBottom;
<       if ((bootloc != 2) && (bootloc != 3)) {
<          printk(KERN_WARNING "%s: CFI does not contain boot "
<                 "bank location. Assuming top.\n", map->name);
<          bootloc = 2;
<       }
<
<       if (bootloc == 3 && cfi->cfiq->NumEraseRegions > 1) {
<          printk(KERN_WARNING "%s: Swapping erase regions for broken CFI table.\n", map->name);
<
<          for (i=0; i<cfi->cfiq->NumEraseRegions / 2; i++) {
<             int j = (cfi->cfiq->NumEraseRegions-1)-i;
<             __u32 swap;
<
<             swap = cfi->cfiq->EraseRegionInfo[i];
<             cfi->cfiq->EraseRegionInfo[i] = cfi->cfiq->EraseRegionInfo[j];
<             cfi->cfiq->EraseRegionInfo[j] = swap;
---
>          bootloc = extp->TopBottom;
>          if ((bootloc != 2) && (bootloc != 3)) {
>             printk(KERN_WARNING "%s: CFI does not contain boot "
>             "bank location. Assuming top.\n", map->name);
>             bootloc = 2;
443a440,455
>
>          if (bootloc == 3 && cfi->cfiq->NumEraseRegions > 1) {
>             printk(KERN_WARNING "%s: Swapping erase regions for broken CFI table.\n", map->name);
>
>             for (i=0; i<cfi->cfiq->NumEraseRegions / 2; i++) {
>                int j = (cfi->cfiq->NumEraseRegions-1)-i;
>                __u32 swap;
>
>                swap = cfi->cfiq->EraseRegionInfo[i];
>                cfi->cfiq->EraseRegionInfo[i] = cfi->cfiq->EraseRegionInfo[j];
>                cfi->cfiq->EraseRegionInfo[j] = swap;
>             }
>          }
>          /* Set the default CFI lock/unlock addresses */
>          cfi->addr_unlock1 = 0x555;
>          cfi->addr_unlock2 = 0x2aa;
445,457c457,461
<       /* Set the default CFI lock/unlock addresses */
<       cfi->addr_unlock1 = 0x555;
<       cfi->addr_unlock2 = 0x2aa;
<       /* Modify the unlock address if we are in compatibility mode */
<       if (   /* x16 in x8 mode */
<          ((cfi->device_type == CFI_DEVICETYPE_X8) &&
<             (cfi->cfiq->InterfaceDesc == 2)) ||
<          /* x32 in x16 mode */
<          ((cfi->device_type == CFI_DEVICETYPE_X16) &&
<             (cfi->cfiq->InterfaceDesc == 4)))
<       {
<          cfi->addr_unlock1 = 0xaaa;
<          cfi->addr_unlock2 = 0x555;
---
>       cfi_fixup(mtd, cfi_nopri_fixup_table);
>
>       if (!cfi->addr_unlock1 || !cfi->addr_unlock2) {
>          kfree(mtd);
>          return NULL;


so lets dig in on the disect...

-Fractal
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Thu Dec 15, 2011 18:42    Post subject: Reply with quote
Strangely enough it fails in iptables modules, which has nothing to do with my file..
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Thu Dec 15, 2011 23:44    Post subject: Reply with quote
Fractal, are you sure that's the only error you got? Because ipt_TRIGGER.c has not been touched in 2 years so I guess this warning is nothing.
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Fri Dec 16, 2011 1:00    Post subject: Reply with quote
yeah I tested this against to separate build environments... one was a box with linero 4.5.2 and the other was gcc 4.1.2 and both die with same error... going to do a strace to see what causes it specifically to die.

-Fractal
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Fri Dec 16, 2011 1:22    Post subject: Reply with quote
Thanks Fractal, I really appreciate your efforts. Let me know if I can do anything to help!
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Fri Dec 16, 2011 3:43    Post subject: Reply with quote
Think I found the problem, did some digging and found this:

http://forums.gentoo.org/viewtopic-t-386320-start-0.html

This is a known problem with 2.6 kernels on alpha when you enable too many drivers / features

so we could try taking something out, and seeing if it compiles... I assume this is the same for mips arch as well

-Fractal
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Fri Dec 16, 2011 4:25    Post subject: Reply with quote
Thanks Fractal, can you post full compile log? Then I can ask for help in mtd mailing list too.
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Fri Dec 16, 2011 22:29    Post subject: Reply with quote
Fractal, can you pass me your build scripts and a quick step by step on how to build? I have a Debian Squeeze x64 VM but it's giving me the most strange errors I've ever seen.

I was using kc6108 scripts, if you wanna see the errors, I've posted in "Compiling dd-wrt" thread.

Thank you!
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Sun Dec 18, 2011 4:55    Post subject: Reply with quote
Fractal, I hope I'm not asking too much, but can you build with &> logfile?

Then you can attach logfile here for me to take a look why it's not building with my patch.

In my case I use kc6108's scripts so I type:

Code:
sh 04_compile_bin.sh &> logfile


Thanks in advance.
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Mon Dec 19, 2011 18:14    Post subject: Reply with quote
fggs wrote:
Fractal, I hope I'm not asking too much, but can you build with &> logfile?

Then you can attach logfile here for me to take a look why it's not building with my patch.

In my case I use kc6108's scripts so I type:

Code:
sh 04_compile_bin.sh &> logfile


Thanks in advance.


Attached is your log file you requested.

-Fractal


Last edited by Fractal on Tue Dec 20, 2011 1:51; edited 1 time in total
fggs
DD-WRT Guru


Joined: 28 Jan 2008
Posts: 1741

PostPosted: Mon Dec 19, 2011 19:44    Post subject: Reply with quote
Hi Fractal,

Thanks for your log, I think I found the problem. There was an extra bracket, I removed it and now it should compile fine.

Can you please try this new one?

If it doesn't compile, please generate a new log file.


Last edited by fggs on Tue Dec 20, 2011 1:50; edited 1 time in total
Fractal
DD-WRT Guru


Joined: 19 Apr 2010
Posts: 1243

PostPosted: Mon Dec 19, 2011 21:15    Post subject: Reply with quote
this was also a no go, if you do look just a little up it is complaining about incompatible pointer type.

enclosed is the compile log

-Fractal


Last edited by Fractal on Tue Dec 20, 2011 1:40; edited 1 time in total
Goto page 1, 2, 3  Next Display posts from previous:    Page 1 of 3
Post new topic   Reply to topic    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum