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

21644Re: [nslu2-linux] slugimage issue or operator error?

Expand Messages
  • Rod Whitby
    May 6, 2008
    • 0 Attachment
      Rob Lockhart wrote:
      > [apologies for long debugging output]
      >
      > On Mon, May 5, 2008 at 5:15 AM, Rod Whitby <rod@...> wrote:
      >> Rob Lockhart wrote:
      >> > Hello, group. I just finished going through and updating the Wiki
      >> > instructions for CentOS, and everything seems to build fine. Except I
      >> > need to replace the MAC address, obviously (using slugimage). The
      >> > build image is "slugosbe-4.10-alpha-nslu2-16mb.bin". Note I replaced
      >> > the last octet of my MAC address with "XX".
      >> >
      >> > First I disassemble the image:
      >> >
      >> Try just:
      >>
      >> slugimage -F -p -o test.bin -L apex.bin -k vmlinuz -r Flashdisk
      >>
      >> If that works, then start adding options until you find the one that
      >> breaks it.
      >
      > Hmm, looks like this won't go very far:
      >
      > [slug@Linux ~/tmp]$ slugimage -F -p -o test.bin -L apex.bin -k vmlinuz
      > -r Flashdisk
      > Read 0x00040000 bytes from "RedBoot" into <RedBoot> (2 blocks / 2 blocks)
      > Read 0x00020000 bytes from "SysConf" into <SysConf> (1 blocks / 1 blocks)
      > Read 0x0000BE28 bytes from "apex.bin" into <Loader> (1 blocks / 1 blocks)
      > Read 0x00101A74 bytes from "vmlinuz" into <Kernel> (9 blocks / 9 blocks)
      > Read 0x00E40000 bytes from "Flashdisk" into <Ramdisk> (115 blocks / 115 blocks)
      > Read 0x00002EBC bytes from "NPE-B" into <Microcode> (0x02ECC bytes /
      > 0x03FE0 bytes)
      > Read 0x00000010 bytes from "Trailer" into <Trailer> (0x00010 bytes /
      > 0x00010 bytes)
      > Ran out of flash space in <Ramdisk> - 0x00010 bytes too large.

      I finally realised the problem - you're asking slugimage to put a jffs2
      Flashdisk partition into the predefined Ramdisk partition. That won't
      work, because a Ramdisk needs the length header, whereas a Flashdisk
      doesn't.

      I've added code to slugimage to catch this specific situation and give a
      better error message:

      $ ./slugimage -F -p -o slugosbe-4.10-alpha-nslu2-16mb.bin -L apex.bin -r
      Flashdisk
      Read 0x00040000 bytes from "RedBoot" into <RedBoot> (2 blocks / 2 blocks)
      Read 0x00020000 bytes from "SysConf" into <SysConf> (1 blocks / 1 blocks)
      Read 0x0000BE28 bytes from "apex.bin" into <Loader> (1 blocks / 1 blocks)
      Read 0x00101A88 bytes from "vmlinuz" into <Kernel> (9 blocks / 9 blocks)
      Read 0x00E40000 bytes from "Flashdisk" into <Ramdisk> (115 blocks / 115
      blocks)
      Read 0x00002EBC bytes from "NPE-B" into <Microcode> (0x02ECC bytes /
      0x03FE0 bytes)
      Read 0x00000010 bytes from "Trailer" into <Trailer> (0x00010 bytes /
      0x00010 bytes)
      Ran out of flash space in <Ramdisk> - 0x00010 bytes too large.
      Perhaps you meant to use the -r Flashdisk:<filename> syntax instead?

      What you need to do is:

      $ slugimage -F -p -o test.bin -L apex.bin -k vmlinuz -r Flashdisk:Flashdisk

      This tells slugimage that you're giving it a Flashdisk partition, with
      the contents in the Flashdisk filename. Slugimage then removes the
      requirement for a partition header (since you're not giving it a
      Ramdisk, and it's already added a skip region in the previous partition
      for the special 16 bytes at 0x160000), and this means the sizes now match:

      $ ./slugimage -F -p -o slugosbe-4.10-alpha-nslu2-16mb.bin -L apex.bin -r
      Flashdisk:Flashdisk
      Read 0x00040000 bytes from "RedBoot" into <RedBoot> (2 blocks / 2 blocks)
      Read 0x00020000 bytes from "SysConf" into <SysConf> (1 blocks / 1 blocks)
      Read 0x0000BE28 bytes from "apex.bin" into <Loader> (1 blocks / 1 blocks)
      Read 0x00101A88 bytes from "vmlinuz" into <Kernel> (9 blocks / 9 blocks)
      Read 0x00E40000 bytes from "Flashdisk" into <Flashdisk> (114 blocks /
      114 blocks)
      Read 0x00002EBC bytes from "NPE-B" into <Microcode> (0x02ECC bytes /
      0x03FE0 bytes)
      Read 0x00000010 bytes from "Trailer" into <Trailer> (0x00010 bytes /
      0x00010 bytes)
      Wrote 2 blocks (0x00000000 to 0x00040000) from <RedBoot> into
      "slugosbe-4.10-alpha-nslu2-16mb.bin"
      Wrote 1 blocks (0x00040000 to 0x00060000) from <SysConf> into
      "slugosbe-4.10-alpha-nslu2-16mb.bin"
      Wrote 1 blocks (0x00060000 to 0x00080000) from <Loader> into
      "slugosbe-4.10-alpha-nslu2-16mb.bin"
      Wrote 9 blocks (0x00080000 to 0x001A0000) from <Kernel> into
      "slugosbe-4.10-alpha-nslu2-16mb.bin"
      Wrote 114 blocks (0x001A0000 to 0x00FE0000) from <Flashdisk> into
      "slugosbe-4.10-alpha-nslu2-16mb.bin"
      Wrote 1 blocks (0x00FE0000 to 0x01000000) from <FIS directory> into
      "slugosbe-4.10-alpha-nslu2-16mb.bin"
      Wrote 0x03FE0 bytes (0x00FFC000 to 0x00FFFFE0) from <Microcode> into
      "slugosbe-4.10-alpha-nslu2-16mb.bin"
      Wrote 0x00010 bytes (0x00FFFFF0 to 0x01000000) from <Trailer> into
      "slugosbe-4.10-alpha-nslu2-16mb.bin"

      -- Rod
    • Show all 10 messages in this topic