Welcome! Log In Create A New Profile

Advanced

LG N1T1 NAS

Posted by ron 
ron
LG N1T1 NAS
March 13, 2016 03:47PM
Hi Everyone!

I recently acquired an LG NAS, particularly the N1T1DD1. It is a Kirkwood-based device with 2 SATA ports, with a 1 TB HDD (3.5 inch size) and a slot-in slimline DVD rewriter attached (the latter feature was my main reason for buying :)), 1 USB 2.0 port, 1 gigabit Ethernet, 5 LEDs, 2 buttons, a single SPDT switch and a fan. Originally it runs a slightly modified Debian Lenny distribution with Linux 2.6.32 kernel. U-Boot 1.1.4, modified by LG, is used as the bootloader.

Since it is a Kirkwood device and LG made available the sources (although without any helpful documentation), I managed to get Linux 3.16 and later Linux 4.4 running on the N1T1. My work is based on bodhi's kernel, the 4.4 only required a dts file and adding an extra line to the mach-types file (I still use the original bootloader, so this seems to be necessary). A patch file is attached to this post, so anyone feeling like upgrading his/her N1T1 (and possibly variants, like N1A1) to a newer kernel and Jessie can use this. To build your own kernel, download the Linux 4.4 sources, patch it with bodhi's 4.4 patch and then this patch. The LG NAS only has a 512 kB SPI Flash and no NAND, so I used USB to boot. For me the easiest way was to just build the kernel with all the USB mass storage drivers embedded, but it should also work with an initrd (I couldn't get it working, but I haven't really tried that hard). The original firmware boots from the hard disk (or DVD if the recovery disc is inserted), this should be also possible if the SATA drivers are built into the kernel. Anyways, here is the boot log:
�Normal mode boot start! 

 _   _     ____              _
| | | |   | __ )  ___   ___ | |_ 
| | | |___|  _ \ / _ \ / _ \| __| 
| |_| |___| |_) | (_) | (_) | |_ 
 \___/    |____/ \___/ \___/ \__|  ** LOADER **
 ** LGE-NAS BOARD: NT1-Pilot LE 

U-Boot 1.1.4 (Apr 26 2010 - 16:13:51) LGE version: NT1-Pilot

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

Soc: 88F6281 A1 (DDR2)
CPU running @ 1000Mhz L2 running @ 333Mhz
SysClock = 333Mhz , TClock = 200Mhz 

DRAM CAS Latency = 5 tRP = 5 tRAS = 15 tRCD=5
DRAM CS[0] base 0x00000000   size 128MB 
DRAM Total size 128MB  16bit width
[512kB@f8000000] Flash: 512 kB
Addresses 8M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (8M - 7M): Done

CPU : Marvell Feroceon (Rev 1)

Streaming disabled 
Write allocate disabled


USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0 [PRIME]
 Normal mode : lg_bootmode = 0 
Hit any key to stop autoboot:  0 
(Re)start USB...
USB:   scanning bus for devices... 2 USB Device(s) found
       scanning bus for storage devices... 1 Storage Device(s) found
....
.
...................
............
.............
...................................................
......................................................................................................
........................................................................................................................

