Difference between revisions of "CM-A510: Linux: Getting started"
m (1 revision(s)) |
(→Preparation steps) |
||
Line 3: | Line 3: | ||
* Obtain a PC workstation with serial communication port. | * Obtain a PC workstation with serial communication port. | ||
* For installation using NFS install TFTP server on host PC. For Windows machines we recommend [http://tftpd32.jounin.net/ TFTPD32] included in this distribution package. | * For installation using NFS install TFTP server on host PC. For Windows machines we recommend [http://tftpd32.jounin.net/ TFTPD32] included in this distribution package. | ||
− | * Download the [http://www.compulab.co.il/ | + | * Download the [http://www.compulab.co.il/a510/download/a510-linux.zip Linux distribution package for CM-A510] from CompuLab's website . Unzip the package to a directory on your host workstation. |
* All image files mentioned below can be found in {{filename|images}} subdirectory | * All image files mentioned below can be found in {{filename|images}} subdirectory | ||
− | * Copy {{filename|debian-image.ubi}} and {{filename|kernel.img}} from [http://www.compulab.co.il/ | + | * Copy {{filename|debian-image.ubi}} and {{filename|kernel.img}} from [http://www.compulab.co.il/a510/download/a510-linux.zip Linux distribution package for CM-A510] either to a directory exported through NFS or to a USB flash drive. |
== Image installation == | == Image installation == | ||
Line 48: | Line 48: | ||
* Format the NAND flash root filesystem partition and write Debian filesystem image onto it: | * Format the NAND flash root filesystem partition and write Debian filesystem image onto it: | ||
<pre> | <pre> | ||
− | $ ubiformat /dev/mtd1 -f /mnt/net/debian-image.ubi | + | $ ubiformat -O 2048 /dev/mtd1 -f /mnt/net/debian-image.ubi |
</pre> | </pre> | ||
Line 54: | Line 54: | ||
* Make sure that CM-A510 LAN0 Ethernet port (connector P11 on SB-A510) is '''disconnected''' | * Make sure that CM-A510 LAN0 Ethernet port (connector P11 on SB-A510) is '''disconnected''' | ||
* Make sure that Linux kernel binary image {{filename|kernel.img}}, ramdisk image {{filename|ramdisk.img}}, Debian filesystem UBI image {{filename|debian-image.ubi}} and bootloader script image {{filename|bootscr.img}} are present at the root directory of the USB flash drive. | * Make sure that Linux kernel binary image {{filename|kernel.img}}, ramdisk image {{filename|ramdisk.img}}, Debian filesystem UBI image {{filename|debian-image.ubi}} and bootloader script image {{filename|bootscr.img}} are present at the root directory of the USB flash drive. | ||
− | * Connect USB flash drive to SB-A510. Use USB1 port (the lower USB connector of P11 on SB-A510). | + | * Connect USB flash drive formated with FAT file system to SB-A510. Use USB1 port (the lower USB connector of P11 on SB-A510). |
* Use the following U-boot command to boot Linux on CM-A510: | * Use the following U-boot command to boot Linux on CM-A510: | ||
<pre> | <pre> | ||
Line 70: | Line 70: | ||
* Format the NAND flash root filesystem partition and write Debian filesystem image onto it: | * Format the NAND flash root filesystem partition and write Debian filesystem image onto it: | ||
<pre> | <pre> | ||
− | $ ubiformat /dev/mtd1 -f /media/sda1/debian-image.ubi | + | $ ubiformat -O 2048 /dev/mtd1 -f /media/sda1/debian-image.ubi |
</pre> | </pre> | ||
Line 116: | Line 116: | ||
* [[CM-A510: Linux: Kernel | Linux Kernel for CM-A510]] | * [[CM-A510: Linux: Kernel | Linux Kernel for CM-A510]] | ||
* [[CM-A510: Linux: Debian | Debian Linux for CM-A510]] | * [[CM-A510: Linux: Debian | Debian Linux for CM-A510]] | ||
+ | * [[CM-A510: Linux: Ubuntu | Ubuntu Linux for CM-A510]] | ||
* [[CM-A510: U-Boot: Firmware Update| U-Boot for CM-A510]] | * [[CM-A510: U-Boot: Firmware Update| U-Boot for CM-A510]] | ||
[[Category:Linux]] | [[Category:Linux]] | ||
[[Category:CM-A510]] | [[Category:CM-A510]] |
Revision as of 06:06, 13 July 2011
Contents
Preparation steps
- Obtain a PC workstation with serial communication port.
- For installation using NFS install TFTP server on host PC. For Windows machines we recommend TFTPD32 included in this distribution package.
- Download the Linux distribution package for CM-A510 from CompuLab's website . Unzip the package to a directory on your host workstation.
- All image files mentioned below can be found in images subdirectory
- Copy debian-image.ubi and kernel.img from Linux distribution package for CM-A510 either to a directory exported through NFS or to a USB flash drive.
Image installation
- Connect the host PC to the CM-A510 via the serial cable supplied with the CM-A510 evaluation kit.
- Start terminal emulation software on your PC using the COM port to which the serial cable is connected. Set baud rate to 115200 bps, 8 bit per frame, 1 stop bit, no parity, no flow control.
- Turn on the CM-A510. The U-Boot boot-loader will start and you will get a command prompt.
If the boot settings of your CM-A510 are different than default, you may need to press and hold ^C while turning on the CM-A510, in order to get command prompt. |
Installation using NFS
- Connect CM-A510 LAN0 Ethernet port (connector P11 on SB-A510) to your local Ethernet
- Make sure that Linux kernel binary image kernel.img, ramdisk image ramdisk.img and bootloader script image bootscr.img are accessible by the TFTP server.
- - On Windows machine: copy kernel.img, ramdisk.img and bootscr.img to the same folder and point the TFTP server to that folder
- - On Linux machine: copy kernel.img, ramdisk.img and bootscr.img to TFTP sevrver root directory, usually /tftpboot or /tftproot.
- You can use U-boot dhcp command to obtain IP address or manually set the ipaddr environment variable:
> setenv ipaddr <CM-A510 ip address>
- Set the serverip environment variable and save the new environment to NAND flash:
> setenv serverip <host ip address> > saveenv
- Use the following U-boot command to boot Linux on CM-A510:
> tftp 100000 bootscr.img && autoscr 100000
- During boot the CM-A510 tries to obtain an IP address using DHCP. If you do not have DHCP server you can set the CM-A510 IP address statically using ifconfig:
$ ifconfig eth0 <ip address>
- After the ramdisk image is loaded you will get Linux login prompt. Login as root into the system.
- Mount the NFS share containing kernel.img and debian-image.ubi image:
$ mount <host ip>:/path/to/nfs/share /mnt/net
- Format the NAND flash kernel partition and write the kernel image onto it:
$ flash_eraseall /dev/mtd0 $ nandwrite -p /dev/mtd0 /mnt/net/kernel.img
- Format the NAND flash root filesystem partition and write Debian filesystem image onto it:
$ ubiformat -O 2048 /dev/mtd1 -f /mnt/net/debian-image.ubi
Installation using USB flash drive
- Make sure that CM-A510 LAN0 Ethernet port (connector P11 on SB-A510) is disconnected
- Make sure that Linux kernel binary image kernel.img, ramdisk image ramdisk.img, Debian filesystem UBI image debian-image.ubi and bootloader script image bootscr.img are present at the root directory of the USB flash drive.
- Connect USB flash drive formated with FAT file system to SB-A510. Use USB1 port (the lower USB connector of P11 on SB-A510).
- Use the following U-boot command to boot Linux on CM-A510:
> usb start > fatload usb 0:1 100000 bootscr.img > autoscr 100000
- After the ramdisk image is loaded you will get Linux login prompt. Login as root into the system.
- The USB flash drive will be automatically mounted under /media/sda1
- Format the NAND flash kernel partition and write the kernel image onto it:
$ flash_eraseall /dev/mtd0 $ nandwrite -p /dev/mtd0 /media/sda1/kernel.img
- Format the NAND flash root filesystem partition and write Debian filesystem image onto it:
$ ubiformat -O 2048 /dev/mtd1 -f /media/sda1/debian-image.ubi
After Installation
- Reset the CM-A510.
- To boot Linux, type:
> setenv bootargs > nboot 200000 nand0 0; bootm
- For Linux automatic boot, type:
> setenv bootdelay 3 > setenv bootcmd "nboot 200000 nand0 0; bootm" > saveenv > boot
If you want to get back to U-Boot prompt, hold Ctrl-C during reset.
If the boot settings of your CM-A510 are different than default, you may need to press and hold ^C while turning the CM-A510 on, in order to get command prompt. |
Connection and Logging In
Use the following usernames and passwords to login:
Account with administrative privileges:
User: root Password: 111111
Regular user account:
User: user Password: 111111
In addition to these accounts CM-A510 allows anonymous FTP access.