Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
243 commits
Select commit Hold shift + click to select a range
5707471
fix patch & add uefi support
jumkey Aug 21, 2021
195d4de
Ugly fix efi folder
jumkey Sep 13, 2021
4a42938
7.0.1-42218
jumkey Sep 2, 2021
6cf6a9d
implement load extra kernel modules
jumkey Sep 13, 2021
97e3db0
Revert "implement load extra kernel modules"
jumkey Oct 8, 2021
c61b1b3
ext not tested
jumkey Oct 8, 2021
4538862
add redpill-virtio
OrpheeGT Oct 9, 2021
a7e2b8a
add redpill-boot-wait
jumkey Oct 10, 2021
ca2ec26
add power button
jumkey Oct 17, 2021
8b4b2ca
test on_os_load
jumkey Oct 19, 2021
e10bfe7
optimization
jumkey Oct 19, 2021
36b5c82
add power button v6
jumkey Oct 20, 2021
bc6cc25
make bsp file action
jumkey Oct 23, 2021
0559bf0
7.0.1-42218 from actions
jumkey Oct 23, 2021
f51f4ec
change to lzma
jumkey Oct 25, 2021
7eaa5a8
change to lzma not tested
jumkey Oct 25, 2021
3831fb2
support update pack
jumkey Oct 25, 2021
3f777ad
Merge pull request #1 from jumkey/develop
dogodefi Jan 11, 2022
e0a8248
update DS3617xs_42218
ranydb Jan 11, 2022
15da107
Update bundled-exts.json
dogodefi Jan 11, 2022
4026629
Update bundled-exts.json
dogodefi Jan 11, 2022
3294fa1
Create bundled-exts.json
dogodefi Jan 11, 2022
1a8623c
Update bundled-exts.json
dogodefi Jan 11, 2022
3cf54f0
Update bundled-exts.json
dogodefi Jan 11, 2022
859ac97
Update bundled-exts.json
dogodefi Jan 11, 2022
cbf9606
Delete config.json.bak
ranydb Jan 12, 2022
e6d0f04
Merge branch 'develop' of https://github.com/dogodefi/redpill-load in…
ranydb Jan 13, 2022
e2a0802
update RS3617xs+ config
ranydb Jan 13, 2022
0851873
Update config.json
ranydb Jan 13, 2022
028f86d
Update bundled-exts.json
ranydb Jan 13, 2022
8519c5c
update
ranydb Feb 4, 2022
c0bdce2
Update config.json
dogodefi Feb 4, 2022
b1b3786
Update bundled-exts.json
dogodefi Feb 10, 2022
fc4a1fc
Update bundled-exts.json
dogodefi Feb 10, 2022
00b6d84
DS920+\7.0.1-42218
jumkey Feb 12, 2022
01d0732
Update config.json
dogodefi Feb 14, 2022
cc50c1c
Update config.json
dogodefi Feb 14, 2022
fb39e5d
Update config.json
dogodefi Feb 15, 2022
7eefc6a
Update config.json
dogodefi Feb 15, 2022
4f49520
Update ramdisk-002-init-script.patch
dogodefi Feb 15, 2022
9824f22
Update config.json
dogodefi Feb 15, 2022
eed9bf5
Update ramdisk-002-init-script.patch
dogodefi Feb 15, 2022
cc22839
Update ramdisk-002-init-script.patch
dogodefi Feb 15, 2022
e7d5b9e
Update ramdisk-002-init-script.patch
dogodefi Feb 15, 2022
f1cb3ae
Update ramdisk-002-init-script.patch
dogodefi Feb 15, 2022
d085594
Update ramdisk-002-init-script.patch
dogodefi Feb 15, 2022
9d449cc
Update ramdisk-002-init-script.patch
dogodefi Feb 15, 2022
4ef3d75
Update ramdisk-002-init-script.patch
dogodefi Feb 15, 2022
e8d2c38
Create ramdisk-002-network-hosts.patch
dogodefi Feb 15, 2022
4a822af
Rename ramdisk-002-network-hosts.patch to ramdisk-004-network-hosts.p…
dogodefi Feb 15, 2022
af85b34
Update config.json
dogodefi Feb 15, 2022
13d84c5
Update ramdisk-004-network-hosts.patch
dogodefi Feb 15, 2022
98bdea9
Update ramdisk-004-network-hosts.patch
dogodefi Feb 15, 2022
c94403a
Update ramdisk-004-network-hosts.patch
dogodefi Feb 15, 2022
5f61d7b
Create disk.patch
dogodefi Feb 15, 2022
2dcc177
Update and rename disk.patch to ramdisk-005-disk-compatibility.patch
dogodefi Feb 15, 2022
d483531
Rename config/DS3622xs+/ramdisk-005-disk-compatibility.patch to confi…
dogodefi Feb 15, 2022
cdf324e
Update config.json
dogodefi Feb 15, 2022
bce488a
Update config.json
dogodefi Feb 16, 2022
ce8952f
Update config.json
dogodefi Feb 16, 2022
6ae3117
Update config.json
dogodefi Feb 16, 2022
8d37f73
Update config.json
dogodefi Feb 16, 2022
7c4210f
Update config.json
dogodefi Feb 16, 2022
b51ac29
Update config.json
dogodefi Feb 16, 2022
0f25633
Update config.json
dogodefi Feb 16, 2022
cd2750a
Update config.json
dogodefi Feb 18, 2022
9fe475d
Update config.json
dogodefi Feb 18, 2022
01ee246
add FS6400 for test
dogodefi Feb 19, 2022
e82fe24
Merge branch 'develop' of https://github.com/dogodefi/redpill-load in…
dogodefi Feb 19, 2022
faee930
Delete ramdisk-005-disk-compatibility.patch
dogodefi Feb 19, 2022
2e7c4a9
Update bundled-exts.json
dogodefi Feb 19, 2022
076ff50
Delete ramdisk-005-disk-compatibility.patch
dogodefi Feb 19, 2022
33757e8
Merge branch 'develop' of https://github.com/dogodefi/redpill-load in…
dogodefi Feb 19, 2022
50c3bcc
Update config.json
dogodefi Feb 19, 2022
77a6db6
Merge branch 'develop' of https://github.com/dogodefi/redpill-load in…
dogodefi Feb 19, 2022
dff626d
up
dogodefi Feb 19, 2022
5ba2cbd
update
dogodefi Feb 19, 2022
b044770
1
dogodefi Feb 19, 2022
dd26c1e
基于@dogodefi 的优化更新DS3622xs+ 7.0.1-42218
jumkey Feb 20, 2022
04a5c66
disconnect update7.synology.com
jumkey Feb 20, 2022
d87844b
Update config.json
dogodefi Feb 20, 2022
5606932
Update config.json
dogodefi Feb 20, 2022
aeb710b
fix pat_url
tossp Feb 21, 2022
3610448
Update bundled-exts.json
dogodefi Feb 21, 2022
83cacb7
Update config.json
dogodefi Feb 21, 2022
7ce2ca9
Update config.json
dogodefi Feb 21, 2022
7852ffc
Update config.json
dogodefi Feb 21, 2022
c861e36
Merge pull request #5 from tossp/patch-1
jumkey Feb 22, 2022
90ce81f
add cmdline
jumkey Feb 22, 2022
845c9dd
redpill-dtb ext for SupportPortMappingV2(DS920+)
jumkey Feb 26, 2022
77f4600
7.1-42550
jumkey Feb 26, 2022
9d6c719
fix sed path
jumkey Feb 26, 2022
e4deb05
fix
jumkey Feb 26, 2022
3389d93
fix
jumkey Feb 26, 2022
2d7e352
update
dogodefi Mar 1, 2022
41b670a
misc ds3622xsp_42550
jumkey Mar 1, 2022
6e480dc
misc
jumkey Mar 1, 2022
b813721
Update bundled-exts.json
dogodefi Mar 1, 2022
0c706d6
Update bundled-exts.json
dogodefi Mar 1, 2022
a23b212
update
dogodefi Mar 1, 2022
5496042
Merge branch 'develop' of https://github.com/dogodefi/redpill-load in…
dogodefi Mar 1, 2022
338caef
ttyd
jumkey Mar 1, 2022
7634eb0
ttyd
jumkey Mar 1, 2022
a8f2984
ttyd
jumkey Mar 1, 2022
71142ff
ttyd
jumkey Mar 2, 2022
6668686
install dtc
jumkey Mar 3, 2022
75e1fe4
Update config.json
dogodefi Mar 3, 2022
eb22ed5
Update config.json
dogodefi Mar 3, 2022
25af608
pcie_root = "00:1e.0,01.0,07.0"
jumkey Mar 3, 2022
f7cbe21
update for support RS4021xs+
dogodefi Mar 3, 2022
b7f1d08
Merge branch 'develop' of https://github.com/dogodefi/redpill-load in…
dogodefi Mar 3, 2022
9a160ee
update
dogodefi Mar 3, 2022
8b04368
DS1621+
jumkey Mar 7, 2022
dedd6d6
ds3622xsp_42550 virtio
jumkey Mar 10, 2022
a0ecad8
DS2422+ × jun mod
jumkey Mar 12, 2022
23c8d2b
Update config.json
dogodefi Mar 12, 2022
2730c48
Update config.json
dogodefi Mar 13, 2022
ac49f38
Create ramdisk-004-rc-script.patch
dogodefi Mar 14, 2022
14c16af
Update config.json
dogodefi Mar 14, 2022
72ee0bf
Update ramdisk-004-rc-script.patch
dogodefi Mar 14, 2022
d0f24f4
Update ramdisk-004-rc-script.patch
dogodefi Mar 14, 2022
e7d3f57
Update ramdisk-004-rc-script.patch
dogodefi Mar 14, 2022
f732d8e
Update ramdisk-004-rc-script.patch
dogodefi Mar 14, 2022
4da01fd
Update ramdisk-004-rc-script.patch
dogodefi Mar 14, 2022
5fb91ee
Update config.json
dogodefi Mar 15, 2022
3c8e941
buildroot.yml
jumkey Mar 17, 2022
7679da7
libelf-dev
jumkey Mar 17, 2022
1a00169
version
jumkey Mar 18, 2022
06c5537
Update config.json
dogodefi Mar 22, 2022
6aa22ef
update
dogodefi Mar 25, 2022
a76b62e
ds3622xsp_42621
jumkey Mar 25, 2022
5f87dcc
update
dogodefi Mar 25, 2022
b8cedfc
update
dogodefi Mar 25, 2022
5d05911
update
dogodefi Mar 25, 2022
749e779
update
dogodefi Mar 30, 2022
b8f23d3
update 3615xs 42621 config
dogodefi Mar 30, 2022
4bf803e
Merge branch 'develop'
pocopico Apr 1, 2022
5247ef0
918 + 920 42621 configs
pocopico Apr 1, 2022
8c4e58c
918 + 920 42621 configs
pocopico Apr 1, 2022
dc8957b
Added workflow
pocopico Apr 2, 2022
02400e3
Added workflow
pocopico Apr 2, 2022
3aa88d5
Changed download cndl
pocopico Apr 2, 2022
46aace5
Added 3617 42621 bsp
pocopico Apr 2, 2022
9134072
Latest additions Merge branch 'develop'
pocopico Apr 2, 2022
56a79a6
Added 3617 42621
pocopico Apr 2, 2022
08068f5
Added 3617 42621
pocopico Apr 2, 2022
ea9ecd6
Added 7.1.0 cpu systemd patch
pocopico Apr 2, 2022
6c38ad5
Added 7.1.0 cpu systemd patch
pocopico Apr 2, 2022
2e5f4a8
Added 1621 42621
pocopico Apr 3, 2022
f1de44e
Added 1621 42621
pocopico Apr 3, 2022
66dcf58
Added 1621 42621
pocopico Apr 3, 2022
ba32b3a
Typos
pocopico Apr 4, 2022
60ab299
Typos
pocopico Apr 4, 2022
1a977a7
Typos
pocopico Apr 4, 2022
961cba6
Typos
pocopico Apr 4, 2022
db3a492
Typos
pocopico Apr 4, 2022
17d54d9
Typos
pocopico Apr 4, 2022
0640dbf
Typos
pocopico Apr 4, 2022
0f09bb5
Typos
pocopico Apr 4, 2022
051f297
Fix typo
pocopico Apr 4, 2022
5011b84
Added 42621
pocopico Apr 4, 2022
2892584
Added 42621
pocopico Apr 4, 2022
5f43bca
typos
pocopico Apr 4, 2022
6a6500d
Squash
pocopico Apr 4, 2022
2327ee1
Squash
pocopico Apr 4, 2022
8b32bd6
Squash
pocopico Apr 4, 2022
7edd134
Merge branch 'develop'
pocopico Apr 4, 2022
10a3cdd
Squash
pocopico Apr 5, 2022
cec91e9
Squash
pocopico Apr 5, 2022
1afbafa
Squash
pocopico Apr 5, 2022
67b9795
Squash
pocopico Apr 5, 2022
0e61469
Merge branch 'develop'
pocopico Apr 5, 2022
959d7fe
Added platforms
pocopico Apr 5, 2022
afb8b54
Added platforms
pocopico Apr 5, 2022
7c3da0d
Added platforms
pocopico Apr 5, 2022
a9d0d07
Fixed pat URL
pocopico Apr 5, 2022
b2a8170
Fixed pat URL
pocopico Apr 5, 2022
0168765
Missing pat urls
pocopico Apr 5, 2022
7ee83c2
Changed id
pocopico Apr 5, 2022
e675ea7
Changed id
pocopico Apr 5, 2022
0e7f616
Changed id
pocopico Apr 5, 2022
31f8b5d
Changed id
pocopico Apr 5, 2022
5634ecf
Squash
pocopico Apr 7, 2022
53de197
Squash
pocopico Apr 7, 2022
8d95ffd
Squash
pocopico Apr 7, 2022
9513568
Squash
pocopico Apr 7, 2022
15b8390
Update rpext-index.json
dogodefi Apr 8, 2022
5d5a5cd
Update rpext-index.json
dogodefi Apr 8, 2022
8eeacf2
Added 42661
pocopico Apr 9, 2022
90608ee
Added 42661
pocopico Apr 9, 2022
8a9526f
Added 42661
pocopico Apr 9, 2022
74d0745
Added 42661
pocopico Apr 9, 2022
d78fc34
Added 42661
pocopico Apr 9, 2022
62f4f77
Added 42661
pocopico Apr 9, 2022
5842510
Added 42661
pocopico Apr 9, 2022
3afd45c
Update config.json
pocopico Apr 9, 2022
d0e2b8f
Update config.json
pocopico Apr 9, 2022
4ab294f
Fixed wrong url
pocopico Apr 10, 2022
9f44072
Fixed wrong url
pocopico Apr 10, 2022
a20ec1d
Fixed wrong url
pocopico Apr 10, 2022
4a440ec
Fixed wrong url
pocopico Apr 10, 2022
e15869d
Fixed wrong url
pocopico Apr 10, 2022
bf7a80f
Fixed wrong url
pocopico Apr 10, 2022
bdfd4a8
Fixed wrong url
pocopico Apr 10, 2022
54ae342
Fixed merge issue
pocopico Apr 11, 2022
522430e
Fixed merge issue
pocopico Apr 11, 2022
55e2186
Fixed merge issue
pocopico Apr 11, 2022
bfb079d
Fixed merge issue
pocopico Apr 11, 2022
d2e477c
Fixed merge issue
pocopico Apr 11, 2022
45edb82
Update ramdisk-004-network-hosts.patch
dogodefi Apr 12, 2022
b2e10f7
Patch to disable access to dataupdate7.synology.com
pocopico Apr 12, 2022
f714f6c
Patch to disable access to dataupdate7.synology.com
pocopico Apr 12, 2022
e9454a8
Merge branch 'develop' of github.com:pocopico/redpill-load into develop
pocopico Apr 12, 2022
b30658c
Patch to disable access to dataupdate7.synology.com
pocopico Apr 12, 2022
3e8b8f2
Patch to disable access to dataupdate7.synology.com
pocopico Apr 12, 2022
8199818
Patch to disable access to dataupdate7.synology.com
pocopico Apr 12, 2022
b28e407
Patch to disable access to dataupdate7.synology.com
pocopico Apr 12, 2022
2fb2ced
Patch to disable access to dataupdate7.synology.com
pocopico Apr 12, 2022
4ad77f9
added install-all script
pocopico Apr 13, 2022
2b5d525
Merge branch 'develop'
pocopico Apr 13, 2022
42f1dbe
Update rpext-index.json
pocopico Apr 16, 2022
1662b37
Added a check to enable extensions with common dependencies to load
pocopico Apr 20, 2022
a20ec37
Merge branch 'master' of github.com:pocopico/redpill-load
pocopico Apr 20, 2022
28c5753
Added a check to enable extensions with common dependencies to load
pocopico Apr 20, 2022
66e9c8b
Fixed modules load check
pocopico May 2, 2022
8aea493
Updated configs to 42661-U1
pocopico May 8, 2022
e85da7f
Merge
pocopico May 10, 2022
851cc67
Update buildroot.yml
pocopico May 16, 2022
16b7256
Update buildroot.yml
pocopico May 16, 2022
e8d37bd
Update buildroot.yml
pocopico May 16, 2022
cfac466
Testing fb kernel patching
pocopico Sep 29, 2022
af4fa03
Testing fb kernel patching
pocopico Sep 29, 2022
be06526
Testing fb kernel patching
pocopico Sep 29, 2022
fdeeac7
Testing fb kernel patching
pocopico Sep 29, 2022
0072dec
Testing fb kernel patching
pocopico Sep 29, 2022
e32b5fc
Changes to 7.1 actions
pocopico Nov 21, 2022
9562c91
Added experimental 5.10.55
pocopico Nov 24, 2022
2da3152
Added experimental 5.10.55
pocopico Nov 24, 2022
fc0c3aa
Added experimental 5.10.55
pocopico Nov 24, 2022
41fa51e
Added experimental 5.10.55
pocopico Nov 24, 2022
d6d5da8
Added experimental 5.10.55
pocopico Nov 24, 2022
4694f2e
Added experimental 5.10.55
pocopico Nov 24, 2022
a1ceb2e
Added experimental 5.10.55
pocopico Nov 24, 2022
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
48 changes: 48 additions & 0 deletions .github/workflows/buildroot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: buildroot

on:
workflow_dispatch:
inputs:
git-address:
description: 'git-address'
required: true
default: 'https://github.com/buildroot/buildroot.git'
branches-tags:
description: 'branches-tags'
required: true
default: '2022.02'
board:
description: 'board'
required: true
default: 'syno'

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Clone source code
run: |
git clone ${{github.event.inputs.git-address}} /opt/buildroot
cd /opt/buildroot
- name: Install packages
run: |
sudo apt-get update
sudo apt-get install -y libelf-dev
- name: Bulid
run: |
mkdir /opt/firmware
cd /opt/buildroot
git checkout ${{github.event.inputs.branches-tags}}
git pull origin ${{github.event.inputs.branches-tags}}
cp -rf /home/runner/work/redpill-load/redpill-load/buildroot/* .
chmod 777 board/syno/rootfs-overlay/root/*.sh
echo '---start make---'
make ${{github.event.inputs.board}}_defconfig
make
cp -r /opt/buildroot/output/images /opt/firmware
- name: Upload buildroot-${{github.event.inputs.branches-tags}}-${{github.event.inputs.board}}
uses: actions/upload-artifact@v3
with:
name: buildroot-${{github.event.inputs.branches-tags}}-${{github.event.inputs.board}}
path: /opt/firmware
118 changes: 118 additions & 0 deletions .github/workflows/make.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,118 @@
name: Make kernel bs patch

on:
workflow_dispatch:
inputs:
pat-address:
description: 'Pat file URL'
required: true
default: 'https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_DS918%2B_42218.pat'
toolchain:
description: 'DSM toolchain URL for repack zImage'
required: true
default: 'https://sourceforge.net/projects/dsgpl/files/Tool%20Chain/DSM%207.0.0%20Tool%20Chains/Intel%20x86%20Linux%204.4.180%20%28Apollolake%29/apollolake-gcc750_glibc226_x86_64-GPL.txz'
linux-src:
description: 'Linux kernel source URL for repack zImage'
required: true
default: 'https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.180.tar.xz'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Bulid
id: bulid-bsp
run: |
patfile=$(basename ${{github.event.inputs.pat-address}} | while read; do echo -e ${REPLY//%/\\x}; done)
echo "::set-output name=patfile::$patfile"
# install bsdiff
sudo apt-get install -y bsdiff

#ls -al $GITHUB_WORKSPACE/
mkdir /opt/build
mkdir /opt/dist
cd /opt/build
curl -L ${{github.event.inputs.pat-address}} -o ds.pat
curl -L ${{github.event.inputs.toolchain}} -o toolchain.txz
curl -L ${{github.event.inputs.linux-src}} -o linux.tar.xz
mkdir pat
tar xf ds.pat -C pat
# is update_pack
if [ ! -f "pat/zImage" ]; then
cd pat
ar x $(ls flashupdate*)
tar xf data.tar.xz
cd ..
fi
mkdir toolchain
tar xf toolchain.txz -C toolchain
mkdir linux-src
tar xf linux.tar.xz --strip-components 1 -C linux-src

# extract vmlinux
./linux-src/scripts/extract-vmlinux pat/zImage > vmlinux
# sha256
sha256sum ds.pat >> checksum.sha256
sha256sum pat/zImage >> checksum.sha256
sha256sum pat/rd.gz >> checksum.sha256
sha256sum vmlinux >> checksum.sha256
# patch vmlinux
# vmlinux_mod.bin
curl -L https://github.com/jumkey/dsm-research/raw/master/tools/common.php -o common.php
curl -L https://github.com/jumkey/dsm-research/raw/master/tools/patch-ramdisk-check.php -o patch-ramdisk-check.php
curl -L https://github.com/jumkey/dsm-research/raw/master/tools/patch-boot_params-check.php -o patch-boot_params-check.php
php patch-boot_params-check.php vmlinux vmlinux-mod
php patch-ramdisk-check.php vmlinux-mod vmlinux_mod.bin

git clone https://github.com/kiler129/recreate-zImage.git
chmod +x recreate-zImage/rebuild_kernel.sh
cd linux-src
# ---------- make zImage_mod
# Make file more anonymous
export KBUILD_BUILD_TIMESTAMP="1970/1/1 00:00:00"
export KBUILD_BUILD_USER="root"
export KBUILD_BUILD_HOST="localhost"
export KBUILD_BUILD_VERSION=0

export ARCH=x86_64
export CROSS_COMPILE=/opt/build/toolchain/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-
#make olddefconfig
make defconfig
# change to lzma
sed -i 's/CONFIG_KERNEL_GZIP=y/# CONFIG_KERNEL_GZIP is not set/' .config
sed -i 's/# CONFIG_KERNEL_LZMA is not set/CONFIG_KERNEL_LZMA=y/' .config
<< see_below
make clean
sed -i 's/bzImage: vmlinux/bzImage: /' arch/x86/Makefile
make vmlinux -j4 || true # make some *.o inspire by UnknowO
cp ../vmlinux_mod.bin vmlinux # vmlinux_mod.bin is already stripped of debugging and comments, strippe again should be ok
make bzImage
sed -i 's/bzImage: /bzImage: vmlinux/' arch/x86/Makefile
cp arch/x86/boot/bzImage ../zImage_mod
make clean
see_below
# for DS3615xs
#sed -i 's/ -std=gnu89$/ -std=gnu89 $(call cc-option,-fno-PIE)/' Makefile
sed -i 's/ ld -/ ${CROSS_COMPILE}ld -/' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/(ld -/(${CROSS_COMPILE}ld -/' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/ gcc / ${CROSS_COMPILE}gcc /' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/ nm / ${CROSS_COMPILE}nm /' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/ objcopy / ${CROSS_COMPILE}objcopy /' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/(objdump /(${CROSS_COMPILE}objdump /' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/ readelf / ${CROSS_COMPILE}readelf /' ../recreate-zImage/rebuild_kernel.sh
../recreate-zImage/rebuild_kernel.sh $PWD/../linux-src ../vmlinux_mod.bin ../zImage_mod
# ----------
cd ..
bsdiff pat/zImage zImage_mod diff.bsp

echo '---copy file---'
cp vmlinux /opt/dist
cp vmlinux_mod.bin /opt/dist
cp diff.bsp /opt/dist
cp checksum.sha256 /opt/dist
echo '---END---'
- name: Upload
uses: actions/upload-artifact@v2
with:
name: kernel bs patch for ${{ steps.bulid-bsp.outputs.patfile }}
path: /opt/dist
139 changes: 139 additions & 0 deletions .github/workflows/make2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,139 @@
name: Make kernel bs patch 71

on:
workflow_dispatch:
inputs:
pat-address:
description: 'Pat file URL'
required: true
default: 'https://cndl.synology.cn/download/DSM/release/7.0.1/42218/DSM_DS3622xs+_42218.pat'
toolchain:
description: 'DSM toolchain URL for repack zImage'
required: true
default: 'https://downloads.sourceforge.net/project/dsgpl/Tool%20Chain/DSM%207.0.0%20Tool%20Chains/Intel%20x86%20Linux%204.4.180%20%28Broadwellnk%29/broadwellnk-gcc750_glibc226_x86_64-GPL.txz'

linux-src:
description: 'Linux kernel source URL for repack zImage'
required: true
default: 'https://cdn.kernel.org/pub/linux/kernel/v4.x/linux-4.4.180.tar.xz'

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Bulid
id: bulid-bsp
env:
ACTIONS_STEP_DEBUG: true
run: |
patfile=$(basename ${{github.event.inputs.pat-address}} | while read; do echo -e ${REPLY//%/\\x}; done)
echo "::set-output name=patfile::$patfile"
# install bsdiff
sudo apt-get install -y bsdiff cpio xz-utils

#ls -al $GITHUB_WORKSPACE/
mkdir /opt/build
mkdir /opt/dist
cd /opt/build
curl -L ${{github.event.inputs.pat-address}} -o ds.pat
curl -L ${{github.event.inputs.toolchain}} -o toolchain.txz
curl -L ${{github.event.inputs.linux-src}} -o linux.tar.xz

# download old pat for syno_extract_system_patch # thanks for jumkey's idea.
mkdir synoesp
curl --location https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_DS3622xs%2B_42218.pat --output oldpat.tar.gz

tar -C./synoesp/ -xf oldpat.tar.gz rd.gz
cd synoesp
xz -dc < rd.gz >rd 2>/dev/null || echo "extract rd.gz"
echo "finish"
cpio -idm <rd 2>&1 || echo "extract rd"
mkdir extract && cd extract
cp ../usr/lib/libcurl.so.4 ../usr/lib/libmbedcrypto.so.5 ../usr/lib/libmbedtls.so.13 ../usr/lib/libmbedx509.so.1 ../usr/lib/libmsgpackc.so.2 ../usr/lib/libsodium.so ../usr/lib/libsynocodesign-ng-virtual-junior-wins.so.7 ../usr/syno/bin/scemd ./
ln -s scemd syno_extract_system_patch
cd ../..
mkdir pat
#tar xf ds.pat -C pat
ls -lh ./
sudo LD_LIBRARY_PATH=synoesp/extract synoesp/extract/syno_extract_system_patch ds.pat pat || echo "extract latest pat"
echo "test4"
# is update_pack
if [ ! -f "pat/zImage" ]; then
cd pat
ar x $(ls flashupdate*)
tar xf data.tar.xz
cd ..
fi
echo "test5"
mkdir toolchain
tar xf toolchain.txz -C toolchain
mkdir linux-src
tar xf linux.tar.xz --strip-components 1 -C linux-src

# extract vmlinux
./linux-src/scripts/extract-vmlinux pat/zImage > vmlinux
# sha256
sha256sum ds.pat >> checksum.sha256
sha256sum pat/zImage >> checksum.sha256
sha256sum pat/rd.gz >> checksum.sha256
sha256sum vmlinux >> checksum.sha256
# patch vmlinux
# vmlinux_mod.bin
curl -L https://github.com/jumkey/dsm-research/raw/master/tools/common.php -o common.php
curl -L https://github.com/jumkey/dsm-research/raw/master/tools/patch-ramdisk-check.php -o patch-ramdisk-check.php
curl -L https://github.com/jumkey/dsm-research/raw/master/tools/patch-boot_params-check.php -o patch-boot_params-check.php
php patch-boot_params-check.php vmlinux vmlinux-mod
php patch-ramdisk-check.php vmlinux-mod vmlinux_mod.bin

git clone https://github.com/kiler129/recreate-zImage.git
chmod +x recreate-zImage/rebuild_kernel.sh
cd linux-src
# ---------- make zImage_mod
# Make file more anonymous
export KBUILD_BUILD_TIMESTAMP="1970/1/1 00:00:00"
export KBUILD_BUILD_USER="root"
export KBUILD_BUILD_HOST="localhost"
export KBUILD_BUILD_VERSION=0

export ARCH=x86_64
export CROSS_COMPILE=/opt/build/toolchain/x86_64-pc-linux-gnu/bin/x86_64-pc-linux-gnu-
#make olddefconfig
make defconfig
# change to lzma
sed -i 's/CONFIG_KERNEL_GZIP=y/# CONFIG_KERNEL_GZIP is not set/' .config
sed -i 's/# CONFIG_KERNEL_LZMA is not set/CONFIG_KERNEL_LZMA=y/' .config
<< see_below
make clean
sed -i 's/bzImage: vmlinux/bzImage: /' arch/x86/Makefile
make vmlinux -j4 || true # make some *.o inspire by UnknowO
cp ../vmlinux_mod.bin vmlinux # vmlinux_mod.bin is already stripped of debugging and comments, strippe again should be ok
make bzImage
sed -i 's/bzImage: /bzImage: vmlinux/' arch/x86/Makefile
cp arch/x86/boot/bzImage ../zImage_mod
make clean
see_below
# for DS3615xs
#sed -i 's/ -std=gnu89$/ -std=gnu89 $(call cc-option,-fno-PIE)/' Makefile
sed -i 's/ ld -/ ${CROSS_COMPILE}ld -/' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/(ld -/(${CROSS_COMPILE}ld -/' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/ gcc / ${CROSS_COMPILE}gcc /' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/ nm / ${CROSS_COMPILE}nm /' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/ objcopy / ${CROSS_COMPILE}objcopy /' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/(objdump /(${CROSS_COMPILE}objdump /' ../recreate-zImage/rebuild_kernel.sh
sed -i 's/ readelf / ${CROSS_COMPILE}readelf /' ../recreate-zImage/rebuild_kernel.sh
../recreate-zImage/rebuild_kernel.sh $PWD/../linux-src ../vmlinux_mod.bin ../zImage_mod
# ----------
cd ..
bsdiff pat/zImage zImage_mod diff.bsp

echo '---copy file---'
cp vmlinux /opt/dist
cp vmlinux_mod.bin /opt/dist
cp diff.bsp /opt/dist
cp checksum.sha256 /opt/dist
echo '---END---'
- name: Upload
uses: actions/upload-artifact@v2
with:
name: kernel bs patch for ${{ steps.bulid-bsp.outputs.patfile }}
path: /opt/dist
Loading