Difference between revisions of "CM-A510: Linux: Getting started"
(→See also) |
(→After Installation) |
||
(2 intermediate revisions by 2 users not shown) | |||
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 31: | Line 31: | ||
<pre> | <pre> | ||
> tftp 100000 bootscr.img && autoscr 100000 | > tftp 100000 bootscr.img && autoscr 100000 | ||
− | </pre> | + | </pre> |
− | * During | + | * During Ramdisk image booting the CM-A510 attempts to obtain an IP address using DHCP. If from some reason the IP address has not been obtained, use the following commands to obtain IP address for the CM-A510: |
− | <pre> | + | ** Obtain IP using DHCP:<pre>$ ifup eth0</pre> |
− | $ ifconfig eth0 <ip address> | + | ** If you do not have a DHCP server, you can set a static IP address using {{cmd|ifconfig}}:<pre>$ ifconfig eth0 <ip address></pre> |
− | </pre> | ||
* After the ramdisk image is loaded you will get Linux login prompt. Login as {{parameter|root}} into the system. | * After the ramdisk image is loaded you will get Linux login prompt. Login as {{parameter|root}} into the system. | ||
* Mount the NFS share containing {{filename|kernel.img}} and {{filename|debian-image.ubi}} image: | * Mount the NFS share containing {{filename|kernel.img}} and {{filename|debian-image.ubi}} image: | ||
<pre> | <pre> | ||
− | $ mount <host ip>:/path/to/nfs/share /mnt/net | + | $ mount -o nolock <host ip>:/path/to/nfs/share /mnt/net |
</pre> | </pre> | ||
* Format the NAND flash kernel partition and write the kernel image onto it: | * Format the NAND flash kernel partition and write the kernel image onto it: | ||
<pre> | <pre> | ||
− | $ | + | $ flash_erase /dev/mtd0 0 0 |
$ nandwrite -p /dev/mtd0 /mnt/net/kernel.img | $ nandwrite -p /dev/mtd0 /mnt/net/kernel.img | ||
</pre> | </pre> | ||
* 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 53: | ||
* 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 65: | Line 64: | ||
* Format the NAND flash kernel partition and write the kernel image onto it: | * Format the NAND flash kernel partition and write the kernel image onto it: | ||
<pre> | <pre> | ||
− | $ | + | $ flash_erase /dev/mtd0 0 0 |
$ nandwrite -p /dev/mtd0 /media/sda1/kernel.img | $ nandwrite -p /dev/mtd0 /media/sda1/kernel.img | ||
</pre> | </pre> | ||
* 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 79: | Line 78: | ||
{{Note|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.}} | {{Note|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.}} | ||
<li> To boot Linux, type: | <li> To boot Linux, type: | ||
− | <pre>> setenv bootargs | + | <pre>> setenv bootargs "ubi.mtd=1,2048 root=ubi0_0 rootfstype=ubifs useNandHal=4bitecc pm_disable console=ttyS0,115200" |
> nboot 200000 nand0 0; bootm</pre> | > nboot 200000 nand0 0; bootm</pre> | ||
{{Caution|The Linux kernel for CM-A510 is shipped with built-in command line parameters that define primary console, default display settings, root device and root filesystem type. Setting U-Boot {{parameter|bootargs}} environment variable overrides default kernel command line!}} | {{Caution|The Linux kernel for CM-A510 is shipped with built-in command line parameters that define primary console, default display settings, root device and root filesystem type. Setting U-Boot {{parameter|bootargs}} environment variable overrides default kernel command line!}} | ||
Line 86: | Line 85: | ||
<pre> | <pre> | ||
> setenv bootdelay 3 | > setenv bootdelay 3 | ||
+ | > setenv bootargs "ubi.mtd=1,2048 root=ubi0_0 rootfstype=ubifs useNandHal=4bitecc pm_disable console=ttyS0,115200" | ||
> setenv bootcmd "nboot 200000 nand0 0; bootm" | > setenv bootcmd "nboot 200000 nand0 0; bootm" | ||
> saveenv | > saveenv | ||
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]] |
Latest revision as of 07:40, 26 August 2015
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 Ramdisk image booting the CM-A510 attempts to obtain an IP address using DHCP. If from some reason the IP address has not been obtained, use the following commands to obtain IP address for the CM-A510:
- Obtain IP using DHCP:
$ ifup eth0
- If you do not have a DHCP server, you can set a static IP address using ifconfig:
$ ifconfig eth0 <ip address>
- Obtain IP using DHCP:
- 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 -o nolock <host ip>:/path/to/nfs/share /mnt/net
- Format the NAND flash kernel partition and write the kernel image onto it:
$ flash_erase /dev/mtd0 0 0 $ 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_erase /dev/mtd0 0 0 $ 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 "ubi.mtd=1,2048 root=ubi0_0 rootfstype=ubifs useNandHal=4bitecc pm_disable console=ttyS0,115200" > nboot 200000 nand0 0; bootm
- For Linux automatic boot, type:
> setenv bootdelay 3 > setenv bootargs "ubi.mtd=1,2048 root=ubi0_0 rootfstype=ubifs useNandHal=4bitecc pm_disable console=ttyS0,115200" > 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.