Welcome! Log In Create A New Profile

Advanced

LG N1T1 NAS

Posted by ron 
Re: LG N1T1 NAS
November 19, 2017 12:38AM
Thanks! But it is still stubborn. This is what I did

========================
=== PART 1 on Ubuntu ===
========================

0. I format a 8 GB USB drive as ext3. I use Ubuntu and I opened Disks as normal user (gnome-disk-utility 3.18.3.1, UDisks 2.1.7 (built against 2.1.6)).
Plugged in the USB drive
Unmounted the USB drive in Disks.
Selected Format Partition...
Selected
> Erase: Don't overwrite existing data (Quick)
> Type: Custom (Enter filesystems type)
> Name: rootfs
> Filesystem: ext3
Clicked Format...
And then as last step in Disks, I mounted the USB drive

1. Then I start a terminal as root, this is the terminal I use below, e.g. I start a terminal and write
sudo -i


2. I make a directory where I can work (I deleted the old one, so all is fresh)
cd ~
mkdir stuff


3. I download linux-4.13.5-kirkwood-tld-1-bodhi.tar.bz2 to ~/stuff from https://forum.doozan.com/read.php?2,12096,12096#msg-12096
cd ~/stuff
wget https://bitly.com/2yTkIaH
mv 2yTkIaH linux-4.13.5-kirkwood-tld-1-bodhi.tar.bz2


4. I download Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from https://forum.doozan.com/read.php?2,12096,12096#msg-12096
cd ~/stuff
wget https://bitly.com/2gW5oGg
mv 2gW5oGg Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2


5. On a Linux PC I go to the USB drive and extract the rootfs into it
cd /media/superuser/rootfs 
tar -xjf ~/stuff/Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2


It extract a lot of files, and it takes some time...

6. I check fstab, does it say ext3
cat /media/superuser/rootfs/etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0


Seems OK

7. I create uImage with embedded DTB
cd /media/superuser/rootfs/boot
cp -a zImage-4.12.1-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-n1t1.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.12.1-kirkwood-tld-1 -d zImage.fdt uImage


It say
Image Name:   Linux-4.12.1-kirkwood-tld-1
Created:      Sun Nov 19 08:12:25 2017
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3833874 Bytes = 3744.02 kB = 3.66 MB
Load Address: 00008000
Entry Point:  00008000


And as a last step
sync


8. I unmount the USB drive in Ubuntu and remove it.

====================
=== PART 2 on LG ===
====================

9. I plug in the rootfs USB drive in the LG N1D1DD1.
I also connect the FT232 USB/serial adaptor between the Ubuntu computer and the LG NAS.

10. I start GtkTerm as root, e.g. start a terminal and in it write
sudo -i
gtkterm


11. I set up my GtkTerm. I click the menu items Configuration - Port and there I choose
> Port: /dev/ttyUSB0
> Baud Rate: 115200
And click OK

12. I do as Ron writes
"Apply power to the NAS and press the red power button on the back of the device. Meanwhile repeatedly hit a button on your keyboard, so the u-boot autostarting can be disabled. If you see the kernel boot messages, the stock OS has started booting, so you need to unplug the power (or shut down via the web UI) and repeat this step until you can access the u-boot command line."

I get access to the u-boot command line.

13. On LG. I set variables
setenv console 'console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)'
setenv bootargs_usb 'root=LABEL=rootfs rootdelay=10 earlyprintk=serial'
setenv bootargs '$(console) $(bootargs_usb)'
setenv mainlineLinux yes


14. On LG. With my gtkterm I try USB start
LGE-NAS>> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found


15. On LG. I try ext2load usb 0:1 0x800000 /boot/uImage
LGE-NAS>> ext2load usb 0:1 0x800000 /boot/uImage
....
.
3833938 bytes read


16. On LG. I try ext2load usb 0:1 0x1100000 /boot/uInitrd
LGE-NAS>> ext2load usb 0:1 0x1100000 /boot/uInitrd
....
.
7245696 bytes read


17. I check my envs
LGE-NAS>> printenv bootargs
bootargs=$(console) $(bootargs_usb)
LGE-NAS>> printenv
baudrate=115200
loads_echo=0
ipaddr=10.177.190.59
serverip=10.177.191.39
rootpath=/opt/Orion-SDK/armel-2.0/rootfs
netmask=255.255.254.0
run_diag=yes
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_nfs=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
boot_name=u-boot.bin
up-boot=tftp 2000000 nt/$(boot_name); sflash protect off; sflash erase all; sflash write 2000000 0 $(filesize)
root_path=root=/dev/md0 rw
read-kern=ide reset; ext2load ide 0 2000000 /boot/$(image_name);
mem-clear=mw.l 1000000 0x00000000 1000000
bootcmd_nfs=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig);  bootm 0x2000000; 
bootcmd_hdd=run read-kern; setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000; 
bootcmd_enc=run mem-clear; set bootargs $(console) $(bootargs_ram) enclosure; ide res; ide load; bootm 1000000 2000000
bootargs_ram=root=/dev/ram0 rw
tftp-ram=tftp 1000000 nt/$(uImage-ram); tftp 2000000 nt/ramdisk_image; set bootargs $(console) $(bootargs_ram); bootm 1000000 2000000
uImage-ram=uImage-2.6.30-nt1_11_ramdisk
bootcmd=run bootcmd_hdd
bootcmd_tftp=tftp 0x2000000 $(image_name); setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000; 
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
ethaddr=00:E0:91:81:5F:C4
nas_type=0x00000110
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
firmware=firmware.tar.gz
bootcmd_netenc=set bootargs $(console) $(bootargs_ram) netenc nas_type=$(nas_type) IP=$(ipaddr) SIP=$(serverip) FW=$(firmware); bootm 1000000 2000000
bootcmd_usbenc=set bootargs $(console) $(bootargs_ram) usbenc nas_type=$(nas_type) IP=$(ipaddr) SIP=$(serverip) FW=$(firmware); bootm 1000000 2000000
bootdelay=1
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=no
pcieTune=no
console=console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)
bootargs_usb=root=LABEL=rootfs rootdelay=10 earlyprintk=serial
bootargs=$(console) $(bootargs_usb)
mainlineLinux=yes
filesize=6E8F80

Environment size: 2438/4092 bytes


18. On LG. I try to boot the kernel with bootm 0x800000 0x1100000
LGE-NAS>> bootm 0x800000 0x1100000
## Booting image at 00800000 ..., header_size = 00000040, header_addr = 0068dcdc
image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = fb4cc272
hdr->ih_time = d92e115a, hdr->ih_size = 003a8012
hdr->ih_load = 00800000, hdr->ih_ep = 00800000
hdr->ih_dcrc = 782af5e6
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 02, hdr->ih_comp = 00
hdr->ih_name = Linux-4.12.1-kirkwood-tld-1

   Image Name:   Linux-4.12.1-kirkwood-tld-1
   Created:      2017-11-19   7:12:25 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3833874 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000, header_addr = 0068dcdc, header_size = 00000040 ...
RAMdisk image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = 54ee2b5c
hdr->ih_time = cf3c7559, hdr->ih_size = 006e8f40
hdr->ih_load = 00000000, hdr->ih_ep = 00000000
hdr->ih_dcrc = 4887aca3
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 03, hdr->ih_comp = 01
hdr->ih_name = initramfs-4.12.1-kirkwood-tld-1

   Image Name:   initramfs-4.12.1-kirkwood-tld-1
   Created:      2017-07-24   0:18:23 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7245632 Bytes =  6.9 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Re: LG N1T1 NAS
November 19, 2017 02:48AM
raffe,

First Test

1. Create the rootfs:

In step 1, use this command (don't use su -i)
su -

And do the rest of the rootfs creation as you did before

2. Boot:

Take the USB to the LG. Power up, interrupt serial console and, run the revised envs:
setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv mainlineLinux yes
usb start
mw 0x800000 0 1                                                       
ext2load usb 0:1 0x800000 /boot/uImage
printenv bootargs
printenv
bootm 0x800000

Note:

And copy the entire terminal log when you create rootfs, and paste it here. I'd need to see exatcly what you did on the Ubuntu terminal to spot any error. And also what going on in serial console too during boot (the entire log from u-boot banner until it got stuck).

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 19, 2017 02:49AM
Second Test:

If the uImage is good, the Linux kernel should at least starts and print out something in the first test (because of earlyprintk=serial). I don't expect it to boot completely, but I want to see the kernel starts, and then stops when it tries to mount the rootfs. If it gets to mounting rootfs, then we'll load the uInitrd in this 2nd test.

setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv mainlineLinux yes
usb start
mw 0x800000 0 1                                                       
ext2load usb 0:1 0x800000 /boot/uImage
ext2load usb 0:1 0x1100000 /boot/uInitrd
printenv bootargs
printenv
bootm 0x800000 0x1100000

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 19, 2017 04:30AM
Here are all logs! :-)
Attachments:
open | download - OnUbuntu.txt (1.4 KB)
open | download - Test1.txt (35.9 KB)
open | download - Text2.txt (16.5 KB)
Re: LG N1T1 NAS
November 19, 2017 04:46AM
raffe,

Awesome! we are getting there :)

The 1st test is exactly what I expected. The kernel loaded and ran OK. But it can't mount the rootfs because there is no uInitrd.

The 2nd test also told me what I expected: that the load address for uInitrd is not good because this stock u-boot limitation in reallocating memory.

Please try the 2nd test again with revised envs

setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv mainlineLinux yes
usb start
mw 0x800000 0 1                                                       
ext2load usb 0:1 0x800000 /boot/uImage
ext2load usb 0:1 0x2100000 /boot/uInitrd
printenv bootargs
printenv
bootm 0x800000 0x2100000

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 19, 2017 05:20AM
YES, it booted to Debian :-D

This is what worked (if anyone needs this in the future)

========================
=== PART 1 on Ubuntu ===
========================

0. I format a 8 GB USB drive as ext3. I use Ubuntu and I opened Disks as normal user (gnome-disk-utility 3.18.3.1, UDisks 2.1.7 (built against 2.1.6)).
Plugged in the USB drive
Unmounted the USB drive in Disks.
Selected Format Partition...
Selected
> Erase: Don't overwrite existing data (Quick)
> Type: Custom (Enter filesystems type)
> Name: rootfs
> Filesystem: ext3
Clicked Format...
And then as last step in Disks, I mounted the USB drive

1. Then I start a terminal as root, this is the terminal I use below, e.g. I start a terminal and write
su -


2. I make a directory where I can work (I deleted the old one, so all is fresh)
cd ~
mkdir stuff


3. I download linux-4.13.5-kirkwood-tld-1-bodhi.tar.bz2 to ~/stuff from https://forum.doozan.com/read.php?2,12096,12096#msg-12096
cd ~/stuff
wget https://bitly.com/2yTkIaH
mv 2yTkIaH linux-4.13.5-kirkwood-tld-1-bodhi.tar.bz2


4. I download Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 from https://forum.doozan.com/read.php?2,12096,12096#msg-12096
cd ~/stuff
wget https://bitly.com/2gW5oGg
mv 2gW5oGg Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2


5. On a Linux PC I go to the USB drive and extract the rootfs into it
cd /media/superuser/rootfs 
tar -xjf ~/stuff/Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2


It extract a lot of files, and it takes some time...

6. I check fstab, does it say ext3
cat /media/superuser/rootfs/etc/fstab
# /etc/fstab: static file system information.
#
# <file system> <mount point>   <type>  <options>       <dump>  <pass>
LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1
tmpfs          /tmp            tmpfs   defaults          0       0


Seems OK

7. I create uImage with embedded DTB
cd /media/superuser/rootfs/boot
cp -a zImage-4.12.1-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-n1t1.dtb >> zImage.fdt
mv uImage uImage.orig
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.12.1-kirkwood-tld-1 -d zImage.fdt uImage


It say
Image Name:   Linux-4.12.1-kirkwood-tld-1
Created:      Sun Nov 19 08:12:25 2017
Image Type:   ARM Linux Kernel Image (uncompressed)
Data Size:    3833874 Bytes = 3744.02 kB = 3.66 MB
Load Address: 00008000
Entry Point:  00008000


And as a last step
sync


8. I unmount the USB drive in Ubuntu and remove it.

====================
=== PART 2 on LG ===
====================

9. I plug in the rootfs USB drive in the LG N1D1DD1.
I also connect the FT232 USB/serial adaptor between the Ubuntu computer and the LG NAS.

10. I start GtkTerm as root, e.g. start a terminal and in it write
su -
gtkterm


11. I set up my GtkTerm. I click the menu items Configuration - Port and there I choose
> Port: /dev/ttyUSB0
> Baud Rate: 115200
And click OK

12. I do as Ron writes
"Apply power to the NAS and press the red power button on the back of the device. Meanwhile repeatedly hit a button on your keyboard, so the u-boot autostarting can be disabled. If you see the kernel boot messages, the stock OS has started booting, so you need to unplug the power (or shut down via the web UI) and repeat this step until you can access the u-boot command line."

I get access to the u-boot command line.

13. On LG. I set variables
setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv mainlineLinux yes


14. On LG. With my gtkterm I try USB start
LGE-NAS>> usb start
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found

15. On LG. I try mw 0x800000 0 1 and ext2load usb 0:1 0x800000 /boot/uImage
LGE-NAS>> mw 0x800000 0 1 
LGE-NAS>> ext2load usb 0:1 0x800000 /boot/uImage
....
.
3833938 bytes read


16. On LG. I try ext2load usb 0:1 0x1100000 /boot/uInitrd
LGE-NAS>> ext2load usb 0:1 0x2100000 /boot/uInitrd
....
.
7245696 bytes read


17. I check my envs
LGE-NAS>> printenv bootargs
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial
LGE-NAS>> printenv
baudrate=115200
loads_echo=0
ipaddr=10.177.190.59
serverip=10.177.191.39
rootpath=/opt/Orion-SDK/armel-2.0/rootfs
netmask=255.255.254.0
run_diag=yes
console=console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_nfs=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
boot_name=u-boot.bin
up-boot=tftp 2000000 nt/$(boot_name); sflash protect off; sflash erase all; sflash write 2000000 0 $(filesize)
root_path=root=/dev/md0 rw
read-kern=ide reset; ext2load ide 0 2000000 /boot/$(image_name);
mem-clear=mw.l 1000000 0x00000000 1000000
bootcmd_nfs=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig);  bootm 0x2000000; 
bootcmd_hdd=run read-kern; setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000; 
bootargs_usb=root=/dev/sdc2 rw rootdelay=10
bootcmd_enc=run mem-clear; set bootargs $(console) $(bootargs_ram) enclosure; ide res; ide load; bootm 1000000 2000000
bootargs_ram=root=/dev/ram0 rw
tftp-ram=tftp 1000000 nt/$(uImage-ram); tftp 2000000 nt/ramdisk_image; set bootargs $(console) $(bootargs_ram); bootm 1000000 2000000
uImage-ram=uImage-2.6.30-nt1_11_ramdisk
bootcmd=run bootcmd_hdd
bootcmd_tftp=tftp 0x2000000 $(image_name); setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000; 
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
ethaddr=00:E0:91:81:5F:C4
nas_type=0x00000110
stdin=serial
stdout=serial
stderr=serial
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
firmware=firmware.tar.gz
bootcmd_netenc=set bootargs $(console) $(bootargs_ram) netenc nas_type=$(nas_type) IP=$(ipaddr) SIP=$(serverip) FW=$(firmware); bootm 1000000 2000000
bootcmd_usbenc=set bootargs $(console) $(bootargs_ram) usbenc nas_type=$(nas_type) IP=$(ipaddr) SIP=$(serverip) FW=$(firmware); bootm 1000000 2000000
bootdelay=1
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=no
pcieTune=no
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial
mainlineLinux=yes
filesize=6E8F80

