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

Linux Kernel does rebuild - my instructions

Expand Messages
  • ZipItPet
    Linux 2.4.21 kernel builds from sources, and appears to be almost the same as the .12 release [not bit-for-bit the same, but close] General ARM Linux build
    Message 1 of 9 , Feb 9, 2005
    • 0 Attachment
      Linux 2.4.21 kernel builds from sources, and appears to be almost
      the same as the .12 release [not bit-for-bit the same, but close]

      General ARM Linux build how-to:
      http://www.arm.linux.org.uk/docs/kerncomp.shtml

      Here are the URLs where I found the pieces: [.gz versions]

      ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.21.tar.gz
      ftp://ftp-old.arm.linux.org.uk/pub/linux/arm/kernel/v2.4/patch-
      2.4.21-rmk1.gz
      http://www.zipitwireless.com/linux/patch-2.4.21-rmk1-zipit.gz

      NOTE: the filename is wrong on the last one -- it is not compressed

      Also the 3.2 ARM Tools:
      ftp://ftp-old.arm.linux.org.uk/pub/linux/arm/toolchain/cross-
      3.2.tar.gz

      --------
      My installation:

      tar zxvf linux-2.4.21.tar.gz
      cd linux-2.4.21
      zcat ../patch-2.4.21-rmk1.gz | patch -p1
      patch -p1 < ../patch-2.4.21-rmk1-zipit

      // edit 'Makefile' and change "CROSS_COMPILE" to the proper location
      of 3.2 ARM tools
      // muck around with config settings - use 'arch/arm/defconfig'
      as '.config' to avoid config questions
      // make clean / make zImage

      Resulting 'zImage' is in ELF format
      Stripping that down to the important stuff, it appears to be
      *almost* identical to the version in the device
      'gzip -9' to compress it to approximately 532KB file

      I downloaded it to my device (using my Zipit Pre-Monitor) and it
      *appears* to run the same.
      Next I plan to tweek it to redirect console output to COM2, and
      perhaps other things.

      NOTE: requires a hardware hacked device for uploading new
      firmware and COM reporting

      ZPM redirected output of first 2 parts of boot sequence:
      -------
      Aeronix 7312 BootLoader

      Sizing Memory...
      SDRAM: 128Mbit, 8MB x 16
      Memory Width: 16 bits
      Memory Size: 0x00000010Clearing Memory
      Copying Ramdisk
      Copying Kernel
      Creating ATAGS

      //COMMENT: addition ZPM hack
      Uploading 532851 bytes from kernel.gz
      // This is my rebuilt kernel, compressed to fit
      // Upload is 57.6Kbps, so it takes approx 2 minutes to upload

      Booting Linux
      // at this point the COM2 port is no longer used, but the ZipIt
      screen pops up and device is running...

      =====================

      What's included, what's not included:

      This is source to the zImage Linux kernel only

      Components and programs found in the 'ramdisk' are not provided with
      source

      There is a semi-final version of the source of the WiFi driver
      No source to utilities (busybox) or the main app (ZipIt)
    • Ken McGuire
      ZipitPet: You seem to have had some success getting data into and out of the Zipit. Great Work!! I have added a connector to the side of mine, and connected up
      Message 2 of 9 , Feb 9, 2005
      • 0 Attachment
        ZipitPet:
        You seem to have had some success getting data into and out of the
        Zipit. Great Work!!
        I have added a connector to the side of mine, and connected up COM2
        and the RXD of COM1 as well as nBROM. (see the Photo's section)
        I'm wondering if you will be detailing operation of your pre-loader?
        (source code?)
        Reading the boot code embedded in the rom it appears as though the TXD
        of COM1 isn't really needed (a good thing since the production boards
        don't have any connection to it any more).
        I have also successfully re-built the kernel using the patches from
        the Zipit site and had some success starting that kernel under the
        Skyeye 7312 emulator http://www.skyeye.org/ I have also been able to
        start the Zippit application under Skyeye (and a different kernel, the
        Zipit one starts but doesn't run yet). The zipit app dumps a signon
        message to the console and then quits. I think that it wants modules
        loaded because I am not using the Zipit file system. All this is still
        very experimental and all the Skyeye doc's are in Chineese, so I'm
        still learning how to configure and run it. But, it looks real
        promising. There are screenshots in the Phots's section of this as
        well.


        <snip>

        > NOTE: requires a hardware hacked device for uploading new
        > firmware and COM reporting
        >
        > ZPM redirected output of first 2 parts of boot sequence:
        > -------
        > Aeronix 7312 BootLoader
        >
        > Sizing Memory...
        > SDRAM: 128Mbit, 8MB x 16
        > Memory Width: 16 bits
        > Memory Size: 0x00000010Clearing Memory
        > Copying Ramdisk
        > Copying Kernel
        > Creating ATAGS
        >

        <snip>
      • ZipItPet
        ... COM2 ... Great, welcome to the club. That s the minimal needed [strictly the COM2 is only needed for debugging] That will be the developer configuration
        Message 3 of 9 , Feb 10, 2005
        • 0 Attachment
          > I have added a connector to the side of mine, and connected up
          COM2
          > and the RXD of COM1 as well as nBROM. (see the Photo's section)

          Great, welcome to the club.
          That's the minimal needed
          [strictly the COM2 is only needed for debugging]

          That will be the 'developer' configuration for the Zipit, even if we
          figure out how to upload new firmware through WiFi. Also if the ROM
          is ever in a state that doesn't allow additional updating, you can
          reflash it from the COM port.

          Since you traced them yourself, I assume you already know that you
          will need a level shifter like a MAX232/233 chip
          http://www.aibohack.com/robosap/sapavr_ser3_max233.gif

          Be sure it is powered by only 3 or 3.3V [otherwise you may fry the
          ZipIt CPU]
          Tie the two RxD ports together and run them through the level
          shifter (ie. you only need a single COM port on your PC to drive
          both)


          -----
          > Reading the boot code embedded in the rom it appears as though the
          TXD
          > of COM1 isn't really needed (a good thing since the production
          boards
          > don't have any connection to it any more).

          Having COM1 to solder to would be a tad easier, but it only takes 4
          lines of change to redirect the kernel output to COM2

          My uploader does, a "blind" upload of the firmware
          #0) be sure the device is off. The nBROM/"DBG" signal must be pulled
          to ground.
          #1) run "upl" program on PC (it is a MSDOS program, but easy to port)
          #2) turn on the device, wait for green LED
          #3) wait 10 seconds [long enough to get it running and waiting
          for upload]
          #4) press a key on your PC keyboard
          #5) a small 2K program is uploaded to the COM1 serial port (9600
          baud)
          #6) the small program runs, initializes COM2 serial port
          (57.6kbaud). See below for ZPM (Zipit Pre-Monitor) commands

          ------
          > I'm wondering if you will be detailing operation of your pre-
          loader?
          > (source code?)

          See above for the sequence
          Will email the tools/source soon after a little cleanup

          The upload program runs under DOS/Windows, but it should be easy to
          port to other OSs.

          The assembler source is also relatively simple. Currently does not
          support writing to the Flash ROM

          Although not essential, it copies and patches the Aeronix boot
          loader to get those pretty Aeronix messages to COM2 (see the 'L'
          command)

          ----

          Complicated command list for ZPM:
          '?' - dump some registers
          'L' - load built-in kernel.gz and ramdisk.gz from Flash ROM to DRAM
          [and cranks CPU up to 90MHz]
          'K' - upload your own custom kernel.gz [takes 2 minutes]
          'U' - upload your own user.gz (AKA ramdisk.gz) [takes 4 minutes]
          'G' - go, run whatever is loaded

          L + G will boot the device *almost* normally. HOWEVER the memory map
          is in special boot mode. In this mode, the WiFi chip doesn't appear
          to work properly (but the ZipIt program will start)
        • gregsearfoss
          Okay, I used the recipe below to compile a kernal and I ve got some questions about it. 1. I get a vmlinux file not zImage . Am I doing something wrong? ...
          Message 4 of 9 , Aug 30, 2005
          • 0 Attachment
            Okay, I used the recipe below to compile a kernal and I've got some
            questions about it.

            1. I get a 'vmlinux' file not 'zImage'. Am I doing something wrong?

            2. I don't understand what is meant by:
            > Stripping that down to the important stuff
            after gzip -9 on vmlinux, the result is 624,457 bytes.
            Was I supposed to leave out some support durring the kernel
            configuration step?

            3. What else will I need to do in order to get this kernel image ready
            for download into my zipit?

            Any advice on getting from where I am, to having a complete zipit
            kernal would be helpful.

            I really appreciate all the help this community has been. Thanks in
            advance for any answers or advice.


            --- In zipitwireless@yahoogroups.com, "ZipItPet" <aibopet@a...> wrote:
            >
            > Linux 2.4.21 kernel builds from sources, and appears to be almost
            > the same as the .12 release [not bit-for-bit the same, but close]
            >
            > General ARM Linux build how-to:
            > http://www.arm.linux.org.uk/docs/kerncomp.shtml
            >
            > Here are the URLs where I found the pieces: [.gz versions]
            >
            > ftp://ftp.kernel.org/pub/linux/kernel/v2.4/linux-2.4.21.tar.gz
            > ftp://ftp-old.arm.linux.org.uk/pub/linux/arm/kernel/v2.4/patch-
            > 2.4.21-rmk1.gz
            > http://www.zipitwireless.com/linux/patch-2.4.21-rmk1-zipit.gz
            >
            > NOTE: the filename is wrong on the last one -- it is not compressed
            >
            > Also the 3.2 ARM Tools:
            > ftp://ftp-old.arm.linux.org.uk/pub/linux/arm/toolchain/cross-
            > 3.2.tar.gz
            >
            > --------
            > My installation:
            >
            > tar zxvf linux-2.4.21.tar.gz
            > cd linux-2.4.21
            > zcat ../patch-2.4.21-rmk1.gz | patch -p1
            > patch -p1 < ../patch-2.4.21-rmk1-zipit
            >
            > // edit 'Makefile' and change "CROSS_COMPILE" to the proper location
            > of 3.2 ARM tools
            > // muck around with config settings - use 'arch/arm/defconfig'
            > as '.config' to avoid config questions
            > // make clean / make zImage
            >
            > Resulting 'zImage' is in ELF format
            > Stripping that down to the important stuff, it appears to be
            > *almost* identical to the version in the device
            > 'gzip -9' to compress it to approximately 532KB file
            >
            > I downloaded it to my device (using my Zipit Pre-Monitor) and it
            > *appears* to run the same.
            > Next I plan to tweek it to redirect console output to COM2, and
            > perhaps other things.
            >
            > NOTE: requires a hardware hacked device for uploading new
            > firmware and COM reporting
            >
            > ZPM redirected output of first 2 parts of boot sequence:
            > -------
            > Aeronix 7312 BootLoader
            >
            > Sizing Memory...
            > SDRAM: 128Mbit, 8MB x 16
            > Memory Width: 16 bits
            > Memory Size: 0x00000010Clearing Memory
            > Copying Ramdisk
            > Copying Kernel
            > Creating ATAGS
            >
            > //COMMENT: addition ZPM hack
            > Uploading 532851 bytes from kernel.gz
            > // This is my rebuilt kernel, compressed to fit
            > // Upload is 57.6Kbps, so it takes approx 2 minutes to upload
            >
            > Booting Linux
            > // at this point the COM2 port is no longer used, but the ZipIt
            > screen pops up and device is running...
            >
            > =====================
            >
            > What's included, what's not included:
            >
            > This is source to the zImage Linux kernel only
            >
            > Components and programs found in the 'ramdisk' are not provided with
            > source
            >
            > There is a semi-final version of the source of the WiFi driver
            > No source to utilities (busybox) or the main app (ZipIt)
          • ZipItPet
            ... Try make zImage It should create a zImage file that can be burned with zflash (sometimes called zimage.dat ) ... That is not necessary anymore. The
            Message 5 of 9 , Aug 31, 2005
            • 0 Attachment
              --- In zipitwireless@yahoogroups.com, "gregsearfoss"
              <gregsearfoss@y...> wrote:
              > Okay, I used the recipe below to compile a kernal and I've got some
              > questions about it.
              >
              > 1. I get a 'vmlinux' file not 'zImage'. Am I doing something wrong?

              Try "make zImage"
              It should create a "zImage" file that can be burned with 'zflash'
              (sometimes called 'zimage.dat')

              > 2. I don't understand what is meant by:
              > > Stripping that down to the important stuff
              > after gzip -9 on vmlinux, the result is 624,457 bytes.
              > Was I supposed to leave out some support durring the kernel
              > configuration step?
              That is not necessary anymore. The zImage will do that for you.
              The default build (BURN3) should fit. If you add to much new stuff
              it may get too big (zflash should complain, but it doesn't detect
              all problems)

              > 3. What else will I need to do in order to get this kernel image
              ready
              > for download into my zipit?
              > Any advice on getting from where I am, to having a complete zipit
              > kernal would be helpful.

              Unless you need kernel changes, my advice is to use a pre-built
              kernel (like the one in BURN3, or OpenZipit)
              The BURN3 version is part of
              http://www.aibohack.com/zipit/zipit_parts_burn3.zip
              The OpenZipit version is in the Files section of this BBS.
            • gregsearfoss
              thanks for your reply, I guess I m a little closer than I thought. I m still curious about what you meant by stripping it down . I just assume that means that
              Message 6 of 9 , Aug 31, 2005
              • 0 Attachment
                thanks for your reply, I guess I'm a little closer than I thought.

                I'm still curious about what you meant by 'stripping it down'. I just
                assume that means that you didn't include kernal modules that weren't
                being used.

                > Unless you need kernel changes, my advice is to use a pre-built
                > kernel (like the one in BURN3, or OpenZipit)
                > The BURN3 version is part of
                > http://www.aibohack.com/zipit/zipit_parts_burn3.zip
                > The OpenZipit version is in the Files section of this BBS.

                Well, hey, if I just wanted to get linux running on the zipit, I've
                already succeeded. I don't just want to get it running, I want to
                understand it, take it apart, make small code changes, put it back
                together, reinstall it, ect...

                I really want to be an embedded software engineer. I've done contract
                work in Assembly and C on embedded systems, but my knowlege of Linux
                is lacking. I bought several books on the subject, all dealing with
                kernal 2.4.x and the zipit is a perfect test grounds for learning this
                stuff.

                Except that no one seems to understand why you'd want to re-do work
                someone else has done, or they think they're 'saving newbs' from
                making mistakes.

                So, if you're scratching your head, wondering why a complete newbie
                would go through all this trouble, it's because I don't want to be
                clueless forever.

                I've always believed that if you haven't *DONE* it, you don't *NKOW*
                it. You can't learn without getting your hands dirty!
              • Glenn Meader
                The Wiki seems to be down with a server error. http://elinux.org/wiki/ZipIt
                Message 7 of 9 , Aug 31, 2005
                • 0 Attachment
                  The Wiki seems to be down with a server error.

                  http://elinux.org/wiki/ZipIt
                • suburban blight
                  uhm.. not for me. __________________________________________________ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around
                  Message 8 of 9 , Aug 31, 2005
                  • 0 Attachment
                    uhm.. not for me.

                    __________________________________________________
                    Do You Yahoo!?
                    Tired of spam? Yahoo! Mail has the best spam protection around
                    http://mail.yahoo.com
                  • ZipItPet
                    ... just ... weren t ... The original build (described in that older BBS post) used the original version and config. It was almost byte-for-byte identical to
                    Message 9 of 9 , Sep 1, 2005
                    • 0 Attachment
                      > I'm still curious about what you meant by 'stripping it down'. I
                      just
                      > assume that means that you didn't include kernal modules that
                      weren't
                      > being used.

                      The original build (described in that older BBS post) used the
                      original version and config. It was almost byte-for-byte identical
                      to the Zipit/Aeronix built kernel, which was the starting point.
                      [the gzip step was my first attempt, a "zimage" has the loader plus
                      the gziped kernel in one file]

                      The "BURN3" kernel is different (keyboard, framebuffer, telnetd etc -
                      - changes/additions most done by ken/cynfab). See the patch file on
                      my site.
                      The OpenZipit kernel (and other variations) are even more different

                      -----
                      > I don't just want to get it running, I want to
                      > understand it, take it apart, make small code changes, put it back
                      > together, reinstall it, ect...
                      >
                      > I really want to be an embedded software engineer....

                      Except that playing around with the Zipit flash is dangerous (unless
                      you do the 5 wire hardware mod)

                      Other advice:
                      There are other embedded linux development kits all packaged up.
                      Most are expensive (there are a few hobby ones or built-it yourself)

                      General Linux programming books may cover a lot of things that don't
                      apply to embedded Linux. Zipit Linux is mostly a "means to an end".
                      To learn the ins-and-outs of the whole system (including many common
                      packages), I recommend a PC version of Linux. You can build and
                      debug on the same machine.

                      You also may want to look at uClinux. Another common embedded
                      Linux family for even smaller systems (NOTE: the Zipit is not
                      running uClinux - it is running full-blown ARM Linux - with MMU)
                    Your message has been successfully submitted and would be delivered to recipients shortly.