扫描二维码关注官方公众号
12下一页
返回列表 发布新帖

[讨论/分享] 从国外论坛转过来的,看上去挺牛的

5195 35
发表于 2013-8-28 09:59:41 | 显示全部楼层 阅读模式

来吧兄弟,一起玩一起讨论!

您需要 登录 才可以下载或查看,没有账号?注册

×
本帖最后由 vaguecupid 于 2013-8-28 10:04 编辑

有能力帮忙翻译下!!


Part 1. Pre-requisites
  • Linux OS with x86_64 architecture (we use Ubuntu 12.10)
  • Additional tools and libraries: git, libc6-i386, ncurses, build-essential archivemountsudo apt-get install git libc6-i386 build-essential libncurses5-dev
  • DSM 4.1 tool chain. It can be downloaded from http://sourceforge.net/projects/dsgpl/files/ and unpacked to the /usr/local folder. For XPEnology we use “Intel x86 Linux 3.2.11 (Bromolow)” version of toolchain and its archive file name is gcc420_glibc236_x64_bromolow-GPL.tgz.
  • Copy of XPEnology linux 3.x kernel source code from https://github.com/andy928/xpenologygit clone https://github.com/andy928/xpenology.git linux-3.x

Part 2. Kernel compiling
  • By default we have enabled a lot of different hardware in kernel, but if you need to enable or disable anything else, you can do it by using an interactive menu:make ARCH=x86_64 CROSS_COMPILE=/usr/local/x86_64-linux-gnu/bin/x86_64-linux-gnu- menuconfig
  • Now we can compile our XPEnology kernel:make ARCH=x86_64 CROSS_COMPILE=/usr/local/x86_64-linux-gnu/bin/x86_64-linux-gnu- modules
  • And finally, build the bzImage file:make ARCH=x86_64 CROSS_COMPILE=/usr/local/x86_64-linux-gnu/bin/x86_64-linux-gnu- bzImageResult will be placed to the “linux-3.x/arch/x86/boot/” folder. When building is done, you must rename “bzImage” to “zImage”