Environment size: 2519/4092 bytes


18. On LG. I try to boot the kernel with bootm 0x800000 0x1100000
LGE-NAS>> bootm 0x800000 0x2100000

19. I login with root/root



Edited 1 time(s). Last edit at 11/19/2017 06:03AM by raffe.
Attachments:
open | download - Test3.txt (22.5 KB)
Re: LG N1T1 NAS
November 19, 2017 05:37AM
Cool :)

Now we can check LEDs control, and other aspects such as SPI mtd partitions definition, fw_printenv/setenv... so on, to make sure they are working ok.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 19, 2017 07:07AM
To make it boot from the USB automatically, I did this

setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv mainlineLinux yes
setenv bootcmd 'run usb_boot'  
setenv start_myusb 'usb start' 
setenv run_mw 'mw 0x800000 0 1'
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_initrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv usb_boot 'run start_myusb; run run_mw; run load_uimage; run load_initrd; bootm 0x800000 0x2100000;'
saveenv

It seems to work. But I am wondering if there is a more elegant way.

EDIT
And one more last thing (we hope ;). And more important than above. Now I can't boot from the hdd anymore, I get stuck at
LGE-NAS>> run bootcmd_hdd

Reset IDE: 
Marvell Serial ATA Adapter, MAX_DEVICE=32
Integrated Sata device found
Channel 0/2 is connected ... 
This is ATA Disk at channel 0
[0 0 0]: Enable DMA mode (6)
  Device 0 @ 0 0:
Model: Hitachi HDS721010CLA332                  Firm: JP4OA3EA Ser#:       JP2940HD0Z3K3C
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB ( Block : 512)
Channel 1/2 is connected ... 
eDmaRegsOffset1 = 24000, eDmaRegsOffset4 = 6002c0,
 SEC_CNT:01, SEC_NUM:01, CYL_LOW:14, CYL_HIGH:eb
ATAPI Indentify Command Done


2441160 bytes read
## Booting image at 02000000 ..., header_size = 00000040, header_addr = 0068dcdc
image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = da0b609e
hdr->ih_time = 0ca2c44e, hdr->ih_size = 00253f88
hdr->ih_load = 00800000, hdr->ih_ep = 00800000
hdr->ih_dcrc = 82b877e2
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 02, hdr->ih_comp = 00
hdr->ih_name = Linux-2.6.36.2-lgnas

   Image Name:   Linux-2.6.36.2-lgnas
   Created:      2011-11-17   5:56:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2441096 Bytes =  2.3 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

I have tried unplugging the USB, set setenv mainlineLinux back to no, add filesize=6E8F80. My env right now is
LGE-NAS>>   printenv
baudrate=115200
loads_echo=0
ipaddr=10.177.190.59
serverip=10.177.191.39
rootpath=/opt/Orion-SDK/armel-2.0/rootfs
netmask=255.255.254.0
run_diag=yes
console=console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_nfs=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
boot_name=u-boot.bin
up-boot=tftp 2000000 nt/$(boot_name); sflash protect off; sflash erase all; sflash write 2000000 0 $(filesize)
root_path=root=/dev/md0 rw
read-kern=ide reset; ext2load ide 0 2000000 /boot/$(image_name);
mem-clear=mw.l 1000000 0x00000000 1000000
bootcmd_nfs=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig);  bootm 0x2000000; 
bootcmd_hdd=run read-kern; setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000; 
bootargs_usb=root=/dev/sdc2 rw rootdelay=10
bootcmd_enc=run mem-clear; set bootargs $(console) $(bootargs_ram) enclosure; ide res; ide load; bootm 1000000 2000000
bootargs_ram=root=/dev/ram0 rw
tftp-ram=tftp 1000000 nt/$(uImage-ram); tftp 2000000 nt/ramdisk_image; set bootargs $(console) $(bootargs_ram); bootm 1000000 2000000
uImage-ram=uImage-2.6.30-nt1_11_ramdisk
bootcmd_tftp=tftp 0x2000000 $(image_name); setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000; 
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
ethaddr=00:E0:91:81:5F:C4
nas_type=0x00000110
firmware=firmware.tar.gz
bootcmd_netenc=set bootargs $(console) $(bootargs_ram) netenc nas_type=$(nas_type) IP=$(ipaddr) SIP=$(serverip) FW=$(firmware); bootm 1000000 2000000
bootcmd_usbenc=set bootargs $(console) $(bootargs_ram) usbenc nas_type=$(nas_type) IP=$(ipaddr) SIP=$(serverip) FW=$(firmware); bootm 1000000 2000000
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial
arcNumber=1681
bootcmd=run usb_boot
start_myusb=usb start
run_mw=mw 0x800000 0 1
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
load_initrd=ext2load usb 0:1 0x2100000 /boot/uInitrd
usb_boot=run start_myusb; run run_mw; run load_uimage; run load_initrd; bootm 0x800000 0x2100000;
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=1
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=no
pcieTune=no

Environment size: 2762/4092 bytes
It feels like I am missing some basic understanding of how this work...



Edited 3 time(s). Last edit at 11/19/2017 08:57AM by raffe.
Re: LG N1T1 NAS
November 19, 2017 03:21PM
raffe,

> It feels like I am missing some basic
> understanding of how this work...

Yes :)

1. When you set u-boot envs, never save them until you test all the paths. Especially, the envs that I have scripted are good for testing only (when we do it for real, it should be simpler and more elegant). And always save your current envs to a notepad or text file before changing them.

