ix4-300d infos & hack ... (bare debian & 3.16 kern) -> DONE

Mijzelf
Posts: 6205
Joined: Mon Jun 16, 2008 10:45 am

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by Mijzelf » Thu Jul 03, 2014 1:37 pm

You deserve an own subforum. ;)

benoitm974
Posts: 35
Joined: Wed Jun 18, 2014 9:38 pm

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by benoitm974 » Sat Jul 05, 2014 1:05 pm

I've initiated a git hub for config and LCD driver : https://github.com/benoitm974/ix4-300d

With wiki for howto and documentation.

benoitm974
Posts: 35
Joined: Wed Jun 18, 2014 9:38 pm

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by benoitm974 » Mon Jul 21, 2014 12:38 am

The current DTS include the handling of the poweroff by pulling up GPIO24. Yet the nas look at eth phy status to decide on wether to reboot or halt the system. Since the neta driver from mainline only initialize eth phy when used (opposite to the original firmware who does always), It took me ages to understand the difference with original firmware, in the end just configure BOTH eth phy at boot and power down just works ! (I did a static inet setting to 169.254.x.x ip)

benoitm974
Posts: 35
Joined: Wed Jun 18, 2014 9:38 pm

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by benoitm974 » Wed Jul 23, 2014 11:03 am

I think it is now safe to say that the dts file is OK and that mainline 3.15 or 3.16rc is table on this device. I've been running the ix4-300d for 48h with 3 disks (2RAID0 & 1sata) doing bakcup, rsync, gcc compilation on 3.16rc kernel with no error, or weird message in dmesg or message.

I made a last commit to the github project that includes the nand configuration in the kernel config & dts so nand is also supported.

That is to say that only CESA and HDD led blinking on disk activity are left over (but they are no show stopper to me) so I won't spent any more active time ont these two for now.

So far I've migrate my previous nas to this one and will be running my device as production. so no more experiments on it :( ... except the lcd driver that I might evolve along with a daemon to display usefull information on it and get user interaction from the select and confirm button, but that's more applicative development than kernel stuff...

Benoit.

benoitm974
Posts: 35
Joined: Wed Jun 18, 2014 9:38 pm

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by benoitm974 » Mon Jul 28, 2014 9:15 pm

https://github.com/benoitm974/ix4-300d/wiki

is updated with final dts for mainline support, note this was filled out for intergation into linux 3.17 !
Also there is a patch for led HDD to work with the mv_sata driver

Thanks all for reading...

benoitm974
Posts: 35
Joined: Wed Jun 18, 2014 9:38 pm

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by benoitm974 » Sat Aug 30, 2014 12:59 am

I'm glad to confirm that the device tree for ix4-300d is now part of the mainline 3.17 !

djok
Posts: 1
Joined: Sun Sep 07, 2014 8:32 pm

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by djok » Sun Sep 07, 2014 8:37 pm

Hi,

Are you going to post complete guide how to install Debian on ix4-300d?
I have same device and currently I try to install my home automation software, but I have problem with current usb drivers in the kernel.


btw,
Very nice work!

benoitm974
Posts: 35
Joined: Wed Jun 18, 2014 9:38 pm

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by benoitm974 » Mon Sep 08, 2014 4:01 pm

Not sure what you're looking for here.

If you're looking into customizing the current linux 3.0.29 then lenovo provide patch to apply to 3.0.29 and you can build your own kernel/modules. If you're planning to boot an entirely debian from USB or HDD1 then you'll need to connect through serial cable to tweak the u-boot env.

I was not really planning to provide howto or easy install guide there. But can reply to some question if you have already look into connecting serial to your box.

Benoit

einne
Posts: 10
Joined: Tue May 27, 2014 1:47 am

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by einne » Sat Nov 22, 2014 12:43 am

benoitm974 wrote: I was not really planning to provide howto or easy install guide there. But can reply to some question if you have already look into connecting serial to your box.
Benoit
I will have to do that. But your notes makes that job a lot easier. Thank you!

benoitm974
Posts: 35
Joined: Wed Jun 18, 2014 9:38 pm

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by benoitm974 » Sat Nov 22, 2014 7:41 am

I think the easier if you go in this direction would be to look at building an USB key with a kernel and initrd image . if you boot the device holding the reset button it search for kernel on USB key. Not that I was only able to boot properly on USB with at least one sata drive connected. Then it's up to you to go for sata install or nand install but for wider spread sata install will scare less people.

Also note that the MV ebu team did forget to merge one patch in 3.17 to have mainline to worknout of the box. You can just apply the patch for my github.
Then also note that the nand support is also in the kernel would need fw env etc configuration that I didn't do.

Enjoy and good luck

