Linux distribution for the ARC HS Development Kit (HSDK) Here
[ ]$ wget --no-check-certificate https://github.com/foss-for-synopsys-dwc-arc-processors/buildroot/archive/arc-2017.11-hsdk-release.tar.gz
[ ]$ tar zxvf arc-2017.11-hsdk-release.tar.gz
[ ]$ cd buildroot-arc-2017.11-hsdk-release
Select the default configuration for the target:
[ ]$ make snps_hsdk_defconfig
Optional: modify the configuration:
[ ]$ make menuconfig
PS. Deselect perf option under Kernel/Linux Kernel Tools (Compilation issue)
Build:
[ ]$ make
PS. During the build process, all downloaded source tarballs are saved in the dl directory.
After fixing a few issues ... Result of the build
[ ]$ tree output/images/
output/images/
├── boot.vfat
├── hsdk.dtb
├── rootfs.ext2
├── rootfs.ext4 -> rootfs.ext2
├── sdcard.img
├── sdcard.img.gz
├── u-boot
├── u-boot.bin
├── uboot.env
├── u-boot.head
└── uImage
Copy the image file to the SD Card
[ ]$ dd if=output/images/sdcard.img of=/dev/mmcblk0 bs=1M status=progress oflag=direct
Boot Message in Minicom Console
U-Boot 2017.11 (Jan 29 2018 - 17:01:45 +0300)
DRAM: 1 GiB
Relocation Offset is: 3ef67000
MMC: Synopsys Mobile storage: 0
reading uboot.env
In: serial0@f0005000
Out: serial0@f0005000
Err: serial0@f0005000
Clock values are saved to environment
Net:
Warning: ethernet@f0008000 (eth0) using random MAC address - 6a:ae:81:c6:de:95
eth0: ethernet@f0008000
Hit any key to stop autoboot: 0
reading uImage
3783300 bytes read in 166 ms (21.7 MiB/s)
reading hsdk.dtb
3491 bytes read in 4 ms (851.6 KiB/s)
## Booting kernel from Legacy Image at 82000000 ...
Image Name: Linux-4.14.7
Image Type: ARC Linux Kernel Image (gzip compressed)
Data Size: 3783236 Bytes = 3.6 MiB
Load Address: 90000000
Entry Point: 90004000
Verifying Checksum ... OK
## Flattened Device Tree blob at 81000000
Booting using the fdt blob at 0x81000000
Uncompressing Kernel Image ... OK
Loading Device Tree to bfd5d000, end bfd60da2 ... OK
CPU start mask is 0xf
Starting kernel ...
Linux version 4.14.7 (shu@e560p) (gcc version 7.1.1 20170710 (Buildroot 2017.11)) #1 SMP PREEMPT Wed Mar 6 13:58:01 CST 2024
Memory @ 80000000 [1024M]
OF: fdt: Machine model: snps,hsdk
archs-intc : 2 priority levels (default 1) FIRQ (not used)
IDENTITY : ARCVER [0x52] ARCNUM [0x0] CHIPID [ 0x0]
processor [0] : ARC HS38 R2.1 (ARCv2 ISA)
Timers : Timer0 Timer1 RTC [UP 64-bit] GFRC [SMP 64-bit]
ISA Extn : atomic ll64 unalign (not used)
: mpy[opt 9] div_rem norm barrel-shift swap minmax swape
BPU : full match, cache:2048, Predict Table:16384
MMU [v4] : 8k PAGE, 2M Super Page (not used) JTLB 1024 (256x4), uDTLB 8, uITLB 4, PAE40 (not used)
I-Cache : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache : 64K, 2way/set, 64B Line, PIPT
SLC : 512K, 128B Line
Peripherals : 0xf0000000, IO-Coherency
Vector Table : 0x90000000
FPU : SP DP
DEBUG : ActionPoint smaRT RTT
OS ABI [v4] : 64-bit data any register aligned
Extn [SMP] : ARConnect (v2): 4 cores with IPI IDU DEBUG GFRC
Enable CONFIG_ARC_HAS_ACCL_REGS for working apps
percpu: Embedded 7 pages/cpu @bff9e000 s25088 r8192 d24064 u57344
Built 1 zonelists, mobility grouping on. Total pages: 130496
Kernel command line: console=ttyS0,115200n8 root=/dev/mmcblk0p2 rootwait
PID hash table entries: 4096 (order: 1, 16384 bytes)
Dentry cache hash table entries: 131072 (order: 6, 524288 bytes)
Inode-cache hash table entries: 65536 (order: 5, 262144 bytes)
Memory: 773256K/1048576K available (5014K kernel code, 270K rwdata, 920K rodata, 152K init, 286K bss, 275320K reserved, 0K cma-reserved)
Preemptible hierarchical RCU implementation.
Tasks RCU enabled.
NR_IRQS: 512
MCIP: IDU supports 64 common irqs
clocksource: ARConnect GFRC: mask: 0xffffffffffffffff max_cycles: 0x1cd42e4dffb, max_idle_ns: 881590591483 ns
Console: colour dummy device 80x25
Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 2048 (order: 0, 8192 bytes)
Mountpoint-cache hash table entries: 2048 (order: 0, 8192 bytes)
Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
Idle Task [1] bf04ba80
Trying to bring up CPU1 ...
archs-intc : 2 priority levels (default 1) FIRQ (not used)
IDENTITY : ARCVER [0x52] ARCNUM [0x1] CHIPID [ 0x0]
processor [1] : ARC HS38 R2.1 (ARCv2 ISA)
Timers : Timer0 Timer1 RTC [UP 64-bit]
ISA Extn : atomic ll64 unalign (not used)
: mpy[opt 9] div_rem norm barrel-shift swap minmax swape
BPU : full match, cache:2048, Predict Table:16384
MMU [v4] : 8k PAGE, 2M Super Page (not used) JTLB 1024 (256x4), uDTLB 8, uITLB 4, PAE40 (not used)
I-Cache : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache : 64K, 2way/set, 64B Line, PIPT
SLC : 512K, 128B Line
Peripherals : 0xf0000000, IO-Coherency
Vector Table : 0x90000000
FPU : SP DP
DEBUG : ActionPoint smaRT RTT
Extn [CCM] : DCCM @ 80000000, 256 KB / ICCM: @ 70000000, 256 KB
OS ABI [v4] : 64-bit data any register aligned
Extn [SMP] : ARConnect (v2): 4 cores with IPI IDU DEBUG GFRC
Enable CONFIG_ARC_HAS_ACCL_REGS for working apps
## CPU1 LIVE ##: Executing Code...
Idle Task [2] bf04b540
Trying to bring up CPU2 ...
archs-intc : 2 priority levels (default 1) FIRQ (not used)
IDENTITY : ARCVER [0x52] ARCNUM [0x2] CHIPID [ 0x0]
processor [2] : ARC HS38 R2.1 (ARCv2 ISA)
Timers : Timer0 Timer1 RTC [UP 64-bit]
ISA Extn : atomic ll64 unalign (not used)
: mpy[opt 9] div_rem norm barrel-shift swap minmax swape
BPU : full match, cache:2048, Predict Table:16384
MMU [v4] : 8k PAGE, 2M Super Page (not used) JTLB 1024 (256x4), uDTLB 8, uITLB 4, PAE40 (not used)
I-Cache : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache : 64K, 2way/set, 64B Line, PIPT
SLC : 512K, 128B Line
Peripherals : 0xf0000000, IO-Coherency
Vector Table : 0x90000000
FPU : SP DP
DEBUG : ActionPoint smaRT RTT
OS ABI [v4] : 64-bit data any register aligned
Extn [SMP] : ARConnect (v2): 4 cores with IPI IDU DEBUG GFRC
Enable CONFIG_ARC_HAS_ACCL_REGS for working apps
## CPU2 LIVE ##: Executing Code...
Idle Task [3] bf04b000
Trying to bring up CPU3 ...
archs-intc : 2 priority levels (default 1) FIRQ (not used)
IDENTITY : ARCVER [0x52] ARCNUM [0x3] CHIPID [ 0x0]
processor [3] : ARC HS38 R2.1 (ARCv2 ISA)
Timers : Timer0 Timer1 RTC [UP 64-bit]
ISA Extn : atomic ll64 unalign (not used)
: mpy[opt 9] div_rem norm barrel-shift swap minmax swape
BPU : full match, cache:2048, Predict Table:16384
MMU [v4] : 8k PAGE, 2M Super Page (not used) JTLB 1024 (256x4), uDTLB 8, uITLB 4, PAE40 (not used)
I-Cache : 64K, 4way/set, 64B Line, VIPT aliasing
D-Cache : 64K, 2way/set, 64B Line, PIPT
SLC : 512K, 128B Line
Peripherals : 0xf0000000, IO-Coherency
Vector Table : 0x90000000
FPU : SP DP
DEBUG : ActionPoint smaRT RTT
Extn [CCM] : DCCM @ 80000000, 256 KB / ICCM: @ 70000000, 256 KB
OS ABI [v4] : 64-bit data any register aligned
Extn [SMP] : ARConnect (v2): 4 cores with IPI IDU DEBUG GFRC
Enable CONFIG_ARC_HAS_ACCL_REGS for working apps
## CPU3 LIVE ##: Executing Code...
smp: Brought up 1 node, 4 CPUs
devtmpfs: initialized
random: get_random_u32 called from rhashtable_init+0x11a/0x284 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 1024 (order: 3, 65536 bytes)
NET: Registered protocol family 16
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
pps_core: LinuxPPS API ver. 1 registered
pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
PTP clock support registered
clocksource: Switched to clocksource ARConnect GFRC
NET: Registered protocol family 2
TCP established hash table entries: 8192 (order: 2, 32768 bytes)
TCP bind hash table entries: 8192 (order: 3, 65536 bytes)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 1, 16384 bytes)
UDP-Lite hash table entries: 512 (order: 1, 16384 bytes)
NET: Registered protocol family 1
RPC: Registered named UNIX socket transport module.
RPC: Registered udp transport module.
RPC: Registered tcp transport module.
RPC: Registered tcp NFSv4.1 backchannel transport module.
ARC perf : 8 counters (48 bits), 113 conditions
workingset: timestamp_bits=30 max_order=17 bucket_order=0
random: fast init done
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
io scheduler noop registered
io scheduler deadline registered
io scheduler cfq registered (default)
io scheduler mq-deadline registered
io scheduler kyber registered
usbcore: registered new interface driver udlfb
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
console [ttyS0] disabled
f0005000.serial: ttyS0 at MMIO 0xf0005000 (irq = 6, base_baud = 2083125) is a 16550A
console [ttyS0] enabled
libphy: Fixed MDIO Bus: probed
stmmaceth f0008000.ethernet: PTP uses main clock
stmmac - user ID: 0x10, Synopsys ID: 0x37
stmmaceth f0008000.ethernet: Ring mode enabled
stmmaceth f0008000.ethernet: DMA HW capability register supported
stmmaceth f0008000.ethernet: Normal descriptors
stmmaceth f0008000.ethernet: RX Checksum Offload Engine supported
stmmaceth f0008000.ethernet: COE Type 2
stmmaceth f0008000.ethernet: TX Checksum insertion supported
stmmaceth f0008000.ethernet: Enable RX Mitigation via HW Watchdog Timer
libphy: stmmac: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-platform: EHCI generic platform driver
ehci-platform f0040000.ehci: EHCI Host Controller
ehci-platform f0040000.ehci: new USB bus registered, assigned bus number 1
ehci-platform f0040000.ehci: irq 15, io mem 0xf0040000
ehci-platform f0040000.ehci: USB 2.0 started, EHCI 1.00
hub 1-0:1.0: USB hub found
hub 1-0:1.0: 1 port detected
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-platform: OHCI generic platform driver
ohci-platform f0060000.ohci: Generic Platform OHCI controller
ohci-platform f0060000.ohci: new USB bus registered, assigned bus number 2
ohci-platform f0060000.ohci: irq 15, io mem 0xf0060000
hub 2-0:1.0: USB hub found
hub 2-0:1.0: 1 port detected
usbcore: registered new interface driver usb-storage
IR NEC protocol handler initialized
IR RC5(x/sz) protocol handler initialized
IR RC6 protocol handler initialized
IR JVC protocol handler initialized
IR Sony protocol handler initialized
IR SANYO protocol handler initialized
IR Sharp protocol handler initialized
IR MCE Keyboard/mouse protocol handler initialized
IR XMP protocol handler initialized
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
Synopsys Designware Multimedia Card Interface Driver
dw_mmc f000a000.mmc: 'num-slots' was deprecated.
dw_mmc f000a000.mmc: IDMAC supports 32-bit address mode.
dw_mmc f000a000.mmc: Using internal DMA controller.
dw_mmc f000a000.mmc: Version ID is 290a
dw_mmc f000a000.mmc: DW MMC controller at irq 12,32 bit host data width,16 deep fifo
mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz, actual 396825HZ div = 63)
sdhci-pltfm: SDHCI platform and OF driver helper
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
NET: Registered protocol family 10
Segment Routing with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered protocol family 17
ttyS0 - failed to request DMA
Waiting for root device /dev/mmcblk0p2...
usb 1-1: new high-speed USB device number 2 using ehci-platform
mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 25000000Hz, actual 25000000HZ div = 1)
mmc0: new SDHC card at address 0007
blk_queue_max_segment_size: set to minimum 8192
mmcblk0: mmc0:0007 SD4GB 3.68 GiB
mmcblk0: p1 p2
EXT4-fs (mmcblk0p2): couldn't mount as ext3 due to feature incompatibilities
EXT4-fs (mmcblk0p2): couldn't mount as ext2 due to feature incompatibilities
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 2 ports detected
random: crng init done
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext4 filesystem) on device 179:2.
devtmpfs: mounted
Freeing unused kernel memory: 152K
This architecture does not have kernel memory protection.
EXT4-fs (mmcblk0p2): re-mounted. Opts: data=ordered
Starting logging: OK
Initializing random number generator... done.
Starting network: stmmaceth f0008000.ethernet eth0: device MAC address 7e:f7:c5:69:03:97
Micrel KSZ9031 Gigabit PHY stmmac-0:00: attached PHY driver [Micrel KSZ9031 Gigabit PHY] (mii_bus:phy_addr=stmmac-0:00, irq=POLL)
stmmaceth f0008000.ethernet eth0: PTP not supported by HW
IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
udhcpc: started, v1.27.2
udhcpc: sending discover
stmmaceth f0008000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: sending discover
udhcpc: sending select for 192.168.7.179
udhcpc: lease of 192.168.7.179 obtained, lease time 864000
deleting routers
adding dns 192.168.7.9
adding dns 192.168.7.8
OK
ssh-keygen: generating new host keys: RSA DSA ECDSA ED25519
Starting sshd: OK
Welcome to the HSDK Platform
hsdk login: root
# ifconfig
eth0 Link encap:Ethernet HWaddr 7E:F7:C5:69:03:97
inet addr:192.168.7.179 Bcast:192.168.7.255 Mask:255.255.255.0
inet6 addr: fe80::7cf7:c5ff:fe69:397/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:435 errors:0 dropped:20 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:36096 (35.2 KiB) TX bytes:1340 (1.3 KiB)
Interrupt:10 Base address:0x8000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
# ping 168.95.1.1
PING 168.95.1.1 (168.95.1.1): 56 data bytes
64 bytes from 168.95.1.1: seq=0 ttl=55 time=6.185 ms
64 bytes from 168.95.1.1: seq=1 ttl=55 time=8.870 ms
^C
--- 168.95.1.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 6.185/7.527/8.870 ms
#
Reference
Building-and-Running-ARC-Linux-for-HSDK