2. Here is what needs to be done to boot both USB and HDD. Run this command (don't save them) to boot both configurations: plug in USB to boot Debian, and unplug USB to boot stock OS in HDD).
setenv bootcmd 'if run usb_boot; then ; else setenv mainlineLinux no; run bootcmd_hdd; fi'
boot
And then after you are sure it works for both cases, do it for real:
setenv bootcmd 'if run usb_boot; then ; else setenv mainlineLinux no; run bootcmd_hdd; fi'
saveenv

3. As for USB boot, in the next post I will show you how to script it in a way that it will not interfere with the current stock envs.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 3 time(s). Last edit at 11/19/2017 04:11PM by bodhi.
Re: LG N1T1 NAS
November 20, 2017 01:27AM
Here is how to setup to boot USB and HDD

setenv bootargs_usb 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv bootcmd_usb 'setenv mainlineLinux yes; run bootargs_usb; usb start; mw 0x800000 0 1; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd; bootm 0x800000 0x2100000'
setenv bootcmd 'if run bootcmd_usb; then ; else setenv mainlineLinux no; run bootcmd_hdd; fi'

Run this a few times to make sure it works in both cases, and then do saveenv to make it permanent.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 11/20/2017 01:28AM by bodhi.
Re: LG N1T1 NAS
November 20, 2017 07:55AM
Thanks!

OK, this looks nice (and much better then mine ;)
setenv bootcmd 'if run usb_boot; then ; else setenv mainlineLinux no; run bootcmd_hdd; fi'

I read at http://www.compulab.co.il/utilite-computer/wiki/index.php/U-Boot_Scripts and I understand it as a "normal" if syntax that says
If run_boot works OK (USB is there), then just do it.
Else, but it run_boot dont' work OK (USB is not there), then setenv mainlineLinux no and then run bootcmd_hdd.

And this also look better, but I am afraid that the bootcmd_usb is to long. We need to cut it up somehow.
setenv bootargs_usb 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv bootcmd_usb 'setenv mainlineLinux yes; run bootargs_usb; usb start; mw 0x800000 0 1; ext2load usb 0:1 0x800000 /boot/uImage; ext2load usb 0:1 0x2100000 /boot/uInitrd; bootm 0x800000 0x2100000'
setenv bootcmd 'if run bootcmd_usb; then ; else setenv mainlineLinux no; run bootcmd_hdd; fi'


But I still don't understand why the old bootcmd_hdd suddenly don't work now. It worked if I accidentally was to slow, then it booted up the LG OS. Just moments before we got the USB to work. If I look in the old envs from this post https://forum.doozan.com/read.php?2,26671,42324#msg-42324 and compare with them I have today. In the one I have today:
NEW (not in old): arcNumber=1681
NEW (not in old): bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial
Different today : bootcmd=run usb_boot (old was bootcmd=run bootcmd_hdd )
NEW (not in old): load_initrd=ext2load usb 0:1 0x2100000 /boot/uInitrd
NEW (not in old): load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
Different today : mainlineLinux=yes	(old was mainlineLinux=no )
NEW (not in old): run_mw=mw 0x800000 0 1
NEW (not in old): start_myusb=usb start
NEW (not in old): usb_boot=run start_myusb; run run_mw; run load_uimage; run load_initrd; bootm 0x800000 0x2100000;

If we look at bootcmd_hdd it say
bootcmd_hdd=run read-kern; setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000;

The the stuff it refers to in envs are the same as before
read-kern=ide reset; ext2load ide 0 2000000 /boot/$(image_name);
image_name=uImage
console=console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)
root_path=root=/dev/md0 rw

So, if bootcmd_hdd dont use stuff that are "NEW (not in old)" and the only other thing that has changed is mainlineLinux=no. Should not this work?
setenv mainlineLinux no
run bootcmd_hdd
I think so, but it stops at "done, booting the kernel.". It is frustrating because I don't understand why. Again, it feels like I am missing some basic understanding of how this work, or there is a hidden magic spell doing something ;)... Help me Obi Wan Kenobi you're my only hope...

EDIT
Even though I tried to read about mw at https://www.denx.de/wiki/DULG/UBootCmdGroupMemory I can't say I really understand it and how it may help bootm 0x2000000;. But I didn't let a such small matter stop me to try this (that didn't work)
LGE-NAS>> mw 0x2000000 0 1
LGE-NAS>> setenv mainlineLinux no
LGE-NAS>> run bootcmd_hdd

Reset IDE: 
Marvell Serial ATA Adapter, MAX_DEVICE=32
Integrated Sata device found
Channel 0/2 is connected ... 
This is ATA Disk at channel 0
[0 0 0]: Enable DMA mode (6)
  Device 0 @ 0 0:
Model: Hitachi HDS721010CLA332                  Firm: JP4OA3EA Ser#:       JP2940HD0Z3K3C
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 953869.7 MB = 931.5 GB ( Block : 512)
Channel 1/2 is connected ... 
eDmaRegsOffset1 = 24000, eDmaRegsOffset4 = 6002c0,
 SEC_CNT:01, SEC_NUM:01, CYL_LOW:14, CYL_HIGH:eb
ATAPI Indentify Command Done


2441160 bytes read
## Booting image at 02000000 ..., header_size = 00000040, header_addr = 0068dcdc
image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = da0b609e
hdr->ih_time = 0ca2c44e, hdr->ih_size = 00253f88
hdr->ih_load = 00800000, hdr->ih_ep = 00800000
hdr->ih_dcrc = 82b877e2
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 02, hdr->ih_comp = 00
hdr->ih_name = Linux-2.6.36.2-lgnas

   Image Name:   Linux-2.6.36.2-lgnas
   Created:      2011-11-17   5:56:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2441096 Bytes =  2.3 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

EDIT 2
I also tried
setenv console  'console=ttyS0,115200 rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv mainlineLinux no
ide reset
ext2load ide 0 2000000 /boot/uImage
setenv bootargs $(console) $(root_path) lpj=4964352
printenv bootargs
printenv
bootm 0x2000000

But same result, as you can see in the attached fileBootHDDtest0.txt

Edit 3
I also tried this, but no luck
ext2load ide 0 2100000 /boot/uImage
bootm 0x2100000



Edited 9 time(s). Last edit at 11/20/2017 11:54AM by raffe.
Attachments:
open | download - BootHDDtest0.txt (5.5 KB)
Re: LG N1T1 NAS
November 20, 2017 02:59PM
raffe,

I'm afraid that you might have changed too many envs to keep track of. Note the most important thing in doing this is not to touch any of the stock envs. Keep them as they are unchanged. The only stock env we need to set is mainlineLinux, so we have to reverse it when running stock.

Here is the new set of USB envs to set again it later (older stock u-boot has many limitation, the length of the env is one of them).

setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_uinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv bootargs_usb 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv bootcmd_usb 'setenv mainlineLinux yes; run bootargs_usb; usb start; mw 0x800000 0 1; run load_uimage; load_uinitrd; bootm 0x800000 0x2100000'


Test 3

Power down, power up, interrupt serial console, and

setenv mainlineLinux yes
setenv bootcmd_hdd 'run read-kern; setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000'
printenv bootargs
run bootcmd_hdd
We restored the bootcmd_hdd back to stock definition above. If this does not boot to stock, then we'll try the next test.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 21, 2017 12:23AM
You are right, in the end it is my fault :/
Noobs are that way, running around and pushing all big red buttons they find ;)

The only time I saved envs was when I did this :(
setenv bootargs 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv mainlineLinux yes
setenv bootcmd 'run usb_boot'  
setenv start_myusb 'usb start' 
setenv run_mw 'mw 0x800000 0 1'
setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_initrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv usb_boot 'run start_myusb; run run_mw; run load_uimage; run load_initrd; bootm 0x800000 0x2100000;'
saveenv

I tried
setenv mainlineLinux yes
setenv bootcmd_hdd 'run read-kern; setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000'
printenv bootargs
printenv
run bootcmd_hdd
Unfortunately it stoped again at "done, booting the kernel.", for the whole log see the attached file BootHDDtest1.txt

EDIT NOTE
Please note that getting the LG to boot the old hard drive is since 5 minutes ago a more academic than a important thing.

I have now planned to buy a 6GB hard drive (this one https://www.wdc.com/products/internal-storage/wd-red.html#WD60EFRX ), install it in the LG N1T1 and then install Debian-4.12.1-kirkwood directly on that new hard drive.

According to http://forum.nas-portal.org/archive/index.php/t-16812.html it is possible at least with a 3GB drive.



Edited 3 time(s). Last edit at 11/21/2017 12:38AM by raffe.
Attachments:
open | download - BootHDDtest1.txt (5.2 KB)
Re: LG N1T1 NAS
November 21, 2017 01:03AM
raffe,

> You are right, in the end it is my fault :/
> Noobs are that way, running around and pushing all
> big red buttons they find ;)

That's OK :) how we learn, right?

> Please note that getting the LG to boot the old
> hard drive is since 5 minutes ago a more academic
> than a important thing.

That's very true. Booting stock OS is really for rescue purpose. But stock OS is also on an HDD, so it is not good at all as a rescue system anyway. Your rescue system, if you want to have one, could be your current USB drive, once you copy this USB rootfs to the new HDD.

> it is possible at least with a 3GB drive.

3TB. That means this LG stock u-boot has been patched with that capability (older u-boot does not have >2TB capability).

Let's try this

Test 4
setenv mainlineLinux yes
setenv bootcmd_hdd 'run read-kern; setenv bootargs $(console) $(root_path) lpj=4964352 earlyprintk=serial; printenv bootargs; printenv; bootm 0x2000000'
run bootcmd_hdd
I hope this stock kernel has the earlyprintk enabled. If that is the case, we will see the reason for the kernel booting freeze in the boot log.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 21, 2017 01:39AM
bodhi,

> 3TB. That means this LG stock u-boot has been
> patched with that capability (older u-boot does
> not have >2TB capability)

Hmm, do you mean it will maybe not be possible with a 6TB hdd? I was planing to do this (don't know exactly how to do it yet, but I hope Google will be able to help me)
  • On the 6TB hdd create a smaller 50GB ext3 partition for u-boot to recognize
  • On that 50GB partition install the same rootfs as on the USB
  • When Linux debian 4.12.1-kirkwood-tld-1 has started up on the 50GB partition, it will create for us a 2GB swap and a ~5,9TB GPT partition (and later use it.)
Possible?

Test 4
Unfortunately the LG is at home and I can only reach it via VPN to the Ubuntu PC. But as it after Test 3 has stopped at "booting the kernel." I have to get home and physically turn it off and on before we can continue. It is late morning here, so maybe in ~6 hours I can be at home :(

EDIT
Found some nice info here at https://forum.doozan.com/read.php?3,10710,10841 . Guess swap should be 256MB



Edited 2 time(s). Last edit at 11/21/2017 02:57AM by raffe.
Re: LG N1T1 NAS
November 21, 2017 03:06AM
raffe,

> Hmm, do you mean it will maybe not be possible
> with a 6TB hdd? I was planing to do this (don't
> know exactly how to do it yet, but I hope Google
> will be able to help me)

Yes. Stock u-boot (i.e. old u-boot) usually can not handle GPT partition table (therefore >2TB partition). So it can only see the partitions if you have MBR partition table.

I don't have the GPL source code so cannot tell you for sure, but I don't think this stock u-boot support it. It is quite old.

Quote

U-Boot 1.1.4 (May 21 2011 - 03:56:55)NT1

So you would have to have to either:

- Split it in 3 MBR partitions
or
- Use a hybrid MBR/GPT table. And have one less-than-2TB MBR partition, and one or more larger-than-2TB GPT partitions.

But first, when you get the HDD, just format it as one 6TB GPT partition , boot with USB rootfs, and see it can be recognized. Run u-boot command
ide reset

My recommendation is to split it into several MBR partitions if stock u-boot does not support GPT partition. Hybrid partition is cumbersome.

I don't know how far ron got in building new u-boot for this box. I could roll new u-boot if I have more free time. However, I would do this only when ron has given up building this u-boot.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 21, 2017 06:06AM
Hmm, why do I want a GTP partition? I don't remember :/

Why not just do
  • On the 6TB hdd create a smaller 50GB ext3 partition for u-boot to recognize
  • On that 50GB partition install the same rootfs as on the USB
  • When Linux debian 4.12.1-kirkwood-tld-1 has started up on the 50GB partition, I create (or maybe I create already when I create the 50GB partition) for us a 512MB swap and a ~5,9TB ext4 partition (and later use it.)

Isn't that easier?

EDIT
Ah, yeah, MBR have those 2TB limits...



Edited 3 time(s). Last edit at 11/21/2017 08:38AM by raffe.
Re: LG N1T1 NAS
November 21, 2017 10:01AM
Whaaaaat!!!!! It worked at the first try! 8-)

With Gparted I made on the new 6TB hdd a GTP partition table with
91 GB ext3 (name rootfs)
~5,9TB ext4 (name data)
512 MB swap

Then I did the stuff from 1 to 7 here https://forum.doozan.com/read.php?2,26671,42569#msg-42569 (but on the hdd ;).
Then I connected it to the LG and did this (exactly same as the USB, but I changet usb to ide)

printenv
ide reset
mw 0x800000 0 1
ext2load ide 0:1 0x800000 /boot/uImage
ext2load ide 0:1 0x2100000 /boot/uInitrd
bootm 0x800000 0x2100000


And BAM, it booted up Debian! I can login as root/root :-)

I had these envs
LGE-NAS>> printenv 
baudrate=115200
loads_echo=0
ipaddr=10.177.190.59
serverip=10.177.191.39
rootpath=/opt/Orion-SDK/armel-2.0/rootfs
netmask=255.255.254.0
run_diag=yes
console=console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_nfs=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
boot_name=u-boot.bin
up-boot=tftp 2000000 nt/$(boot_name); sflash protect off; sflash erase all; sflash write 2000000 0 $(filesize)
root_path=root=/dev/md0 rw
read-kern=ide reset; ext2load ide 0 2000000 /boot/$(image_name);
mem-clear=mw.l 1000000 0x00000000 1000000
bootcmd_nfs=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig);  bootm 0x2000000; 
bootcmd_hdd=run read-kern; setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000; 
bootargs_usb=root=/dev/sdc2 rw rootdelay=10
bootcmd_enc=run mem-clear; set bootargs $(console) $(bootargs_ram) enclosure; ide res; ide load; bootm 1000000 2000000
bootargs_ram=root=/dev/ram0 rw
tftp-ram=tftp 1000000 nt/$(uImage-ram); tftp 2000000 nt/ramdisk_image; set bootargs $(console) $(bootargs_ram); bootm 1000000 2000000
uImage-ram=uImage-2.6.30-nt1_11_ramdisk
bootcmd_tftp=tftp 0x2000000 $(image_name); setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000; 
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
ethaddr=00:E0:91:81:5F:C4
nas_type=0x00000110
firmware=firmware.tar.gz
bootcmd_netenc=set bootargs $(console) $(bootargs_ram) netenc nas_type=$(nas_type) IP=$(ipaddr) SIP=$(serverip) FW=$(firmware); bootm 1000000 2000000
bootcmd_usbenc=set bootargs $(console) $(bootargs_ram) usbenc nas_type=$(nas_type) IP=$(ipaddr) SIP=$(serverip) FW=$(firmware); bootm 1000000 2000000
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial
arcNumber=1681
bootcmd=run usb_boot
start_myusb=usb start
run_mw=mw 0x800000 0 1
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
load_initrd=ext2load usb 0:1 0x2100000 /boot/uInitrd
usb_boot=run start_myusb; run run_mw; run load_uimage; run load_initrd; bootm 0x800000 0x2100000;
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=1
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=no
pcieTune=no

Environment size: 2762/4092 bytes

The whole log is in the attached file...

EDIT
I tried this
root@debian:~# mount /dev/sda3 /mnt/data/
[  685.937274] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
root@debian:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev             54M     0   54M   0% /dev
tmpfs            12M  144K   12M   2% /run
/dev/sda1        88G  534M   83G   1% /
tmpfs           5.0M     0  5.0M   0% /run/lock
tmpfs            23M     0   23M   0% /run/shm
tmpfs            58M     0   58M   0% /tmp
/dev/sda3       5.4T   59M  5.1T   1% /mnt/data
I think it looks promising :)

EDIT 2

Maybe my next u-boot step is to try these
setenv mainlineLinux yes
setenv set_mw 'mw 0x800000 0 1'
setenv load_bootm 'bootm 0x800000 0x2100000'

setenv load_usbuimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_usbuinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv bootargs_usb 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv bootcmd_usb 'run bootargs_usb; usb start; run set_mw; run load_usbuimage; run load_usbuinitrd; run load_bootm'

