0019-build-linux-sysroot-create-a-sysroot-for-riscv.patch 30 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104
  1. From 5254439289bd00f5fb9269f3abfa3625c4c80040 Mon Sep 17 00:00:00 2001
  2. From: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  3. Date: Tue, 5 Apr 2022 06:40:16 +0000
  4. Subject: [PATCH 19/22] build: linux: sysroot: create a sysroot for riscv
  5. Upstream-status: Unidentified
  6. Since riscv is not an official port in Debian, this might not be
  7. able to upstream.
  8. Signed-off-by: Rebecca Chang Swee Fun <rebecca.chang@starfivetech.com>
  9. ---
  10. build/config/posix/BUILD.gn | 12 -
  11. build/config/sysroot.gni | 5 +-
  12. .../debian-ports-archive-2022.gpg | Bin 0 -> 1210 bytes
  13. .../sysroot-builder-riscv64.sh | 588 ++++++++++++++++++
  14. .../sysroot-creator-riscv64.sh | 400 ++++++++++++
  15. 5 files changed, 992 insertions(+), 13 deletions(-)
  16. create mode 100644 build/linux/sysroot_scripts/debian-ports-archive-2022.gpg
  17. create mode 100755 build/linux/sysroot_scripts/sysroot-builder-riscv64.sh
  18. create mode 100755 build/linux/sysroot_scripts/sysroot-creator-riscv64.sh
  19. diff --git a/build/config/posix/BUILD.gn b/build/config/posix/BUILD.gn
  20. index 5d15163875717..3e0ded398ced3 100644
  21. --- a/build/config/posix/BUILD.gn
  22. +++ b/build/config/posix/BUILD.gn
  23. @@ -28,18 +28,6 @@ config("runtime_library") {
  24. if (!is_apple && sysroot != "" && current_os != "zos") {
  25. # Pass the sysroot to all C compiler variants, the assembler, and linker.
  26. sysroot_flags = [ "--sysroot=" + rebase_path(sysroot, root_build_dir) ]
  27. - if (is_linux || is_chromeos) {
  28. - # This is here so that all files get recompiled after a sysroot roll and
  29. - # when turning the sysroot on or off. (defines are passed via the command
  30. - # line, and build system rebuilds things when their commandline
  31. - # changes). Nothing should ever read this define.
  32. - sysroot_hash =
  33. - exec_script("//build/linux/sysroot_scripts/install-sysroot.py",
  34. - [ "--print-hash=$current_cpu" ],
  35. - "trim string",
  36. - [ "//build/linux/sysroot_scripts/sysroots.json" ])
  37. - defines += [ "CR_SYSROOT_HASH=$sysroot_hash" ]
  38. - }
  39. asmflags += sysroot_flags
  40. ldflags += sysroot_flags
  41. diff --git a/build/config/sysroot.gni b/build/config/sysroot.gni
  42. index cbcf0a3f09615..aaf1b21baf5f7 100644
  43. --- a/build/config/sysroot.gni
  44. +++ b/build/config/sysroot.gni
  45. @@ -23,7 +23,8 @@ declare_args() {
  46. # is empty, default sysroot is calculated.
  47. use_sysroot = current_cpu == "x86" || current_cpu == "x64" ||
  48. current_cpu == "arm" || current_cpu == "arm64" ||
  49. - current_cpu == "mipsel" || current_cpu == "mips64el"
  50. + current_cpu == "mipsel" || current_cpu == "mips64el" ||
  51. + current_cpu == "riscv64"
  52. }
  53. if (sysroot == "") {
  54. @@ -50,6 +51,8 @@ if (sysroot == "") {
  55. sysroot = "$target_sysroot_dir/debian_bullseye_arm-sysroot"
  56. } else if (current_cpu == "arm64") {
  57. sysroot = "$target_sysroot_dir/debian_bullseye_arm64-sysroot"
  58. + } else if (current_cpu == "riscv64") {
  59. + sysroot = "$target_sysroot_dir/debian_sid_riscv64-sysroot"
  60. } else {
  61. assert(false, "No linux sysroot for cpu: $target_cpu")
  62. }
  63. diff --git a/build/linux/sysroot_scripts/debian-ports-archive-2022.gpg b/build/linux/sysroot_scripts/debian-ports-archive-2022.gpg
  64. new file mode 100644
  65. index 0000000000000000000000000000000000000000..946d514f68f75bf1035d3c2fec23be503bcaa7de
  66. GIT binary patch
  67. literal 1210
  68. zcmV;r1V#Iq0u2OT`-isy5CFX&gr2KN<iC3NKjKXSf#TTjm+=kmq;H8*cck8*9X4Ny
  69. z$uTg6SpzoPR)&h1IDe2W!ug=bbT++nGuhzYnVPO;_6%7*XzzKZaHt|$K>m94Nd<p?
  70. z|5QU>d+VlNCb*dZjQHg|t7oNC+@8OhGsvhjVFz-oqj3UkCZ8Eq(N@y2$KJxGW3j74
  71. zV36~q(PbY90ZTh0;046Ekk!SucYoHzuB$!@arn!b1x7ffCGu?~xpH;3rnbNsFM`+J
  72. zMIjL{5r8BNNbfPEq?e;qApDDwB7l4$oVIpEj04Xp?QEETGbPp4=cm{8Uszr(Og0Nr
  73. zqMQKYohL`1hup>L8d&x@+^&)_>1ENsGp1)nv&mK_jGxt&cyXY+#D)%S4f0@D3FM@7
  74. z3V1$RsbHI#?W2fQ41aMPMXmL?r%Xkeicrl+u8}$%i?9ga(V9^2|MF0}<~%)2;hd3e
  75. zKlZrTM_VCp(sD7CqF4`WURB??O{aaSWt`0FD7Y>rKPx&g+=qIv*=ej<cqgO&z^BC@
  76. zS5y^LPUUBZd*KZX4?o!rLuf78H*A5@MoS@H=^~njX+MG$BHv2pQub6G>+Wi9F)Ec}
  77. zp+s=)26mw;auSFp;L|i#LtEL!z91C6gtL3(Y(_l)kQt$!#Bp58bwc+AR{^eofl7Lo
  78. z`!1Lt(iUXdDLnuY0RRECRYYZCX<=?4P;YW{b09%-V`yo1WgtOybZ>28bZKKCQ)y>z
  79. zX>MmAOJ#W=C^9fIGASTDW^{0EVRLk4azJoza&&VoZDDhCWpXZLWnyVzZZ2<fXFiDn
  80. zPy`bJ3IIA5Aq30E3ShbIZzFnNTMOt?QBPg-67~fGU;Br*0viJb2?O31fC38%1QiMi
  81. z2n7}b0|5X69svRufB*^!5a?1-PhIm8_67(L0FApGI%0TlFf#s^R&9KJAEk|G%nNhM
  82. ztZ(BCz^290)D8w1_L^HlT&zMSPS;C2i5xot35$Uy>cASU=7-o<oXr8BtFDeQ_rruT
  83. zG*MhWOe;0?-qnBhVd^S6&Dy~$cJFw1VJi8#MJ1VH_W4_1o~5=SBp9GE$Ovg&P`;m@
  84. z@MU(p+3@WjKSH6vik&^rwTLJ7nz<+7LN?@IdP{WcGr==H9Q|`j!><J7IwOQoYruZa
  85. zlrFvfQ>O}1=P+SqwopNCZdZdc#+ebWmyaRKb;dgyi>RzfdCTyG$IUE^?m?2Az~>l0
  86. zd&z|kG6R}PfY%;KH+%9JDq#=c<yEzF2JYv5W39%{6NsNFEAsr5<{DowWuVgy)n*+f
  87. z5+m595pn)kfuNdrpC^N-N1k#$xZ8)iieVwBbOgVYnegAeez;g1*03EU&%RAoB#EGk
  88. z!j)qAlNOA|S6iGi1|xfW29dL<Q+zKx!vvEgVs8THQ6DHD5(c8-98c+vGG}wlD91B8
  89. z8?S5iGtavOoHtN1=uRRu-s6|XSxFReLd8$Cw?ZZnZq$>y=!}46xHery{3VEv-wYt9
  90. zOjq@MUta10RIH^9WK`+Og$(oIaFmE?5NK!Ok3M@mhVybBY-K~oCud(;>!u%`XV7n1
  91. YXx^}TJV%j3zJt}E_<gtaMn?Bg9P=nExc~qF
  92. literal 0
  93. HcmV?d00001
  94. diff --git a/build/linux/sysroot_scripts/sysroot-builder-riscv64.sh b/build/linux/sysroot_scripts/sysroot-builder-riscv64.sh
  95. new file mode 100755
  96. index 0000000000000..34cfe5a370428
  97. --- /dev/null
  98. +++ b/build/linux/sysroot_scripts/sysroot-builder-riscv64.sh
  99. @@ -0,0 +1,588 @@
  100. +# Copyright 2014 The Chromium Authors. All rights reserved.
  101. +# Use of this source code is governed by a BSD-style license that can be
  102. +# found in the LICENSE file.
  103. +#
  104. +# This script should not be run directly but sourced by the other
  105. +# scripts (e.g. sysroot-creator-sid.sh). Its up to the parent scripts
  106. +# to define certain environment variables: e.g.
  107. +# DISTRO=debian
  108. +# DIST=sid
  109. +# # Similar in syntax to /etc/apt/sources.list
  110. +# APT_SOURCES_LIST="http://ftp.us.debian.org/debian/ sid main"
  111. +# KEYRING_FILE=debian-archive-sid-stable.gpg
  112. +# DEBIAN_PACKAGES="gcc libz libssl"
  113. +
  114. +#@ This script builds Debian/Ubuntu sysroot images for building Google Chrome.
  115. +#@
  116. +#@ Generally this script is invoked as:
  117. +#@ sysroot-creator-<flavour>.sh <mode> <args>*
  118. +#@ Available modes are shown below.
  119. +#@
  120. +#@ List of modes:
  121. +
  122. +######################################################################
  123. +# Config
  124. +######################################################################
  125. +
  126. +set -o nounset
  127. +set -o errexit
  128. +
  129. +SCRIPT_DIR=$(cd $(dirname $0) && pwd)
  130. +
  131. +if [ -z "${DIST:-}" ]; then
  132. + echo "error: DIST not defined"
  133. + exit 1
  134. +fi
  135. +
  136. +if [ -z "${KEYRING_FILE:-}" ]; then
  137. + echo "error: KEYRING_FILE not defined"
  138. + exit 1
  139. +fi
  140. +
  141. +if [ -z "${DEBIAN_PACKAGES:-}" ]; then
  142. + echo "error: DEBIAN_PACKAGES not defined"
  143. + exit 1
  144. +fi
  145. +
  146. +readonly HAS_ARCH_RISCV64=${HAS_ARCH_RISCV64:=0}
  147. +
  148. +readonly REQUIRED_TOOLS="curl xzcat"
  149. +
  150. +######################################################################
  151. +# Package Config
  152. +######################################################################
  153. +
  154. +readonly PACKAGES_EXT=xz
  155. +readonly RELEASE_FILE="Release"
  156. +readonly RELEASE_FILE_GPG="Release.gpg"
  157. +
  158. +readonly DEBIAN_DEP_LIST_RISCV64="generated_package_lists/${DIST}.riscv64"
  159. +
  160. +
  161. +######################################################################
  162. +# Helper
  163. +######################################################################
  164. +
  165. +Banner() {
  166. + echo "######################################################################"
  167. + echo $*
  168. + echo "######################################################################"
  169. +}
  170. +
  171. +
  172. +SubBanner() {
  173. + echo "----------------------------------------------------------------------"
  174. + echo $*
  175. + echo "----------------------------------------------------------------------"
  176. +}
  177. +
  178. +
  179. +Usage() {
  180. + egrep "^#@" "${BASH_SOURCE[0]}" | cut --bytes=3-
  181. +}
  182. +
  183. +
  184. +DownloadOrCopyNonUniqueFilename() {
  185. + # Use this function instead of DownloadOrCopy when the url uniquely
  186. + # identifies the file, but the filename (excluding the directory)
  187. + # does not.
  188. + local url="$1"
  189. + local dest="$2"
  190. +
  191. + local hash="$(echo "$url" | sha256sum | cut -d' ' -f1)"
  192. +
  193. + DownloadOrCopy "${url}" "${dest}.${hash}"
  194. + # cp the file to prevent having to redownload it, but mv it to the
  195. + # final location so that it's atomic.
  196. + cp "${dest}.${hash}" "${dest}.$$"
  197. + mv "${dest}.$$" "${dest}"
  198. +}
  199. +
  200. +DownloadOrCopy() {
  201. + if [ -f "$2" ] ; then
  202. + echo "$2 already in place"
  203. + return
  204. + fi
  205. +
  206. + HTTP=0
  207. + echo "$1" | grep -Eqs '^https?://' && HTTP=1
  208. + if [ "$HTTP" = "1" ]; then
  209. + SubBanner "downloading from $1 -> $2"
  210. + # Appending the "$$" shell pid is necessary here to prevent concurrent
  211. + # instances of sysroot-creator.sh from trying to write to the same file.
  212. + local temp_file="${2}.partial.$$"
  213. + # curl --retry doesn't retry when the page gives a 4XX error, so we need to
  214. + # manually rerun.
  215. + for i in {1..10}; do
  216. + # --create-dirs is added in case there are slashes in the filename, as can
  217. + # happen with the "debian/security" release class.
  218. + local http_code=$(curl -L "$1" --create-dirs -o "${temp_file}" \
  219. + -w "%{http_code}")
  220. + if [ ${http_code} -eq 200 ]; then
  221. + break
  222. + fi
  223. + echo "Bad HTTP code ${http_code} when downloading $1"
  224. + rm -f "${temp_file}"
  225. + sleep $i
  226. + done
  227. + if [ ! -f "${temp_file}" ]; then
  228. + exit 1
  229. + fi
  230. + mv "${temp_file}" $2
  231. + else
  232. + SubBanner "copying from $1"
  233. + cp "$1" "$2"
  234. + fi
  235. +}
  236. +
  237. +
  238. +SetEnvironmentVariables() {
  239. + case $1 in
  240. + *Riscv*)
  241. + ARCH=RISCV64
  242. + ;;
  243. + *)
  244. + echo "ERROR: Unable to determine architecture based on: $1"
  245. + exit 1
  246. + ;;
  247. + esac
  248. + ARCH_LOWER=$(echo $ARCH | tr '[:upper:]' '[:lower:]')
  249. +}
  250. +
  251. +
  252. +# some sanity checks to make sure this script is run from the right place
  253. +# with the right tools
  254. +SanityCheck() {
  255. + Banner "Sanity Checks"
  256. +
  257. + local chrome_dir=$(cd "${SCRIPT_DIR}/../../.." && pwd)
  258. + BUILD_DIR="${chrome_dir}/out/sysroot-build/${DIST}"
  259. + mkdir -p ${BUILD_DIR}
  260. + echo "Using build directory: ${BUILD_DIR}"
  261. +
  262. + for tool in ${REQUIRED_TOOLS} ; do
  263. + if ! which ${tool} > /dev/null ; then
  264. + echo "Required binary $tool not found."
  265. + echo "Exiting."
  266. + exit 1
  267. + fi
  268. + done
  269. +
  270. + # This is where the staging sysroot is.
  271. + INSTALL_ROOT="${BUILD_DIR}/${DIST}_${ARCH_LOWER}_staging"
  272. + TARBALL="${BUILD_DIR}/${DISTRO}_${DIST}_${ARCH_LOWER}_sysroot.tar.xz"
  273. +
  274. + if ! mkdir -p "${INSTALL_ROOT}" ; then
  275. + echo "ERROR: ${INSTALL_ROOT} can't be created."
  276. + exit 1
  277. + fi
  278. +}
  279. +
  280. +
  281. +ChangeDirectory() {
  282. + # Change directory to where this script is.
  283. + cd ${SCRIPT_DIR}
  284. +}
  285. +
  286. +
  287. +ClearInstallDir() {
  288. + Banner "Clearing dirs in ${INSTALL_ROOT}"
  289. + rm -rf ${INSTALL_ROOT}/*
  290. +}
  291. +
  292. +
  293. +CreateTarBall() {
  294. + Banner "Creating tarball ${TARBALL}"
  295. + tar -I "xz -9 -T0" -cf ${TARBALL} -C ${INSTALL_ROOT} .
  296. +}
  297. +
  298. +ExtractPackageXz() {
  299. + local src_file="$1"
  300. + local dst_file="$2"
  301. + local repo="$3"
  302. + xzcat "${src_file}" | egrep '^(Package:|Filename:|SHA256:) ' |
  303. + sed "s|Filename: |Filename: ${repo}|" > "${dst_file}"
  304. +}
  305. +
  306. +GeneratePackageListDist() {
  307. + local arch="$1"
  308. + set -- $2
  309. + local repo="$1"
  310. + local dist="$2"
  311. + local repo_name="$3"
  312. +
  313. + TMP_PACKAGE_LIST="${BUILD_DIR}/Packages.${dist}_${repo_name}_${arch}"
  314. + local repo_basedir="${repo}/dists/${dist}"
  315. + local package_list="${BUILD_DIR}/Packages.${dist}_${repo_name}_${arch}.${PACKAGES_EXT}"
  316. + local package_file_arch="${repo_name}/binary-${arch}/Packages.${PACKAGES_EXT}"
  317. + local package_list_arch="${repo_basedir}/${package_file_arch}"
  318. +
  319. + DownloadOrCopyNonUniqueFilename "${package_list_arch}" "${package_list}"
  320. + VerifyPackageListing "${package_file_arch}" "${package_list}" ${repo} ${dist}
  321. + ExtractPackageXz "${package_list}" "${TMP_PACKAGE_LIST}" ${repo}
  322. +}
  323. +
  324. +GeneratePackageListCommon() {
  325. + local output_file="$1"
  326. + local arch="$2"
  327. + local packages="$3"
  328. +
  329. + local dists="${DIST} ${DIST_UPDATES:-}"
  330. +
  331. + local list_base="${BUILD_DIR}/Packages.${DIST}_${arch}"
  332. + > "${list_base}" # Create (or truncate) a zero-length file.
  333. + echo "${APT_SOURCES_LIST}" | while read source; do
  334. + GeneratePackageListDist "${arch}" "${source}"
  335. + cat "${TMP_PACKAGE_LIST}" | ./merge-package-lists.py "${list_base}"
  336. + done
  337. +
  338. + GeneratePackageList "${list_base}" "${output_file}" "${packages}"
  339. +}
  340. +
  341. +GeneratePackageListRiscv64() {
  342. + GeneratePackageListCommon "$1" riscv64 "${DEBIAN_PACKAGES}
  343. + ${DEBIAN_PACKAGES_RISCV64:=}"
  344. +}
  345. +
  346. +StripChecksumsFromPackageList() {
  347. + local package_file="$1"
  348. + sed -i 's/ [a-f0-9]\{64\}$//' "$package_file"
  349. +}
  350. +
  351. +######################################################################
  352. +#
  353. +######################################################################
  354. +
  355. +HacksAndPatchesCommon() {
  356. + local arch=$1
  357. + local os=$2
  358. + local strip=$3
  359. + Banner "Misc Hacks & Patches"
  360. + # these are linker scripts with absolute pathnames in them
  361. + # which we rewrite here
  362. + lscripts="${INSTALL_ROOT}/usr/lib/${arch}-${os}/libpthread.so \
  363. + ${INSTALL_ROOT}/usr/lib/${arch}-${os}/libc.so"
  364. +
  365. + # Rewrite linker scripts
  366. + sed -i -e 's|/usr/lib/${arch}-${os}/||g' ${lscripts}
  367. + sed -i -e 's|/lib/${arch}-${os}/||g' ${lscripts}
  368. +
  369. + # Unversion libdbus and libxkbcommon symbols. This is required because
  370. + # libdbus-1-3 and libxkbcommon0 switched from unversioned symbols to versioned
  371. + # ones, and we must still support distros using the unversioned library. This
  372. + # hack can be removed once support for Ubuntu Trusty and Debian Jessie are
  373. + # dropped.
  374. + ${strip} -R .gnu.version_d -R .gnu.version \
  375. + "${INSTALL_ROOT}/lib/${arch}-${os}/libdbus-1.so.3"
  376. + cp "${SCRIPT_DIR}/libdbus-1-3-symbols" \
  377. + "${INSTALL_ROOT}/debian/libdbus-1-3/DEBIAN/symbols"
  378. +
  379. + ${strip} -R .gnu.version_d -R .gnu.version \
  380. + "${INSTALL_ROOT}/usr/lib/${arch}-${os}/libxkbcommon.so.0.0.0"
  381. + cp "${SCRIPT_DIR}/libxkbcommon0-symbols" \
  382. + "${INSTALL_ROOT}/debian/libxkbcommon0/DEBIAN/symbols"
  383. +
  384. + # libxcomposite1 is missing a symbols file.
  385. + cp "${SCRIPT_DIR}/libxcomposite1-symbols" \
  386. + "${INSTALL_ROOT}/debian/libxcomposite1/DEBIAN/symbols"
  387. +
  388. + # Shared objects depending on libdbus-1.so.3 have unsatisfied undefined
  389. + # versioned symbols. To avoid LLD --no-allow-shlib-undefined errors, rewrite
  390. + # DT_NEEDED entries from libdbus-1.so.3 to a different string. LLD will
  391. + # suppress --no-allow-shlib-undefined diagnostics for such shared objects.
  392. + set +e
  393. + for f in "${INSTALL_ROOT}/lib/${arch}-${os}"/*.so \
  394. + "${INSTALL_ROOT}/usr/lib/${arch}-${os}"/*.so; do
  395. + echo "$f" | grep -q 'libdbus-1.so$' && continue
  396. + # In a dependent shared object, the only occurrence of "libdbus-1.so.3" is
  397. + # the string referenced by the DT_NEEDED entry.
  398. + offset=$(LANG=C grep -abo libdbus-1.so.3 "$f")
  399. + [ -n "$offset" ] || continue
  400. + echo -n 'libdbus-1.so.0' | dd of="$f" conv=notrunc bs=1 \
  401. + seek="$(echo -n "$offset" | cut -d : -f 1)" status=none
  402. + done
  403. + set -e
  404. +
  405. + # Avoid requiring unsupported glibc versions.
  406. + "${SCRIPT_DIR}/reversion_glibc.py" \
  407. + "${INSTALL_ROOT}/lib/${arch}-${os}/libc.so.6"
  408. + "${SCRIPT_DIR}/reversion_glibc.py" \
  409. + "${INSTALL_ROOT}/lib/${arch}-${os}/libm.so.6"
  410. +
  411. + # fcntl64() was introduced in glibc 2.28. Make sure to use fcntl() instead.
  412. + local fcntl_h="${INSTALL_ROOT}/usr/include/fcntl.h"
  413. + sed -i '{N; s/#ifndef __USE_FILE_OFFSET64\(\nextern int fcntl\)/#if 1\1/}' \
  414. + "${fcntl_h}"
  415. +
  416. + # __GLIBC_MINOR__ is used as a feature test macro. Replace it with the
  417. + # earliest supported version of glibc (2.17, https://crbug.com/376567).
  418. + local features_h="${INSTALL_ROOT}/usr/include/features.h"
  419. + sed -i 's|\(#define\s\+__GLIBC_MINOR__\)|\1 17 //|' "${features_h}"
  420. +
  421. + # This is for chrome's ./build/linux/pkg-config-wrapper
  422. + # which overwrites PKG_CONFIG_LIBDIR internally
  423. + SubBanner "Move pkgconfig scripts"
  424. + mkdir -p ${INSTALL_ROOT}/usr/lib/pkgconfig
  425. + mv ${INSTALL_ROOT}/usr/lib/${arch}-${os}/pkgconfig/* \
  426. + ${INSTALL_ROOT}/usr/lib/pkgconfig
  427. +}
  428. +
  429. +
  430. +HacksAndPatchesRiscv64() {
  431. + HacksAndPatchesCommon riscv64 linux-gnu riscv64-linux-gnu-strip
  432. +}
  433. +
  434. +
  435. +InstallIntoSysroot() {
  436. + Banner "Install Libs And Headers Into Jail"
  437. +
  438. + mkdir -p ${BUILD_DIR}/debian-packages
  439. + # The /debian directory is an implementation detail that's used to cd into
  440. + # when running dpkg-shlibdeps.
  441. + mkdir -p ${INSTALL_ROOT}/debian
  442. + # An empty control file is necessary to run dpkg-shlibdeps.
  443. + touch ${INSTALL_ROOT}/debian/control
  444. + while (( "$#" )); do
  445. + local file="$1"
  446. + local package="${BUILD_DIR}/debian-packages/${file##*/}"
  447. + shift
  448. + local sha256sum="$1"
  449. + shift
  450. + if [ "${#sha256sum}" -ne "64" ]; then
  451. + echo "Bad sha256sum from package list"
  452. + # exit 1
  453. + fi
  454. +
  455. + Banner "Installing $(basename ${file})"
  456. + DownloadOrCopy ${file} ${package}
  457. + if [ ! -s "${package}" ] ; then
  458. + echo
  459. + echo "ERROR: bad package ${package}"
  460. + exit 1
  461. + fi
  462. + echo "${sha256sum} ${package}" | sha256sum --quiet -c
  463. +
  464. + SubBanner "Extracting to ${INSTALL_ROOT}"
  465. + dpkg-deb -x ${package} ${INSTALL_ROOT}
  466. +
  467. + base_package=$(dpkg-deb --field ${package} Package)
  468. + mkdir -p ${INSTALL_ROOT}/debian/${base_package}/DEBIAN
  469. + dpkg-deb -e ${package} ${INSTALL_ROOT}/debian/${base_package}/DEBIAN
  470. + done
  471. +
  472. + # Prune /usr/share, leaving only pkgconfig.
  473. + ls -d ${INSTALL_ROOT}/usr/share/* | grep -v "/pkgconfig$" | xargs rm -r
  474. +}
  475. +
  476. +
  477. +CleanupJailSymlinks() {
  478. + Banner "Jail symlink cleanup"
  479. +
  480. + SAVEDPWD=$(pwd)
  481. + cd ${INSTALL_ROOT}
  482. + local libdirs="lib usr/lib"
  483. + libdirs="${libdirs} lib64"
  484. +
  485. + find $libdirs -type l -printf '%p %l\n' | while read link target; do
  486. + # skip links with non-absolute paths
  487. + echo "${target}" | grep -qs ^/ || continue
  488. + echo "${link}: ${target}"
  489. + # Relativize the symlink.
  490. + prefix=$(echo "${link}" | sed -e 's/[^/]//g' | sed -e 's|/|../|g')
  491. + ln -snfv "${prefix}${target}" "${link}"
  492. + done
  493. +
  494. + find $libdirs -type l -printf '%p %l\n' | while read link target; do
  495. + # Make sure we catch new bad links.
  496. + if [ ! -r "${link}" ]; then
  497. + echo "ERROR: FOUND BAD LINK ${link}"
  498. + ls -l ${link}
  499. + exit 1
  500. + fi
  501. + done
  502. + cd "$SAVEDPWD"
  503. +}
  504. +
  505. +
  506. +VerifyLibraryDepsCommon() {
  507. + local arch=$1
  508. + local os=$2
  509. + local find_dirs=(
  510. + "${INSTALL_ROOT}/lib/"
  511. + "${INSTALL_ROOT}/lib/${arch}-${os}/"
  512. + "${INSTALL_ROOT}/usr/lib/${arch}-${os}/"
  513. + )
  514. + local needed_libs="$(
  515. + find ${find_dirs[*]} -name "*\.so*" -type f -exec file {} \; | \
  516. + grep ': ELF' | sed 's/^\(.*\): .*$/\1/' | xargs readelf -d | \
  517. + grep NEEDED | sort | uniq | sed 's/^.*Shared library: \[\(.*\)\]$/\1/g')"
  518. + local all_libs="$(find ${find_dirs[*]} -printf '%f\n')"
  519. + # Ignore missing libdbus-1.so.0
  520. + all_libs+="$(echo -e '\nlibdbus-1.so.0')"
  521. + local missing_libs="$(grep -vFxf <(echo "${all_libs}") \
  522. + <(echo "${needed_libs}"))"
  523. + if [ ! -z "${missing_libs}" ]; then
  524. + echo "Missing libraries:"
  525. + echo "${missing_libs}"
  526. + exit 1
  527. + fi
  528. +}
  529. +
  530. +VerifyLibraryDepsRiscv64() {
  531. + VerifyLibraryDepsCommon riscv64 linux-gnu
  532. +}
  533. +
  534. +#@
  535. +#@ BuildSysrootRiscv64
  536. +#@
  537. +#@ Build everything and package it
  538. +BuildSysrootRiscv64() {
  539. + if [ "$HAS_ARCH_RISCV64" = "0" ]; then
  540. + return
  541. + fi
  542. + ClearInstallDir
  543. + local package_file="${DEBIAN_DEP_LIST_RISCV64}"
  544. + # GeneratePackageListRiscv64 "$package_file"
  545. + local files_and_sha256sums="$(cat ${package_file})"
  546. + StripChecksumsFromPackageList "$package_file"
  547. + InstallIntoSysroot ${files_and_sha256sums}
  548. + CleanupJailSymlinks
  549. + HacksAndPatchesRiscv64
  550. + VerifyLibraryDepsRiscv64
  551. + CreateTarBall
  552. +}
  553. +
  554. +#
  555. +# CheckForDebianGPGKeyring
  556. +#
  557. +# Make sure the Debian GPG keys exist. Otherwise print a helpful message.
  558. +#
  559. +CheckForDebianGPGKeyring() {
  560. + if [ ! -e "$KEYRING_FILE" ]; then
  561. + echo "KEYRING_FILE not found: ${KEYRING_FILE}"
  562. + echo "Debian GPG keys missing. Install the debian-archive-keyring package."
  563. + exit 1
  564. + fi
  565. +}
  566. +
  567. +#
  568. +# VerifyPackageListing
  569. +#
  570. +# Verifies the downloaded Packages.xz file has the right checksums.
  571. +#
  572. +VerifyPackageListing() {
  573. + local file_path="$1"
  574. + local output_file="$2"
  575. + local repo="$3"
  576. + local dist="$4"
  577. +
  578. + local repo_basedir="${repo}/dists/${dist}"
  579. + local release_list="${repo_basedir}/${RELEASE_FILE}"
  580. + local release_list_gpg="${repo_basedir}/${RELEASE_FILE_GPG}"
  581. +
  582. + local release_file="${BUILD_DIR}/${dist}-${RELEASE_FILE}"
  583. + local release_file_gpg="${BUILD_DIR}/${dist}-${RELEASE_FILE_GPG}"
  584. +
  585. + CheckForDebianGPGKeyring
  586. +
  587. + DownloadOrCopyNonUniqueFilename ${release_list} ${release_file}
  588. + DownloadOrCopyNonUniqueFilename ${release_list_gpg} ${release_file_gpg}
  589. + echo "Verifying: ${release_file} with ${release_file_gpg}"
  590. + set -x
  591. + gpgv --keyring "${KEYRING_FILE}" "${release_file_gpg}" "${release_file}"
  592. + set +x
  593. +
  594. + echo "Verifying: ${output_file}"
  595. + local sha256sum=$(grep -E "${file_path}\$|:\$" "${release_file}" | \
  596. + grep "SHA256:" -A 1 | xargs echo | awk '{print $2;}')
  597. +
  598. + if [ "${#sha256sum}" -ne "64" ]; then
  599. + echo "Bad sha256sum from ${release_list}"
  600. + exit 1
  601. + fi
  602. +
  603. + echo "${sha256sum} ${output_file}" | sha256sum --quiet -c
  604. +}
  605. +
  606. +#
  607. +# GeneratePackageList
  608. +#
  609. +# Looks up package names in ${BUILD_DIR}/Packages and write list of URLs
  610. +# to output file.
  611. +#
  612. +GeneratePackageList() {
  613. + local input_file="$1"
  614. + local output_file="$2"
  615. + echo "Updating: ${output_file} from ${input_file}"
  616. + /bin/rm -f "${output_file}"
  617. + shift
  618. + shift
  619. + for pkg in $@ ; do
  620. + local pkg_full=$(grep -A 1 " ${pkg}\$" "$input_file" | \
  621. + egrep "debian-ports/.*" | sed 's/.*Filename: //')
  622. + if [ -z "${pkg_full}" ]; then
  623. + echo "ERROR: missing package: $pkg"
  624. + exit 1
  625. + fi
  626. + local sha256sum=$(grep -A 4 " ${pkg}\$" "$input_file" | \
  627. + grep ^SHA256: | sed 's/^SHA256: //')
  628. + if [ "${#sha256sum}" -ne "64" ]; then
  629. + echo "Bad sha256sum from Packages"
  630. + exit 1
  631. + fi
  632. + echo $pkg_full $sha256sum >> "$output_file"
  633. + done
  634. + # sort -o does an in-place sort of this file
  635. + sort "$output_file" -o "$output_file"
  636. +}
  637. +
  638. +#@
  639. +#@ PrintArchitectures
  640. +#@
  641. +#@ Prints supported architectures.
  642. +PrintArchitectures() {
  643. + if [ "$HAS_ARCH_RISCV64" = "1" ]; then
  644. + echo Riscv64
  645. + fi
  646. +}
  647. +
  648. +#@
  649. +#@ PrintDistro
  650. +#@
  651. +#@ Prints distro. eg: ubuntu
  652. +PrintDistro() {
  653. + echo ${DISTRO}
  654. +}
  655. +
  656. +#@
  657. +#@ DumpRelease
  658. +#@
  659. +#@ Prints disto release. eg: jessie
  660. +PrintRelease() {
  661. + echo ${DIST}
  662. +}
  663. +
  664. +RunCommand() {
  665. + SetEnvironmentVariables "$1"
  666. + SanityCheck
  667. + "$@"
  668. +}
  669. +
  670. +if [ $# -eq 0 ] ; then
  671. + echo "ERROR: you must specify a mode on the commandline"
  672. + echo
  673. + Usage
  674. + exit 1
  675. +elif [ "$(type -t $1)" != "function" ]; then
  676. + echo "ERROR: unknown function '$1'." >&2
  677. + echo "For help, try:"
  678. + echo " $0 help"
  679. + exit 1
  680. +else
  681. + ChangeDirectory
  682. + if echo $1 | grep -qs --regexp='\(^Print\)\|\(All$\)'; then
  683. + "$@"
  684. + else
  685. + RunCommand "$@"
  686. + fi
  687. +fi
  688. diff --git a/build/linux/sysroot_scripts/sysroot-creator-riscv64.sh b/build/linux/sysroot_scripts/sysroot-creator-riscv64.sh
  689. new file mode 100755
  690. index 0000000000000..aa4a34c04988e
  691. --- /dev/null
  692. +++ b/build/linux/sysroot_scripts/sysroot-creator-riscv64.sh
  693. @@ -0,0 +1,400 @@
  694. +#!/bin/bash
  695. +# Copyright 2017 The Chromium Authors. All rights reserved.
  696. +# Use of this source code is governed by a BSD-style license that can be
  697. +# found in the LICENSE file.
  698. +
  699. +SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  700. +
  701. +DISTRO=debian
  702. +DIST=sid
  703. +
  704. +# Keep the "experimental" repo before the "sid" repo. There are some packages
  705. +# that are currently only available in experimental like libgtk-4-1, but if it
  706. +# were to be placed first, experimental (unreleased) versions of other packages
  707. +# like libc6 would take precedence over the sid (released) versions. While this
  708. +# may be useful for certain kinds of development, the standard sysroots should
  709. +# continue to be shipped only with released packages.
  710. +# Also keep "stretch" before "sid". For now, it's needed to bring back
  711. +# libgnome-keyring-dev which has since been deprecated and removed from sid.
  712. +# It will be needed until gnome keyring is removed (http://crbug.com/466975 and
  713. +# http://crbug.com/355223).
  714. +ARCHIVE_URL="http://ftp.ports.debian.org/debian-ports"
  715. +APT_SOURCES_LIST="${ARCHIVE_URL}/ unstable main
  716. +${ARCHIVE_URL}/ experimental main
  717. +${ARCHIVE_URL}/ sid main"
  718. +
  719. +# gpg keyring file generated using generate_debian_archive_unstable.sh
  720. +KEYRING_FILE="/etc/apt/trusted.gpg.d/debian-ports-archive-2022.gpg"
  721. +
  722. +HAS_ARCH_RISCV64=1
  723. +
  724. +# Sysroot packages: these are the packages needed to build chrome.
  725. +# NOTE: When DEBIAN_PACKAGES is modified, the packagelist files must be updated
  726. +# by running this script in GeneratePackageList mode.
  727. +# comerr-dev
  728. +# krb5-multidev
  729. +# libappindicator-dev libappindicator1 libappindicator3-1 libappindicator3-dev
  730. +# libffi6 libffi7
  731. +# libgcc1
  732. +# libgnome-keyring-dev libgnome-keyring0
  733. +# libindicator3-7 libindicator7
  734. +# libpango-1.0-0 libpango1.0-dev
  735. +# libpangox-1.0-0
  736. +DEBIAN_PACKAGES="\
  737. + libasound2
  738. + libasound2-dev
  739. + libasyncns0
  740. + libatk-bridge2.0-0
  741. + libatk-bridge2.0-dev
  742. + libatk1.0-0
  743. + libatk1.0-dev
  744. + libatomic1
  745. + libatspi2.0-0
  746. + libatspi2.0-dev
  747. + libattr1
  748. + libaudit1
  749. + libavahi-client3
  750. + libavahi-common3
  751. + libblkid-dev
  752. + libblkid1
  753. + libbluetooth-dev
  754. + libbluetooth3
  755. + libbrotli-dev
  756. + libbrotli1
  757. + libbsd0
  758. + libc6
  759. + libc6-dev
  760. + libcairo-gobject2
  761. + libcairo-script-interpreter2
  762. + libcairo2
  763. + libcairo2-dev
  764. + libcap-dev
  765. + libcap-ng0
  766. + libcap2
  767. + libcloudproviders0
  768. + libcolord2
  769. + libcom-err2
  770. + libcups2
  771. + libcups2-dev
  772. + libcupsimage2
  773. + libcupsimage2-dev
  774. + libdatrie-dev
  775. + libcurl3-gnutls
  776. + libcurl4-gnutls-dev
  777. + libdatrie1
  778. + libdb5.3
  779. + libdbus-1-3
  780. + libdbus-1-dev
  781. + libdbus-glib-1-2
  782. + libdbusmenu-glib-dev
  783. + libdbusmenu-glib4
  784. + libdbusmenu-gtk3-4
  785. + libdbusmenu-gtk4
  786. + libdeflate-dev
  787. + libdeflate0
  788. + libdrm-amdgpu1
  789. + libdrm-dev
  790. + libdrm-nouveau2
  791. + libdrm-radeon1
  792. + libdrm2
  793. + libegl-dev
  794. + libegl1
  795. + libegl1-mesa
  796. + libegl1-mesa-dev
  797. + libelf-dev
  798. + libelf1
  799. + libepoxy-dev
  800. + libepoxy0
  801. + libevdev-dev
  802. + libevdev2
  803. + libevent-2.1-7
  804. + libexpat1
  805. + libexpat1-dev
  806. + libffi-dev
  807. + libffi8
  808. + libflac-dev
  809. + libflac8
  810. + libfontconfig-dev
  811. + libfontconfig1
  812. + libfreetype-dev
  813. + libfreetype6
  814. + libfribidi-dev
  815. + libfribidi0
  816. + libgbm-dev
  817. + libgbm1
  818. + libgcc-10-dev
  819. + libgcc-s1
  820. + libgcrypt20
  821. + libgcrypt20-dev
  822. + libgdk-pixbuf-2.0-0
  823. + libgdk-pixbuf-2.0-dev
  824. + libgl-dev
  825. + libgl1
  826. + libgl1-mesa-dev
  827. + libgl1-mesa-glx
  828. + libglapi-mesa
  829. + libgles-dev
  830. + libgles1
  831. + libgles2
  832. + libglib2.0-0
  833. + libglib2.0-dev
  834. + libglvnd-dev
  835. + libglvnd0
  836. + libglx-dev
  837. + libglx0
  838. + libgmp10
  839. + libgnutls-dane0
  840. + libgnutls-openssl27
  841. + libgnutls28-dev
  842. + libgnutls30
  843. + libgnutlsxx28
  844. + libgomp1
  845. + libgpg-error-dev
  846. + libgpg-error0
  847. + libgraphene-1.0-0
  848. + libgraphene-1.0-dev
  849. + libgraphite2-3
  850. + libgraphite2-dev
  851. + libgssapi-krb5-2
  852. + libgssrpc4
  853. + libgtk-3-0
  854. + libgtk-3-dev
  855. + libgtk2.0-0
  856. + libgudev-1.0-0
  857. + libharfbuzz-dev
  858. + libharfbuzz-gobject0
  859. + libharfbuzz-icu0
  860. + libharfbuzz0b
  861. + libhogweed6
  862. + libice6
  863. + libicu-le-hb0
  864. + libicu67
  865. + libidl-2-0
  866. + libidn12
  867. + libidn2-0
  868. + libinput-dev
  869. + libinput10
  870. + libjbig-dev
  871. + libjbig0
  872. + libjpeg62-turbo
  873. + libjpeg62-turbo-dev
  874. + libjson-glib-1.0-0
  875. + libjsoncpp-dev
  876. + libjsoncpp25
  877. + libk5crypto3
  878. + libkadm5clnt-mit12
  879. + libkadm5srv-mit12
  880. + libkdb5-10
  881. + libkeyutils1
  882. + libkrb5-3
  883. + libkrb5-dev
  884. + libkrb5support0
  885. + liblcms2-2
  886. + libldap-2.5-0
  887. + libltdl7
  888. + liblz4-1
  889. + liblzma5
  890. + liblzo2-2
  891. + libmd0
  892. + libminizip-dev
  893. + libminizip1
  894. + libmount-dev
  895. + libmount1
  896. + libmtdev1
  897. + libncurses-dev
  898. + libncurses6
  899. + libncursesw6
  900. + libnettle8
  901. + libnghttp2-14
  902. + libnsl2
  903. + libnspr4
  904. + libnspr4-dev
  905. + libnss-db
  906. + libnss3
  907. + libnss3-dev
  908. + libogg-dev
  909. + libogg0
  910. + libopengl0
  911. + libopus-dev
  912. + libopus0
  913. + libp11-kit0
  914. + libpam0g
  915. + libpam0g-dev
  916. + libpangocairo-1.0-0
  917. + libpangoft2-1.0-0
  918. + libpangoxft-1.0-0
  919. + libpci-dev
  920. + libpci3
  921. + libpciaccess0
  922. + libpcre16-3
  923. + libpcre2-16-0
  924. + libpcre2-32-0
  925. + libpcre2-8-0
  926. + libpcre2-dev
  927. + libpcre2-posix3
  928. + libpcre3
  929. + libpcre3-dev
  930. + libpcre32-3
  931. + libpcrecpp0v5
  932. + libpipewire-0.3-0
  933. + libpipewire-0.3-dev
  934. + libpixman-1-0
  935. + libpixman-1-dev
  936. + libpng-dev
  937. + libpng16-16
  938. + libpsl5
  939. + libpthread-stubs0-dev
  940. + libpulse-dev
  941. + libpulse-mainloop-glib0
  942. + libpulse0
  943. + libre2-9
  944. + libre2-dev
  945. + librest-0.7-0
  946. + librtmp1
  947. + libsasl2-2
  948. + libselinux1
  949. + libselinux1-dev
  950. + libsepol2
  951. + libsepol-dev
  952. + libsm6
  953. + libsnappy-dev
  954. + libsnappy1v5
  955. + libsndfile1
  956. + libsoup-gnome2.4-1
  957. + libsoup2.4-1
  958. + libspa-0.2-dev
  959. + libspeechd-dev
  960. + libspeechd2
  961. + libsqlite3-0
  962. + libssh2-1
  963. + libssl-dev
  964. + libssl1.1
  965. + libstdc++-10-dev
  966. + libstdc++6
  967. + libsystemd0
  968. + libtasn1-6
  969. + libthai-dev
  970. + libthai0
  971. + libtiff-dev
  972. + libtiff5
  973. + libtiffxx5
  974. + libtinfo6
  975. + libtirpc3
  976. + libudev-dev
  977. + libudev1
  978. + libunbound8
  979. + libunistring2
  980. + libutempter-dev
  981. + libutempter0
  982. + libuuid1
  983. + libva-dev
  984. + libva-drm2
  985. + libva-glx2
  986. + libva-wayland2
  987. + libva-x11-2
  988. + libva2
  989. + libvorbis0a
  990. + libvorbisenc2
  991. + libvulkan-dev
  992. + libvulkan1
  993. + libwacom9
  994. + libwayland-client0
  995. + libwayland-cursor0
  996. + libwayland-dev
  997. + libwayland-egl1
  998. + libwayland-egl1-mesa
  999. + libwayland-server0
  1000. + libwebp-dev
  1001. + libwebp7
  1002. + libwebpdemux2
  1003. + libwebpmux3
  1004. + libwrap0
  1005. + libx11-6
  1006. + libx11-dev
  1007. + libx11-xcb-dev
  1008. + libx11-xcb1
  1009. + libxau-dev
  1010. + libxau6
  1011. + libxcb-dri2-0
  1012. + libxcb-dri2-0-dev
  1013. + libxcb-dri3-0
  1014. + libxcb-dri3-dev
  1015. + libxcb-glx0
  1016. + libxcb-glx0-dev
  1017. + libxcb-present-dev
  1018. + libxcb-present0
  1019. + libxcb-render0
  1020. + libxcb-render0-dev
  1021. + libxcb-shm0
  1022. + libxcb-shm0-dev
  1023. + libxcb-sync1
  1024. + libxcb-xfixes0
  1025. + libxcb1
  1026. + libxcb1-dev
  1027. + libxcomposite-dev
  1028. + libxcomposite1
  1029. + libxcursor-dev
  1030. + libxcursor1
  1031. + libxdamage-dev
  1032. + libxdamage1
  1033. + libxdmcp-dev
  1034. + libxdmcp6
  1035. + libxext-dev
  1036. + libxext6
  1037. + libxfixes-dev
  1038. + libxfixes3
  1039. + libxft-dev
  1040. + libxft2
  1041. + libxi-dev
  1042. + libxi6
  1043. + libxinerama-dev
  1044. + libxinerama1
  1045. + libxkbcommon-dev
  1046. + libxkbcommon0
  1047. + libxml2
  1048. + libxml2-dev
  1049. + libxrandr-dev
  1050. + libxrandr2
  1051. + libxrender-dev
  1052. + libxrender1
  1053. + libxshmfence-dev
  1054. + libxshmfence1
  1055. + libxslt1-dev
  1056. + libxslt1.1
  1057. + libxss-dev
  1058. + libxss1
  1059. + libxt-dev
  1060. + libxt6
  1061. + libxtst-dev
  1062. + libxtst6
  1063. + libxxf86vm-dev
  1064. + libxxf86vm1
  1065. + libzstd1
  1066. + linux-libc-dev
  1067. + mesa-common-dev
  1068. + shared-mime-info
  1069. + uuid-dev
  1070. + wayland-protocols
  1071. + x11proto-core-dev
  1072. + x11proto-dev
  1073. + x11proto-input-dev
  1074. + x11proto-kb-dev
  1075. + x11proto-randr-dev
  1076. + x11proto-record-dev
  1077. + x11proto-render-dev
  1078. + x11proto-scrnsaver-dev
  1079. + x11proto-xext-dev
  1080. + x11proto-xinerama-dev
  1081. + zlib1g
  1082. + zlib1g-dev
  1083. +"
  1084. +
  1085. +DEBIAN_PACKAGES_RISCV64="
  1086. + libasan6
  1087. + libgmp10
  1088. + libgtk-4-1
  1089. + libgtk-4-dev
  1090. + libthai0
  1091. +"
  1092. +
  1093. +. "${SCRIPT_DIR}/sysroot-builder-riscv64.sh"
  1094. --
  1095. 2.25.1