summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--package/glibc/Makefile6
-rw-r--r--target/config/Config.in.kernelversion3
-rw-r--r--target/riscv32/kernel/qemu-riscv323
-rw-r--r--target/riscv64/Makefile8
-rw-r--r--target/riscv64/kernel/qemu-riscv641
-rw-r--r--toolchain/glibc/Makefile.inc3
6 files changed, 18 insertions, 6 deletions
diff --git a/package/glibc/Makefile b/package/glibc/Makefile
index 96ae9fa63..c7df87f66 100644
--- a/package/glibc/Makefile
+++ b/package/glibc/Makefile
@@ -48,14 +48,14 @@ ifneq ($(ADK_TARGET_USE_STATIC_LIBS_ONLY),y)
$(CP) $(STAGING_TARGET_DIR)/lib/ld*.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH)
for file in libc libpthread librt libcrypt libdl libm libanl libnsl libresolv libutil libnss_dns libnss_files; do \
$(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \
- $(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_VERSION).so $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \
+ $(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_GLIBCVER).so $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \
done
else
# libnss_* required at runtime even for static builds
${INSTALL_DIR} ${IDIR_GLIBC}/$(ADK_TARGET_LIBC_PATH)
for file in libnss_dns libnss_files; do \
$(CP) $(STAGING_TARGET_DIR)/lib/$$file.so* $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \
- $(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_VERSION).so $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \
+ $(CP) $(STAGING_TARGET_DIR)/lib/$$file-$(PKG_GLIBCVER).so $(IDIR_GLIBC)/$(ADK_TARGET_LIBC_PATH); \
done
endif
${INSTALL_DIR} $(IDIR_GLIBC)/usr/bin
@@ -99,7 +99,7 @@ endif
${CP} ${STAGING_TARGET_DIR}/usr/lib/crt* ${IDIR_GLIBC_DEV}/usr/lib
${CP} ${STAGING_TARGET_DIR}/usr/lib/libc_nonshared.a ${IDIR_GLIBC_DEV}/usr/lib
-for file in libpthread librt libcrypt libdl libm libresolv libutil; do \
- cd $(IDIR_GLIBC_DEV)/$(ADK_TARGET_LIBC_PATH); ln -sf $$file-$(PKG_VERSION).so $$file.so; \
+ cd $(IDIR_GLIBC_DEV)/$(ADK_TARGET_LIBC_PATH); ln -sf $$file-$(PKG_GLIBCVER).so $$file.so; \
done
# header package
${KERNEL_MAKE_ENV} \
diff --git a/target/config/Config.in.kernelversion b/target/config/Config.in.kernelversion
index 062df0129..8e958a4c9 100644
--- a/target/config/Config.in.kernelversion
+++ b/target/config/Config.in.kernelversion
@@ -204,7 +204,6 @@ config ADK_TARGET_KERNEL_GIT_REPO
default "https://git.phytec.de/git/linux-ti.git" if ADK_TARGET_SYSTEM_PHYTEC_WEGA
default "https://github.com/m-labs/linux-milkymist.git" if ADK_TARGET_ARCH_LM32
default "https://github.com/c-sky/linux-4.9.y.git" if ADK_TARGET_ARCH_CSKY
- default "https://github.com/riscv/riscv-linux.git" if ADK_TARGET_ARCH_RISCV32 || ADK_TARGET_ARCH_RISCV64
default "git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git"
help
GIT repository to use.
@@ -214,7 +213,6 @@ config ADK_TARGET_KERNEL_GIT_REPO_NAME
depends on ADK_TARGET_KERNEL_VERSION_GIT
default "csky" if ADK_TARGET_ARCH_CSKY
default "lm32" if ADK_TARGET_ARCH_LM32
- default "riscv" if ADK_TARGET_ARCH_RISCV32 || ADK_TARGET_ARCH_RISCV64
default "rpi" if ADK_TARGET_BOARD_BCM28XX
default "ad" if ADK_TARGET_SYSTEM_ADSP_BF537
default "bb" if ADK_TARGET_SYSTEM_BEAGLEBONE_BLACK
@@ -229,7 +227,6 @@ config ADK_TARGET_KERNEL_GIT
depends on ADK_TARGET_KERNEL_VERSION_GIT
default "6064a9bdf48cefbccc4f6472dd04251f0dec1931" if ADK_TARGET_ARCH_CSKY
default "6a2f2e4198eaff63ee75f6085ce9f966c47b4441" if ADK_TARGET_ARCH_LM32
- default "1cd2e072bbd1a518e11b551435be0ad84a2c52af" if ADK_TARGET_ARCH_RISCV32 || ADK_TARGET_ARCH_RISCV64
default "cfa29b46af94d83e31aa000dbaee553f9c4d670c" if ADK_TARGET_BOARD_BCM28XX
default "f8d3b2a0fa5054aaed0f14cd457db9d8922bb167" if ADK_TARGET_SYSTEM_ADSP_BF537
default "e7c8afc1dda7b7c18596d90ad6a17ae886650b72" if ADK_TARGET_SYSTEM_KINETIS_K70
diff --git a/target/riscv32/kernel/qemu-riscv32 b/target/riscv32/kernel/qemu-riscv32
index 6c2573530..ab8ffb263 100644
--- a/target/riscv32/kernel/qemu-riscv32
+++ b/target/riscv32/kernel/qemu-riscv32
@@ -1,4 +1,7 @@
CONFIG_RISCV=y
+CONFIG_ARCH_RV32I=y
+CONFIG_CMODEL_MEDANY=y
CONFIG_CPU_RV_GENERIC=y
CONFIG_RV_SYSRISCV_ATOMIC=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
CONFIG_32BIT=y
diff --git a/target/riscv64/Makefile b/target/riscv64/Makefile
index 30099fb55..9b84ee309 100644
--- a/target/riscv64/Makefile
+++ b/target/riscv64/Makefile
@@ -14,6 +14,10 @@ ifeq ($(ADK_TARGET_FS),initramfs)
targethelp:
@echo 'The kernel file is: $(FW_DIR)/${TARGET_KERNEL}'
@echo 'The initramfs image is: ${FW_DIR}/${INITRAMFS}'
+ifeq ($(ADK_TARGET_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo 'qemu-system-riscv64 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL) -initrd ${FW_DIR}/${INITRAMFS}'
+endif
endif
ifeq ($(ADK_TARGET_FS),initramfsarchive)
targethelp:
@@ -23,6 +27,10 @@ endif
ifeq ($(ADK_TARGET_FS),initramfspiggyback)
targethelp:
@echo 'The kernel+initramfs file is: $(FW_DIR)/${TARGET_KERNEL}'
+ifeq ($(ADK_TARGET_QEMU),y)
+ @echo "Start qemu with following command line:"
+ @echo 'qemu-system-riscv64 ${QEMU_ARGS} -kernel $(FW_DIR)/$(TARGET_KERNEL)'
+endif
endif
kernel-strip:
diff --git a/target/riscv64/kernel/qemu-riscv64 b/target/riscv64/kernel/qemu-riscv64
index 94104e26c..85e4c59d5 100644
--- a/target/riscv64/kernel/qemu-riscv64
+++ b/target/riscv64/kernel/qemu-riscv64
@@ -1 +1,2 @@
CONFIG_RISCV=y
+CONFIG_SECTION_MISMATCH_WARN_ONLY=y
diff --git a/toolchain/glibc/Makefile.inc b/toolchain/glibc/Makefile.inc
index 16355c05a..728fe6270 100644
--- a/toolchain/glibc/Makefile.inc
+++ b/toolchain/glibc/Makefile.inc
@@ -4,17 +4,20 @@
PKG_NAME:= glibc
ifeq ($(ADK_LIBC_VERSION),git)
PKG_VERSION:= 2.26.90
+PKG_GLIBCVER:= 2.26.90
PKG_SITES:= git://sourceware.org/git/glibc.git
PKG_RELEASE:= 1
endif
ifeq ($(ADK_TARGET_LIB_GLIBC_2_26),y)
PKG_VERSION:= 2.26
+PKG_GLIBCVER:= 2.26
PKG_RELEASE:= 1
PKG_SITES:= ${MASTER_SITE_GNU:=glibc/}
PKG_HASH:= e54e0a934cd2bc94429be79da5e9385898d2306b9eaf3c92d5a77af96190f6bd
endif
ifeq ($(ADK_TARGET_LIB_GLIBC_RISCV),y)
PKG_VERSION:= riscv-glibc-2.26
+PKG_GLIBCVER:= 2.26
PKG_RELEASE:= 1
PKG_GIT:= branch
PKG_SITES:= https://github.com/riscv/riscv-glibc.git