setenv load_myhdduimage 'ext2load ide 0:1 0x800000 /boot/uImage'
setenv load_myhdduinitrd 'ext2load ide 0:1 0x2100000 /boot/uInitrd'
setenv bootcmd_myhdd 'setenv mainlineLinux yes; ide reset; run set_mw; run load_myhdduimage; run load_myhdduinitrd; run load_bootm'

setenv bootcmd 'if run bootcmd_usb; then ; else run bootcmd_myhdd; fi'
And delete these
NEW (not in old): start_myusb=usb start
NEW (not in old): usb_boot=run start_myusb; run run_mw; run load_uimage; run load_initrd; bootm 0x800000 0x2100000;
With
setenv start_myusb
setenv usb_boot

Does that seem right?
I will test now. First I set all envs, then I try run bootcmd without USB plugged in.

EDIT 3
I get
LGE-NAS>> run bootcmd
Unknown command 'if' - try 'help'
Unknown command 'then' - try 'help'
Unknown command 'else' - try 'help'
This command can be used only if enaMonExt is set!
Maybe cheat with
setenv bootcmd 'run bootcmd_usb; run bootcmd_myhdd'
If USB works, HDD will never run. If USB don't work, HDD will run.

Edit 4
Well, it seems to work. Both with USB plugged in (boots USB) and without USB (boots HDD). Am I ready for this?
setenv mainlineLinux yes
setenv set_mw 'mw 0x800000 0 1'
setenv load_bootm 'bootm 0x800000 0x2100000'

setenv load_usbuimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_usbuinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv bootargs_usb 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv bootcmd_usb 'run bootargs_usb; usb start; run set_mw; run load_usbuimage; run load_usbuinitrd; run load_bootm'

setenv load_myhdduimage 'ext2load ide 0:1 0x800000 /boot/uImage'
setenv load_myhdduinitrd 'ext2load ide 0:1 0x2100000 /boot/uInitrd'
setenv bootcmd_myhdd 'setenv mainlineLinux yes; ide reset; run set_mw; run load_myhdduimage; run load_myhdduinitrd; run load_bootm'

setenv bootcmd 'run bootcmd_usb; run bootcmd_myhdd'

setenv start_myusb
setenv usb_boot

saveenv



Edited 15 time(s). Last edit at 11/21/2017 01:22PM by raffe.
Attachments:
open | download - Boot6TB-hdd-test0.txt (20.6 KB)
Re: LG N1T1 NAS
November 21, 2017 03:13PM
raffe,

Excellent works :) so stock u-boot was built with GPT partitions capability.

In the meantime, please get 2 more info:

At serial console u-boot prompt, take a look at the partitions
ide part

In Debian, take a look at the partitions
fdisk -l

I'll review the log and envs and let you know!

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 11/21/2017 03:30PM by bodhi.
Re: LG N1T1 NAS
November 21, 2017 03:44PM
The boot log looks really good!

The envs also look good enough to used as is.

setenv mainlineLinux yes
setenv set_mw 'mw 0x800000 0 1'
setenv load_bootm 'bootm 0x800000 0x2100000'

setenv load_usbuimage 'ext2load usb 0:1 0x800000 /boot/uImage'
setenv load_usbuinitrd 'ext2load usb 0:1 0x2100000 /boot/uInitrd'
setenv bootargs_usb 'console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial'
setenv bootcmd_usb 'run bootargs_usb; usb start; run set_mw; run load_usbuimage; run load_usbuinitrd; run load_bootm'

setenv load_myhdduimage 'ext2load ide 0:1 0x800000 /boot/uImage'
setenv load_myhdduinitrd 'ext2load ide 0:1 0x2100000 /boot/uInitrd'
setenv bootcmd_myhdd 'setenv mainlineLinux yes; ide reset; run set_mw; run load_myhdduimage; run load_myhdduinitrd; run load_bootm'

setenv bootcmd 'run bootcmd_usb; run bootcmd_myhdd'

setenv start_myusb
setenv usb_boot

But I would enhance it a bit.

mainlineLinux was set permanenly to yes already, so no need to set it again.
setenv bootcmd_myhdd 'ide reset; run set_mw; run load_myhdduimage; run load_myhdduinitrd; run load_bootm'

This will make the box reset and try to boot again if something went wrong (instead just hang at the u-boot prompt)
setenv bootcmd 'run bootcmd_usb; run bootcmd_myhdd; reset'

And then test boot it a few times with USB, and without USB, before doing a final saveenv.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 22, 2017 04:37AM
Here are some results

root@debian:~# fdisk -l
Disk /dev/mtdblock0: 512 KiB, 524288 bytes, 1024 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes

Disk /dev/sda: 5.5 TiB, 6001175126016 bytes, 11721045168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 20E87844-62F0-4A8B-8D0A-0C8FBCD354DB

Device           Start         End     Sectors  Size Type
/dev/sda1         2048   187539455   187537408 89.4G Linux filesystem
/dev/sda2  11719997440 11721043967     1046528  511M Linux swap
/dev/sda3    187539456 11719997439 11532457984  5.4T Linux filesystem

Partition table entries are not in disk order.


LGE-NAS>> ide part

Partition Map for IDE device 0  --   Partition Type: EFI

Part  Start LBA  End LBA
gpt1  0x%lX    0x%lX
gpt2  0x%lX    0x%lX
gpt3  0x%lX    0x%lX


And thanks for this, I was blind and didn't even see setenv mainlineLinux yes anymore ;)
setenv bootcmd_myhdd 'ide reset; run set_mw; run load_myhdduimage; run load_myhdduinitrd; run load_bootm'


I have done several boots with USB, and without USB. Works perfectly! So I have now done saveenv with this

LGE-NAS>> printenv
baudrate=115200
loads_echo=0
ipaddr=10.177.190.59
serverip=10.177.191.39
rootpath=/opt/Orion-SDK/armel-2.0/rootfs
netmask=255.255.254.0
run_diag=yes
console=console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)
CASset=min
MALLOC_len=1
ethprime=egiga0
bootargs_nfs=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
boot_name=u-boot.bin
up-boot=tftp 2000000 nt/$(boot_name); sflash protect off; sflash erase all; sflash write 2000000 0 $(filesize)
root_path=root=/dev/md0 rw
read-kern=ide reset; ext2load ide 0 2000000 /boot/$(image_name);
mem-clear=mw.l 1000000 0x00000000 1000000
bootcmd_nfs=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig);  bootm 0x2000000; 
bootcmd_hdd=run read-kern; setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000; 
bootcmd_enc=run mem-clear; set bootargs $(console) $(bootargs_ram) enclosure; ide res; ide load; bootm 1000000 2000000
bootargs_ram=root=/dev/ram0 rw
tftp-ram=tftp 1000000 nt/$(uImage-ram); tftp 2000000 nt/ramdisk_image; set bootargs $(console) $(bootargs_ram); bootm 1000000 2000000
uImage-ram=uImage-2.6.30-nt1_11_ramdisk
bootcmd_tftp=tftp 0x2000000 $(image_name); setenv bootargs $(console) $(root_path) lpj=4964352; bootm 0x2000000; 
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev0:fxs,dev1:fxs
mvNetConfig=mv_net_config=(00:11:88:0f:62:81,0:1:2:3),mtu=1500
usb0Mode=host
yuk_ethaddr=00:00:00:EE:51:81
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
ethact=egiga0
ethaddr=00:E0:91:81:5F:C4
nas_type=0x00000110
firmware=firmware.tar.gz
bootcmd_netenc=set bootargs $(console) $(bootargs_ram) netenc nas_type=$(nas_type) IP=$(ipaddr) SIP=$(serverip) FW=$(firmware); bootm 1000000 2000000
bootcmd_usbenc=set bootargs $(console) $(bootargs_ram) usbenc nas_type=$(nas_type) IP=$(ipaddr) SIP=$(serverip) FW=$(firmware); bootm 1000000 2000000
bootargs=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial
arcNumber=1681
run_mw=mw 0x800000 0 1
load_uimage=ext2load usb 0:1 0x800000 /boot/uImage
load_initrd=ext2load usb 0:1 0x2100000 /boot/uInitrd
set_mw=mw 0x800000 0 1
load_bootm=bootm 0x800000 0x2100000
load_usbuimage=ext2load usb 0:1 0x800000 /boot/uImage
load_usbuinitrd=ext2load usb 0:1 0x2100000 /boot/uInitrd
bootargs_usb=console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) earlyprintk=serial
bootcmd_usb=run bootargs_usb; usb start; run set_mw; run load_usbuimage; run load_usbuinitrd; run load_bootm
load_myhdduimage=ext2load ide 0:1 0x800000 /boot/uImage
load_myhdduinitrd=ext2load ide 0:1 0x2100000 /boot/uInitrd
bootcmd=run bootcmd_usb; run bootcmd_myhdd; reset
stdin=serial
stdout=serial
stderr=serial
mainlineLinux=yes
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
netbsd_en=no
vxworks_en=no
bootdelay=1
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=no
pcieTune=no
bootcmd_myhdd=ide reset; run set_mw; run load_myhdduimage; run load_myhdduinitrd; run load_bootm

Environment size: 3251/4092 bytes
Re: LG N1T1 NAS
November 22, 2017 05:00AM
raffe,

Cool! everything looks great.

Now you can check if your LEDs control works.

See which LEDs were enumerated by the kernel:
ls -l /sys/class/leds

And see /etc/rc.local for example how to control them.

After that it's all system go :)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 22, 2017 05:44AM
Thanks for all help bodhi!

This is what I have done so far

I generate new SSH key to make it my own unique rootfs
rm /etc/ssh/ssh_host*
ssh-keygen -A

I made an apt-get update script that tells me if there is any change on initramfs
apt-get update
apt-get upgrade | tee apt-get-upgrade.log
echo ' '
echo '****  CHECKING FOR UPDATE-INITRAMFS!  **********'
echo '****  This  will look for things like this:'
echo 'update-initramfs: Generating /boot/initrd.img-4.12.1-kirkwood-tld-1'
echo ' '
echo '**** IF FOUND, you will have to do this (otherwies, do nothing):'
echo ' '
echo 'cd /boot'
echo 'mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.12.1-kirkwood-tld-1 -d initrd.img-4.12.1-kirkwood-tld-1 uInitrd '
echo ' '
echo '**** Checking (if you see nothing here under, nothing is found)....'
cat apt-get-upgrade.log | grep update-initramfs

About leds. What can I do with them? Change their behavior? Or do they not work as standard after Debian install, so we have to fix it?
root@debian:~# ls -l /sys/class/leds
total 0
drwxr-xr-x  2 root root 0 Nov 22 04:22 .
drwxr-xr-x 41 root root 0 Nov 22 03:39 ..
lrwxrwxrwx  1 root root 0 Nov 22 04:22 status:white:hdd -> ../../devices/platform/gpio-leds/leds/status:white:hdd
lrwxrwxrwx  1 root root 0 Nov 22 04:22 status:white:odd -> ../../devices/platform/gpio-leds/leds/status:white:odd
lrwxrwxrwx  1 root root 0 Nov 22 04:22 status:white:usb -> ../../devices/platform/gpio-leds/leds/status:white:usb

Examples
root@debian:~# cat /etc/rc.local
#!/bin/sh -e
#
# rc.local
#
# This script is executed at the end of each multiuser runlevel.
# Make sure that the script will "exit 0" on success or any other
# value on error.
#
# In order to enable or disable this script just change the execution
# bits.
#
# By default this script does nothing.

# turn on LED

if [ -d /sys/class/leds/status:green:health ]; then
   echo default-on > /sys/class/leds/status:green:health/trigger
   if [ -d /sys/class/leds/status:orange:fault ]; then
      echo none > /sys/class/leds/status:orange:fault/trigger
   fi
   if [ -d /sys/class/leds/status:blue:health ]; then
      echo none > /sys/class/leds/status:blue:health/trigger
   fi
fi
if [ -d /sys/class/leds/dockstar:green:health ]; then
   echo default-on > /sys/class/leds/dockstar:green:health/trigger
   echo none > /sys/class/leds/dockstar:orange:misc/trigger
fi

if [ -d /sys/class/leds/plug:green:health ]; then
   echo default-on > /sys/class/leds/plug:green:health/trigger
   if [ -d /sys/class/leds/plug:red:misc ]; then
      echo none  > /sys/class/leds/plug:red:misc/trigger
   fi
fi

if [ -d /sys/class/leds/power:blue ]; then
   echo default-on  > /sys/class/leds/power:blue/trigger
   ### echo default-on  > /sys/class/leds/otb:blue/trigger
   echo none        > /sys/class/leds/power:red/trigger
fi

if [ -d /sys/class/leds/usb1:blue ]; then
   echo usb-host > /sys/class/leds/usb1\:blue/trigger
fi
if [ -d /sys/class/leds/usb2:blue ]; then
   echo usb-host > /sys/class/leds/usb2\:blue/trigger
fi
if [ -d /sys/class/leds/usb3:blue ]; then
   echo usb-host > /sys/class/leds/usb3\:blue/trigger
fi
if [ -d /sys/class/leds/usb4:blue ]; then
   echo usb-host > /sys/class/leds/usb4\:blue/trigger
fi

if [ -d /sys/class/leds/nsa325:green:sys ]; then
   echo default-on  > /sys/class/leds/nsa325:green:sys/trigger
   echo none        > /sys/class/leds/nsa325:orange:sys/trigger
fi

if [ -d /sys/class/leds/nsa325:green:sata1 ]; then
   echo ide-disk1  > /sys/class/leds/nsa325:green:sata1/trigger
fi

if [ -d /sys/class/leds/nsa325:green:sata2 ]; then
   echo ide-disk2  > /sys/class/leds/nsa325:green:sata2/trigger
fi

if [ -d /sys/class/leds/nsa325:green:usb ]; then
   echo usb-host > /sys/class/leds/nsa325\:green\:usb/trigger
fi

exit 0

My plans when all in Debian is working, is to setup OpenVPN and rsync (or is there anything better) so I can place the LG, for example, at my parents house and from there make automatic backups of documents and photos from my own NAS.



Edited 1 time(s). Last edit at 11/22/2017 05:56AM by raffe.
Re: LG N1T1 NAS
November 22, 2017 03:24PM
raffe,

> About leds. What can I do with them? Change their
> behavior? Or do they not work as standard after
> Debian install, so we have to fix it?

Normally, they are not turned on in either mainline kernel or customed built kernel such as mine. The trigger files are the control file for each LED. So you need to put statements in /etc/rc.local to control them.

For example, you can execute these at command line to see how it works.

To set up flashing USB LED whenever there are USB drive read/write access.
echo usb-host > /sys/class/leds/status:white:usb/trigger
To turn it off completely
echo none > /sys/class/leds/status:white:usb/trigger
To turn it on permanently
echo default-on > /sys/class/leds/status:white:usb/trigger

and so on...

To see which values available in the trigger file:

cat /sys/class/leds/status:white:usb/trigger


------

Since your box is different from ron's box (N1T1DD1), some the LED GPIO might not be in the DTS yet.

