Package Details: mounriver-studio-toolchain-bin 1.20-1

Git Clone URL: https://aur.archlinux.org/mounriver-studio-toolchain-bin.git (read-only, click to copy)
Package Base: mounriver-studio-toolchain-bin
Description: This MRS Toolchain includes the tool chain for RISC-V kernel chip under Linux x64 and the debug download tool OpenOCD.
Upstream URL: http://www.mounriver.com/
Keywords: mounriver openocd studio toolchain WCH
Licenses: GPL2, custom, GPL3
Provides: MRS-Toolchain
Submitter: taotieren
Maintainer: taotieren (yjun)
Last Packager: taotieren
Votes: 1
Popularity: 0.35
First Submitted: 2021-08-03 07:02
Last Updated: 2021-11-30 02:33

Dependencies (9)

Required by (4)

Sources (1)

Latest Comments

yjun commented on 2021-11-30 13:48

@taotieren thanks!

taotieren commented on 2021-11-30 02:10

@yjun 已添加为共同维护者,有更新可以及时提交到仓库。操作方式:

# 更新 PKGBUILD 版本信息
vim PKGBUILD
# 更新 校验值和 .SRCINFO 文件
updpkgsums && makepkg --printsrcinfo > .SRCINFO
# 编译测试
makepkg -sf
# 安装编译后的包验证
yay -U *.pkg.tar.zst
# 确认没问题后提交并推送到仓库。
git commit -am "Update 1.20" && git push
# 特殊注意:变更 PKGBUILD 后一定要更新 校验值和 .SRCINFO 文件  

yjun commented on 2021-11-29 08:23

v1.20

diff --git a/PKGBUILD b/PKGBUILD
index a6fae5f..6001de3 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -2,14 +2,13 @@

 pkgbase=mounriver-studio-toolchain-bin
 pkgname=($pkgbase mounriver-studio-toolchain-openocd-bin mounriver-studio-toolchain-riscv-bin)
-pkgver=1.10
-pkgrel=2
+pkgver=1.20
+pkgrel=1
 arch=('x86_64')
 url='http://www.mounriver.com/'
 license=('GPL2' 'GPL3' 'custom')
 provides=('MRS-Toolchain')
 conflicts=()
