Skip to content
3 changes: 2 additions & 1 deletion config/DS918+/7.0-41890/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -113,7 +113,8 @@
},
"bootp1_copy": {
"@@@PAT@@@/GRUB_VER": "GRUB_VER",
"@@@COMMON@@@/EFI": "EFI"
"@@@COMMON@@@/EFI/boot/SynoBootLoader.conf": "EFI/BOOT/",
"@@@COMMON@@@/EFI/boot/SynoBootLoader.efi": "EFI/BOOT/"
},
"bootp2_copy": {
"@@@PAT@@@/GRUB_VER": "GRUB_VER",
Expand Down
127 changes: 127 additions & 0 deletions config/DS918+/7.0.1-42218/config.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
{
"os": {
"id": "ds918p_42218",
"pat_url": "https://global.download.synology.com/download/DSM/release/7.0.1/42218/DSM_DS918%2B_42218.pat",
"sha256": "4fc59b0f0adfdd96467376f50919dde1bf5dcec74e53452e626f9cf7bd52a38c"
},

"files": {
"zlinux": {
"name": "zImage",
"sha256": "0df0fe7b86c269a58933e334cde5056cf5a901f705d6fef5cd750f2981b0ca04"
},
"ramdisk": {
"name": "rd.gz",
"sha256": "016a99d562b0c06be5f36b4d69a7208ccd2dc816de85c9fb1bba3bf493e1e3ec"
},
"vmlinux": {
"sha256": "aeeb8fd775f7b3d149e0ad6534c4ada162556e4c5c3d171808b9a1cbd93266cf"
}
},

"patches": {
"zlinux": [
"zImage-001-918p-42218-ramdisk-and-flag-NOP.bsp"
],
"ramdisk": [
"@@@COMMON@@@/ramdisk-001-disable-root-pwd.patch",
"@@@COMMON@@@/ramdisk-002-init-script-NEW-name.patch",
"@@@COMMON@@@/ramdisk-003-post-init-script-UPPER.patch"
]
},

"synoinfo": {
"maxdisks": "16",
"internalportcfg": "0xffff",
"esataportcfg": "0x0",
"HddHotplug": "",
"support_led_brightness_adjustment": "",
"support_leds_lp3943": "",
"buzzeroffen": "0xffff",
"rss_server": "http://example.com/null.xml",
"rss_server_ssl": "https://example.com/null.xml",
"small_info_path": "https://example.com/null",
"updateurl": "http://example.com/",
"myds_region_api_base_url": "https://example.com"
},

"grub": {
"template": "@@@COMMON@@@/grub-template.conf",
"base_cmdline": {
"sn": "",
"vid": "0x46f4",
"pid": "0x0001",
"mac1": "",
"netif_num": 1,

"syno_hw_version": "DS918+",
"syno_hdd_powerup_seq": 1,
"HddHotplug": 0,
"vender_format_version": 2,
"console": "ttyS0,115200n8",
"withefi": null,
"elevator": "elevator",
"syno_port_thaw": 1,
"syno_hdd_detect": 0,
"root": "/dev/md0",
"earlycon": "uart8250,io,0x3f8,115200n8"
},

"menu_entries": {
"RedPill DS918+ v7.0.1-42218 (USB, Verbose)": {
"options": [
"savedefault",
"set root=(hd0,msdos1)",
"echo Loading Linux...",
"linux /zImage @@@CMDLINE@@@",
"echo Loading initramfs...",
"initrd /rd.gz /custom.gz",
"echo Starting kernel with USB boot"
],
"cmdline": {
"earlyprintk": null,
"loglevel": 15,
"log_buf_len": "32M"
}
},
"RedPill DS918+ v7.0.1-42218 (SATA, Verbose)": {
"options": [
"savedefault",
"set root=(hd0,msdos1)",
"echo Loading Linux...",
"linux /zImage @@@CMDLINE@@@",
"echo Loading initramfs...",
"initrd /rd.gz /custom.gz",
"echo Starting kernel with SATA boot",
"echo WARNING: SATA boot support on this platform is experimental!"
],
"cmdline": {
"earlyprintk": null,
"loglevel": 15,
"synoboot_satadom": 2,
"log_buf_len": "32M"
}
}
}
},

"extra": {
"compress_rd": false,
"ramdisk_copy": {
"@@@EXT@@@/rp-lkm/redpill-linux-v4.4.180+.ko": "usr/lib/modules/rp.ko",
"@@@COMMON@@@/iosched-trampoline.sh": "usr/sbin/modprobe"
},
"bootp1_copy": {
"@@@PAT@@@/GRUB_VER": "GRUB_VER",
"@@@COMMON@@@/EFI/boot/SynoBootLoader.conf": "EFI/BOOT/",
"@@@COMMON@@@/EFI/boot/SynoBootLoader.efi": "EFI/BOOT/"
},
"bootp2_copy": {
"@@@PAT@@@/GRUB_VER": "GRUB_VER",
"@@@COMMON@@@/EFI": "EFI",
"@@@PAT@@@/grub_cksum.syno": "grub_cksum.syno",
"@@@PAT@@@/rd.gz": "rd.gz",
"@@@PAT@@@/zImage": "zImage"
}
}
}
Binary file not shown.
12 changes: 12 additions & 0 deletions config/_common/grub-template.conf
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,17 @@ insmod gzio
set gfxmode=auto
insmod vbe
insmod vga
# UEFI
insmod efi_gop
insmod efi_uga

insmod font
if loadfont ${prefix}/unicode.pf2
then
insmod gfxterm
set gfxmode=auto
set gfxpayload=keep
terminal_output gfxterm
fi

@@@MENU_ENTRIES@@@
Binary file modified ext/boot-image-template.img.gz
Binary file not shown.
13 changes: 13 additions & 0 deletions ext/build-template-image.txt
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,14 @@ The following settings were detected by ./configure for the binary release:
With stack smashing protector: No
*******************************************************

mkdir build-pc && cd build-pc
../configure --prefix=$PWD/usr -sbindir=$PWD/sbin --sysconfdir=$PWD/etc --disable-werror
make && make install
cd ..
mkdir build && cd build
../configure --prefix=$PWD/usr -sbindir=$PWD/sbin --sysconfdir=$PWD/etc --disable-werror --with-platform=efi --target=x86_64
make && make install

########################################################################################################################
### Create the image
########################################################################################################################
Expand Down Expand Up @@ -83,8 +91,13 @@ mount /dev/loop8p1 ./temp-mount-p1
--root-directory=$PWD/temp-mount-p1 \
/dev/loop8
# small note: --root-directory MUST be an absolute path (or it will create it in /)
./grub-2.06/build/grub-install \
--target=x86_64-efi \
--efi-directory=$PWD/temp-mount-p1 \
--removable --no-nvram -s --no-bootsector --boot-directory=$PWD/temp-mount-p1/boot
sync
umount /dev/loop8p1
losetup -d /dev/loop8

########################################################################################################################
### Pack image
Expand Down