代码拉取完成,页面将自动刷新
#!/bin/sh
[ -d "$(dirname ${0%/*})/build" ] || mkdir "$(dirname ${0%/*})/build"
cd "$(dirname ${0%/*})/build"
# Build libz3-4
#apt-src --build install libz3-4
#sudo dpkg -i libz3-4_*.deb libz3-dev_*.deb
# Build libllvm9, llvm-toolchain-11, glslang-tools and librenderdoc
#apt-src --build install libllvm9 llvm-toolchain-11 glslang-tools
#sudo apt update
#cat << "EOF"
#TODO: Create the local repo
#Pause
#EOF
#read P
#sudo apt install amdgcn-tools glslang-dev
# Build librenderdoc, libglvnd, intel-gpu-tools, intel-media-driver-non-free, intel-graphics-compiler, intel-opencl-icd
#apt-src --build install librenderdoc libglvnd intel-gpu-tools intel-media-driver-non-free intel-graphics-compiler intel-opencl-icd
#sudo apt update
#cat << "EOF"
#TODO: Create the local repo
#Pause
#EOF
#read P
apt source mesa
cd mesa-*
dpkg-buildpackage --no-check-builddeps --unsigned-source --unsigned-buildinfo --unsigned-changes
#cat << "EOF"
#TODO: Remove the local repo
#Pause
#EOF
#read P
apt source gcc-10
sed -e 's/\(libc6\(\|\.1\)-dev (>= \)2.30-1\~/\12.28/g' -e 's/\(binutils\(\|-hppa64-linux-gnu\):native (>= \)2.35.1-7/\12.31/g' \
-i"" gcc-10_*.dsc
sed -e 's/\(libc6\(\|\.1\)-dev (>= \)2.30-1\~/\12.28/g' -e 's/\(binutils\(\|-hppa64-linux-gnu\):native (>= \)2.35.1-7/\12.31/g' \
-i"" gcc-10-*/debian/control
sed -e 's/2\.30\-1\~/2.28/' -e 's/2.3\(4\|5.1-7\)/2.31.1.3-1/' -i"" gcc-10-*/debian/rules.conf
sed -e 's/\(^distrelease := \)sid/\1buster/' -i"" gcc-10-*/debian/rules.defs
cd gcc-10-*
dpkg-buildpackage --no-check-builddeps --unsigned-source --unsigned-buildinfo --unsigned-changes
# DO NOT USE toram when building chromium (You need a lot of RAM!!!)
apt source chromium
sed -e 's/\(__clang_major__ \)=/\1>/' -i"" chromium-*/extensions/browser/api/declarative_net_request/regex_rules_matcher.cc
dpkg-buildpackage --no-pre-clean --unsigned-source --unsigned-buildinfo --unsigned-changes
# Linux kernel
apt install --yes linux-source
tar xvJf /usr/src/linux-source-*.tar.xz
cd linux-source-*
unxz -c /usr/src/linux-patch-*.patch.xz | patch -p1
sed -e '/pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI/,/PCI_VENDOR_ID_ASMEDIA/ d' -i"" drivers/usb/host/xhci-pci.c
sed -e '/JMS567/,/US_FL_BROKEN_FUA/ { s/\(US_FL_BROKEN_FUA\))/\1 | US_FL_NO_REPORT_OPCODES)/ }' -e '/icenowy@aosc.io/,/^$/ { d }' -i"" drivers/usb/storage/unusual_uas.h
make -j$(lscpu | sed -n -e 's/^CPU(s)[^0-9]*//p') -C /lib/modules/$(uname -r)/build M="${PWD}/drivers/usb/host" modules
make -j$(lscpu | sed -n -e 's/^CPU(s)[^0-9]*//p') -C /lib/modules/$(uname -r)/build M="${PWD}/drivers/usb/storage" modules
make -j$(lscpu | sed -n -e 's/^CPU(s)[^0-9]*//p') -C /lib/modules/$(uname -r)/build M="${PWD}/drivers/usb/host" modules_install
make -j$(lscpu | sed -n -e 's/^CPU(s)[^0-9]*//p') -C /lib/modules/$(uname -r)/build M="${PWD}/drivers/usb/storage" modules_install
exit
#sudo sed -e 's/\(libc6\(\|\.1\)-dev (>= \)2.30-1\~/\12.28/g' -e 's/\(binutils\(\|-hppa64-linux-gnu\):native (>= \)2.35.1-7/\12.31/g' -i"" /usr/src/gcc-10/debian/control
#sudo sed -e 's/2\.30\-1\~/2.28/' -e 's/2.3\(4\|5.1-7\)/2.31.1.3-1/' -i"" /usr/src/gcc-10/debian/rules.conf
#sudo sed -e 's/\(^distrelease := \)sid/\1buster/' -i"" /usr/src/gcc-10/debian/rules.defs
# https://wiki.debian.org/BuildingCrossCompilers
cd "$(dirname ${0%/*})"
env TARGET_LIST=arm64 HOST_LIST=amd64 cross-gcc-gensource 10
cd cross-gcc-packages-amd64/cross-gcc-10-arm64
for i in pr97250-1.diff pr97250-2.diff pr97250-3.diff pr97250-4.diff pr97250-5.diff pr97250-doc.diff cross-install-location.diff gcc-as-needed.diff gcc-as-needed-gold.diff ; do
[ -s "/usr/src/gcc-10/debian/patches/${i}" ] && sudo truncate -s 0 "/usr/src/gcc-10/debian/patches/${i}"
done
for i in 0004-added-multi-arch-specific-install-location-patch.patch 0008-g-include-directories-functional-again.patch ; do
[ -s "/usr/share/cross-gcc/patches/gcc-10/${i}" ] && sudo truncate -s 0 "/usr/share/cross-gcc/patches/gcc-10/${i}"
done
env TARGET_LIST=arm64 HOST_LIST=amd64 dpkg-buildpackage --no-check-builddeps
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。