Loading ...
Sorry, an error occurred while loading the content.
 

Re: [nslu2-linux] Debian - ObeseSlug - eth0 MAC address not found correctly

Expand Messages
  • Rob Lockhart
    Hi Rod, I used the wiki Obese instructions wiki/HowTo/ObeseSlug and I modified that to make my own RedBoot (from my RedBoot) - is this different than your
    Message 1 of 5 , Apr 30, 2008
      Hi Rod,
      I used the wiki Obese instructions wiki/HowTo/ObeseSlug and I modified that to make my own RedBoot (from my RedBoot) - is this different than your RedBoot?  Indeed, it sees the whole 16MB flash, but perhaps the SerComm trailer is in the wrong location (expected to be at the 16MB boundary) which may be the source of the problem.  I have been able to confirm that the ethernet address is indeed correct if I look at the right location (per wiki/Info/BootFlash 0x5003FFB0-0x5003FFB5.  I'm not sure if this is what you're asking as it seems that either RedBoot sees the wrong MAC location, or the Debian kernel (4.0r3) sees the wrong MAC address as it initializes the kernel.  If the former, then clearly RedBoot is the culprit.  If the latter, sounds like I might need a manually-compiled kernel built for 16MB flash, or perhaps do I need to move the config location from the 8MB space in wiki/Info/BootFlash ?  I will have to confirm the MAC address that RedBoot sees.  If RedBoot MAC is fine, then it's an issue with the stock Debian kernel.  If that's the case, I should re-direct to the Debian group.

        -Rob

      P.S. Three more USB ports will be added from a friend's salvaged/fried PC motherboard, so I should have no shortage of ports for testing.  Once I'm successful, wiki update of course.
      P.P.S.S. Nevermind about dhclient.  Apparently, the ifup/ifdown scrips aren't smart enough to stop dhclient if you modify the network to static, then ifdown (it doesn't know that it needs to stop dhclient).  I'll have to figure how to integrate that into the debian wiki's.  If going from DHCP to static, order must be: keep /etc/network/interfaces using DHCP, run ifdown, modify /etc/network/interfaces file, then run ifup.  This is quite tricky without a serial console.  It can be done (using sed), but you can't screw up the parameters (if you do, reboot and try again).


      On Mon, Apr 28, 2008 at 5:58 PM, Rod Whitby <rod@...> wrote:
      Rob,
      I have an updated RedBoot you can use which will see the full 16MB flash.
      Can you get into RedBoot and dump the memory contents where the kernel is looking for the ethernet address?
      -- Rod

      -----Original Message-----
      From: "Rob Lockhart" <rlockhar@...>
      Date: Thursday, Apr 24, 2008 8:17 am
      Subject: [nslu2-linux] Debian - ObeseSlug - eth0 MAC address not found correctly
      To: nslu2-linux@yahoogroups.comReply-To: nslu2-linux@yahoogroups.com

      >On my NSLU2, I dumped the entire 8MB flash contents (as described in HowTo/CompletelyBackupTheNSLU2 wiki), then replaced the 8MB flash with 16MB.  Then using JTAG, I restored RedBoot via JTAG, then TFTP'ed the rest into RAM and restored the flash 8MB space via RedBoot (per HowTo/RecoverFromABadFlashUsingJTAG wiki).  Everything seems to work.   Note that I haven't yet installed new Apex or Debian image for recognition of larger flash (but plan to, or perhaps use SlugOS/BE).
      >
      >But, there seems to be some issue with the Debian etch (4.0r-latest) distribution with 16MB flash (or perhaps just the kernel).  Specifically, the kernel is getting the wrong ethernet MAC address.  If I 'hexedit /dev/mtd0' and look at the address range 0x3ffb0 (per Info/BootFlash wiki)
      > it appears that my MAC address is there, but the kernel is seeing some other 'crap' that's confusing its determination of the MAC address.  'dmesg' confirms this.  Here's the 'ifconfig -a' output.  Note that this is NOT my MAC address but this is the MAC address given to the driver.
      >
      >NSLU2:/etc# ifconfig -a
      >eth0      Link encap:Ethernet  HWaddr 4A:05:BE:6A:85:01
      >          inet addr:192.168.10.100  Bcast:192.168.10.255  Mask:255.255.255.0
      >          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
      >          RX packets:9610029 errors:0 dropped:0 overruns:0 frame:0
      >          TX packets:5111872 errors:0 dropped:0 overruns:0 carrier:0
      >          collisions:0 txqueuelen:100
      >          RX bytes:371745549 (354.5 MiB)  TX bytes:388378618 (370.3 MiB)
      >
      >Also note that I'm not sure why dhclient is still running if I modified /etc/network/interfaces (as follows), /etc/network/ifdown then /etc/network/ifup ??  It works (stays the fixed address) until dhclient runs again (for some reason?).
      >
      >-------------------
      >NSLU2:/etc/network# more interfaces
      ># This file describes the network interfaces available on your system
      ># and how to activate them. For more information, see interfaces(5).
      >
      ># The loopback network interface
      > auto lo
      >iface lo inet loopback
      >
      ># The primary network interface
      >allow-hotplug eth0
      >iface eth0 inet static
      >        address 192.168.10.227
      >        netmask 255.255.255.0
      >        gateway 192.168.10.254
      >--------------------------
      >
      >Here's a (somewhat) unabridged output from dmesg (I took out the non-relevant sections) and the console output commands:
      >http://pastebin.ca/995165
      >

    • Rob Lockhart
      Rod, It appears that RedBoot (modified per ObeseSlug wiki) does find the MAC address(es) correctly (last octet manually replaced, and only pertinent details
      Message 2 of 5 , May 2 8:42 AM
        Rod,
        It appears that RedBoot (modified per ObeseSlug wiki) does find the MAC address(es) correctly (last octet manually replaced, and only pertinent details pasted):
         
        RedBoot(tm) bootstrap and debug environment [ROMRAM]
        Red Hat certified release, version 1.92 - built 15:16:07, Feb  3 2004
        Platform: IXDP425 Development Platform (XScale)
        RAM: 0x00000000-0x02000000, 0x000723a0-0x01ff3000 available
        FLASH: 0x50000000 - 0x51000000, 128 blocks of 0x00020000 bytes each.
        RedBoot> set_npe_mac
        NPE eth0 mac: 00:0f:66:7b:fe:XY
        NPE eth1 mac: 00:0f:66:7b:fe:XZ

        It appears that this is clearly an issue with the Debian linux kernel, and it appears I'll have to use a home-brew variant.  There are approx 30+ messages with mtd errors like this:
         
        . extends beyond the end of device "IXP4XX-Flash.0" -- size truncated to 0xJKL
        . partition "" doesn't start on an erase block boundary -- force read-only
        . partition "" extends beyond the end of device "IXP4XX-Flash.0" -- size truncated to 0xJKL
         
        Here are the pertinent details regarding the Debian build (etch) kernel (from APEX to Debian kernel load):
         
        ATAG_HEADER
        ATAG_MEM: start 0x00000000  size 0x04000000
        ATAG_CMDLINE: (55 bytes) 'console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug'
        ATAG_INITRD2: start 0x01000000  size 0x00400000
        ATAG_END
        Booting kernel at 0x00008000...
        Uncompressing Linux............................................................................... done, booting the kernel.
        Linux version 2.6.18-6-ixp4xx (Debian 2.6.18.dfsg.1-18etch1) (waldi@...)
        (gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 Tue Feb 12 00:57:
        53 UTC 2008
        CPU: XScale-IXP42x Family [690541f1] revision 1 (ARMv5TE), cr=0000397f
        Machine: Linksys NSLU2
          -Rob

         
        On Mon, Apr 28, 2008 at 5:58 PM, Rod Whitby <rod@...> wrote:
        Rob,
        I have an updated RedBoot you can use which will see the full 16MB flash.
        Can you get into RedBoot and dump the memory contents where the kernel is looking for the ethernet address?
        -- Rod

        -----Original Message-----
        From: "Rob Lockhart" <rlockhar@...>
        Date: Thursday, Apr 24, 2008 8:17 am
        Subject: [nslu2-linux] Debian - ObeseSlug - eth0 MAC address not found correctly
        To: nslu2-linux@yahoogroups.comReply-To: nslu2-linux@yahoogroups.com

           On my NSLU2, I dumped the entire 8MB flash contents (as described in HowTo/CompletelyBackupTheNSLU2 wiki), then replaced the 8MB flash with 16MB.  Then using JTAG, I restored RedBoot via JTAG, then TFTP'ed the rest into RAM and restored the flash 8MB space via RedBoot (per HowTo/RecoverFromABadFlashUsingJTAG wiki).  Everything seems to work.   Note that I haven't yet installed new Apex or Debian image for recognition of larger flash (but plan to, or perhaps use SlugOS/BE).
        >
        >But, there seems to be some issue with the Debian etch (4.0r-latest) distribution with 16MB flash (or perhaps just the kernel).  Specifically, the kernel is getting the wrong ethernet MAC address.  If I 'hexedit /dev/mtd0' and look at the address range 0x3ffb0 (per   Info/BootFlash wiki)
        > it appears that my MAC address is there, but the kernel is seeing some other 'crap' that's confusing its determination of the MAC address.  'dmesg' confirms this.  Here's the 'ifconfig -a' output.  Note that this is NOT my MAC address but this is the MAC address given to the driver.
        >
        >NSLU2:/etc# ifconfig -a
        >eth0      Link encap:Ethernet  HWaddr 4A:05:BE:6A:85:01
        >          inet addr:192.168.10.100  Bcast:192.168.10.255  Mask:255.255.255.0
        >          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
        >          RX packets:9610029 errors:0 dropped:0 overruns:0 frame:0
        >          TX packets:5111872 errors:0 dropped:0 overruns:0 carrier:0
        >          collisions:0 txqueuelen:100
        >          RX bytes:371745549 (354.5 MiB)  TX bytes:388378618 (370.3 MiB)
      • Rod Whitby
        What is the partition table reported by the kernel on boot? -- Rod ... From: Rob Lockhart Date: Saturday, May 3, 2008 1:12 am Subject:
        Message 3 of 5 , May 10 2:11 AM
          What is the partition table reported by the kernel on boot?
          -- Rod

          -----Original Message-----
          From: "Rob Lockhart" <rlockhar@...>
          Date: Saturday, May 3, 2008 1:12 am
          Subject: Re: [nslu2-linux] Debian - ObeseSlug - eth0 MAC address not found correctly
          To: nslu2-linux@yahoogroups.comReply-To: nslu2-linux@yahoogroups.com


          >Rod,
          >It appears that RedBoot (modified per ObeseSlug wiki) does find the MAC address(es) correctly (last octet manually replaced, and only pertinent details pasted):
          >
          >RedBoot(tm) bootstrap and debug environment [ROMRAM]
          >Red Hat certified release, version 1.92 - built 15:16:07, Feb 3 2004
          >Platform: IXDP425 Development Platform (XScale)
          >RAM: 0x00000000-0x02000000, 0x000723a0-0x01ff3000 available
          >FLASH: 0x50000000 - 0x51000000, 128 blocks of 0x00020000 bytes each.
          >
          >RedBoot> set_npe_mac
          >NPE eth0 mac: 00:0f:66:7b:fe:XY
          >NPE eth1 mac: 00:0f:66:7b:fe:XZ
          >
          >It appears that this is clearly an issue with the Debian linux kernel, and it appears I'll have to use a home-brew variant. There are approx 30+ messages with mtd errors like this:
          >
          >. extends beyond the end of device 'IXP4XX-Flash.0' -- size truncated to 0xJKL
          >. partition '' doesn't start on an erase block boundary -- force read-only
          >. partition '' extends beyond the end of device 'IXP4XX-Flash.0' -- size truncated to 0xJKL
          >
          >Here are the pertinent details regarding the Debian build (etch) kernel (from APEX to Debian kernel load):
          >
          >ATAG_HEADER
          >ATAG_MEM: start 0x00000000 size 0x04000000
          >ATAG_CMDLINE: (55 bytes) 'console=ttyS0,115200 rtc-x1205.probe=0,0x6f noirqdebug'
          >ATAG_INITRD2: start 0x01000000 size 0x00400000
          >ATAG_END
          > Booting kernel at 0x00008000...
          >Uncompressing Linux............................................................................... done, booting the kernel.
          >Linux version 2.6.18-6-ixp4xx (Debian 2.6.18.dfsg.1-18etch1) (waldi@...)
          >(gcc version 4.1.2 20061115 (prerelease) (Debian 4.1.1-21)) #1 Tue Feb 12 00:57:
          >53 UTC 2008
          >CPU: XScale-IXP42x Family [690541f1] revision 1 (ARMv5TE), cr=0000397f
          >Machine: Linksys NSLU2
          >
          > -Rob
          >
          > On Mon, Apr 28, 2008 at 5:58 PM, Rod Whitby <rod@...> wrote:
          >Rob,
          >I have an updated RedBoot you can use which will see the full 16MB flash.
          >Can you get into RedBoot and dump the memory contents where the kernel is looking for the ethernet address?
          >-- Rod
          >
          >
          >
          >-----Original Message-----
          >From: 'Rob Lockhart' <rlockhar@...>
          >Date: Thursday, Apr 24, 2008 8:17 am
          >Subject: [nslu2-linux] Debian - ObeseSlug - eth0 MAC address not found correctly
          > To: nslu2-linux@yahoogroups.comReply-To: nslu2-linux@yahoogroups.com
          >
          > On my NSLU2, I dumped the entire 8MB flash contents (as described in HowTo/CompletelyBackupTheNSLU2 wiki), then replaced the 8MB flash with 16MB. Then using JTAG, I restored RedBoot via JTAG, then TFTP'ed the rest into RAM and restored the flash 8MB space via RedBoot (per HowTo/RecoverFromABadFlashUsingJTAG wiki). Everything seems to work. Note that I haven't yet installed new Apex or Debian image for recognition of larger flash (but plan to, or perhaps use SlugOS/BE).
          >>
          >>But, there seems to be some issue with the Debian etch (4.0r-latest) distribution with 16MB flash (or perhaps just the kernel). Specifically, the kernel is getting the wrong ethernet MAC address. If I 'hexedit /dev/mtd0' and look at the address range 0x3ffb0 (per Info/BootFlash wiki)
          >> it appears that my MAC address is there, but the kernel is seeing some other 'crap' that's confusing its determination of the MAC address. 'dmesg' confirms this. Here's the 'ifconfig -a' output. Note that this is NOT my MAC address but this is the MAC address given to the driver.
          >>
          >>NSLU2:/etc# ifconfig -a
          >>eth0 Link encap:Ethernet HWaddr 4A:05:BE:6A:85:01
          >> inet addr:192.168.10.100 Bcast:192.168.10.255 Mask:255.255.255.0
          >> UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
          >> RX packets:9610029 errors:0 dropped:0 overruns:0 frame:0
          >> TX packets:5111872 errors:0 dropped:0 overruns:0 carrier:0
          >> collisions:0 txqueuelen:100
          >> RX bytes:371745549 (354.5 MiB) TX bytes:388378618 (370.3 MiB)
          >
        Your message has been successfully submitted and would be delivered to recipients shortly.