Various fixes

This commit is contained in:
pocopico
2023-05-28 12:39:40 +03:00
parent a19a29a4d2
commit 27415c8276
2 changed files with 13 additions and 6 deletions

View File

@ -2,16 +2,16 @@
"os": {
"id": "dva1622_42218",
"pat_url": "https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_DS920%2B_42218.pat",
"sha256": "fe2a4648f76adeb65c3230632503ea36bbac64ee88b459eb9bfb5f3b8c8cebb3"
"sha256": "b9b77846e0983f50496276bec6bcdfcfadd4c1f9f0db8ed2ca5766f131ddf97f"
},
"files": {
"zlinux": {
"name": "zImage",
"sha256": "346b68f662b50f47d3ee6c2bc9de6302e4b60436142c24ee88b620c7afd1ba06"
"sha256": "70e93678f3932c35c5e884f950e50b36f8dc6366f96dd9a454c8d47ecbaee5de"
},
"ramdisk": {
"name": "rd.gz",
"sha256": "f7dd1317f24ec6b9bac839e37f66b59030218c7f97c06f73f1f54ed0f892c4aa"
"sha256": "8607c34fff3a13c75dbc1a9c730de2b2cf649697d6244fd37047090d2e2ba897"
},
"vmlinux": {
"sha256": "6494b4c4789ed887ddfaf0fe0e45e100cfcc4ec719b7f3ab6bcc26b05e97c829"

View File

@ -17,7 +17,7 @@ SCRIPTREPO="https://github.com/pocopico/tinycore-redpill/raw/main/html/index.sh"
extensionrepofile="https://github.com/pocopico/tcrp-addons/raw/main/addons.json"
extensionfile="addons.json"
TOOLS="bspatch bzImage-to-vmlinux.sh calc_run_size.sh crc32 dtc kexec ramdisk-patch.sh vmlinux-to-bzImage.sh xxd zimage-patch.sh kpatch zImage_template.gz grub-editenv"
SCRIPTVERSION="0.10.4"
SCRIPTVERSION="0.10.5"
#. ${HOMEPATH}/include/config.sh
############################################
@ -31,6 +31,7 @@ function versionhistory() {
<br> 0.10.2, Fixed some bugs, added more models.
<br> 0.10.3, Added full image backup function
<br> 0.10.4, Fixed long standing issue with the corruption of the user_config.json file.
<br> 0.10.5, Various fixes
<br>
EOF
@ -1755,6 +1756,7 @@ function patchkernel() {
function cachepat() {
echo "Caching PAT file"
mkdir -p /mnt/$tcrppart/auxfiles/
status "setstatus" "cachingpat" "false" "Caching PAT file"
cd ${TEMPPAT}
rm -rf rd.temp && rm -rf vmlinux* && rm -rf zImage-dsm && rm -rf initrd-dsm && status "setstatus" "cachingpat" "false" "Removing temp files from ${TEMPPAT}"
@ -2158,7 +2160,7 @@ function build() {
wecho "Copying original ramdisk to partitions ${loaderdisk}1 and ${loaderdisk}2" && status "setstatus" "ramdiskpatch" "warn" "Copying original ramdisk to partitions ${loaderdisk}1 and ${loaderdisk}2"
cp -f ${TEMPPAT}/rd.gz /mnt/${loaderdisk}1/
cp -f ${TEMPPAT}/rd.gz /mnt/${loaderdisk}2/
wecho "ramdisk sha256sum matches expected sha256sum, patching kernel" && status "setstatus" "ramdiskpatch" "warn" "ramdisk sha256sum matches expected sha256sum, patching kernel"
wecho "ramdisk sha256sum matches expected sha256sum, patching ramdisk" && status "setstatus" "ramdiskpatch" "warn" "ramdisk sha256sum matches expected sha256sum, patching ramdisk"
patchramdisk
else
wecho "rd.gz does not match sha256sum : $extractedrdsha"
@ -2480,7 +2482,11 @@ EOF
EXTENSIONS="$(echo $platform_selected | jq -r -e '.add_extensions[]' | grep json | awk -F: '{print $1}' | sed -s 's/"//g')"
EXTENSIONS_SOURCE_URL="$(echo $platform_selected | jq -r -e '.add_extensions[]' | grep json | awk '{print $2}' | sed -e 's/,//g' -e 's/"//g')"
BUILDVERSION="$(echo $VERSION | awk -F- '{print $2}')"
wecho "Please note that for MODEL ${BUILDMODEL}_${BUILDVERSION}, the following extensions are added automatically: $EXTENSIONS <br>"
if [ -z "$EXTENSIONS" ]; then
wecho "No auto included extensions found for MODEL ${BUILDMODEL}_${BUILDVERSION}, check ${CUSTOMCONFIG} for this model"
else
wecho "Please note that for MODEL ${BUILDMODEL}_${BUILDVERSION}, the following extensions are added automatically: $EXTENSIONS <br>"
fi
for exturl in $EXTENSIONS_SOURCE_URL; do
@ -2500,6 +2506,7 @@ EOF
cat /home/tc/payload/$ext/*json | jq -r -e '. | .id,.url ' | paste -d " " - - | sort | uniq
done
)"
[ ! -f $extensionfile ] && curl --insecure -sL $extensionrepofile -O
extensionlist="$(cat $extensionfile | jq -r -e '. | .id,.url ' | paste -d " " - - | sort | uniq)"