Skip to content

Commit 87157a0

Browse files
committed
board: add support for ARC HS Development Kit (HSDK)
Synopsys DesignWare HSDK (which stands for ARC HS Development Kit) is the latest and greatest development platform that sports quad-core ARC HS38 in real silicon. Most noticeable features of the board are: * Quad-core ARC HS38 CPU running at 1GHz * 4Gb of DDR * Built-in Vivante GPU (well supported via open source Etnaviv drivers) * Built-in Wi-Fi/Bluetooth module (RedPine RS-9113) And as usual we have: * [micro] SD-card slot * 2 USB 2.0 ports * 1Gbit Ethernet port * Built-in Digilent JTAG probe * Serial port accessible via micro-USB port Writing sdcard.img on SDcard creates two partitions: * FAT32 with uImage and uboot.env * EXT4 with root filesystem We modify kernel config because in default hsdk kernel config CONFIG_INITRAMFS_SOURCE parameter is set and when we build rootfs separately (BR2_TARGET_ROOTFS_INITRAMFS is not set) error appears. Also we set up CONFIG_ARC_UBOOT_SUPPORT which enables usage of uboot variables in the boot process. Signed-off-by: Evgeniy Didin <[email protected]>
1 parent 9dd7669 commit 87157a0

File tree

7 files changed

+96
-0
lines changed

7 files changed

+96
-0
lines changed

.gitlab-ci.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -206,6 +206,7 @@ snps_arc700_axs101_defconfig: *defconfig
206206
snps_archs38_axs103_defconfig: *defconfig
207207
snps_archs38_haps_defconfig: *defconfig
208208
snps_archs38_vdk_defconfig: *defconfig
209+
snps_hsdk_defconfig: *defconfig
209210
socrates_cyclone5_defconfig: *defconfig
210211
stm32f429_disco_defconfig: *defconfig
211212
stm32f469_disco_defconfig: *defconfig

DEVELOPERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -146,6 +146,7 @@ F: package/wf111/
146146

147147
N: ARC Maintainers <[email protected]>
148148
F: arch/Config.in.arc
149+
F: board/synopsys
149150

150151
N: Ariel D'Alessandro <[email protected]>
151152
F: package/axfsutils/

board/synopsys/hsdk/genimage.cfg

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
image boot.vfat {
2+
vfat {
3+
files = {
4+
"uboot.env",
5+
"uImage"
6+
}
7+
}
8+
size = 100M
9+
}
10+
11+
image sdcard.img {
12+
hdimage {
13+
}
14+
15+
partition boot {
16+
partition-type = 0xC
17+
bootable = "true"
18+
image = "boot.vfat"
19+
}
20+
21+
partition rootfs {
22+
partition-type = 0x83
23+
image = "rootfs.ext4"
24+
size = 1G
25+
}
26+
}

board/synopsys/hsdk/linux.fragment

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
CONFIG_INITRAMFS_SOURCE=
2+
CONFIG_ARC_UBOOT_SUPPORT=y

board/synopsys/hsdk/post-image.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#!/bin/bash
2+
3+
BOARD_DIR="$(dirname $0)"
4+
BOARD_NAME="$(basename ${BOARD_DIR})"
5+
GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
6+
GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
7+
rm -rf "${GENIMAGE_TMP}"
8+
9+
mv ${BINARIES_DIR}/uboot-env.bin ${BINARIES_DIR}/uboot.env
10+
11+
genimage \
12+
--rootpath "${TARGET_DIR}" \
13+
--tmppath "${GENIMAGE_TMP}" \
14+
--inputpath "${BINARIES_DIR}" \
15+
--outputpath "${BINARIES_DIR}" \
16+
--config "${GENIMAGE_CFG}"
17+
gzip < ${BINARIES_DIR}/sdcard.img > ${BINARIES_DIR}/sdcard.img.gz
18+
exit $?

board/synopsys/hsdk/uboot.env.txt

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
baudrate=115200
2+
bootargs=console=ttyS3,115200n8 root=/dev/mmcblk0p2 rootwait
3+
bootcmd=fatload mmc 0:1; bootm
4+
bootdelay=2
5+
bootfile=uImage
6+
loadaddr=0x82000000
7+
stderr=serial0@f0005000
8+
stdin=serial0@f0005000
9+
stdout=serial0@f0005000

configs/snps_hsdk_defconfig

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
#Architecture
2+
BR2_arcle=y
3+
BR2_archs38=y
4+
5+
#Linux headers
6+
BR2_KERNEL_HEADERS_4_14=y
7+
8+
#System
9+
BR2_TARGET_GENERIC_HOSTNAME="hsdk"
10+
BR2_TARGET_GENERIC_ISSUE="Welcome to the HSDK Platform"
11+
BR2_SYSTEM_DHCP="eth0"
12+
13+
#Kernel
14+
BR2_LINUX_KERNEL=y
15+
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
16+
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="4.14.4"
17+
BR2_LINUX_KERNEL_DEFCONFIG="hsdk"
18+
BR2_LINUX_KERNEL_CONFIG_FRAGMENT_FILES="board/synopsys/hsdk/linux.fragment"
19+
20+
#Filesystem / image
21+
BR2_TARGET_ROOTFS_EXT2=y
22+
BR2_TARGET_ROOTFS_EXT2_4=y
23+
# BR2_TARGET_ROOTFS_TAR is not set
24+
BR2_PACKAGE_HOST_DOSFSTOOLS=y
25+
BR2_PACKAGE_HOST_GENIMAGE=y
26+
BR2_PACKAGE_HOST_MTOOLS=y
27+
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/synopsys/hsdk/post-image.sh"
28+
29+
#Bootloader
30+
BR2_TARGET_UBOOT=y
31+
BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y
32+
BR2_TARGET_UBOOT_CUSTOM_VERSION=y
33+
BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2017.11"
34+
BR2_TARGET_UBOOT_BOARD_DEFCONFIG="hsdk"
35+
BR2_TARGET_UBOOT_NEEDS_DTC=y
36+
BR2_TARGET_UBOOT_FORMAT_ELF=y
37+
BR2_TARGET_UBOOT_ENVIMAGE=y
38+
BR2_TARGET_UBOOT_ENVIMAGE_SOURCE="board/synopsys/hsdk/uboot.env.txt"
39+
BR2_TARGET_UBOOT_ENVIMAGE_SIZE="0x4000"

0 commit comments

Comments
 (0)