einne
Posts: 10
Joined: Tue May 27, 2014 1:47 am

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by einne » Mon Nov 24, 2014 12:51 am

benoitm974 wrote:I think the easier if you go in this direction would be to look at building an USB key with a kernel and initrd image . if you boot the device holding the reset button it search for kernel on USB key. Not that I was only able to boot properly on USB with at least one sata drive connected. Then it's up to you to go for sata install or nand install but for wider spread sata install will scare less people.
I wanna do sth different - build kernel which will support boot from RAID5 or RAID10. I wanna put kernel on NAND and point to rootfs on RAID.
benoitm974 wrote:Also note that the MV ebu team did forget to merge one patch in 3.17 to have mainline to worknout of the box. You can just apply the patch for my github.
Then also note that the nand support is also in the kernel would need fw env etc configuration that I didn't do.
Can u please write what tool chain did u used for cross compilation?
Is there everything in kernel to boot directly from SATA disk with ext2/3/4 filesystem? I worry that there's sth missing. (without initrd)
Do u suggest to use your last kernel with all patches or to stick with lenovo's one?

benoitm974
Posts: 35
Joined: Wed Jun 18, 2014 9:38 pm

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by benoitm974 » Mon Nov 24, 2014 4:19 pm

einne wrote:
benoitm974 wrote:I think the easier if you go in this direction would be to look at building an USB key with a kernel and initrd image . if you boot the device holding the reset button it search for kernel on USB key. Not that I was only able to boot properly on USB with at least one sata drive connected. Then it's up to you to go for sata install or nand install but for wider spread sata install will scare less people.
I wanna do sth different - build kernel which will support boot from RAID5 or RAID10. I wanna put kernel on NAND and point to rootfs on RAID.
--> This is what I do in that case the easier is to use serial to test then install your kernel on NAND. But all you need is described here :https://github.com/benoitm974/ix4-300d/wiki
einne wrote:
benoitm974 wrote:Also note that the MV ebu team did forget to merge one patch in 3.17 to have mainline to worknout of the box. You can just apply the patch for my github.
Then also note that the nand support is also in the kernel would need fw env etc configuration that I didn't do.
Can u please write what tool chain did u used for cross compilation?
Is there everything in kernel to boot directly from SATA disk with ext2/3/4 filesystem? I worry that there's sth missing. (without initrd)
Do u suggest to use your last kernel with all patches or to stick with lenovo's one?
--> Well I support open source so can't tell you to use lenovo/marvell ones :) For what you want to do you can use both, it does have all filesystem and raid support no worries. For toolchain the easier is to install a ubuntu installing ARM toolchain.

einne
Posts: 10
Joined: Tue May 27, 2014 1:47 am

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by einne » Thu Nov 27, 2014 3:10 pm

I was able to configure kernel and boot the device, I've created basic rootfs too. Success. Thank u for your work!
Were u able to hack WOL?
What do u mean by:
power, reset, select & scroll button support as gpio-key recognized as keyboard entry (working with acpid)
R u sure that your kernel config is ACPI compatible?
I have got an error when acpid starts:

Code: Select all

RTNETLINK1 answers: No such file or directory
acpid: error talking to the kernel via netlink
Last edited by einne on Thu Nov 27, 2014 5:14 pm, edited 1 time in total.

benoitm974
Posts: 35
Joined: Wed Jun 18, 2014 9:38 pm

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by benoitm974 » Thu Nov 27, 2014 4:48 pm

einne wrote:I was able to configure kernel and boot the device, I've created basic rootfs too. Success. Thank u for your work!
Was u able to hack WOL?
What do u mean by:
power, reset, select & scroll button support as gpio-key recognized as keyboard entry (working with acpid)
R u sure that your kernel config is ACPI compatible?
I have got an error when acpid starts:

Code: Select all

RTNETLINK1 answers: No such file or directory
acpid: error talking to the kernel via netlink
I mean that the device tree does declare the 4 buttons as GPIO-Keys, so you can install acpid and MAP those keys (with name you can see in /sys/class/gpio-keys/... to action you'd like to take) . So you can declare the power button to launch shutdown script in /etc/acpi/events/powerbtn or something like this I don't remember configuration path by heart but you'll get to those easily.

Although agreed with you any gpis-keys mapper would do (hotplugd or other), this is not acpid specific it's just that it does have the proper script for reset and power button already that I used it to test.

Benoit

einne
Posts: 10
Joined: Tue May 27, 2014 1:47 am

Re: ix4-300d infos & hack ... (bare debian & 3.16 kern) -> D

Post by einne » Thu Nov 27, 2014 5:11 pm

I am extremely thankful for such fast answer. Can u please let me know also if you were able to wake the device up.

Post Reply