-depends=('bash')
 makedepends=('tar')
 optdepends=('ch34x-dkms-git: CH341SER driver with fixed bug'
             'i2c-ch341-dkms: CH341 USB-I2C adapter driver'
@@ -17,15 +16,13 @@ optdepends=('ch34x-dkms-git: CH341SER driver with fixed bug'
             'ch341eepromtool: An i2c serial EEPROM programming tool for the WCH CH341A'
             'ch341prog-git: A simple command line tool (programmer) interfacing with ch341a'
             'ch341eeprom-git: A libusb based programming tool for 24xx I²C EEPROMs using the WCH CH341A')
-source=("${pkgbase}-${pkgver}.tar.gz::http://file.mounriver.com/tools/MRS_Toolchain_Linux_x64_V${pkgver}.tar.gz"
+source=("${pkgbase}-${pkgver}.tar.xz::http://file.mounriver.com/tools/MRS_Toolchain_Linux_x64_V${pkgver}.tar.xz"
         )

-sha256sums=('443a7392c42cd387a2b0445f265e9e98b020b7779d346f360a786f1c0c1a7b9b')
+sha256sums=('f70344379c586d93c5405ed7c75a2b71ef952c5747ad587cab5fc641b65276eb')

 options=('!strip')

-noextract=(${pkgbase}-${pkgver}.tar.gz)
-
 _install(){
      find ${@: 2} -type f -exec install -Dm$1 {}  ${pkgdir}/opt/wch/${pkgname%-bin}/{} \;
 } 
@@ -44,37 +41,30 @@ package_mounriver-studio-toolchain-openocd-bin() {
              'libudev.so')

     pkgdesc="MRS Toolchain OpenOCD supports erasure, programming, verification and debugging of the chip."
-    install -dm0755 "${pkgdir}/opt/wch/${pkgname%-bin}"
-
-    tar -xf "${srcdir}/${pkgbase}-${pkgver}.tar.gz" --strip-components=2 -C "${srcdir}"
-# cp -r "${srcdir}"/OPENOCD/* "${pkgdir}/opt/wch/${pkgname%-bin}"
-    cd "${srcdir}"/OPENOCD/
+    cd "${srcdir}"/OpenOCD/
     _install 644 bin -name "*.cfg"
     _install 755 bin -name "openocd"
     _install 644 share

     install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/openocd-wch-arm" << EOF
 #!/bin/env bash
-cd /opt/wch/${pkgname%-bin}/bin
-exec ./openocd -f wch-arm.cfg "\$@"
+exec /opt/wch/${pkgname%-bin}/bin/openocd -f /opt/wch/${pkgname%-bin}/bin/wch-arm.cfg "\$@"

 EOF
     install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/openocd-wch-riscv" << EOF
 #!/bin/env bash
-cd /opt/wch/${pkgname%-bin}/bin
-exec ./openocd -f wch-riscv.cfg "\$@"
+exec /opt/wch/${pkgname%-bin}/bin/openocd -f /opt/wch/${pkgname%-bin}/bin/wch-riscv.cfg "\$@"

 EOF
 }

 package_mounriver-studio-toolchain-riscv-bin() {
     pkgdesc="MRS Toolchain Support for RISC-V assembly and GNU C compilation, link operation."
+    depends=('bash')
     install -dm0755 "${pkgdir}/opt/wch/${pkgname%-bin}"
+    cp -a "${srcdir}"/RISC-V\ Embedded\ GCC/* "${pkgdir}/opt/wch/${pkgname%-bin}"

-    tar -xf "${srcdir}/${pkgbase}-${pkgver}.tar.gz" --strip-components=2 -C "${srcdir}"
-    cp -r "${srcdir}"/RISC-V\ Embedded\ GCC/* "${pkgdir}/opt/wch/${pkgname%-bin}"
-
-    install -Dm0755 /dev/stdin "${pkgdir}/etc/profile.d/${pkgname%-bin}.sh" << EOF
+    install -Dm0644 /dev/stdin "${pkgdir}/etc/profile.d/${pkgname%-bin}.sh" << EOF
 #!/bin/sh
 [ -d /opt/wch/${pkgname%-bin}/bin ] && append_path '/opt/wch/${pkgname%-bin}/bin'

taotieren commented on 2021-11-26 12:04

Thanks!bot!

yjun commented on 2021-11-26 11:22

  • 删除opencod 下的bin/里的动态链接库
  • 补全依赖
  • 修复个别文件的755 权限问题
diff --git a/PKGBUILD b/PKGBUILD
index 1128d7e..e2d3b05 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -6,7 +6,7 @@ pkgver=1.10
 pkgrel=1
 arch=('x86_64')
 url='http://www.mounriver.com/'
-license=('GPL2' 'GPL3' 'Custom')
+license=('GPL2' 'GPL3' 'custom')
 provides=('MRS-Toolchain')
 conflicts=()
 depends=('bash')
@@ -17,6 +17,7 @@ optdepends=('ch34x-dkms-git: CH341SER driver with fixed bug'
             'ch341eepromtool: An i2c serial EEPROM programming tool for the WCH CH341A'
             'ch341prog-git: A simple command line tool (programmer) interfacing with ch341a'
             'ch341eeprom-git: A libusb based programming tool for 24xx I²C EEPROMs using the WCH CH341A')
+options=('!strip')
 source=("${pkgbase}-${pkgver}.tar.gz::http://file.mounriver.com/tools/MRS_Toolchain_Linux_x64_V${pkgver}.tar.gz"
         )

@@ -24,17 +25,31 @@ sha256sums=('443a7392c42cd387a2b0445f265e9e98b020b7779d346f360a786f1c0c1a7b9b')

 noextract=(${pkgbase}-${pkgver}.tar.gz)

+_install() {
+  find ${@: 2} -type f -exec install -Dm$1 {} ${pkgdir}/opt/wch/${pkgname%-bin}/{} \;
+}
+
 package_mounriver-studio-toolchain-bin() {
     pkgdesc="This MRS Toolchain includes the tool chain for RISC-V kernel chip under Linux x64 and the debug download tool OpenOCD."
     depends=(mounriver-studio-toolchain-openocd-bin mounriver-studio-toolchain-riscv-bin)
 }

 package_mounriver-studio-toolchain-openocd-bin() {
+    depends=('bash'
+            'libftdi-compat'
+            'libusb'
+            'hidapi'
+            'libusb-compat'
+            'libudev.so')
     pkgdesc="MRS Toolchain OpenOCD supports erasure, programming, verification and debugging of the chip."
     install -dm0755 "${pkgdir}/opt/wch/${pkgname%-bin}"

     tar -xf "${srcdir}/${pkgbase}-${pkgver}.tar.gz" --strip-components=2 -C "${srcdir}"
-    cp -r "${srcdir}"/OPENOCD/* "${pkgdir}/opt/wch/${pkgname%-bin}"
+    cd "${srcdir}"/OPENOCD/
+    _install 644 bin -name "*.cfg"
+    _install 755 bin -name "openocd"
+    _install 644 share
+    # cp -r "${srcdir}"/OPENOCD/* "${pkgdir}/opt/wch/${pkgname%-bin}"

     install -Dm0755 /dev/stdin "${pkgdir}/usr/bin/openocd-wch-arm" << EOF
 #!/bin/env bash

yjun commented on 2021-11-26 10:34

plz add options=('!strip') in PKGBUILD, or too many strip error will show during packaging.