Part 3. Synobios modification
  • First of all, you need to get a copy of synobios.ko file from rd.gz or hda1.tgz file, both of them are inside of the DSM pat file, which is actually a tar archive.
  • Let SetMicropId() function return a valid NAS ID.text:0000000000002370                                         public SetMicropId.text:0000000000002370                         SetMicropId     proc near               ; DATA XREF: .data:synobios_ops_0o.text:0000000000002370.text:0000000000002370                         var_18          = qword ptr -18h.text:0000000000002370.text:0000000000002370 48 83 EC 18                             sub     rsp, 18h.text:0000000000002374 0F B6 15 1D 33 00 00                    movzx   edx, cs:syno_module+8.text:000000000000237B 0F B6 05 17 33 00 00                    movzx   eax, cs:syno_module+9.text:0000000000002382 48 C7 04 24 00 00 00 00                 mov     [rsp+18h+var_18], 0.text:000000000000238A C0 EA 04                                shr     dl, 4.text:000000000000238D 83 E0 0F                                and     eax, 0Fh.text:0000000000002390 48 C1 E0 04                             shl     rax, 4.text:0000000000002394 0F B6 D2                                movzx   edx, dl.text:0000000000002397 48 09 D0                                or      rax, rdx.text:000000000000239A 04 01                                   add     al, 1.text:000000000000239C 74 15                                   jz      short loc_23B3.text:000000000000239E 31 D2                                   xor     edx, edx.text:00000000000023A0 81 3D F2 32 00 00 FF 00+                cmp     cs:MpId_20729, 0FFh.text:00000000000023AA 74 1C                                   jz      short loc_23C8.text:00000000000023AC                         loc_23AC:                               ; CODE XREF: .text:00000000000023AC 89 D0                                   mov     eax, edx.text:00000000000023AE 48 83 C4 18                             add     rsp, 18h.text:00000000000023B2 C3                                      retn.text:00000000000023B3                         loc_23B3:                               ; CODE XREF:.text:00000000000023B3 48 C7 C7 FE 45 00 00                    mov     rdi, offset aGetMicropFail ; "get microp fail\n".text:00000000000023BA 31 C0                                   xor     eax, eax.text:00000000000023BC E8 9B 42 00 00                          call    printk.text:00000000000023C1 BA FF FF FF FF                          mov     edx, 0FFFFFFFFh.text:00000000000023C6 EB E4                                   jmp     short loc_23AC.text:00000000000023C8                         loc_23C8:                               ; CODE XREF:.text:00000000000023C8 48 C7 C6 13 46 00 00                    mov     rsi, offset aR  ; "R".text:00000000000023CF 48 89 E2                                mov     rdx, rsp.text:00000000000023D2 B9 08 00 00 00                          mov     ecx, 8.text:00000000000023D7 48 89 F7                                mov     rdi, rsi.text:00000000000023DA E8 81 FE FF FF                          call    ReadUart.text:00000000000023DF 85 C0                                   test    eax, eax.text:00000000000023E1 BA FF FF FF FF                          mov     edx, 0FFFFFFFFh.text:00000000000023E6 75 C4                                   jnz     short loc_23AC.text:00000000000023E8 0F BE 04 24                             movsx   eax, byte ptr [rsp+18h+var_18].text:00000000000023EC 31 D2                                   xor     edx, edx.text:00000000000023EE 89 05 A8 32 00 00                       mov     cs:MpId_20729, eax.text:00000000000023F4 EB B6                                   jmp     short loc_23AC.text:00000000000023F4                         SetMicropId     endpCode at offset 000023E6 must be changed to
    .text:00000000000023E6 48 31 C0                                xor rax, rax.text:00000000000023E9 B0 42                                   mov al, 042h.text:00000000000023EB 90                                      nopFull list of available NAS ID's is enumerated as SYNO_MICROP_ID and it can be obtained in “linux-3.x/include/linux/synobios.h” file.
  • Switching off “buzzer stop button pressed” logging message:.text:0000000000000395 80 7C 24 17 00                          cmp     [rsp+28h+var_11], 0.text:000000000000039A 74 D4                                   jz      short loc_370 to  
    .text:0000000000000395 80 7C 24 17 00                          cmp     [rsp+28h+var_11], 0.text:000000000000039A EB D4                                   jmp     short loc_370

Part 4. Building PAT fileFor XPEnology project we use DS3612xs firmware from DSM_DS3612xs_2668.pat file, which is, actually, a TAR archive with the following files inside:
checksum.syno    // files' checksumsgrub_cksum.syno  // zImage and rd.gz checksums that are used in GRUBhda1.tgz         // system imagerd.gz            // ram disk imageupdater          // WEB version of the installer (instead of Synology Assistent)VERSION          // DSM versionzImage           // kernel image
  • First, we need to replace synobios.ko file in RAM disk image. Unpack and mount RAM disk:gunzip /tmp/rd.gzsudo mount -t ext2 -o loop rd /mnt/ramdiskNow we must replace synobios.ko file in the /mnt/ramdisk/lib/modules folder with our previously patched one. Now we must unmount RAM disk and pack it back:
    sudo umount /mnt/ramdiskgzip /tmp/rd
  • Secondly, we will replace synobios.ko file in system image. Mount hda1.tgz with archivemount:sudo archivemount /tmp/hda1.tgz /mnt/hdd
  • Thirdly, we will replace synobios.ko file again in the /mnt/hdd/lib/modules folder with the same patched file and then unmount it:sudo umount /mnt/hdd Now we need to rename result file /tmp/hda1.tgz to /tmp/hda1 and pack it with XZ:
    xz -z9 /tmp/hda1 and rename it back to /tmp/hda1.tgz
  • Finally, we need to recalculate the checksums of updated files. Get a copy of checksum calculator:git clone https://github.com/andy928/synochecksum.git synochecksum and compale it by running make. Now copy synochecksum-emu1 file to the folder with unpacked and modified files and recalculate checksum:
    synochecksum-emu1 hda1.tgz rd.gz updater VERSION zImage >checksum.synoWhen it's done, pack files back to TAR archive and rename its extension to pat

本帖被以下淘专辑推荐:

  • 牛贴|主题: 66, 订阅: 11