3328734 bytes read
## Booting image at 00800000 ..., header_size = 00000040, header_addr = 0068d634
image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = ae17fc70
hdr->ih_time = 8729e356, hdr->ih_size = 0032ca9e
hdr->ih_load = 00800000, hdr->ih_ep = 00800000
hdr->ih_dcrc = 9dfe0b7e
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 02, hdr->ih_comp = 00
hdr->ih_name = Linux-4.4.0-kirkwood-tld-1

   Image Name:   Linux-4.4.0-kirkwood-tld-1
   Created:      2016-03-11  20:24:39 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3328670 Bytes .2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 4.4.0-n1t1-tld-1 (aronk@vincent) (gcc version 4.4.1 (Sourcery G++ Lite 2009q3-67) ) #1 PREEMPT Fri Mar 11 21:10:25 CET 2016
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: LG N1T1
[    0.000000] Memory policy: Data cache writeback
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env) root=/dev/sda1 rw rootdelay=10 rootfstype=ext3
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 120140K/131072K available (6359K kernel code, 608K rwdata, 2096K rodata, 296K init, 313K bss, 10932K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff800000   ( 880 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0849fcc   (8456 kB)
[    0.000000]       .init : 0xc084a000 - 0xc0894000   ( 296 kB)
[    0.000000]       .data : 0xc0894000 - 0xc092c084   ( 609 kB)
[    0.000000]        .bss : 0xc092c084 - 0xc097a508   ( 314 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[    0.000011] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[    0.000371] Console: colour dummy device 80x30
[    0.000404] Calibrating delay loop... 996.14 BogoMIPS (lpj=4980736)
[    0.090109] pid_max: default: 32768 minimum: 301
[    0.090237] Security Framework initialized
[    0.090322] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090344] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091278] Initializing cgroup subsys io
[    0.091316] Initializing cgroup subsys devices
[    0.091346] Initializing cgroup subsys freezer
[    0.091385] Initializing cgroup subsys net_cls
[    0.091477] CPU: Testing write buffer coherency: ok
[    0.091996] Setting up static identity map for 0x8200 - 0x8258
[    0.092325] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.096596] devtmpfs: initialized
[    0.103103] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.103642] prandom: seed boundary self test passed
[    0.108439] prandom: 100 self tests passed
[    0.108467] pinctrl core: initialized pinctrl subsystem
[    0.110173] NET: Registered protocol family 16
[    0.110766] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.140120] cpuidle: using governor ladder
[    0.170116] cpuidle: using governor menu
[    0.170666] Feroceon L2: Enabling L2
[    0.170718] Feroceon L2: Cache support initialised.
[    0.171176] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.178080] No ATAGs?
[    0.211930] vgaarb: loaded
[    0.212337] SCSI subsystem initialized
[    0.212760] usbcore: registered new interface driver usbfs
[    0.212861] usbcore: registered new interface driver hub
[    0.212969] usbcore: registered new device driver usb
[    0.214391] clocksource: Switched to clocksource orion_clocksource
[    0.282270] NET: Registered protocol family 2
[    0.283256] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.283290] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.283317] TCP: Hash tables configured (established 1024 bind 1024)
[    0.283399] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.283431] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.283673] NET: Registered protocol family 1
[    0.284191] RPC: Registered named UNIX socket transport module.
[    0.284206] RPC: Registered udp transport module.
[    0.284216] RPC: Registered tcp transport module.
[    0.284226] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.284848] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.286138] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.286228] audit: initializing netlink subsys (disabled)
[    0.286285] audit: type=2000 audit(0.280:1): initialized
[    0.286721] Initialise system trusted keyring
[    0.287150] zbud: loaded
[    0.287517] VFS: Disk quotas dquot_6.6.0
[    0.287594] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.288254] NFS: Registering the id_resolver key type
[    0.288313] Key type id_resolver registered
[    0.288324] Key type id_legacy registered
[    0.288358] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.288378] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.288661] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.289309] Key type big_key registered
[    0.303892] Key type asymmetric registered
[    0.303922] Asymmetric key parser 'x509' registered
[    0.304028] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.304048] io scheduler noop registered
[    0.304065] io scheduler deadline registered
[    0.304138] io scheduler cfq registered (default)
[    0.305796] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.306629] irq: Cannot allocate irq_descs @ IRQ34, assuming pre-allocated
[    0.307138] irq: Cannot allocate irq_descs @ IRQ66, assuming pre-allocated
[    0.307836] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.345252] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.345547] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.385302] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[    0.385931] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.387580] console [ttyS0] disabled
[    0.387651] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[    0.982170] console [ttyS0] enabled
[    0.988210] m25p80 spi0.0: mx25l4005a (512 Kbytes)
[    0.996165] libphy: Fixed MDIO Bus: probed
[    1.000675] libphy: orion_mdio_bus: probed
[    1.005739] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    2.083863] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:e0:91:81:30:9b
[    2.092833] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.099458] ehci-pci: EHCI PCI platform driver
[    2.104015] ehci-orion: EHCI orion driver
[    2.108279] orion-ehci f1050000.ehci: EHCI Host Controller
[    2.113829] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    2.121771] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    2.144432] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    2.150768] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    2.157626] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    2.164906] usb usb1: Product: EHCI Host Controller
[    2.169808] usb usb1: Manufacturer: Linux 4.4.0-n1t1-tld-1 ehci_hcd
[    2.176127] usb usb1: SerialNumber: f1050000.ehci
[    2.181767] hub 1-0:1.0: USB hub found
[    2.185644] hub 1-0:1.0: 1 port detected
[    2.190483] usbcore: registered new interface driver usb-storage
[    2.197107] mousedev: PS/2 mouse device common for all mice
[    2.203521] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    2.210730] i2c /dev entries driver
[    2.216171] hidraw: raw HID events driver (C) Jiri Kosina
[    2.222090] drop_monitor: Initializing network drop monitor service
[    2.228791] NET: Registered protocol family 17
[    2.233631] Key type dns_resolver registered
[    2.239071] registered taskstats version 1
[    2.243232] Loading compiled-in X.509 certificates
[    2.248181] zswap: loaded using pool lzo/zbud
[    2.253878] Key type encrypted registered
[    2.258639] rtc-mv f1010300.rtc: setting system clock to 2000-01-01 00:00:00 UTC (946684800)
[    2.269001] Waiting 10 sec before mounting root device...
[    2.504436] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.655407] usb 1-1: New USB device found, idVendor=cd12, idProduct=ef18
[    2.662166] usb 1-1: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.669379] usb 1-1: Product: DISK
[    2.672804] usb 1-1: Manufacturer: USB
[    2.677535] usb-storage 1-1:1.0: USB Mass Storage device detected
[    2.684023] scsi host0: usb-storage 1-1:1.0
[    3.685517] scsi 0:0:0:0: Direct-Access     SCSI     DISK             1.00 PQ: 0 ANSI: 4
[    3.696206] sd 0:0:0:0: [sda] 7881824 512-byte logical blocks: (4.03 GB/3.75 GiB)
[    3.704188] sd 0:0:0:0: [sda] Write Protect is off
[    3.709567] sd 0:0:0:0: [sda] No Caching mode page found
[    3.714986] sd 0:0:0:0: [sda] Assuming drive cache: write through
[    3.735564]  sda: sda1 sda2
[    3.741695] sd 0:0:0:0: [sda] Attached SCSI removable disk
[   12.286205] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   12.317713] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
[   12.325515] VFS: Mounted root (ext3 filesystem) on device 8:1.
[   12.344635] devtmpfs: mounted
[   12.348782] Freeing unused kernel memory: 296K (c084a000 - c0894000)
Mount failed for selinuxfs on /sys/fs/selinux:  No such file or directory
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Starting the hotplug events dispatcher: udevd[   14.222213] systemd-udevd[209]: starting version 215
. ok 
[   14.353768] random: udevd urandom read with 72 bits of entropy available
[ ok ] Synthesizing the initial hotplug events...done.
[....] Waiting for /dev to be fully populated...[   14.666686] input: gpio-keys as /devices/platform/gpio-keys/input/input0
[   14.827591] orion_wdt: Initial timeout 21 sec
[   14.975448] marvell-cesa: probe of f1030000.crypto failed with error -524
[   15.042031] usbcore: registered new interface driver uas
[   15.066677] sata_mv f1080000.sata: slots 32 ports 2
[   15.112983] sd 0:0:0:0: Attached scsi generic sg0 type 0
[   15.131009] scsi host1: sata_mv
[   15.152827] scsi host2: sata_mv
[   15.169329] ata1: SATA max UDMA/133 irq 33
[   15.173505] ata2: SATA max UDMA/133 irq 33
[   15.714448] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[   15.754482] ata1.00: ATA-8: HITACHI HTS725016A9A364, PCBZC70F, max UDMA/100
[   15.761484] ata1.00: 312581808 sectors, multi 0: LBA48 NCQ (depth 31/32)
[   15.824485] ata1.00: configured for UDMA/100
[   15.844963] scsi 1:0:0:0: Direct-Access     ATA      HITACHI HTS72501 C70F PQ: 0 ANSI: 5
[   15.855061] sd 1:0:0:0: [sdb] 312581808 512-byte logical blocks: (160 GB/149 GiB)
[   15.863644] sd 1:0:0:0: Attached scsi generic sg1 type 0
[   15.869412] sd 1:0:0:0: [sdb] Write Protect is off
[   15.875137] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[   15.920958]  sdb: sdb1 sdb2 sdb3
[   15.927534] sd 1:0:0:0: [sdb] Attached SCSI disk
[   16.384441] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl F300)
[   16.404538] ata2.00: ATAPI: HL-DT-STDVDRAM GA31N, T107, max UDMA/100
[   16.444531] ata2.00: configured for UDMA/100
[   16.624533] scsi 2:0:0:0: CD-ROM            HL-DT-ST DVDRAM GA31N     T107 PQ: 0 ANSI: 5
[   16.696424] scsi 2:0:0:0: Attached scsi generic sg2 type 5
[   16.734229] random: nonblocking pool is initialized
[   16.864546] sr 2:0:0:0: [sr0] scsi3-mmc drive: 24x/24x writer dvd-ram cd/rw xa/form2 cdda tray
[   16.873204] cdrom: Uniform CD-ROM driver Revision: 3.20
done.
[ ok ] Activating swap...done.
[   29.599341] EXT4-fs (sda1): re-mounted. Opts: (null)
[....] Checking root file system...fsck from util-linux 2.25.2
rootfs: clean, 17070/213840 files, 153128/854016 blocks
done.
[   31.840393] EXT4-fs (sda1): re-mounted. Opts: errors=remount-ro
[ ok ] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.25.2
done.
[ ok ] Cleaning up temporary files... /tmp.
[ ok ] Loading kernel modules...done.
[ ok ] Mounting local filesystems...done.
[ ok ] Activating swapfile swap...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables ...done.
[   35.886414] NET: Registered protocol family 10
[   37.144070] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[....] Configuring network interfaces...Internet Systems Consortium DHCP Client 4.3.1
Copyright 2004-2014 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

Listening on LPF/eth0/00:e0:91:81:30:9b
Sending on   LPF/eth0/00:e0:91:81:30:9b
Sending on   Socket/fallback
DHCPREQUEST on eth0 to 255.255.255.255 port 67
[   43.335878] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   43.345819] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPACK from 192.168.1.1
bound to 192.168.1.202 -- renewal in 10786 seconds.
done.
[ ok ] Starting rpcbind daemon....
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1178 (syslogd)
. ok 
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Starting system message bus: dbus.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
[ ok ] Starting NTP server: ntpd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1181 (klogd)
. ok 
[ ok ] Starting OpenBSD Secure Shell server: sshd.

Debian GNU/Linux 8 debian ttyS0

debian login:

If someone sees something strange/wrong, please notify me so I can fix it. My next step is to bring U-Boot support for this board. It also works fine with the stock version but I think it's not such a big effort to add support for the latest U-Boot.

I will post some pics of the main PCB in the following days, since there is no picture on the Internet of the internals of the device and maybe it is helpful for others. There is a NEC microcontroller, connected by I2C to the Marvell CPU, which controls the power supply, possibly the Eject button and the Power LED. It would be good to get some input on this, try to reverse engineer how it works, reprogram it, replace it... Anyways it's not important for using the device as a NAS, it just makes a good hardware hacking project :)
Attachments:
open | download - n1t1-4.4.patch (6.4 KB)
Re: LG N1T1 NAS
March 13, 2016 05:44PM
Hi ron,

Welcome to the forum and thanks you for your contribution! The boot log looks very good! I'll merge your patch into the kernel for 4.5.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
ron
Re: LG N1T1 NAS
March 15, 2016 02:40PM
Here are some pics of the main board of the NAS: http://imgur.com/gallery/OyI1q

@bodhi: thanks, I'll also try the 4.5 kernel when you make it available.
Re: LG N1T1 NAS
March 25, 2016 03:52AM
A quick question, the most compelling feature of this device are the USB OTG port(s), so it could disguise itself as either a usb hard drive or as a usb dvd writer.

here a description http://www.cnet.com/products/lg-n1t1-nas-with-dvd-rewrite/

" Also on the back, there's the power button and a switch that quickly changes the role of the LG N1T1 among a NAS server, an external hard drive, or an external DVD burner. You can do this even when the device is powered on but of course you should only perform this switch when the device is idle.

The slot-load DVD drive of the LG is on the front, next to the Eject and Backup buttons. The Backup button allows for quickly backing up the data on the device's built-in storage, onto a DVD disc.