For example, check what LED do you have? is there individual LED for each HDD? is the color for HDD, ODD, USB the same as defined (i.e. white).

If you have individual LED for HDD 1 and 2, then we need to add code to the DTS file to enable that individual control.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 23, 2017 01:30AM
I only have one color on my LEDs, white. The settings as standard look like this
cat /sys/class/leds/status:white:usb/trigger
[none] kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock f1072004.mdio-bus-mii:08:1Gbps f1072004.mdio-bus-mii:08:100Mbps f1072004.mdio-bus-mii:08:10Mbps usbport usb-gadget usb-host timer oneshot disk-activity ide-disk1 ide-disk2 mtd nand-disk heartbeat gpio default-on panic

cat /sys/class/leds/status:white:hdd/trigger
none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock f1072004.mdio-bus-mii:08:1Gbps f1072004.mdio-bus-mii:08:100Mbps f1072004.mdio-bus-mii:08:10Mbps usbport usb-gadget usb-host timer oneshot disk-activity ide-disk1 [ide-disk2] mtd nand-disk heartbeat gpio default-on panic

root@debian:~# cat /sys/class/leds/status:white:odd/trigger
none kbd-scrolllock kbd-numlock kbd-capslock kbd-kanalock kbd-shiftlock kbd-altgrlock kbd-ctrllock kbd-altlock kbd-shiftllock kbd-shiftrlock kbd-ctrlllock kbd-ctrlrlock f1072004.mdio-bus-mii:08:1Gbps f1072004.mdio-bus-mii:08:100Mbps f1072004.mdio-bus-mii:08:10Mbps usbport usb-gadget usb-host timer oneshot disk-activity [ide-disk1] ide-disk2 mtd nand-disk heartbeat gpio default-on panic

So
/sys/class/leds/status:white:usb/trigger = [none]
/sys/class/leds/status:white:hdd/trigger= [ide-disk2] (and it is flashing)
/sys/class/leds/status:white:odd/trigger =[ide-disk1] (this flash when I plug in the USB)

Looks good, except that odd is used for USB. I will probably never use the DVD drive, so that don't really bother me (as long as I don't think to much about that).

I guess that means all is OK :-D
Re: LG N1T1 NAS
November 23, 2017 02:22AM
raffe,

> Looks good, except that odd is used for USB. I
> will probably never use the DVD drive, so that
> don't really bother me (as long as I don't think
> to much about that).
>
> I guess that means all is OK :-D

Hey, that's good enough if you like the way they flash to tell you something you want to see :)

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: LG N1T1 NAS
November 27, 2017 09:53AM
Fan control

Hi again!

After a honey moon period, our relationships is still good. But I have recognized that the LG N1T1 sounds a lot. The fan sound as it is going full speed all the time.

I tried to install lm-sensors and fancontrol and then run
root@debian:~# pwmconfig
# pwmconfig revision 6243 (2014-03-20)
This program will search your sensors for pulse width modulation (pwm)
controls, and test each one to see if it controls a fan on
your motherboard. Note that many motherboards do not have pwm
circuitry installed, even if your sensor chip supports pwm.

We will attempt to briefly stop each fan using the pwm controls.
The program will attempt to restore each fan to full speed
after testing. However, it is ** very important ** that you
physically verify that the fans have been to full speed
after the program has completed.

/usr/sbin/pwmconfig: No sensors found! (modprobe sensor modules?)


I also tried this
root@debian:~# sensors-detect
# sensors-detect revision 6284 (2015-05-31 14:00:33 +0200)
# DMI data unavailable, please consider installing dmidecode 2.7
# or later for better results.
# Kernel: 4.12.1-kirkwood-tld-1 armv5tel
# Processor: Feroceon 88FR131 rev 1 (v5l) (//)

This program will help you determine which kernel modules you need
to load to use lm_sensors most effectively. It is generally safe
and recommended to accept the default answers to all questions,
unless you know what you're doing.

Some south bridges, CPUs or memory controllers contain embedded sensors.
Do you want to scan for them? This is totally safe. (YES/no): YES
modprobe: FATAL: Module cpuid not found in directory /lib/modules/4.12.1-kirkwood-tld-1
Failed to load module cpuid.
Silicon Integrated Systems SIS5595...                       No
VIA VT82C686 Integrated Sensors...                          No
VIA VT8231 Integrated Sensors...                            No
AMD K8 thermal sensors...                                   No
AMD Family 10h thermal sensors...                           No
AMD Family 11h thermal sensors...                           No
AMD Family 12h and 14h thermal sensors...                   No
AMD Family 15h thermal sensors...                           No
AMD Family 16h thermal sensors...                           No
AMD Family 15h power sensors...                             No
AMD Family 16h power sensors...                             No
Intel digital thermal sensor...                             No
Intel AMB FB-DIMM thermal sensor...                         No
Intel 5500/5520/X58 thermal sensor...                       No
VIA C7 thermal sensor...                                    No
VIA Nano thermal sensor...                                  No

Lastly, we can probe the I2C/SMBus adapters for connected hardware
monitoring devices. This is the most risky part, and while it works
reasonably well on most systems, it has been reported to cause trouble
on some systems.
Do you want to probe the I2C/SMBus adapters now? (YES/no): YES
Sorry, no supported PCI bus adapters found.

Sorry, no sensors were detected.
Either your system has no sensors, or they are not supported, or
they are connected to an I2C or SMBus adapter that is not
supported. If you find out what chips are on your board, check
http://www.lm-sensors.org/wiki/Devices for driver status.

I also read some here
https://forum.doozan.com/read.php?2,25783,page=2
https://askubuntu.com/questions/22108/how-to-control-fan-speed
https://forum.doozan.com/read.php?2,35975,43074#msg-43074

And tried to look in /sys/devices/ to find any clues as in the threads. But, I don't find anything I think I can use.

What should next step be?
ron
Re: LG N1T1 NAS
November 27, 2017 10:07AM
Hi raffe!

Unfortunately there is no easy way to control the fan from Linux. You can see the photos of the board in the third post, and on the first photo in the top left corner you'll see the fan connector. It has no speed sensing (despite the 3 pin connector) and the power is controlled by a MOSFET. Now I don't remember exactly how it is, but the MOSFET is either controlled by the microcontroller on the back or it's hardwired to the power rail. It's definitely not connected to the Kirkwood CPU so we can't control it from Linux. There are possible hacks to make it work, like connecting the MOSFET to a LED and then doing PWM control of the LED (and the fan), but I'm not sure it's worth the effort.
In my configuration, the fan was simply disconnected and removed from the NAS. It operates 24/7 with a 7200 RPM old and loud Seagate HDD. Since Linux runs from a USB stick, I could set up the HDD to power down after 10 minutes idling (this won't work if you have Linux installed on the hard drive), so heat (and noise too) are not a problem for me anymore.
Re: LG N1T1 NAS
December 24, 2017 09:27AM
Thank you, Bodhi and Raffe, for your analysis.

Changing the uInitrd load address from 0x1100000 to 0x2100000 helped me to boot kernels > 4.10.9 which didn't work before.

Bernd
Re: LG N1T1 NAS
December 24, 2017 10:46PM
bernd Wrote:
-------------------------------------------------------
> Thank you, Bodhi and Raffe, for your analysis.
>
> Changing the uInitrd load address from 0x1100000
> to 0x2100000 helped me to boot kernels > 4.10.9
> which didn't work before.
>
> Bernd

Cool!

-bodhi
===========================
Forum Wiki
bodhi's corner
Author:

Your Email:


Subject:


Spam prevention:
Please, solve the mathematical question and enter the answer in the input field below. This is for blocking bots that try to post this form automatically.
Question: how much is 15 plus 9?
Message: