Wednesday, March 6, 2024

Buildroot for the ARC HS Development Kit (Part2)

Based on Buildroot 2023.02.1, the build process is quite smooth.

[ ]$ wget --no-check-certificate https://buildroot.org/downloads/buildroot-2023.02.1.tar.gz
[ ]$ tar zxvf buildroot-2023.02.1.tar.gz
[ ]$ cd buildroot-2023.02.1
[ ]$ make snps_archs38_hsdk_defconfig
[ ]$ make menuconfig
[ ]$ make

Result of the build

[ ]$ tree output/images/
output/images/
├── boot.vfat
├── rootfs.ext2
├── rootfs.ext4 -> rootfs.ext2
├── sdcard.img
├── u-boot
├── u-boot.bin
├── uboot-env.bin
└── uImage

Boot message in Minicom Console

Linux version 5.16.0 (shu@e560p) (arc-buildroot-linux-gnu-gcc.br_real (Buildroot 2023.02.1) 10.2.0, GNU ld (GNU Binutils) 2.34.50.20200611) #1 SM4
Memory @ 80000000 [1024M]
OF: fdt: Machine model: snps,hsdk
earlycon: uart8250 at MMIO32 0xf0005000 (options '115200n8')
printk: bootconsole [uart8250] enabled
Failed to get possible-cpus from dtb, pretending all 4 cpus exist
archs-intc : 2 priority levels (default 1) FIRQ (not used)

IDENTITY : ARCVER [0x52] ARCNUM [0x0] CHIPID [ 0x0]
processor [0] : HS38 R2.1 (ARCv2 ISA)
Timers : Timer0 Timer1 RTC [UP 64-bit] GFRC [SMP 64-bit]
ISA Extn : atomic ll64 unalign mpy[opt 9] div_rem
BPU : full match, cache:2048, Predict Table:16384 Return stk: 8
MMU [v4] : 8k PAGE, 2M Super Page (not used) , swalk 2 lvl, 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 (per-device)
Vector Table : 0x90000000
FPU : SP DP
DEBUG : smaRT RTT ActionPoint 8/min
Extn [SMP] : ARConnect (v2): 4 cores with IPI IDU DEBUG GFRC
Zone ranges:
Normal [mem 0x0000000080000000-0x00000000bfffffff]
Movable zone start for each node
Early memory node ranges
node 0: [mem 0x0000000080000000-0x00000000bfffffff]
Initmem setup node 0 [mem 0x0000000080000000-0x00000000bfffffff]
percpu: Embedded 6 pages/cpu s15360 r8192 d25600 u49152
pcpu-alloc: s15360 r8192 d25600 u49152 alloc=6*8192
pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3
Built 1 zonelists, mobility grouping on. Total pages: 130496
Kernel command line: earlycon=uart8250,mmio32,0xf0005000,115200n8 console=ttyS0,115200n8 debug print-fatal-signals=1 root=/dev/mmcblk0p2 rootwait
Dentry cache hash table entries: 131072 (order: 6, 524288 bytes, linear)
Inode-cache hash table entries: 65536 (order: 5, 262144 bytes, linear)
mem auto-init: stack:off, heap alloc:off, heap free:off
Memory: 1033520K/1048576K available (5549K kernel code, 636K rwdata, 1384K rodata, 152K init, 272K bss, 15056K reserved, 0K cma-reserved)
rcu: Preemptible hierarchical RCU implementation.
rcu: RCU event tracing is enabled.
Trampoline variant of Tasks RCU enabled.
rcu: RCU calculated value of scheduler-enlistment delay is 10 jiffies.
NR_IRQS: 512
MCIP: IDU supports 64 common irqs
sched_clock: 64 bits at 999MHz, resolution 1ns, wraps every 4398046511103ns
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, linear)
Mountpoint-cache hash table entries: 2048 (order: 0, 8192 bytes, linear)
rcu: Hierarchical SRCU implementation.
smp: Bringing up secondary CPUs ...
Idle Task [1] (ptrval)
Trying to bring up CPU1 ...
archs-intc : 2 priority levels (default 1) FIRQ (not used)

IDENTITY : ARCVER [0x52] ARCNUM [0x1] CHIPID [ 0x0]
processor [1] : HS38 R2.1 (ARCv2 ISA)
Timers : Timer0 Timer1 RTC [UP 64-bit]
ISA Extn : atomic ll64 unalign mpy[opt 9] div_rem
BPU : full match, cache:2048, Predict Table:16384 Return stk: 8
MMU [v4] : 8k PAGE, 2M Super Page (not used) , swalk 2 lvl, 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 (per-device)
Vector Table : 0x90000000
FPU : SP DP
DEBUG : smaRT RTT ActionPoint 8/min
Extn [CCM] : DCCM @ 60000000, 256 KB / ICCM: @ 60000000, 256 KB
Extn [SMP] : ARConnect (v2): 4 cores with IPI IDU DEBUG GFRC
## CPU1 LIVE ##: Executing Code...
Idle Task [2] (ptrval)
Trying to bring up CPU2 ...
archs-intc : 2 priority levels (default 1) FIRQ (not used)

IDENTITY : ARCVER [0x52] ARCNUM [0x2] CHIPID [ 0x0]
processor [2] : HS38 R2.1 (ARCv2 ISA)
Timers : Timer0 Timer1 RTC [UP 64-bit]
ISA Extn : atomic ll64 unalign mpy[opt 9] div_rem
BPU : full match, cache:2048, Predict Table:16384 Return stk: 8
MMU [v4] : 8k PAGE, 2M Super Page (not used) , swalk 2 lvl, 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 (per-device)
Vector Table : 0x90000000
FPU : SP DP
DEBUG : smaRT RTT ActionPoint 8/min
Extn [SMP] : ARConnect (v2): 4 cores with IPI IDU DEBUG GFRC
## CPU2 LIVE ##: Executing Code...
Idle Task [3] (ptrval)
Trying to bring up CPU3 ...
archs-intc : 2 priority levels (default 1) FIRQ (not used)

IDENTITY : ARCVER [0x52] ARCNUM [0x3] CHIPID [ 0x0]
processor [3] : HS38 R2.1 (ARCv2 ISA)
Timers : Timer0 Timer1 RTC [UP 64-bit]
ISA Extn : atomic ll64 unalign mpy[opt 9] div_rem
BPU : full match, cache:2048, Predict Table:16384 Return stk: 8
MMU [v4] : 8k PAGE, 2M Super Page (not used) , swalk 2 lvl, 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 (per-device)
Vector Table : 0x90000000
FPU : SP DP
DEBUG : smaRT RTT ActionPoint 8/min
Extn [CCM] : DCCM @ 60000000, 256 KB / ICCM: @ 60000000, 256 KB
Extn [SMP] : ARConnect (v2): 4 cores with IPI IDU DEBUG GFRC
## CPU3 LIVE ##: Executing Code...
smp: Brought up 1 node, 4 CPUs
devtmpfs: initialized
random: get_random_u32 called from rhashtable_init+0xbc/0x288 with crng_init=0
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 1024 (order: 4, 131072 bytes, linear)
NET: Registered PF_NETLINK/PF_ROUTE protocol family
DMA: preallocated 128 KiB GFP_KERNEL pool for atomic allocations
thermal_sys: Registered thermal governor 'step_wise'
reg-fixed-voltage regulator-5v0: use noncoherent DMA ops
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 PF_INET protocol family
IP idents hash table entries: 16384 (order: 4, 131072 bytes, linear)
tcp_listen_portaddr_hash hash table entries: 1024 (order: 0, 12288 bytes, linear)
TCP established hash table entries: 8192 (order: 2, 32768 bytes, linear)
TCP bind hash table entries: 8192 (order: 3, 65536 bytes, linear)
TCP: Hash tables configured (established 8192 bind 8192)
UDP hash table entries: 512 (order: 1, 16384 bytes, linear)
UDP-Lite hash table entries: 512 (order: 1, 16384 bytes, linear)
NET: Registered PF_UNIX/PF_LOCAL protocol family
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-pct pct: use noncoherent DMA ops
ARC perf : 8 counters (48 bits), 113 conditions
workingset: timestamp_bits=30 max_order=17 bucket_order=0
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 250)
io scheduler mq-deadline registered
io scheduler kyber registered
simple-pm-bus soc: use noncoherent DMA ops
random: fast init done
snps-creg-gpio f00014b0.gpio: use noncoherent DMA ops
snps-creg-gpio f00014b0.gpio: GPIO controller with 2 gpios probed
gpio-dwapb f0003000.gpio: use noncoherent DMA ops
gpio-dwapb f0003000.gpio: no IRQ for port0
dw_axi_dmac_platform f0080000.dmac: use noncoherent DMA ops
dw_axi_dmac_platform f0080000.dmac: DesignWare AXI DMA Controller, 4 channels
hsdk-reset f00008a0.reset-controller: use noncoherent DMA ops
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
dw-apb-uart f0005000.serial: use noncoherent DMA ops
printk: console [ttyS0] disabled
f0005000.serial: ttyS0 at MMIO 0xf0005000 (irq = 6, base_baud = 2083125) is a 16550A
printk: console [ttyS0] enabled
printk: console [ttyS0] enabled
printk: bootconsole [uart8250] disabled
printk: bootconsole [uart8250] disabled
usbcore: registered new interface driver udl
etnaviv-gpu f0090000.gpu: use noncoherent DMA ops
(null): use noncoherent DMA ops
etnaviv etnaviv: bound f0090000.gpu (ops 0x905cd900)
etnaviv-gpu f0090000.gpu: model: GC880, revision: 5124
[drm] Initialized etnaviv 1.3.0 20151214 for etnaviv on minor 0
brd: module loaded
dw_spi_mmio f0020000.spi: use noncoherent DMA ops
spi-nor spi0.0: sst26wf016b (2048 Kbytes)
libphy: Fixed MDIO Bus: probed
stmmaceth f0008000.ethernet: use coherent DMA ops
stmmaceth f0008000.ethernet: IRQ eth_wake_irq not found
stmmaceth f0008000.ethernet: IRQ eth_lpi not found
stmmaceth f0008000.ethernet: PTP uses main clock
stmmaceth f0008000.ethernet: User ID: 0x10, Synopsys ID: 0x37
stmmaceth f0008000.ethernet: DWMAC1000
stmmaceth f0008000.ethernet: DMA HW capability register supported
stmmaceth f0008000.ethernet: RX Checksum Offload Engine supported
stmmaceth f0008000.ethernet: COE Type 2
stmmaceth f0008000.ethernet: TX Checksum insertion supported
stmmaceth f0008000.ethernet: Normal descriptors
stmmaceth f0008000.ethernet: Ring mode enabled
stmmaceth f0008000.ethernet: Enable RX Mitigation via HW Watchdog Timer
stmmaceth f0008000.ethernet: device MAC address 0e:ba:db:6c:95:56
libphy: stmmac: probed
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-platform: EHCI generic platform driver
ehci-platform f0040000.ehci: use coherent DMA ops
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: use coherent DMA ops
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
sdhci: Secure Digital Host Controller Interface driver
sdhci: Copyright(c) Pierre Ossman
Synopsys Designware Multimedia Card Interface Driver
dw_mmc f000a000.mmc: use coherent DMA ops
sdhci-pltfm: SDHCI platform and OF driver helper
dw_mmc f000a000.mmc: IDMAC supports 32-bit address mode.
usbcore: registered new interface driver usbhid
dw_mmc f000a000.mmc: Using internal DMA controller.
usbhid: USB HID core driver
dw_mmc f000a000.mmc: Version ID is 290a
NET: Registered PF_INET6 protocol family
dw_mmc f000a000.mmc: DW MMC controller at irq 12,32 bit host data width,16 deep fifo
Segment Routing with IPv6
In-situ OAM (IOAM) with IPv6
sit: IPv6, IPv4 and MPLS over IPv4 tunneling driver
NET: Registered PF_PACKET protocol family
mmc_host mmc0: Bus speed (slot 0) = 50000000Hz (slot req 400000Hz, actual 396825HZ div = 63)
dw-apb-uart f0005000.serial: forbid DMA for kernel console
Waiting for root device /dev/mmcblk0p2...
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
usb 1-1: new high-speed USB device number 2 using ehci-platform
EXT4-fs (mmcblk0p2): recovery complete
EXT4-fs (mmcblk0p2): mounted filesystem with ordered data mode. Opts: (null). Quota mode: disabled.
VFS: Mounted root (ext4 filesystem) on device 179:2.
devtmpfs: mounted
Freeing unused kernel image (initmem) memory: 152K
This architecture does not have kernel memory protection.
Run /sbin/init as init process
with arguments:
/sbin/init
with environment:
HOME=/
TERM=linux
hub 1-1:1.0: USB hub found
hub 1-1:1.0: 2 ports detected
EXT4-fs (mmcblk0p2): re-mounted. Opts: (null). Quota mode: disabled.
Starting syslogd: OK
Starting klogd: OK
Running sysctl: OK
Saving 2048 bits of non-creditable seed for next boot
Starting network: stmmaceth f0008000.ethernet eth0: PHY [stmmac-0:00] driver [Micrel KSZ9031 Gigabit PHY] (irq=POLL)
stmmaceth f0008000.ethernet eth0: Register MEM_TYPE_PAGE_POOL RxQ-0
stmmaceth f0008000.ethernet eth0: No Safety Features support found
stmmaceth f0008000.ethernet eth0: PTP not supported by HW
stmmaceth f0008000.ethernet eth0: configuring for phy/rgmii-id link mode
udhcpc: started, v1.36.0
udhcpc: broadcasting discover
stmmaceth f0008000.ethernet eth0: Link is Up - 100Mbps/Full - flow control rx/tx
IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
udhcpc: no lease, forking to background
OK

Welcome to the HSDK Platform
hsdk login: root
# ifconfig
eth0 Link encap:Ethernet HWaddr 0E:BA:DB:6C:95:56
inet addr:192.168.7.120 Bcast:192.168.7.255 Mask:255.255.255.0
inet6 addr: fe80::cba:dbff:fe6c:9556/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:84 errors:0 dropped:4 overruns:0 frame:0
TX packets:9 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:8561 (8.3 KiB) TX bytes:1270 (1.2 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.020 ms
64 bytes from 168.95.1.1: seq=1 ttl=55 time=19.687 ms
^C
--- 168.95.1.1 ping statistics ---
2 packets transmitted, 2 packets received, 0% packet loss
round-trip min/avg/max = 6.020/12.853/19.687 ms
#

No comments: