<?xml version="1.0" encoding="UTF-8"?>
<rss version="2.0"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	>
 <channel>
  <title>UNIX и Программизм</title>
  <link>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?</link>
  <generator>http://www.eblah.com</generator>
  <description></description>
  <language>en</language>
  <item>
   <title>Gentoo on WD MyBook World, wight light</title>
   <link>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?m-1282935985/</link>
   <comments>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?m-1282935985/#num1</comments>
   <description><![CDATA[How to install Gentoo to WD My Book World edition (white light)<br /><br />Lasy guys see the end of this file for link to all the staff bundled together. <br /><br />Precaution:<br />&nbsp;&nbsp;1. Make sure you make a full (including a spare partitions) backup of virgin MyBook,<br />&nbsp;&nbsp;&nbsp;&nbsp; becuase there is no way to restore original firmware if you will need it. (use partimage to don't store empty sectors)<br />&nbsp;&nbsp;2. I strictly suggest to wire com console (personally I use Nokia DKU-5 cable as 3.3v com to USB converter)&nbsp;&nbsp;&nbsp;&nbsp; otherwise you couldn't determine what goes wrong if the system will not boot.<br />&nbsp;&nbsp;3. I don't know (yet?) how to deal with LEON copro and turn off it's support in kernel. So you could experience slowdown of your ipsec vpn or something like this.<br />&nbsp;&nbsp;4. Below I assume that HDD of MyBook is /dev/sdb, adjust it to fit your actual configuration&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp;5. if you decide to use files from my installation notice: I use 100Gb XFS sda1 for gentoo, 1Gb sda2 for SWAP, and 900G sda3 is left for rest of the world. <br />&nbsp;&nbsp;&nbsp;&nbsp; No raid support. ext2, ext3, usb etc compiled as modules. eth0 compiled in firmware-less (LEON-less) mode. <br />&nbsp;&nbsp;6. Notice link section at the end of this readme. <br /><br /><br />General information:<br />&nbsp;&nbsp;&nbsp;&nbsp; WD based on Oxford semiconductors oxnas 810 board. It holds: LEON sprcv8 copro, oxnas SATA interface, Intel EHCI compatible USB host, Synopsis GMAC 1Gb NIC. It doesn't have RT clock chip despite the fact original firmware try to initialize it. Original kernel based on 2.6.24 linux kernel and built with eabi/ulibc. Boot loader consists of two stages - proprietary stage1 and&nbsp;&nbsp;u-boot. u-boot doesn't support Ethernet so tftp boot is not possible. First five cyllinders of hdd is reserved for boot and&nbsp;&nbsp;kernel image so first partition started from cyl 5. COM is 3.3v, console operates on 115200,8N1, xon/xoff and it's UART2<br /><br />Pre-requirements:<br />&nbsp;&nbsp;&nbsp;&nbsp;1. GPL sources from WD site<br />&nbsp;&nbsp;&nbsp;&nbsp;2. Precompiled mbr, stage1, u-boot and kernel images, (you can start from blank page, install one of cross development framework&nbsp;&nbsp;and build everything from scratch but this way is not covered here.)<br />&nbsp;&nbsp;&nbsp;&nbsp;3. Gentoo stage3 for arm and portage archive<br /><br />&nbsp;&nbsp;&nbsp;&nbsp;Also you should have the way to access you HDD from host linux machine (e.g. SATA-to-USB adapter) <br />&nbsp; &nbsp; &nbsp; <br /><br /><br />Installation steps:<br />&nbsp;&nbsp; 1. Clean your HDD (dd if=/dev/zero of=/dev/sdb bs=512 count=10000) <br />&nbsp;&nbsp; 2. Install boot images<br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; dd if=./mbr of=/dev/sdb bs=512 seek=0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dd if=./stage1 of=/dev/sdb bs=512 seek=1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dd if=./u-boot.wrapped of=/dev/sdb bs=512 seek=3<br />&nbsp;&nbsp; 3. Install pre-compiled kernel&nbsp;&nbsp;<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dd if=./uImage of=/dev/sdb bs=512 seek=336<br />&nbsp;&nbsp; 4. Edit partition table as necessary<br />&nbsp;&nbsp; 5. Make filesystem. Don't initialize swap. If your whant to use raid (md driver) make sure that version of md on your host much one used on MyBook (0.90)<br />&nbsp;&nbsp; 6. Mount sdb1 and extract stage3 and portage<br />&nbsp;&nbsp; 7. Install additional software - you have to install ntpclient and mkimage also you may need <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;vi, lrzsz and sysklogd<br />&nbsp;&nbsp; 8. Setup console <br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;change /etc/inittab<br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; s0:12345:respawn:/sbin/agetty 115200 ttyS0 vt100<br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;add to your .profile<br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;stty rows 40 <br />&nbsp;&nbsp; 9. Create /sdbin/rc0 to get clock from the network at early boot <br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/bin/mount -t proc&nbsp;&nbsp;proc /proc<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/sbin/ifconfig eth0 inet 192.168.0.57<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/sbin/route add default gw 192.168.0.1<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;/bin/ntpclient -s -h ntp0.uk.uu.net<br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;and change /etc/inittab<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i0::sysinit:/sbin/rc0<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; i1::sysinit:/sbin/rc sysinit<br />&nbsp;&nbsp; 10. edit /etc/fstab accroding to your partition layout&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; 11. Edit /etc/shadow - remove * to have password less root account&nbsp; &nbsp; &nbsp;&nbsp; &nbsp; &nbsp; <br />&nbsp;&nbsp; 12. Enable sshd i.e. link /etc/init.d/sshd to /etc/runlevels/default/<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; Change /etc/sshd_config - say yes to PermitRootLogin and PermitEmptyPasswords<br />&nbsp;&nbsp; 13. Plug HDD back to MyBook and boot device<br />&nbsp;&nbsp; 14. ssh to box and setup os as you like.<br /><br />Kernel re-compilation on device:<br />&nbsp; &nbsp; &nbsp;1. Have a good cup of cofee - it takes a while<br />&nbsp;&nbsp;&nbsp;&nbsp;2. Unpack kernel source obtained from wdc site<br />&nbsp; &nbsp; &nbsp;3. Create symlink /usr/src/linux -&gt; kernel-source/kernel-0.4.6<br />&nbsp;&nbsp;&nbsp;&nbsp;4. Edit /usr/src/linux/Makefile, <br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ARCH&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;?= $(SUBARCH)<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;CROSS_COMPILE&nbsp;&nbsp; ?=<br />&nbsp; &nbsp; &nbsp;5. cd /usr/src/linux <br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; make oxnas_810_eabi_wd_prod_defconfig <br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; make menuconfig<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; make<br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; Notice: disable LEON support, otherwise eth0 will not work.<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; don't enable OXNAS i2c protocol - it's broken<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; don't enable USB debugging - it's broken<br />&nbsp;&nbsp;&nbsp;&nbsp;6. Install new image:<br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; mkimage -A arm -a 48008000 -e 48008000 -C none -d /usr/src/linux/arch/arm/boot/zImage uImage<br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; dd if=./uImage of=/dev/sda bs=512 seek=336<br /><br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; You may try new kernel first, before installing it to main location:<br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;dd if=./uImage of=/dev/sda bs=512 seek=32478<br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; interrupt u-boot and type<br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;run load2 boot<br /><br />&nbsp; &nbsp; &nbsp;&nbsp;&nbsp; <br />Links:<br />&nbsp;&nbsp;&nbsp;&nbsp;My MyBook:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://devnull.samersoff.net/pub/MyBook_me&nbsp;&nbsp;">http://devnull.samersoff.net/pub/MyBook_me&nbsp;&nbsp;</a><br />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; oxnas_boot_dms_20100827.bin.gz, oxnas_lib_modules_dms_20100827.bin.gz etc<br />&nbsp;&nbsp;&nbsp;&nbsp;MyBook origin:&nbsp;&nbsp;&nbsp;&nbsp; <a href="http://support.wdc.com">http://support.wdc.com</a><br />&nbsp;&nbsp;&nbsp;&nbsp;Com wiring:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://www.nslu2-linux.org/wiki/HowTo/AddASerialPort">http://www.nslu2-linux.org/wiki/HowTo/AddASerialPort</a><br />&nbsp; &nbsp; &nbsp;Gentoo Arm:&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://distfiles.gentoo.org/releases/arm/autobuilds/current-stage3/armv5tel-softfloat-linux-gnueabi/">http://distfiles.gentoo.org/releases/arm/autobuilds/current-stage3/armv5tel-softfloat-linux-gnueabi/</a><br />&nbsp; &nbsp; &nbsp;Bunch of staff:&nbsp;&nbsp;&nbsp;&nbsp;<a href="http://mybookworld.wikidot.com">http://mybookworld.wikidot.com</a> ]]></description>
   <pubDate>Fri, 27 Aug 2010 23:06:25</pubDate>
   <dc:creator>dsamersoff</dc:creator>
  </item>
  <item>
   <title>xpg4,xpg6 and /usr/bin difference</title>
   <link>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?m-1271449101/</link>
   <comments>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?m-1271449101/#num1</comments>
   <description><![CDATA[<a href="http://www.petertribble.co.uk/Solaris/proj_stdarg.html">http://www.petertribble.co.uk/Solaris/proj_stdarg.html</a>]]></description>
   <pubDate>Sat, 17 Apr 2010 00:18:21</pubDate>
   <dc:creator>dsamersoff</dc:creator>
  </item>
  <item>
   <title>dv =&gt; mpeg2</title>
   <link>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?m-1265716725/</link>
   <comments>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?m-1265716725/#num1</comments>
   <description><![CDATA[<strong>video</strong><br />dvgrab capture_20060604.dv<br />ffmpeg -i capture_20060604.dv&nbsp;&nbsp;-target pal-dvd capture_20060604.mpeg<br /><br />more ...<br /><a href="http://womble.decadent.org.uk/talks/dvd-ukuug06/dvd-talk-ukuug06-paper.html">http://womble.decadent.org.uk/talks/dvd-ukuug06/dvd-talk-ukuug06-paper.html</a>]]></description>
   <pubDate>Tue, 9 Feb 2010 14:58:45</pubDate>
   <dc:creator>dsamersoff</dc:creator>
  </item>
  <item>
   <title>mkv =&gt; avi: change container</title>
   <link>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?m-1249336329/</link>
   <comments>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?m-1249336329/#num1</comments>
   <description><![CDATA[/opt/mplayer/bin/mencoder infile.mkv -oac copy -ovc copy -o outfile.avi]]></description>
   <pubDate>Tue, 4 Aug 2009 01:52:09</pubDate>
   <dc:creator>dsamersoff</dc:creator>
  </item>
  <item>
   <title>samba mount UTF-8 partition</title>
   <link>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?m-1247777197/</link>
   <comments>http://devnull.samersoff.net/cgi-bin/forum/Blah.pl/Blah.pl?m-1247777197/#num1</comments>
   <description><![CDATA[server:<br /> smb.conf<br />[global]<br />unix charset = UTF-8<br /><br />client:<br />mount -t cifs ... -o username=winusername,password=winpassword,iocharset=utf8]]></description>
   <pubDate>Fri, 17 Jul 2009 00:46:37</pubDate>
   <dc:creator>dsamersoff</dc:creator>
  </item>
 </channel>
</rss>