This page contains Debian tutorials, recipes, articles, forums, etc. related to all the SAM9G25 boards on Debian system.

Basic knowledge:

How-tos:

  • Configure the MAC address
  • Set eth0 with a static IP address or DHCP when booting the system s

    Edit the /etc/network/interfaces file with the follow word, then you can boot the board with the ethernet preset.

    Set the eth0 for DHCP when booting

    auto eth0
    iface eth0 inet dhcp
    

    Set the eth0 for Static IP address when booting

    auto eth0
    iface eth0 inet static
    address 192.168.1.142
    network 192.168.1.0
    netmask 255.255.255.0
    broadcast 192.168.1.255
    gateway 192.168.1.1
    
  • Get the IP address from DHCP manually

    If you need to get the IP address manually from the DHCP server on your LAN simply shut down the eth0 interface:

    ~# ifdown eth0
    Internet Systems Consortium DHCP Client 4.1.1-P1                                
    Copyright 2004-2010 Internet Systems Consortium.                                
    All rights reserved.                                                            
    For info, please visit https://www.isc.org/software/dhcp/                       
                                                                                    
    Listening on LPF/eth0/00:04:25:a8:9d:5e                                         
    Sending on   LPF/eth0/00:04:25:a8:9d:5e                                         
    Sending on   Socket/fallback                                                    
    DHCPRELEASE on eth0 to 10.55.98.1 port 67                                       
    eth0: link down  
    

    and bring it back up by typing:

    ~# ifup eth0
    Internet Systems Consortium DHCP Client 4.1.1-P1                                
    Copyright 2004-2010 Internet Systems Consortium.                                
    All rights reserved.                                                            
    For info, please visit https://www.isc.org/software/dhcp/                       
                                                                                    
    ADDRCONF(NETDEV_UP): eth0: link is not ready                                    
    Listening on LPF/eth0/00:04:25:a8:9d:5e                                         
    Sending on   LPF/eth0/00:04:25:a8:9d:5e                                         
    Sending on   Socket/fallback                                                    
    eth0: link up (100/Full)                                                        
    ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready                               
    DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4                      
    DHCPOFFER from 10.55.98.1                                                       
    DHCPREQUEST on eth0 to 255.255.255.255 port 67                                  
    DHCPACK from 10.55.98.1                                                         
    bound to 10.55.98.19 -- renewal in 33627 seconds.                               
    

    it comes up and grabs its IP (in this case 10.55.98.19 )

  • Set the system date

    Your CORE9G25 board has two clocks:

    • One called System Clock that is a software clock maintained by the Linux Operating System
    • Another one called Real Time Clock (RTC) and implemented in hardware inside the Atmel CPU. This clock is powered by a Lithium battery to mantain the clock alive when the main power supply is off.

    Setting the System Clock

    date is the Linux command to manage the systems clock.

    To read the currently System Clock type:

    ~# date
    Fri Oct  8 17:44:42 CEST 2010
    

    To set it type:

    ~# date -s 201311231517
    Sat Nov 23 15:17:00 UTC 2013
    

    This time is active until the main power supply board is on. When off the system clock is lost.

    Setting the Real Time Clock

    To read the Hardware Clock type:

    ~# hwclock -r
    Fri Oct  8 17:46:43 2010  -0.004115 seconds
    

    To set the Hardware Clock using the System Clock current time type:

    ~# hwclock -w
    

    Now check it typing:

    ~# date
    Fri Oct  8 18:49:02 CEST 2010
    ~# hwclock -r
    Fri Oct  8 18:49:10 2010  -0.004076 seconds
    
  • Change the hostname

    When you get access to the CORE9G25 board command line the prompt is something like this:

    CORE9G25:~# 
    

    Where CORE9G25 is the current hostname.

    If more CORE9G25 boards or other Linux systems are reacheable on your LAN it could be important to have different hostnames tfor each board to avoid for example to give commands to the wrong system.

    The hostname is saved in /etc/hostname.

    Change it for example with myboard by typing:

    ~# echo "myboard" > /etc/hostname
  • Read the microSD serial number

    Enter the SD Card

    ~# cd /sys/class/mmc_host/mmc?/mmc?:*
    /sys/class/mmc_host/mmc0/mmc0:aaaa# cat serial
    0x015c5340

    A lot of other info are available:

    /sys/class/mmc_host/mmc0/mmc0:aaaa# ls -al
    total 0
    drwxr-xr-x 4 root root    0 Jun 27 15:37 .
    drwxr-xr-x 4 root root    0 Jun 27 15:37 ..
    drwxr-xr-x 3 root root    0 Jun 27 15:37 block
    -r--r--r-- 1 root root 4096 Jun 28 07:18 cid
    -r--r--r-- 1 root root 4096 Jun 28 07:28 csd
    -r--r--r-- 1 root root 4096 Jun 28 07:28 date
    lrwxrwxrwx 1 root root    0 Jun 27 15:37 driver -> ../../../../../../bus/mmc/drk
    -r--r--r-- 1 root root 4096 Jun 28 07:28 erase_size
    -r--r--r-- 1 root root 4096 Jun 28 07:21 fwrev
    -r--r--r-- 1 root root 4096 Jun 28 07:21 hwrev
    -r--r--r-- 1 root root 4096 Jun 28 07:21 manfid
    -r--r--r-- 1 root root 4096 Jun 27 15:37 name
    -r--r--r-- 1 root root 4096 Jun 28 07:18 oemid
    drwxr-xr-x 2 root root    0 Jun 28 07:28 power
    -r--r--r-- 1 root root 4096 Jun 28 07:28 preferred_erase_size
    -r--r--r-- 1 root root 4096 Jun 28 07:28 scr
    -r--r--r-- 1 root root 4096 Jun 27 15:37 serial
    lrwxrwxrwx 1 root root    0 Jun 27 15:37 subsystem -> ../../../../../../bus/mmc
    -r--r--r-- 1 root root 4096 Jun 28 07:28 type
    -rw-r--r-- 1 root root 4096 Jun 27 15:37 uevent
    

    Related links

  • System partition table
    0x00000-0x40000 : "bootstrap"
    0x40000-0xc0000 : "uboot"
    0xc0000-0x100000 : "env"
    0x100000-0x140000 : "env_redundant"
    0x140000-0x180000 : "spare"
    0x180000-0x200000 : "dtb"
    0x200000-0x800000 : "kernel"
    0x800000-0x10000000 : "rootfs" 
  • Reserve
     

Programming languages

This is a selection of "Hello World !" examples in all the languages we tried on the CORE9G25 boards:

Linux Kernel 3.6.9 and Buildroot

Update the system image file:

Embedded peripherals

USB peripherals

Programming examples

   

 

关注我们: 微博

销售邮箱:market@armdevs.com
技术支持: support@armdevs.com
销售电话: +86-755-29638421


核风在线支持>
在线时间:09:00-18:00
Copyright @ 2014 to 2020 - 核风智能技术有限公司