Editing Linuxstamp
Jump to navigation
Jump to search
Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.
The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then save the changes below to finish undoing the edit.
Latest revision | Your text | ||
Line 1: | Line 1: | ||
[[Image:linuxstamp_top_02.jpg]] | [[Image:linuxstamp_top_02.jpg]] | ||
+ | da2agV gki8Tvqq3PngJ02lH | ||
== Description == | == Description == | ||
The Linuxstamp is designed to be a general purpose processor module. It is designed to work as a stand alone module (SD card, Ethernet and USB/Serial converter are all on the module). This allows all initial development to be done without a motherboard, but for integration into a specific project a motherboard with specific features could be designed. Check out the start of the first mother board for the Linuxstamp, [http://opencircuits.com/Linuxstamp_Mboard_1 Mboard 1]. | The Linuxstamp is designed to be a general purpose processor module. It is designed to work as a stand alone module (SD card, Ethernet and USB/Serial converter are all on the module). This allows all initial development to be done without a motherboard, but for integration into a specific project a motherboard with specific features could be designed. Check out the start of the first mother board for the Linuxstamp, [http://opencircuits.com/Linuxstamp_Mboard_1 Mboard 1]. | ||
− | |||
− | |||
− | |||
== Features == | == Features == | ||
Line 38: | Line 36: | ||
When you plug the Linuxstamp into your host (Linux) machine a device should appear '''/dev/ttyUSB0''' (I think the postfix number will increment as you add more devices). '''/dev/ttyUSB0''' will behave as any other serial port now. '''Minicom''' is the standard program to access the serial port in Linux. The first time you run minicom you will have to be root in order to do the setup, after that you can change the permissions on /dev/ttyUSB0 so any user can run minicom. To enter configuration mode in minicom type '''CTRL-A o''', now scroll down to '''Serial port setup'''. Use the letters to navigate. You will want the device to be '''/dev/ttyUSB0''' and '''Bps/Par/Bits''' to read '''115200 8N1'''. Both hardware and software flow control should be OFF. Connection to the board is important for loading Atmel's tiny program and u-boot, but once the board is working it might not be as important. | When you plug the Linuxstamp into your host (Linux) machine a device should appear '''/dev/ttyUSB0''' (I think the postfix number will increment as you add more devices). '''/dev/ttyUSB0''' will behave as any other serial port now. '''Minicom''' is the standard program to access the serial port in Linux. The first time you run minicom you will have to be root in order to do the setup, after that you can change the permissions on /dev/ttyUSB0 so any user can run minicom. To enter configuration mode in minicom type '''CTRL-A o''', now scroll down to '''Serial port setup'''. Use the letters to navigate. You will want the device to be '''/dev/ttyUSB0''' and '''Bps/Par/Bits''' to read '''115200 8N1'''. Both hardware and software flow control should be OFF. Connection to the board is important for loading Atmel's tiny program and u-boot, but once the board is working it might not be as important. | ||
+ | <br><br> | ||
− | + | XModem transfers between Minicom and U-Boot seem to work fine. This means that you can update U-Boot itself as well as the kernel and root file systems using Minicom. However, the built in xmodem in minicom does not seem to work with the hardware bootloader in the AT91RM9200. If you see "Retry 0: NAK on Sector", you have likely hit this problem. The folks at [http://www.koansoftware.com/it/art.php?art=68 Koan] have created a workaround. The one thing you have to do is edit the .c file for the proper serial port ttyUSB0 in my case. (This link does not seem to work any more, does someone have an alternate?) | |
− | |||
− | XModem transfers between Minicom and U-Boot seem to work fine. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | Another alternative is to use HyperTerm on Windows, which works fine with the Hardware boot loader. If you are updating the | + | Another alternative is to use HyperTerm on Windows, which works fine with the Hardware boot loader. If you are updating the Darren Bootloader, note that the loader only has a short delay after you initiate the "receive" (on the loader) after which it send out the "ready to receive" signal. As a result, you'll need to be rather quick to initiate the Xmodem "send" (on HyperTerm). If you are seeing time outs on HyperTerm when you try and send the loader.bin file, you are probably hitting this problem ... you need to have initiated the send before you see the "C" on the screen from the bootloader. |
== nfs & tftp == | == nfs & tftp == | ||
Line 90: | Line 77: | ||
*"'''eval `cat arm.dat gcc-3.4.5-glibc-2.3.6.dat` sh all.sh --notest'''"<br> | *"'''eval `cat arm.dat gcc-3.4.5-glibc-2.3.6.dat` sh all.sh --notest'''"<br> | ||
In the "arm.dat" file I changed the TARGET to "arm-linux" (By default u-boot looks for arm-linux-* tools). Now if you run "demo-arm.sh" you should get a cross compilier. | In the "arm.dat" file I changed the TARGET to "arm-linux" (By default u-boot looks for arm-linux-* tools). Now if you run "demo-arm.sh" you should get a cross compilier. | ||
− | |||
− | |||
== Booting == | == Booting == | ||
Line 107: | Line 92: | ||
* > '''setenv bootcmd 'tftpboot 20800000 uImage; bootm 20800000'''' Sets the boot command to load a image over tftp and boot it | * > '''setenv bootcmd 'tftpboot 20800000 uImage; bootm 20800000'''' Sets the boot command to load a image over tftp and boot it | ||
* > '''setenv bootargs mem=32M nfsroot=192.168.0.3:/nfs_root ip=192.168.0.51 console=ttyS0,115200n8 rootdelay=1''' | * > '''setenv bootargs mem=32M nfsroot=192.168.0.3:/nfs_root ip=192.168.0.51 console=ttyS0,115200n8 rootdelay=1''' | ||
− | This sets the command line to be passed to the kernel. As you can see it sets the | + | This sets the command line to be passed to the kernel. As you can see it sets the nfsrot, ip address and console |
== Busybox == | == Busybox == | ||
Line 122: | Line 107: | ||
== Building the Linux Kernel == | == Building the Linux Kernel == | ||
− | If you have ever built the kernel for your desktop, then cross-compiling the kernel isn't that much harder. First get the latest kernel from [http://kernel.org/ kernel.org] (I was using 2.6.23-rc9), then get the AT91RM9200 patch from [http://maxim.org.za/at91_26.html here]. After you unpack both of these you can apply the patch | + | If you have ever built the kernel for your desktop, then cross-compiling the kernel isn't that much harder. First get the latest kernel from [http://kernel.org/ kernel.org] (I was using 2.6.23-rc9), then get the AT91RM9200 patch from [http://maxim.org.za/at91_26.html here]. After you unpack both of these you can apply the patch. |
* $ '''patch -p1 < 2.6.23-rc3-at91.patch''' | * $ '''patch -p1 < 2.6.23-rc3-at91.patch''' | ||
Now lets take a look at the default configurations | Now lets take a look at the default configurations | ||
Line 132: | Line 117: | ||
Now we're are ready to build the kernel. You will have to have the u-boot tool '''mkimage''' in the '''PATH''' for this to work | Now we're are ready to build the kernel. You will have to have the u-boot tool '''mkimage''' in the '''PATH''' for this to work | ||
* $ '''make ARCH=arm CROSS_COMPILE=arm-linux- uImage''' | * $ '''make ARCH=arm CROSS_COMPILE=arm-linux- uImage''' | ||
− | |||
− | |||
− | |||
− | |||
== Minimal filesystem == | == Minimal filesystem == | ||
Line 144: | Line 125: | ||
The '''c''' says this is a character device. The '''5''' is the major node, and the '''1''' is the minor node. | The '''c''' says this is a character device. The '''5''' is the major node, and the '''1''' is the minor node. | ||
<br><br> | <br><br> | ||
− | For development the most convenient way to work is by mounting an NFS root file system. Another easy way to deal with | + | For development the most convenient way to work is by mounting an NFS root file system. Another easy way to deal with thre root file system is by mounting it on either a USB drive or SD card, but if you want a stand alone system you will want the root filesystem to come from the onboard Dataflash. There are several steps to do this. The Dataflash on the Linuxstamp is 8MB. A little under 2MB is used for the bootloaders and the Linux kernel. This leaves about 6MB for the filesystem. The filesystem I am working with is about 10MB, so we will need to compress the filesystem. One method of doing this is to use the initramfs function in the kernel. The kernel expects the image to be a gzipped CPIO archive. In the kernel source there are tools to create the CPIO archive. First we must create a file list from our file system (presumedly this is just the root of your current NFS mount). |
<br> | <br> | ||
/!!Remember that you need a 'init' file in /. You can just link to /sbin/init | /!!Remember that you need a 'init' file in /. You can just link to /sbin/init | ||
Line 151: | Line 132: | ||
Next create the CPIO archive | Next create the CPIO archive | ||
* # '''usr/gen_init_cpio cpio_list > initramfs.cpio''' | * # '''usr/gen_init_cpio cpio_list > initramfs.cpio''' | ||
− | You might have to make gen_init_cpio | + | You might have to make gen_init_cpio |
* # '''make gen_init_cpio''' | * # '''make gen_init_cpio''' | ||
Gzip the CPIO archive | Gzip the CPIO archive | ||
* $ '''gzip initramfs.cpio''' | * $ '''gzip initramfs.cpio''' | ||
Now copy initramfs.cpio.gz to usr/initramfs_data.cpio.gz, and run the normal kernel make. You will notice that uImage is much larger (size = kernel + fs). | Now copy initramfs.cpio.gz to usr/initramfs_data.cpio.gz, and run the normal kernel make. You will notice that uImage is much larger (size = kernel + fs). | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Dropbear SSH == | == Dropbear SSH == | ||
One of the first non busybox tools you will want is SSH. Dropbear is a small SSH client/server. I was able to get version 0.50 working. | One of the first non busybox tools you will want is SSH. Dropbear is a small SSH client/server. I was able to get version 0.50 working. | ||
− | |||
− | |||
− | |||
* $ '''./configure --host="arm-linux" --disable-zlib --prefix=/staging_path''' | * $ '''./configure --host="arm-linux" --disable-zlib --prefix=/staging_path''' | ||
* $ '''make all''' | * $ '''make all''' | ||
Line 175: | Line 147: | ||
* # '''mknod /dev/tty c 5 0''' | * # '''mknod /dev/tty c 5 0''' | ||
You will also have to have the devpts filesystem mounted. | You will also have to have the devpts filesystem mounted. | ||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
− | |||
== Servos == | == Servos == | ||
Line 200: | Line 161: | ||
*[http://linuxstamp.budgetdedicated.com/ ftp site]: Here you will find tools and images like the crosscompilier and a debian file system | *[http://linuxstamp.budgetdedicated.com/ ftp site]: Here you will find tools and images like the crosscompilier and a debian file system | ||
*[http://www.atmel.com/dyn/products/app_notes.asp?family_id=605 App notes]: for Atmel arm processors | *[http://www.atmel.com/dyn/products/app_notes.asp?family_id=605 App notes]: for Atmel arm processors | ||
− | *[[ | + | *[http://www.jendylabs.com/ Jendy Labs] |
− | *[http://wiki.emqbit.com/ | + | *[http://opencircuits.com/Linuxstamp_Mboard_1 Mborad 1] for the Linuxstamp |
− | + | *[http://wiki.emqbit.com/wiki ECB AT91] This is another open source project similar to the Linuxstamp. They have somve very good documentation. | |
+ | |||
+ | == Pricing == | ||
+ | The parts cost for qty 1 is $75 from digikey, and $55 for qty 100<br> | ||
+ | I'm sure this can be greatly reduced with higher quantity<br> | ||
+ | We will make a small run soon, and I will let you know when these are available.<br> | ||
== USB Info == | == USB Info == | ||
Line 220: | Line 186: | ||
* [[ARMUS Embedded Linux Board]] | * [[ARMUS Embedded Linux Board]] | ||
* [http://balloonboard.org/ Balloon board] | * [http://balloonboard.org/ Balloon board] | ||
− | |||
− | |||
[[Category:Projects]] | [[Category:Projects]] |