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

openslug, apex, kernel command line, fat slug how?

Expand Messages
  • mingchu
    Hi Group, I just upgraded my SLUG to 128MB (4chips X 256Mbits), and looks like its still alive. And now I need help for the software part of it. 1. I have
    Message 1 of 7 , Apr 2, 2006
    • 0 Attachment
      Hi Group,

      I just upgraded my SLUG to 128MB (4chips X 256Mbits), and looks like
      its still alive. And now I need help for the software part of it.

      1. I have searched through this group and see that changing the kernel
      command line to "mem=64M@000..." should allow me to see at least 64M
      for the slug. I'm running Openslug 2.7 beta, BTW. Forgive me if this
      is a dumb question, where is the "kernel command line"? In a file
      under /boot? Like grub.conf in FC linux? or in the Redboot command
      line? In kernel config file? name of the file, please.

      2. From discussion in this group, it seems that I don't need to
      recompile the kernel (using Openslug) to see the full 128MB, but I
      need APEX, right?

      3. I changed the ".config" file for APEX as:
      CONFIG_SDRAM_BANK0=y
      CONFIG_SDRAM_BANK1=y
      CONFIG_SDRAM_BANK_LENGTH=0x04000000
      and compiled APEX, but now how do I flash it in? or test it? Do I have
      to use JTAG or serial console for this? Any other way around it?

      I tried http://www.nslu2-linux.org/wiki/HowTo/RunApex eFfeM's method
      and load in apex.bin using tftp, but when I'm in the last step and
      typed "g 0x01000000", all the lights on my slug stays on, the status
      light is orange, other ones are green. And the Redboot command prompt
      just freezes. Is my apex.bin not good? It's size is 50256 bytes,
      md5sum is ffcd9c25eea2ee209a26c7efe0bbcb87. Can someone send me a
      known working one for my configuration please?

      Thank you.

      -Ming
    • Florian Voelzke
      Hi Ming, as I have a 128MB slug (2x 512 Mbit) running here, some answers below: ... As I see it, the bootloader sets the kernel command line. On a PC, this
      Message 2 of 7 , Apr 2, 2006
      • 0 Attachment
        Hi Ming,

        as I have a 128MB slug (2x 512 Mbit) running here, some answers below:

        mingchu wrote:
        > Hi Group,
        >
        > I just upgraded my SLUG to 128MB (4chips X 256Mbits), and looks like
        > its still alive. And now I need help for the software part of it.
        >
        > 1. I have searched through this group and see that changing the kernel
        > command line to "mem=64M@000..." should allow me to see at least 64M
        > for the slug. I'm running Openslug 2.7 beta, BTW. Forgive me if this
        > is a dumb question, where is the "kernel command line"? In a file
        > under /boot? Like grub.conf in FC linux? or in the Redboot command
        > line? In kernel config file? name of the file, please.
        >
        As I see it, the bootloader sets the kernel command line. On a PC, this
        would be LILO or GRUB, on a NSLU2 it is Redboot or Apex. To change the
        kernel command line that the bootloader passes to the kernel, you most
        likely have to recompile the bootloader. I did not try if I can patch
        RedBoot in any way to avoid recompiling (there are no sources to
        RedBoot, right?). Another way might be to recompile the kernel that it
        does not use the parameter from the kernel comand line but a fixed value.
        But my knowledge to the linux kernel is limited, I could be wrong...

        > 2. From discussion in this group, it seems that I don't need to
        > recompile the kernel (using Openslug) to see the full 128MB, but I
        > need APEX, right?
        Yep, that's what I read, too.

        >
        > 3. I changed the ".config" file for APEX as:
        > CONFIG_SDRAM_BANK0=y
        > CONFIG_SDRAM_BANK1=y
        > CONFIG_SDRAM_BANK_LENGTH=0x04000000
        > and compiled APEX, but now how do I flash it in? or test it? Do I have
        > to use JTAG or serial console for this? Any other way around it?
        >
        To use Apex at the moment, you definitely want a serial port: Apex has
        no ethernet support. Don't know if that is planned for the future.

        Jtag is a good thing if something goes wrong. You can only reflash a
        corrupted bootloader with Jtag. (But as long as the bootloader starts,
        you can always flash a new one. So when you have chosen, let's say, a
        wrong kernel command line and linux does not boot, you use the running
        apex to flash a new apex...)

        > I tried http://www.nslu2-linux.org/wiki/HowTo/RunApex eFfeM's method
        > and load in apex.bin using tftp, but when I'm in the last step and
        > typed "g 0x01000000", all the lights on my slug stays on, the status
        > light is orange, other ones are green. And the Redboot command prompt
        > just freezes. Is my apex.bin not good? It's size is 50256 bytes,
        > md5sum is ffcd9c25eea2ee209a26c7efe0bbcb87. Can someone send me a
        > known working one for my configuration please?
        >

        On my slug, booting Apex starts with rolling lights on the LEDs, some
        flashes, a beep. On the serial port, you see the boot messages. In
        standard config, apex then stops at the command line and waits for input.

        I build apex using the bitbake file of the development env for openslug.
        I had to edit it for the new apex version (just rename it accordingly)
        and edit the path to the compiler. Make a new config file with
        menuconfig from the apex sources, copy the config file to the
        destination bitbake expects it and then bitbake apex.

        Also remember that you have to run Apex from flash to be able to use the
        128MB. When I remember correctly, I was able to start apex through
        redboot. But I was never able to start linux from this ram-apex. There
        were always corrupted kernel panics etc. Only after I flashed apex,
        everything went smooth.

        Sorry if the description is quite short, I don't have access to my slug
        files right at the moment, this is written from my memories.

        Florian
      • mingchu
        Thank you Florian! ... I ve been gooling around and find this page: http://www.trejan.com/projects/nslu2/redboot_help.html. It said that in Redboot, it has an
        Message 3 of 7 , Apr 3, 2006
        • 0 Attachment
          Thank you Florian!

          My responds below:

          --- In nslu2-linux@yahoogroups.com, Florian Voelzke <FVoelzke@...> wrote:
          >
          > Hi Ming,
          >
          > as I have a 128MB slug (2x 512 Mbit) running here, some answers below:
          >
          > mingchu wrote:
          > > Hi Group,
          > >
          > > I just upgraded my SLUG to 128MB (4chips X 256Mbits), and looks like
          > > its still alive. And now I need help for the software part of it.
          > >
          > > 1. I have searched through this group and see that changing the kernel
          > > command line to "mem=64M@000..." should allow me to see at least 64M
          > > for the slug. I'm running Openslug 2.7 beta, BTW. Forgive me if this
          > > is a dumb question, where is the "kernel command line"? In a file
          > > under /boot? Like grub.conf in FC linux? or in the Redboot command
          > > line? In kernel config file? name of the file, please.
          > >
          > As I see it, the bootloader sets the kernel command line. On a PC, this
          > would be LILO or GRUB, on a NSLU2 it is Redboot or Apex. To change the

          I've been gooling around and find this page:
          http://www.trejan.com/projects/nslu2/redboot_help.html. It said that
          in Redboot, it has an option "exec -c <kernel command line>". So I
          guess I can specify the "mem=128M" there. Tried it, no luck, it asks
          me to specify the starting address and length and stuff which I got
          confused. Can someone confirm whether this is the place to change the
          "kernel command line" for Redboot? What should I put here besides
          "exec -c mem=128M@00000000"?


          > kernel command line that the bootloader passes to the kernel, you most
          > likely have to recompile the bootloader. I did not try if I can patch
          > RedBoot in any way to avoid recompiling (there are no sources to
          > RedBoot, right?). Another way might be to recompile the kernel that it
          > does not use the parameter from the kernel comand line but a fixed
          value.
          > But my knowledge to the linux kernel is limited, I could be wrong...
          >
          > > 2. From discussion in this group, it seems that I don't need to
          > > recompile the kernel (using Openslug) to see the full 128MB, but I
          > > need APEX, right?
          > Yep, that's what I read, too.
          >

          I'm fine with recompiling the kernel, but what do I need to change in
          the kernel config to see more memory? Someone please tell me the
          exact name of the config file.


          > >
          > > 3. I changed the ".config" file for APEX as:
          > > CONFIG_SDRAM_BANK0=y
          > > CONFIG_SDRAM_BANK1=y
          > > CONFIG_SDRAM_BANK_LENGTH=0x04000000
          > > and compiled APEX, but now how do I flash it in? or test it? Do I have
          > > to use JTAG or serial console for this? Any other way around it?
          > >
          > To use Apex at the moment, you definitely want a serial port: Apex has
          > no ethernet support. Don't know if that is planned for the future.
          >
          > Jtag is a good thing if something goes wrong. You can only reflash a
          > corrupted bootloader with Jtag. (But as long as the bootloader starts,
          > you can always flash a new one. So when you have chosen, let's say, a
          > wrong kernel command line and linux does not boot, you use the running
          > apex to flash a new apex...)

          So Florian, you have added a serial port to the slug to flash
          apex.bin? If that's the only way, then I guess I'll try to add a
          serial port to my slug. Thanks for the info.

          >
          > > I tried http://www.nslu2-linux.org/wiki/HowTo/RunApex eFfeM's method
          > > and load in apex.bin using tftp, but when I'm in the last step and
          > > typed "g 0x01000000", all the lights on my slug stays on, the status
          > > light is orange, other ones are green. And the Redboot command prompt
          > > just freezes. Is my apex.bin not good? It's size is 50256 bytes,
          > > md5sum is ffcd9c25eea2ee209a26c7efe0bbcb87. Can someone send me a
          > > known working one for my configuration please?
          > >
          >
          > On my slug, booting Apex starts with rolling lights on the LEDs, some
          > flashes, a beep. On the serial port, you see the boot messages. In
          > standard config, apex then stops at the command line and waits for
          input.

          Oops, I guess my apex.bin may be bad. I see some flashes but then all
          lights stay on after a quick second. No beep or anything else
          afterward. I'll try it again after adding the serial port. BTW, I can
          only build the older version of apex (1.3.14). The latest versions
          doesn't build.

          >
          > I build apex using the bitbake file of the development env for
          openslug.
          > I had to edit it for the new apex version (just rename it accordingly)
          > and edit the path to the compiler. Make a new config file with
          > menuconfig from the apex sources, copy the config file to the
          > destination bitbake expects it and then bitbake apex.

          Let me try to build again using this method.

          >
          > Also remember that you have to run Apex from flash to be able to use
          the
          > 128MB. When I remember correctly, I was able to start apex through
          > redboot. But I was never able to start linux from this ram-apex. There
          > were always corrupted kernel panics etc. Only after I flashed apex,
          > everything went smooth.
          >
          > Sorry if the description is quite short, I don't have access to my slug
          > files right at the moment, this is written from my memories.
          >
          > Florian
          >
        • kinsa
          ... Changing the kernel command line is not sufficient. You need to recompile redboot for it to recognize the new memory. The hardware (NSLU) needs to know
          Message 4 of 7 , Apr 3, 2006
          • 0 Attachment
            > I've been gooling around and find this page:
            > http://www.trejan.com/projects/nslu2/redboot_help.html. It said that
            > in Redboot, it has an option "exec -c <kernel command line>". So I
            > guess I can specify the "mem=128M" there. Tried it, no luck, it asks
            > me to specify the starting address and length and stuff which I got
            > confused. Can someone confirm whether this is the place to change the
            > "kernel command line" for Redboot? What should I put here besides
            > "exec -c mem=128M@00000000"?

            Changing the kernel command line is not sufficient. You need to recompile redboot for it to recognize the new memory.

            The hardware (NSLU) needs to know that it has an additional memory installed. This information is hard coded on the boot loader.

            Apex works great. You don't need a serial port to install it, but you do need a serial port and jtag to debug or rescue your slug once you bricked it.

            Kinsa
          • mingchu
            Hi Kinsa, How do I install apex.bin without a serial port? Is there a step-by-step procedure somewhere? This page
            Message 5 of 7 , Apr 3, 2006
            • 0 Attachment
              Hi Kinsa,

              How do I install apex.bin without a serial port? Is there a
              step-by-step procedure somewhere? This page
              (http://wiki.buici.com/bin/view/Main/ApexBootloader) seems to require
              a serial port. Just curious, I've already ordered the A232DBH3v Max232
              adapter kit. My serial port will be up pretty soon.

              Another related question, I'm going to piggy back the removed 2x16MB
              chips into another slug later, making the second slug 64MB (4chips x
              128Mbit). For this second slug, I don't need to install APEX to see
              all 64MB, right? You have suggested changing the kernel command line
              in another post, how did you do it? Sorry if I'm repeating the question.

              Thank you.

              -Ming

              >
              > Apex works great. You don't need a serial port to install it, but
              you do need a serial port and jtag to debug or rescue your slug once
              you bricked it.
              >
              > Kinsa
              >
            • kinsa
              Hello Ming, ... This page shows you how to transfer a binary file using tftp: http://www.nslu2-linux.org/wiki/HowTo/RecoverFromABadFlash You can only do this
              Message 6 of 7 , Apr 3, 2006
              • 0 Attachment
                Hello Ming,

                > How do I install apex.bin without a serial port? Is there a
                > step-by-step procedure somewhere? This page
                > (http://wiki.buici.com/bin/view/Main/ApexBootloader) seems to require
                > a serial port. Just curious, I've already ordered the A232DBH3v Max232
                > adapter kit. My serial port will be up pretty soon.

                This page shows you how to transfer a binary file using tftp:

                http://www.nslu2-linux.org/wiki/HowTo/RecoverFromABadFlash

                You can only do this within redboot.

                > Another related question, I'm going to piggy back the removed 2x16MB
                > chips into another slug later, making the second slug 64MB (4chips x
                > 128Mbit). For this second slug, I don't need to install APEX to see
                > all 64MB, right? You have suggested changing the kernel command line
                > in another post, how did you do it? Sorry if I'm repeating the question.

                I recompiled the kernel.

                I have tried this on a 128MB and I was able to access the lower 64MB with out having to install a new boot loader. I don't know if this will also work with a 64MB upgrade.

                A quick check to see if this works is to compile APEX with the kernel command line set to 64MB, run apex on top of redboot and then boot the kernel. If it works then you should be
                able to access the lower 64MB.

                My advise is to have jtag working first, this will save you from a lot of mistakes later.

                Regards,

                Kinsa
              • mingchu
                Thank you Kinsa for the quick reply. I ve read that page regarding RecoverFromABadFlash; however, it didn t rang to me that I can use it to try out APEX.
                Message 7 of 7 , Apr 3, 2006
                • 0 Attachment
                  Thank you Kinsa for the quick reply.

                  I've read that page regarding RecoverFromABadFlash; however, it didn't
                  rang to me that I can use it to try out APEX. Thanks for the info.

                  I'll try to get the JTAG to work also. Thanks.

                  Learning alot here...

                  -Ming
                Your message has been successfully submitted and would be delivered to recipients shortly.