Coder Social home page Coder Social logo

zeik0s / wdmc-gen2 Goto Github PK

View Code? Open in Web Editor NEW

This project forked from johns-q/wdmc-gen2

5.0 2.0 0.0 28.14 MB

WD My Cloud Gen2 (Kernel / Distribution / Information) drop

License: GNU Affero General Public License v3.0

Shell 100.00%
western-digital mycloud my-cloud generation-2 gen2 custom customization linux os free

wdmc-gen2's Introduction

WD My Cloud (Gen2) - wdmc-gen2 - Marvell ARMADA 375

For a better documented and more recent way head over to https://github.com/heisath/wdmc2-kernel

For detailed Information have a look in the Wiki! Feel free to contribute!

  • mainline kernel support tested with 4.18.9

    files needed for compiling:

    it's pretty easy doing this on your WDMC, but takes a long time. Instructions for Cross-compiling here

    Before you start, get sure to make a Backup of your current /dev/sda3 Partition! That's the partition that holds the system itself and all the configuration. And for the worst Case use/buy some Adapter or Dockingstation to restore the Backup when mounting the Drive!

    • download kernel source from https://www.kernel.org/

    • extract the kernel archive

    • copy kernel-OLD_VERSION_NUMBER.config to linux-XXXXXXX/.config

    • copy armada-375-wdmc-gen2.dts to linux-XXXXXXX/arch/arm/boot/dts/

    • ready to build the kernel

       cd linux-XXXXXXXX
       make -j2 zImage
       make armada-375-wdmc-gen2.dtb
       cat arch/arm/boot/zImage arch/arm/boot/dts/armada-375-wdmc-gen2.dtb > zImage_and_dtb
       mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 'WDMC-Gen2' -d zImage_and_dtb uImage
       rm zImage_and_dtb
       make -j2 modules modules_install
      

      copy uImage to /boot of your boot partition

      reboot and enjoy your new Kernel!


  • Cross-Compile:

     alias makehelp='make -j8 CROSS_COMPILE=/home/user/arm-unknown-linux-gnueabi/bin/arm-unknown-linux-gnueabi- ARCH=arm'
    

    replace the following /home/user directory with the directory where the toolchain is downloaded change the number after -j according to your Number of Threads (Cores x 2) on your PC, this speeds up significantly the compiling process. then these commands follow:

     makehelp zImage
     makehelp armada-375-wdmc-gen2.dtb
     mkdir -p ../kernel-bin/boot
     cat arch/arm/boot/zImage arch/arm/boot/dts/armada-375-wdmc-gen2.dtb > ../kernel-bin/zImage_and_dtb
     mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n 'WDMC-Gen2' -d ../kernel-bin/zImage_and_dtb ../kernel-bin/boot/uImage
     rm ../kernel-bin/zImage_and_dtb
     makehelp modules
     makehelp INSTALL_MOD_PATH=../kernel-bin modules_install
    

    This creates a folder called kernel-bin, where the Kernel and Boot-Code and all the compiled Kernel Modules are generated. Move the content of the folder to the root folder your Mycloud Device.

Recovery/other Stuff

  • uRamdisk modified (Original from AllesterFox)

    Can boot original firmware, debian from AllesterFox, alpine linux. It looks for a linux partition as 2nd on usb stick and boots from there. If there is none, it boots from 3rd partition on SATA drive. Copy to /boot on 1st partition of the usb stick or to 3rd partition of the harddrive.

  • build-initramfs.sh

    builds a minimal initramfs. Can boot from kernel commandline, usb-stick 2nd partition, hdd 3rd partition. Placed in /boot/uInitrd. rename it to uRamdisk.

  • alpine linux diskless image

    • alpine-wdmc-gen2-3.6.2-armhf.tar.gz

      contains a complete bootable diskless image of alpine linux. modified to ignore "root=". "root" is not setable on WD My Cloud. And enabled SSH daemon, you can ssh to it after booting. root account has no password. Kernel 4.12 is included, but no modules.

    • alpine initramfs image with ssh (without password!)

  • install

    • Use an USB 2.0 stick! They had the problem, that usb 3.0 sticks aren't always booting. If you have only an usb 3.0 stick, remove stick, turn wdmc2 on, when the blue light blinks insert usb stick fast, using this i could boot from usb 3.0 sick.

    • make a dos partition table (not gpt) on usb stick.

    • make a partition "W95 FAT32 (LBA)" numeric 0x0C on usb stick

    • make a FAT32 filesystem on usb stick.

    • extact alpine-wdmc-gen2-3.6.2-armhf.tar.gz to the root of the usb stick.

      You should have:

      -rwxr-xr-x    1 root     root            26 Jun 17 11:47 .alpine-release
      -rwxr-xr-x    1 root     root          3427 Jan  1  1980 alpine.apkovl.tar.gz
      drwxr-xr-x    3 root     root          4096 Jun 17 11:47 apks
      drwxr-xr-x    5 root     root          4096 Jul  5 12:02 boot
          
      

      on the usb stick.

wdmc-gen2's People

Contributors

johns-q avatar zeik0s avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

wdmc-gen2's Issues

kernel.config

Hello, is it possible to get your .config file from kernel 4.18.9 or later if you have? Mine stopped working after 4.16.18

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.