It's easy to set up the LG N1T1. When the device is used as an external hard drive or DVD burner, just connect it to a computer via the USB connection and turn it on. The computer then recognizes the external hard drive or the external DVD drive automatically and you can use the newly added drive the same as the internal drives included in your computer. "

This feature is enabled by the "usb gadget" kernel feature, afaik.

Is this working in your box? Can it be enabled?
ron
Re: LG N1T1 NAS
March 29, 2016 04:17AM
I think it's not enabled by bodhi's kernel config and most definitely wasn't enabled by me. Theoretically it should work, however the usb gadget driver needs investigation to see how it handles the USB voltage detection. The old LG kernel called the gadget initialization by passing the number of the GPIO pins that control the USB voltage output and the voltage input detection. It needs checking if the driver in the 4.5 kernel does it and what device tree configuration does it need. Right now MPP10, the voltage output is configured as a permanent output (eg. fixed regulator), MPP26, the Vbus detection input is ignored.

Also the 2.6 LG kernel had lots of modifications in the SATA and filesystem drivers for enabling exclusive access for the USB subsystem. I have no idea how is this handled in the 4.5 kernel: if it's not supported then the drivers need modification.

Currently I'm busy with porting the latest U-boot to this device and even this will probably be interrupted by a month long trip. After the porting is done I can check if the gadget feature is working with minor modifications (to the config and the device tree). If it needs modification in the SATA/FS drivers, someone else has to do that.

(Personally I dislike the idea of USB HDD/ODD only mode in a NAS, that's why I haven't focused on this feature yet. But if it's easy to solve it than I will take the time to do it.)
Re: LG N1T1 NAS
March 29, 2016 08:48AM
Thanks for the answer. :)

The reason I was interested in such feature is because I was thinking about having the device act like DriveDroid smarphone app. (that is terribly unstable on my hardware and screwed up my firmware, not a major issue since it got fixed at the next cyanogenmod nightly update, but heh)

It works by taking a disk image from the internal storage (sd card in the phone) and acting like a usb stick or CD drive I can boot from, or r/w disk image I can keep an operating system in. Also to experiment with the other possibilities of the "usb gadget" functionality (like usb tethering for example).

There is no hurry though, it's unlikely I can get a N1T1 anywhere soon, have only found some N1A1 ffrom the US, that seem to be the same but without the dvd drive.
ron
Re: LG N1T1 NAS
March 30, 2016 02:38AM
Quote

There is no hurry though, it's unlikely I can get a N1T1 anywhere soon, have only found some N1A1 ffrom the US, that seem to be the same but without the dvd drive.

The N1A1 has exactly the same mainboard as the N1T1, maybe only the 2nd SATA connector for the optical drive is missing.

When u-boot is complete (currently I have some issues with kwboot-ing the compiled image) I'll check the gadget functionality. Looking at other devices with similar functionality, all the needed stuff is in the kernel (4.x versions), especially tethering. Probably it is a simple fix, like modifying the config and the DTS, so it should work.
Re: LG N1T1 NAS
March 31, 2016 04:41PM
ron,

> When u-boot is complete (currently I have some
> issues with kwboot-ing the compiled image) I'll
> check the gadget functionality. Looking at other
> devices with similar functionality, all the needed
> stuff is in the kernel (4.x versions), especially
> tethering. Probably it is a simple fix, like
> modifying the config and the DTS, so it should
> work.

Would be cool if you can do a pull request when you're done. Or create a patch that I can merge to my GitHub repo.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 03/31/2016 04:43PM by bodhi.
ron
Re: LG N1T1 NAS
April 01, 2016 03:27PM
That's the plan, to make it all available when it's done. Unfortunately I have some serial cable issues and can't upload the compiled binary. Hopefully this will be solved next week when I can resolder all the connectors and cables and get u-boot running.
Re: LG N1T1 NAS
August 22, 2016 02:45PM
Hello,

From the way this is written, it appears that you are not making any distinction between n1t1 and n1t1dd1, which I believe are two different products.

Is this intentional, i.e. do they share the same hardware (this would be kinda odd, since one of them is ~5 years older than the other)?

Thanks in advance!
Re: LG N1T1 NAS
August 22, 2016 05:54PM
Re: LG N1T1 NAS
August 23, 2016 01:16AM
I found specs for the following Marvell based LG NAS units:

N2B1DD2 has Marvell 88F6192 800MHz with 128 MB DDR2 SDRAM, 2 SATA ports w/2 1TB drives, Blue-Ray Rewriter, 3 USB 2.0, 4-in-1 memory card reader, and 1 10/100/1000 Mbps LAN.

The N1T1 is also supposed to have Marvell 88F6192 800MHz with 128 MB DDR2 SDRAM, but only 1 SATA port w 1TB drive, DVD Rewriter, 1 USB 2.0 and 1 10/100/1000 Mbps LAN. The N1T1DD1 appears to use the same firmware (couldn't find any online specs).

The N2A2 is listed as having a Marvell 88F6281 @ 1Ghz with 128 MB, 2 SATA ports w/2 1TB drives, 2 USB 2.0 and 1 10/100/1000 Mbps LAN.

They also have a some 4 bay units, but those seem to be Intel Atom based.

Ray



Edited 1 time(s). Last edit at 08/23/2016 01:29AM by rayknight.
Re: LG N1T1 NAS
August 23, 2016 08:55AM
I'm not sure regarding the difference in internal hardware, which is why I asked in the first place... :-)

However, the product page for N1T1DD1 is here:
http://www.lg.com/us/support-product/lg-N1T1DD1 - As I am writing this I notice that this is actually the "support" page and not the product page. Here they do not mention that this is a discontinued product.

On the other hand the product page is:
http://www.lg.com/us/burners-drives/lg-N1T1-network-attached-storage - Here they call it just N1T1 and state that it is discontinued. This is why I thought that those might be different products, along with the fact that it said "discontinued" for a while now, and yet ron's message is from March.

Now I'm starting to think that they might just have had two different names for the same product. If so, this is great news, since I was long considering what to do with it - I took the HDD out and put it into USB enclosure. Maybe I'll get a larger drive and update the firmware, in this case.

Despite what they write online, I'm pretty sure the chip inside was not 88F6192 but rather 88F618XX - I'll verify later today when I get home. P.S. - ray, the N1T1 does indeed possess two sata ports. One of them is simply taken up by the DVD drive, but I think that in principle it could be replaced by an HDD if one doesn't use the drive. There are a couple of problems with this however - one is of course that there is no space inside for both drives, so something will need to get hacked up. The second is that the DVD did not need an additional power port other than the standard sata, whereas an HDD would.

Anyway, now I am hopeful. The biggest hurdle for me now would be to figure out exactly what needs to be done to flash a new OS onto a new HDD.
Re: LG N1T1 NAS
August 25, 2016 07:09PM
shwouchk Wrote:
-------------------------------------------------------
> I'm not sure regarding the difference in internal
> hardware, which is why I asked in the first
> place... :-)
>
> However, the product page for N1T1DD1 is here:
> http://www.lg.com/us/support-product/lg-N1T1DD1 -
> As I am writing this I notice that this is
> actually the "support" page and not the product
> page. Here they do not mention that this is a
> discontinued product.
>
> On the other hand the product page is:
> http://www.lg.com/us/burners-drives/lg-N1T1-networ
> k-attached-storage - Here they call it just N1T1
> and state that it is discontinued. This is why I
> thought that those might be different products,
> along with the fact that it said "discontinued"
> for a while now, and yet ron's message is from
> March.
>
> Now I'm starting to think that they might just
> have had two different names for the same product.
> If so, this is great news, since I was long
> considering what to do with it - I took the HDD
> out and put it into USB enclosure. Maybe I'll get
> a larger drive and update the firmware, in this
> case.
>
> Despite what they write online, I'm pretty sure
> the chip inside was not 88F6192 but rather
> 88F618XX - I'll verify later today when I get
> home. P.S. - ray, the N1T1 does indeed possess two
> sata ports. One of them is simply taken up by the
> DVD drive, but I think that in principle it could
> be replaced by an HDD if one doesn't use the
> drive. There are a couple of problems with this
> however - one is of course that there is no space
> inside for both drives, so something will need to
> get hacked up. The second is that the DVD did not
> need an additional power port other than the
> standard sata, whereas an HDD would.
>
> Anyway, now I am hopeful. The biggest hurdle for
> me now would be to figure out exactly what needs
> to be done to flash a new OS onto a new HDD.

Seems like it would boot with one of the DTS file. Use Debian 4.4 rootfs. If someone is able to clearly identify the differences , I would be able to compile the DTB tor it.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: LG N1T1 NAS
August 29, 2016 01:15AM
rayknight Wrote:
-------------------------------------------------------
> I found specs for the following Marvell based LG
> NAS units:
>
> N2B1DD2 has Marvell 88F6192 800MHz with 128 MB
> DDR2 SDRAM, 2 SATA ports w/2 1TB drives, Blue-Ray
> Rewriter, 3 USB 2.0, 4-in-1 memory card reader,
> and 1 10/100/1000 Mbps LAN.
>
> The N1T1 is also supposed to have Marvell 88F6192
> 800MHz with 128 MB DDR2 SDRAM, but only 1 SATA
> port w 1TB drive, DVD Rewriter, 1 USB 2.0 and 1
> 10/100/1000 Mbps LAN. The N1T1DD1 appears to use
> the same firmware (couldn't find any online
> specs).
>
> The N2A2 is listed as having a Marvell 88F6281 @
> 1Ghz with 128 MB, 2 SATA ports w/2 1TB drives, 2
> USB 2.0 and 1 10/100/1000 Mbps LAN.
>
> They also have a some 4 bay units, but those seem
> to be Intel Atom based.
>
> Ray

Thanks Ray! Look like all these can be booted with the Debian 4.4 rootfs using the N1T1 DTB, to start. The differences regarding 88F6192/8281 and peripherals can be taken care of in a slightly modified DTS.

And the N1T1 actually has 88F6281 SoC (the current DTS proved that). If anybody who has a stock boot log, please confirm.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: LG N1T1 NAS
September 20, 2016 01:41AM
Hi ron,

Thanks for your work. Just one question, do you have any minitutorial in how to upgrade the N1T1 to the jessie release from the original firmware using yours and bodhi's work?

I installed the patched firmware by Talantus (https://lg.threnor.de/en:start), so I have SSH access to the box, but from here I could only managed to do a proper apt-get upgrade in lenny. If I want to go further, it doesn't work using the apt way.

You describe in a high level how to do it, but since the original boots from the HD, I wonder what did you do to upgrade the kernel ... download it, applied the patches and compile it using the N1T1 box? I've tried that, and then apt-distupgrade, but it didn't work out since it couldn't dhcp correctly. Tried as well usbconsole, so I can log if any problem, but it didn't work out either ...

Any advices so I can move forward?

Thanks in advance.

N.



Edited 1 time(s). Last edit at 09/20/2016 02:18AM by noarre.
ron
Re: LG N1T1 NAS
September 24, 2016 08:02AM
Hi All!

Sorry for the late reply, somehow I didn't get any notifications for this thread :(

There are multiple NAS-es made by LG (I'm not sure if they are still selling any of them). For me the easiest way to distinguish them was to download the sources from the LG website and examine the board support files. There are two versions of the source files, called "old" and "new" (by LG themselves), use the "new" one since it's easier to navigate. However it seems to me that only the "old" one was released as a compiled version, the "new" seems to be some kind of work in progress that was abandoned some years ago. Anyways, if I remember correctly the BSP had files for the "nt1", "nt2" boards in the ARM directory, and "nt3", "nt5" in the PowerPC dir. Some defines had product names, based on them the "nt1" board is the N1T1 and N1A1 products. There are some images on the Internet of both of the devices and the only difference seems to be the presence of the DVD burner: the N1T1 has one and the N1A1 doesn't.
Unfortunately I'm away from my home computer where I have all the sources and the BSP files (and also the HW itself), but on the next week I can verify this. Also I'm quite sure that the label on my LG NAS had N1T1DD1 written on it, but it also needs to be checked.
I got my device on a local auction site, with the item being marked as faulty since it won't start the built-in website. It turned out to be fully operational with the exception of the hard drive which was replaced by the previous owner by a faulty and smaller drive. So I didn't get any operating system with it. However the patched Talantus firmware could be booted from a hard drive. This is the reason why there is no original bootlog (except for the patched firmware, which probably uses the same kernel as the original FW).

The N1T1 has the 88F6281 SoC (see the pictures: http://imgur.com/gallery/OyI1q), 128 MB RAM, 512 SPI flash for U-Boot, 1 GbE port, 1 USB 2.0 port with OTG support and 2 SATA ports (one "regular" SATA port and one notebook optical drive connector format SATA port). There is also a buzzer, a SP3T switch, three buttons and a couple of LEDs. Some of them are directly connected to the SoC while others (like the power LED) are connected to a NEC µPD78F0535 microcontroller that connects to the SoC via I2C and also controls the power supplies. Unfortunately I haven't been able to completely reverse engineer the schematics of the board and the role of the microcontroller, but the custom kernel is fully operational without the I2C communication to the MCU.

Also by next week I'll try to put together a mini-HOWTO that explains running the kernel and the jessie rootfs from an USB drive (or a HDD).
Re: LG N1T1 NAS
September 25, 2016 03:22PM
Hi Ron!

Thanks for your reply. Let me explain my (not very useful) experience with the N1T1. My goal is to know how to install and maintain a "normal" Debian installation, since the sw that comes with the N1T1 is obsolete for "cloud" purposes. Jessie + NextCloud looks like a good combination.

I've been using the N1T1 with Talentus images with no problem. In the last days I've been trying to play around a little bit more, I have installed latest officials UI, UBoot and LG images. I've found them in the American website of LG (http://www.lg.com/us/support/product-search?pageCode=support-main&search=N1T1). Latest is only, surprisingly, one year old, and it's focused on fixing security issues.

I've been trying to gain root access to the box, with the new images, but I am still working on this. Some solutions that I've found, didn't work out (http://forum.nas-portal.org/showthread.php?14664-N2A2-General-(-)-New-UI-firmware-Password-protected/page4).But since I know now how to decrypt the images by LG (again, thanks to Talentus [gpg --passphrase="$(cat MD5SUM).$(cat MODEL)" --decrypt firmware.tar.gz > decrypted_firmware.tar.gz ]), I guess I'll be able to do that ... My early intention was to create a "LG-ish" image with yours and Bodhi's work, and use the existing process of fresh installation (explained in the doc file that comes with the official 6674 image), to installed it. I can say is a rock-solid process, since in the last five days I have re-installed the LG box like 20-25 times :-) ... but I'll wait to your mini-Howto and, at least, I can help you, confirming that it work in an off-the-shelve N1T1.

Last but not least, did you manage to open the enclosure without breaking it? ;-)

Thanks again.

N.
Re: LG N1T1 NAS
September 25, 2016 03:54PM
> I've been trying to gain root access to the box,
> with the new images, but I am still working on
> this. Some solutions that I've found, didn't work
> out

If you can boot Debian then you can change stock root password by mounting its rootfs (if it is not encrypted, of course).

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 09/25/2016 03:55PM by bodhi.
Re: LG N1T1 NAS
September 26, 2016 01:43PM
Hi Bodhi,

The root access is not a big deal for me. I'll get it sooner than later (I wish). What I want is to understand properly how Uboot works and how, a bad issue, could make may NAS become a brick. Since I am not expert in ARM architecture, and installing Linux on it, I want to make safe steps on changing things. If that was on my PC (actually an Imac with Linux), I won't bother at all, since I have a display and a keyboard ... but on the NAS, with any peripheral on it, I am a bit more cautious about changing U-Boot or the rootfs.

I have read again and again your explanation about the U-Boot & kernel, and I began to understand a little bit. The N1T1 has a function for automatic loading an external image to reset it, than I don't want to lose it, since is my safe-boat for any problem and, since I don't know how it works, and most likely the U-Boot has something to do on it, I am afraid to break it all. If your turn on the NAS while pressing the backup button, it change to this "reset mode" immediately, and remain in a state that expects and external program to push the image and load it. So, you safely come back to factory configuration ...and you still can play with it ... again and again.

I'll wait for Ron steps in how to boot with a new kernel and what changes must be done in the U-boot. I will like to first boot from USB with your rootfs, understands how u-boot deals with that, and be able to easily change it back to HD and see nothing has broken down. I would like that it will first search for a rootfs on an USB and then on an HD, without losing the functionality of resetting it back to factory configuration ... i.e., without getting another brick in the wall (I got some already). So I need to understand how to check my actual uboot configuration, and compare it to the one we need to boot your rootfs, and if that will break anything.

Once I get it, I'll help to keep updated the mini-howto with Ron and how install and maintain a secure Nextcloud installation (security is, at the end, my field of interest).

Thanks !

N.
Re: LG N1T1 NAS
September 27, 2016 02:57AM
Hi again,

A little more of reading about u-boot has bring me some more light. It took me sometime to make the change from Lilo to Grub, so I'll need a little bit more to make the change to u-boot ... and time is something very expensive when you have kids at home :-)

I've seen that what I described in my previous post about the "back to factory configuration" functionality of the NAS, is a basic functionality of u-boot, since it allows a remote load of a kernel via TFTP ... that is exactly what the NAS reset process is about.

So I guess that, at high level, the u-boot on the LG-NAS is set up following the next steps:

IF <backup_button is pressed when turning on> THEN;
DO search for a TFTP server;
download image;
download kernel;
install_all:
change u-boot env;
reboot;
ELSE boot_from_image_on HD

All I need is to modify it and add another ELSE instruction, booting from USB, previous the the HD booting. That way I'll keep all the options and I can play with bodhi and ron kernels, and it will be much simpler update it to a normal Debian.

When I'll get time, I'll uncompressed the official image with the u-boot that is configured, and check that my guessing is correct.

Step by step ...

N.
Re: LG N1T1 NAS
September 27, 2016 03:09AM
The 1st to do before changing uboot env is to make sure you can do UART booting using serial console with kwboot. Only then you can be sure that you can unbrick it when a wrong uboot env setting will lock you out.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
ron
Re: LG N1T1 NAS
September 27, 2016 03:10AM
Wish it was that simple... :(

I'll get some more info posted tonight, including the u-boot environment vars. Basically there is no way to query the state of the button from the u-boot command line. Of course the registers can be read and it is possible to determine the state of the GPIO that is connected to the button (it is wired directly to the Kirkwood SoC), apply some debouncing, etc. but it is way too complicated to do it from the u-boot shell.

What my goal is (that's also hindered by lack of time) to port the latest u-boot from this forum to the N1T1 (and variants). That would give us DTS support, LED control and also button support (I didn't think of that, so thanks :)). I already made some patches to the u-boot tree back in March according to the information I could reverse engineer from the LG kernel sources, PCB, the LG u-boot source (which might be different from the one that runs on my box) and the register values read from the N1T1 in the u-boot shell. The source compiled, however it didn't start. Then my serial cable got broken (giving me transfer errors only during the serial transfer of the KWB image :/) and the project was put on hold. Maybe I try it again this week with a different cable and see if it can be started.

Be back soon with more information...
Re: LG N1T1 NAS
September 27, 2016 03:16AM
Thanks bodhi,

If you can point me to some readings in how to do that, I'll appreciate it.

N.
Re: LG N1T1 NAS
September 27, 2016 03:22AM
Thanks Ron,

Of course it was a simplistic approach, but it must follow a similar process.

I'll try to dig into the original LG images to see if I can find something that will help to understand the way it handles the button, and how it affects the booting process.
There is a lot of own LG code under /usr/nas and /usr/lib/nas. It is .pyc files, but they can be easily decompiled with Uncompyle2.

N.
Re: LG N1T1 NAS
September 27, 2016 03:24AM
noarre Wrote:
-------------------------------------------------------
> Thanks bodhi,
>
> If you can point me to some readings in how to do
> that, I'll appreciate it.
>
> N.

In the uboot installation thread: http://forum.doozan.com/read.php?3,12381

Look for:

Quote

Important Note: If possible, try to test this boot image with UART booting before flashing to NAND. See davygravy's UART booting using kwboot instruction here in this thread. The latest u-boot image released here should be used for UART booting, if your box is the type that supports it (these do not: Dockstar, Pogo E02, iConnect).

If you can do kwboot using stock uboot image, then it is quite safe to play with envs.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 2 time(s). Last edit at 09/27/2016 03:27AM by bodhi.
ron
Re: LG N1T1 NAS
September 27, 2016 02:29PM
Hello Everyone!

Here is the mini (or micro) HOW-TO regarding the installation of Debian Jessie and the 4.6 kernel to an LG N1T1 (by the way: my device has N1T1DD1 printed on its bottom sticker).

WARNING: this procedure requires opening the case of the NAS, soldering wires or a pin header to the PCB and using a serial terminal. Okay, the last one is not so dangerous ;) But your warranty will definitely be void. As always, neither am I or anyone else on this forum can be held responsible for any damages.

(Unfortunately custom OS installation requires a serial console. The stock LG u-boot doesn't support netconsole and I don't know if the stock firmware can be exploited for root access. Maybe later, when we have custom u-boot running on the N1T1 we can create a script that replaces the stock u-boot and OS.)

Installation:
  1. Step 1: Connect a serial cable to the pin header at the bottom of the device. The pins are - from left to right - 3V3, TX, RX, GND. So the 3V3 is the closest pin to the power connector and the GND pin is the closest one to the DVD burner. The pin header has 2.0 mm spacing, you will probably need an adapter for most USB->TTL cables. The 3V3 pin shouldn't be connected. Also make sure that your serial adapter has 3,3 Volts as high level.
  2. Step 2: Start a terminal emulator and access the serial console using your favorite tool:
      screen /dev/ttyUSB0 115200  
  3. Step 3: 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.
  4. Step 4: Now you should have access to the u-boot console, you can examine the environment, play around with the variables (without saving).
  5. Step 5: Grab an USB flash drive that's at least 2 GB large. Create a single partition and format it to ext3 (ext4 may be fine, but my old stick was formatted to ext3 and I can't remember why). Download bodhi's latest kernel (4.6 at the time of writing this post) and rootfs (4.4). Also download this uImage: https://drive.google.com/file/d/0B-uU4xdcKTB6dUFEeXFwdFVYWU0/view?usp=sharing, as it is necessary for the first boot. Extract the rootfs to the flash drive. Copy the uImage file to the boot directory on the flash drive, overwriting the old uImage.
    The reason for the modified uImage that it has the N1T1 DTS embedded and also the USB mass storage drivers compiled into the kernel. It boots without DTS support from the bootloader or without the need for an initrd.
  6. Step 6: Insert the flash drive into the USB slot of the LG NAS and start typing in the console:
      usb start
    This starts the USB subsystem. It should find one storage device. If it's not found, you might want to try repeating step 5 with a different USB stick.
      ext2load usb 0:1 0x800000 /boot/uImage
    There should be some dots appearing that indicate the loading of the kernel image from the USB drive into the RAM. At the end of the operation, there should be an output of the number of bytes read. If there is a problem, repeat steps 5 and 6.
    Now set some environment variables:
      setenv console console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)
      setenv bootargs_usb root=/dev/sda1 rw rootdelay=10 rootfstype=ext3
      setenv bootargs $(console) $(bootargs_usb)
    Now cross fingers and boot the kernel:
      bootm 0x800000
    You should be seeing the kernel boot messages and after a while (it might be up to 2 minutes, depending on the speed of your USB stick) you are greeted with a login prompt. Use root/root to log in. Now you have Debian Jessie running on your LG NAS!
  7. Step 7: Let's upgrade the kernel to 4.6 and ditch the custom uImage... Copy the 4.6 kernel archive to the NAS. I put it into /root using SCP.
  8. Step 8: Extract the main archive:
      tar jxvf linux-4.6.0-kirkwood-tld-1-bodhi.tar.bz2
    Also extract the DTS archive:
      tar xvf linux-dtb-4.6.0-kirkwood-tld-1.tar
    And install the kernel:
      dpkg -i linux-image-4.6.0-kirkwood-tld-1_1.0_armel.deb  
  9. Step 9: Now that the kernel and the modules are installed, we need to create uImage and uInitrd for the bootloader:
      cd /boot/
      cp -a /root/zImage-4.6.0-kirkwood-tld-1 zImage.fdt
      cat /root/dts/kirkwood-n1t1.dtb >> zImage.fdt
      mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -n Linux-4.6.0-kirkwood-tld-1 -d zImage.fdt uImage
      mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.6.0-kirkwood-tld-1 -d initrd.img-4.6.0-kirkwood-tld-1 uInitrd
    Now there should be two u-boot images in the /boot directory. Sync and reboot:
      sync
      reboot
    Remember to start pressing a key when the u-boot starts to avoid autoboot. (You can also set bootdelay to a nonzero value in u-boot.)
  10. Step 10: we need to repeat the previous procedure in u-boot, but this time uInitrd has to be loaded too. Also you can save these commands for later use (saveenv).
      usb start
      ext2load usb 0:1 0x800000 /boot/uImage
    Load uInitrd too:
      ext2load usb 0:1 0x1100000 /boot/uInitrd
    These are the previously set arguments, set console and bootargs_usb if you didn't save them.
      setenv bootargs $(console) $(bootargs_usb)
    Cross fingers, boot (notice the uInitrd RAM address at the end):
      bootm 0x800000 0x1100000  
  11. Step 11: log in, and verify that you have kernel 4.6:
      root@debian:~# uname -a
      Linux debian 4.6.0-kirkwood-tld-1 #1 PREEMPT Wed May 18 03:54:14 PDT 2016 armv5tel GNU/Linux  

Optionally you can also set bootcmd in u-boot to run bootcmd_usb. This way the OS from the USB stick starts automatically and the serial cable can be removed. The instructions are probably very similar if you want to do an HDD install, but I can't verify it now. If you try to install on the stock hard drive, make sure that you only overwrite the OS partition and not the data.
Re: LG N1T1 NAS
September 27, 2016 02:51PM
Wow, thanks!

One question: You and others talked about stock root access, but I remember clearly that I did have it.
Can you explain the difficulty you had with obtaining it?

As far as I remember (right now the Unit is lying somewhere without an HDD inside so I can't verify), you ssh to it on port 2020 with the username and password from the web UI, and either "sudo -i" or "su -" with the same password. Does having root in the stock UI simplify the process in any manner?
ron
Re: LG N1T1 NAS
September 27, 2016 03:02PM
Sorry, I can't help you with that. My unit came with a faulty HDD and without an OS. I booted the original OS from NFS once, but that doesn't count as getting root access :)

IMHO having root from the stock OS doesn't simplify the procedure. But in the near future a script could be created that replaces u-boot and then the OS too (just like the scripts for DockStars or PogoPlugs).
Re: LG N1T1 NAS
September 27, 2016 04:06PM
ron Wrote:
-------------------------------------------------------
> Sorry, I can't help you with that. My unit came
> with a faulty HDD and without an OS. I booted the
> original OS from NFS once, but that doesn't count
> as getting root access :)
>
> IMHO having root from the stock OS doesn't
> simplify the procedure. But in the near future a
> script could be created that replaces u-boot and
> then the OS too (just like the scripts for
> DockStars or PogoPlugs).

There is a new script already in the works (at Beta now):
http://forum.doozan.com/read.php?3,28966

When a new u-boot is ready, then do a pull request to my GitHub so I can build it.
https://github.com/mibodhi

The N1T1 could potentially be added to the installation script to install u-boot automatically.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 09/27/2016 04:07PM by bodhi.
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: