daniviga / ix2-200

Configs and tools for installing vanilla Debian Linux on iomega ix2-200 NAS
11 stars 5 forks source link

About using your repo #2

Open dtrigo opened 8 years ago

dtrigo commented 8 years ago

Hi, I have a ix2-200 and I want to install debian jessie on it thanks to your incredible work :) I read the links you have as reference and I crosscompiled the kernel following your instructions... I tested the serial connection and I am able to see/interact with the uboot on my machine. Next step...try to load debian kernel from usb... The main question I have is which are the right steps to finally install debian on my box? My guess: -make netinstall with http://ftp.nl.debian.org/debian/dists/jessie/main/installer-armel/current/images/kirkwood/netboot/marvell/openrd/ images (I am concerned about the size of the images and if they fit the current nand configuration, should I check it? cat /proc/mtd ?? ) -test the installation via usb boot -install kernel and ramdisk to nand... (following your instructions I don't have a "initrd.img-3.16.7-ix2-200" file... how can I generate it?)

Thanks in advance!

PS: Also I have a ix4-200d unit, do you think booting from netboot/usb it's safe to try? As far as I understand no changes are made until you write to disk/nand.

andmarti1424 commented 8 years ago

Indeed. The make command just generates the kernel image and headers. Not the Initrd. How do I generate it? Thanks

dtrigo commented 8 years ago

I finally make the netinstall, as recomended on the http://blog.nobiscuit.com/2011/08/06/installing-debian-to-disk-on-an-ix2-200/ but using the last debian (8) available...did not recompile any module... I think they are packages named u-boot-tools and mtd-utils to flash it

andmarti1424 commented 8 years ago

yes, me too. but I (and perhaps you too) still have to make the sensors, and button work! As well this kernel config is smaller than the one installed in the netinst. You really have things that are not neccesary for this NAS.

Going back to your question, in my case, the instructions described here made a deb image that when installed in target, generated the initrd.img. But after I installed all, I got a kernel panic, so obviously I am doing something wrong..

dtrigo commented 8 years ago

did you use the initrd file on /usr/src/linux-3.16.7-ckt20/arch/arm/boot (on my crosscompile machine) I didn't try this yet, because was not important to me to had all this working, but I hope I can try it soon. Also I found this blog (referenced by some reference here) http://blog.nobiscuit.com/2011/11/04/compiling-kernels-for-the-marvell-kirkwood-soc-under-ubuntu-11-10/ than can complete the lost steps here... Please, make me know if you managed to get this working Regards

dtrigo commented 8 years ago

After write my message I realized that I messed up Initrd with Image so I ended up installing the deb packages I had after following the crosscompiling tutorial on this repo... As result:

dpkg -i linux-image-3.16.7-ix2-200_1_armel.deb 
Selecting previously unselected package linux-image-3.16.7-ix2-200.
(Reading database ... 60647 files and directories currently installed.)
Preparing to unpack linux-image-3.16.7-ix2-200_1_armel.deb ...
Unpacking linux-image-3.16.7-ix2-200 (1) ...
Setting up linux-image-3.16.7-ix2-200 (1) ...
update-initramfs: Generating /boot/initrd.img-3.16.7-ix2-200
flash-kernel: deferring update (trigger activated)
flash-kernel: deferring update (trigger activated)
Processing triggers for flash-kernel (3.35+deb8u2) ...
Unsupported platform.
dpkg: error processing package flash-kernel (--install):
 subprocess installed post-installation script returned error exit status 1
Errors were encountered while processing:
 flash-kernel

But on /boot:

/boot# ls
config-3.16.0-4-kirkwood      System.map-3.16.7-ix2-200
config-3.16.7-ix2-200         uImage
initrd.img                    uInitrd
initrd.img-3.16.0-4-kirkwood  vmlinuz
initrd.img-3.16.7-ix2-200     vmlinuz-3.16.0-4-kirkwood
lost+found                    vmlinuz-3.16.7-ix2-200
System.map-3.16.0-4-kirkwood

So kernel is installed and initrd was generated correctly...after following the tutorial...

Append the dtb to the kernel

cp arch/arm/boot/dts/kirkwood-iomega_ix2_200.dtb /boot
cd /boot
cat vmlinuz-3.16.7-ix2-200 kirkwood-iomega_ix2_200.dtb > vmlinuz-3.16.7-ix2-200-dtb

Install the new kernel on the device

mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs -d initrd.img-3.16.7-ix2-200 uInitrd
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux+dtb -d vmlinuz-3.16.7-ix2-200-dtb uImage-dtb

I had the files ready to flash! I didn't try to boot yet because I don't have physical access to the NAS if something fails... maybe in a few days

dtrigo commented 8 years ago

After all...I try to flash, reboot...and it's working: sensors lm63-i2c-0-4c Adapter: mv64xxx_i2c adapter fan1: 0 RPM (min = 0 RPM) temp1: +55.0°C (high = +70.0°C) temp2: +56.4°C (low = +0.0°C, high = +70.0°C) (crit = +85.0°C, hyst = +75.0°C)

but I think the script for gpio-keys will not work, because keys are 'mapped' to a different location:

cat /sys/class/leds/status\:blue\:backup_led/brightness 0 cat /sys/class/leds/status\:white\:power_led/brightness 255

Anyway it should 'work' as are defined on the dtb attached to the kernel... hope it helps