该会员没有填写今日想说内容.

评论35

zym789Lv.5 发表于 2013-8-28 10:06:27 | 显示全部楼层
太深奥了.完全不懂
回复 点赞

使用道具 举报

vaguecupid楼主Lv.6 发表于 2013-8-28 10:08:58 | 显示全部楼层
群晖的源代码应该是在http://sourceforge.net/projects/dsgpl/files/里面!!
4.3的toolchains放出来了,看来很快4.3的黑群晖也快了  详情 回复
发表于 2013-8-28 10:21
该会员没有填写今日想说内容.
回复 点赞

使用道具 举报

isekuLv.5 发表于 2013-8-28 10:21:02 | 显示全部楼层
本帖最后由 iseku 于 2013-8-28 10:29 编辑

4.3的toolchains放出来了,看来4.3的黑群晖也快了
回复 点赞

使用道具 举报

dsqaLv.10 发表于 2013-8-28 10:22:45 | 显示全部楼层
这是编译破解教程
回复 点赞

使用道具 举报

raw12Lv.2 发表于 2013-8-28 10:26:02 | 显示全部楼层
看来和我此等小白是没关系的了
回复 点赞

使用道具 举报

knsewLv.5 发表于 2013-8-28 10:34:34 | 显示全部楼层
白的用着挺好,放放资料,省的麻烦。
虚拟机上跑着黑群,干点PT的苦力啥的。
各司其职挺好
回复 点赞

使用道具 举报

nizhengfengLv.5 发表于 2013-8-28 10:40:16 | 显示全部楼层
进来看看
回复 点赞

使用道具 举报

alfredLv.5 发表于 2013-8-28 11:16:52 | 显示全部楼层
只可远观不可亵玩
回复 点赞

使用道具 举报

天堂无泪Lv.5 发表于 2013-8-28 11:28:51 | 显示全部楼层
看不懂鸟语
回复 点赞

使用道具 举报

civLv.3 发表于 2013-8-28 11:29:49 | 显示全部楼层
挺牛的,有空在细看。
回复 点赞

使用道具 举报

saiwaikeLv.4 发表于 2013-8-28 13:04:25 | 显示全部楼层
这是给O大这些专家看的吧。
回复 点赞

使用道具 举报

tong 发表于 2013-8-28 16:04:24 | 显示全部楼层
提示: 作者被禁止或删除 内容自动屏蔽
回复 点赞

使用道具 举报

nunanaLv.6 发表于 2013-8-28 16:51:28 | 显示全部楼层
google翻译
回复 点赞

使用道具 举报

goliathLv.5 发表于 2013-8-28 17:36:47 | 显示全部楼层
看不懂,幫頂一下。
回复 点赞

使用道具 举报

justrockLv.3 发表于 2013-8-28 17:59:07 | 显示全部楼层
编译教程?
回复 点赞

使用道具 举报

tk472990VIPLv.4 发表于 2013-8-28 18:20:58 | 显示全部楼层
好深奥的感觉
回复 点赞

使用道具 举报

非典型废言Lv.3 发表于 2013-8-29 17:23:10 | 显示全部楼层
坐等大侠
回复 点赞

使用道具 举报

5182525Lv.3 发表于 2013-8-29 17:25:42 | 显示全部楼层
看不懂啊,噶高深的
回复 点赞

使用道具 举报

vaguecupid楼主Lv.6 发表于 2013-8-29 20:35:02 | 显示全部楼层
只能寄托于其他大大了,O大好像不发布了!!
该会员没有填写今日想说内容.
回复 点赞

使用道具 举报

回复

懒得打字嘛,点击右侧快捷回复 【本站酷狼4T,750元】
您需要登录后才可以回帖 登录 | 注册

本版积分规则

投诉/建议联系

support@gebi1.cn

未经授权禁止转载,复制和建立镜像,
如有违反,追究法律责任
  • 关注公众号
  • 添加微信客服
Copyright © 2001-2024 隔壁网 版权所有 All Rights Reserved. 粤ICP备14056481号-1
关灯 在本版发帖
扫一扫添加微信客服
返回顶部
快速回复 返回顶部 返回列表