Welcome! Log In Create A New Profile

Advanced

Debian on Lenovo ix2-dl

Posted by pengu 
Debian on Lenovo ix2-dl
June 05, 2017 07:19AM
This device is similar to some ZyXEL devices (NSA325v2 / NSA310s / NSA320s)
so it has similar issues (power off)
This is why I gave away my first device last year.
A view months ago I noticed that this issue is gone since Kernel 4.8 on other devices, let's try on this device too.
I also noticed that there was introduced a new DTB in Kernel 4.10 for the, I think similar device "Lenovo ix2-ng".

       |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** ix2-nand ** ** uboot_ver:0.0.8 **

 ** MARVELL BOARD: DB-88F6282A-BP LE 

U-Boot 1.1.4 (Oct 28 2011 - 15:19:29) Marvell version: 3.6.1 - EMC

U-Boot code: 00600000 -> 0067FFF0  BSS: -> 006CFB00

Soc: 88F6282 A1 CPU running @ 1600Mhz L2 running @ 533Mhz
SysClock = 533Mhz , TClock = 200Mhz 

DRAM (DDR3) CAS Latency = 7 tRP = 7 tRAS = 20 tRCD=7
DRAM CS[0] base 0x00000000   size 256MB 
DRAM Total size 256MB  16bit width
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done
NAND:1024 MB
Found ADT7473, program PWM1 ... OK
Flash:  0 kB

Marvell Serial ATA Adapter
Integrated Sata device found


CPU : Marvell Feroceon (Rev 1)
Found kernel at 0x100000
Found initrd at 0x400000

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
PEX 1: interface detected no Link.
Net:   egiga0 [PRIME]
Hit any key to stop autoboot:  0

So I changed the U-Boot env as usual to boot from USB:
Note: adopted from the iomega / lennovo ix2-200

setenv load_initrd 'fatload usb 0:1 0x1100000 /uInitrd'                                                                                                                                              
setenv load_uimage 'fatload usb 0:1 0x800000 /uImage'                                                                                                                                                
setenv rootdelay 4                                                                                                                                                                                 
setenv rootfstype ext4                                                                                                                                                                             
setenv usb_root 'LABEL=rootfs'                                                                                                                                                                       
setenv bootcmd 'run usb_boot'                                                                                                                                                                       
                                                                                                                                                                            
setenv usb_boot 'usb start; run load_uimage; run load_initrd; bootm 0x800000 0x1100000'                                                                                                                                                                                
setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootfstype=ext4 mtdparts=orion_nand:0x100000@0(uboot)ro,0x20000@0xA0000(uboot_env)'

Because this U-Boot doesn't know about DTBs I had to append it.

Note: you can also use the ix2-200 one but with this you get strange NAND error messages, sensors were not working and with the new device .. no serial output after the kernel is loaded.
so we will proceed with the ix2-ng DTB:


(Re)start USB...
USB:   scanning bus for devices... 3 USB Device(s) found
Waiting for storage device(s) to settle before scanning...
1 Storage Device(s) found

reading /uImage
.................................................................................................................................................

3223931 bytes read
reading /uInitrd
.................................................................................................................................................

6824496 bytes read
## Booting image at 00800000 ...
   Image Name:   vmlinuz-4.9.30-kirkwood-rm-1
   Created:      2017-06-05  10:33:02 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3223867 Bytes =  3.1 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initrd.img-4.9.30-kirkwood-rm-1
   Created:      2017-06-05  10:33:35 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6824432 Bytes =  6.5 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.9.30-kirkwood-rm-1 (root@iConnectTV) (gcc version 4.9.2 (Debian 4.9.2-10) ) #1 PREEMPT Sun Jun 4 01:56:52 CEST 207
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] OF: fdt:Machine model: Lenovo IX2-ng
...

serial bootlog

dmesg output

sensors working:

sensors
adt7473-i2c-0-2e
Adapter: mv64xxx_i2c adapter
in1:          +1.10 V  (min =  +0.00 V, max =  +2.99 V)
+3.3V:        +3.32 V  (min =  +2.96 V, max =  +3.61 V)
fan1:         793 RPM  (min =    0 RPM)
fan2:           0 RPM  (min =    0 RPM)
fan3:           0 RPM  (min =    0 RPM)
fan4:           0 RPM  (min =    0 RPM)
temp1:        +49.2°C  (low  = -63.0°C, high = +191.0°C)
                       (crit = +100.0°C, hyst = +96.0°C)
Board Temp:   +44.2°C  (low  = -63.0°C, high = +191.0°C)
                       (crit = +100.0°C, hyst = +96.0°C)
temp3:        +41.5°C  (low  = -63.0°C, high = +191.0°C)
                       (crit = +100.0°C, hyst = +96.0°C)

kirkwood_thermal-virtual-0
Adapter: Virtual device
temp1:        +52.1°C

 cat /proc/cpuinfo 
processor	: 0
model name	: Feroceon 88FR131 rev 1 (v5l)
BogoMIPS	: 1580.03
Features	: swp half thumb fastmult edsp 
CPU implementer	: 0x56
CPU architecture: 5TE
CPU variant	: 0x2
CPU part	: 0x131
CPU revision	: 1

Hardware	: Marvell Kirkwood (Flattened Device Tree)
Revision	: 0000
Serial		: 0000000000000000
free -m
              total        used        free      shared  buff/cache   available
Mem:            244          19         198           1          27         215
Swap:           255           9         246

Note:

Now I tried to power the device off to see whats happening:

...
[  140.124718] systemd-shutdown[1]: Sending SIGTERM to remaining processes...
[  140.143270] systemd-journald[205]: Received SIGTERM from PID 1 (systemd-shutdow).
[  140.166077] systemd-shutdown[1]: Sending SIGKILL to remaining processes...
[  140.183355] systemd-shutdown[1]: Unmounting file systems.
[  140.189888] systemd-shutdown[1]: Remounting '/' read-only with options 'data=ordered'.
[  140.223809] EXT4-fs (sda3): re-mounted. Opts: data=ordered
[  140.240940] systemd-shutdown[1]: Remounting '/' read-only with options 'data=ordered'.
[  140.249216] EXT4-fs (sda3): re-mounted. Opts: data=ordered
[  140.254837] systemd-shutdown[1]: All filesystems unmounted.
[  140.260483] systemd-shutdown[1]: Deactivating swaps.
[  140.265657] systemd-shutdown[1]: All swaps deactivated.
[  140.270977] systemd-shutdown[1]: Detaching loop devices.
[  140.280240] systemd-shutdown[1]: All loop devices detached.
[  140.384774] reboot: System halted

ok .. no error messages but the fan is still running and the device is still consuming power confirmed with different kernel versions

Edit

with the 4.4.0 rootfs and 4.11.3 kernel .. poweroff seems to work completely .. perhaps this is systemd related ..

serial log

working on debian stretch too, see here



Edited 7 time(s). Last edit at 06/05/2017 10:22AM by pengu.
Re: Debian on Lenovo ix2-dl
June 05, 2017 01:31PM
Re: Debian on Lenovo ix2-dl
June 05, 2017 04:20PM
no, the fan is off
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: