NSA-Backup-Device/Log

aus Metalab Wiki, dem offenen Zentrum für meta-disziplinäre Magier und technisch-kreative Enthusiasten.
Zur Navigation springenZur Suche springen

Here is my log for building and installing Debian on the D-Link DNS-320 NAS. If anything is unclear, you have questions or improvements please drop me an email dns320 to AT to woerm DOT at.

                               PROGRESS MADE SO FAR
Serial console                                                           [x],
U-boot via. u-art                                                        [x],
U-boot via. nand                                                         [x],
Debootstrap Debian                                                       [~],
U-Boot ubifs-image                                                       [~],
Configure Debian correctly                                               [ ]
[#######################¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦¦]

Compiling u-boot.kwb

  • Clone u-boot from master-branch git clone -b dns320_support https://github.com/lentinj/u-boot.git
  • set export-variable export CROSS_COMPILE=arm-linux-gnueabi-
  • make distclean
    • tells me make: arm-linux-gnueabi-gcc: Command not found
    • export CROSS_COMPILE=arm-linux-gnu- correct variable on Fed
  • make dns320_config
  • make u-boot-nand.kwb
  • change u-boot/board/d-link/dnskw/kwbimage.dns320.cfg BOOT_FROM nand to BOOF_FROM uart
  • make clean && make dns320_config && make u-boot-uart.kwb

Starting u-boot.kwb over rs232-adapter

  • connect RX => TX, TX => RX, GND <=> GND
  • download kwuartboot-0.1
    • make
  • sudo ./kwuartboot /dev/ttyUSB1 u-boot-uart.kwb; sleep 5; sudo ./kwuartboot /dev/ttyUSB1 u-boot-uart.kwb; sudo screen /dev/ttyUSB1 115200
    • find out which is your tty device by looking into your kernel ring and searching for the string tty dmesg |grep -i tty
    • Connect RS232, connect power, run the command, push power button once, wait, press any key for interrupting u-boot
    • quit screen with pressing ctrl+a once, then push d once

Bootstrapping debian

  • debootstrap --verbose --foreign --arch=armel --variant=minbase --include=module-init-tools,locales,udev,aptitude,dialog,ifupdown,procps,iproute,iputils-ping,pump,nano,wget,netbase wheezy rootfs http://ftp.uk.debian.org/debian
  • cp /usr/bin/qemu-arm-static rootfs/usr/bin/
  • chroot rootfs
    • ./debootstrap/debootstrap --second-stage
    • apt-get clean
    • dpkg-reconfigure tzdata
    • dpkg-reconfigure locales
    • passwd
    • exit #:)
  • rm rootfs/usr/bin/qemu-arm-static
  • sudo mkfs.ubifs -v -r rootfs -m 2048 -e 129024 -c 1016 -x zlib -o ubifs.img
    • requires on ubuntu sudo apt-get install mtd-utils
    • side note: You can copy files from your vagrant box to your vagrant
      folder with cp /vagrant/

Kernel Compiling(Additionally)

  • downloading linux-2.6
    • Did not work, trying it with 3x Kernel now
  • setting alias for cross-make
  • copying kirkwood_defconfig and adding extra options