Welcome! Log In Create A New Profile

Advanced

LG N1T1 NAS

Posted by ron 
ron
Re: LG N1T1 NAS
March 28, 2017 04:52AM
Hi everyone!

Based on what yongki has written
-------------------------------------------------------
> ** LGE-NAS BOARD: NC1 LE
>
> U-Boot 1.1.4 (Feb 24 2012 - 15:06:45)NC1

the internal LG codename for the N2Bx series are NC1. (Just like NT1 is the codename for the N1T1/N1A1/...). I downloaded the sources from LG and compared the nt1-setup.c and nc1-setup.c BSP files (my DTS was based on the nt1-setup file).

Apart from the different CPUs there are other things that have to be considered:
- The NC1 has an RTC attached to the I2C bus, probably a Ricoh R2025SD.
- It also has a NAND flash, which is at least 16MB large (I couldn't find the MTDPART_SIZ_FULL definition so the size of the last partition is unknown). It shouldn't affect booting from USB but if you want to re-flash the original OS then some adjustments have to be made.
- This also means that there is no SPI flash that is defined in the NT1 DTS.
- There is no USB device support, eg. the NAS can't be attached to a PC as a mass storage device. (IMHO you don't lose anything special)
- USB VBUS and VBUS EN pin definitions seem to be missing, USB power is probably enabled all the time (or U-Boot enables it).
- The HDD power pins are defined, however the function that sets the power state is empty.
- There are some unknown GPIO pin definitions (MPP20, MPP22, MPP32, MPP33) that are probably LEDs or buttons and are controlled from the LG NAS daemon (there are scripts in the original rootfs with pin number definitions, so you can look it up).

The bottom line is that the NT1 DTS cannot be used for the NC1/N2B1. Maybe you'll have success by modifying some kernel arguments (like removing the mtdparts=spi... part) but it won't be a 100% stable/functional unit.
My advice is to either create a DTS based on the NT1 DTS and the nc1-setup.c, nt1-setup.c file. Or point me to a site where I can buy an N2B1 in the EU for less than 50-60EUR and I'll be happy to port the kernel for the N2B1 :)
Mattias Magnusson
Re: LG N1T1 NAS
May 29, 2017 04:43PM
Hi, i see this is a seriously old tread and that ny question is not related to the active discussion, but this is my last hope. As you probably understand I also have a N1T1DD1 device that recently broke down, so I bought a new disc and replaced it, now i don't have a recovery disc for my device since it's very old ^^ it sure have served me well after all these years and I still want to kick some life in to this butiful machine.

Does anyone have a original recovery disc of this device or could some one guide me through how to install any os on this device since I don't have anything installed. I have tried to do the power + backup button start but it seams useless without the recovery disc. I would love if you could share your recovery disc in a ISO format or any other image that I could burn my self, i have been in contact with LG about this disc but they say they don't have one or that they can't send me a copy of it in any way. So you're my last hope here guys.

Thanks in advance.
Great regards Mattias Magnusson.
Re: LG N1T1 NAS
May 30, 2017 07:45AM
Hi Mattias,

I looked at the box of my N1T1TD1 but the CD originally included is not a Recovery CD. In the manual they write explicitly:
"Initialization CD is not provided. Please download LG Network Storage Installer ...."
But there is an old zipped recovery iso on LG's Dutch support page. At the bottom of this page you will find a "NT1 initialization program" as the next to last entry. (Thanks to Tantalus for the hint to the Dutch LG-page, see FAQ "Mein Update ist fehlgeschlagen, was kann ich tun?".) Please note that using the recovery disk will destroy the data on your NAS Box.
On Tantalus' page you will also find alternative custom firmwares for N1T1.

If instead you follow the instructions of this thread here you will get an up-to-date operating system - a bare linux with an up-to-date kernel and the option to install debian software packages. But this solution is near to hardware, e.g. soldering a serial cable. Furthermore you should gain an understanding of the boot loader (uboot).

I refer to the following postings:

Best regards
Bernd
Mattias Magnusson
Re: LG N1T1 NAS
May 30, 2017 01:54PM
Awesome! thanks for sharing this with me, i actually got it booted now, firmware upgrading everything right now, and i had lost everything anyway since my HDD died, luckily i got weekly backups on another ext hdd that i keep for safety. So after all firmware upgrades i will most likely just put everything back there again using pydio sync on my desktop :) thanks again!
Mattias Magnusson
Re: LG N1T1 NAS
May 31, 2017 10:05AM
So after a couple of firmware upgrades i installed the firmware 111223 just like any regular bin firmware upgrade, i did a backup and it was working fine, the first boot. After i restarted the N1T1 i found out that i don't have access to / on this server, so i figured something went wrong durring the upgrade, and i tried to reset it once more just to be sure that something was wrong. Yes it's not allowing me to access / on this server probably some apache issues regarding the interface on port 8000. well i inserted my disc that i had just burnt and figured i had to restart and NOT install firmware 111223. now im stuck, it happens absolutely nothing at all. the HDD led i blinking like christmas and it's been like this for that last 18 hours no web interface, no sounds at boot, no nothing.

Any idea whats wrong?

What happens in upgrade 111223 except the new interface?
Re: LG N1T1 NAS
June 01, 2017 07:46AM
Hi Mattias,

I never did this upgrade myself so I can only look at what others write about it.

According to LG's download page the update 111223 is an update of the uboot firmware (see "Uboot file (new_ui_uboot_update_111223.bin) for New User Interface update -N1T1" on the download page).
"uboot" is the device's boot loader and it is stored on your N1T1's mainboard, not on the harddisk.

Did you check your uboot version on the "[Log] -> [Self-diagnosis] page" after your upgrade as it is recommended in LG's readme N1T1(ew)_uboot.txt?

Anyhow, in case you have still a working uboot, you could get control of it by soldering a serial interface to your mainboard as described in this forum. Over this serial interface you can watch the boot process, look where it fails and even get a command line of uboot in order to get control of the boot process.
In case your uboot is broken, maybe you could flash it on a hardware level soldering even some other connections (JT...) to the mainboard, but this is beyond my knowledge.
Marcel
Re: LG N1T1 NAS
July 31, 2017 07:07PM
I dont mind giving you root access to my N2R1D which is based on the NC1 system
I have been looking at updating my nas and maybe get something else running like an up to date debian or Alpine Linux due to the lower requirements.
Josiah
Re: LG N1T1 NAS
September 25, 2017 02:57PM
Is there any possibility that this could be installed directly to the hard drive? The reason I ask is that I can't seem to get the NAS to initialize, even with the disk. I don't have a serial cable, and it would take me a few weeks to get one, but I do have a hard drive dock. Is it possible that I could write directly to the hard drive to bypass the need for a console cable?

Thanks in advance!
Re: LG N1T1 NAS
September 30, 2017 10:28AM
Josiah,

the interface and the numbers of the boot and root partitions are configured in uboot (see step 6 and 10 in Ron's mini howto). This configuration must match with the interface and partitioning of your hard drive where you want to boot from. Maybe you can make your hard drive match the existing configuration of your uboot loader by looking at your original harddrive, but in order to get actually control of the configuration and the bootloader, you should get the serial adapter. I got mine from Amazon in a few days.
Josiah
Re: LG N1T1 NAS
September 30, 2017 01:03PM
Alright, thanks bernd. I live outside of the US, so it takes a bit longer to get things in the mail (deliveries usually happen once a week), but I'll look into getting one. Thanks again.
Clark Leach
Re: LG N1T1 NAS
October 12, 2017 02:14PM
I created a CD from the "NT1 Initialization Program" mentioned above, inserted it, and rebooted the device while holding the BACK-UP button. The thing has been blinking the HDD and Network lights for hours now. I'm fairly confident in saying that this is a bad sign. I was given this N1T1DD1 and it seems like just the sort of device I need for sharing files on my network. It seemed to work fine - I could find it on my network and get the web interface up on my browser - but I was unable to login. This seemed like the fast way to reset it to factory settings and put it to use. Any suggestions as to what my next move might be? I'm no Linux wizard but also not incompetent...
Clark Leach
Re: LG N1T1 NAS
October 13, 2017 03:05PM
Trying the NT1 Initialization apparently did nothing; the thing still boots and seems to run. The web interface is accessible but I can't log on.

So, I connected my FTDI TTL-232R-3V3 as directed (I think) but I'm seeing nothing on my terminal when I restart the N1T1 (except one unprintable character, most likely garbage created on power-up). The four pins on the N1T1 main board are connected, starting at the end nearest the power jack, as follows: N/C, RXD (YLW), TXD (ORG), GND (BLK).

Any thoughts on troubleshooting this?
Re: LG N1T1 NAS
October 13, 2017 06:07PM
Try swapping RxD and TxD.
Sk9
Re: LG N1T1 NAS
October 14, 2017 11:09AM
@Clark Leach

If you use the latest u-boot version from LG then the old Initialization Program won't work. For the latest u-boot version you have to use N1T1_eng.zip instead.

The procedure to factory reset the N1T1DD1 with the latest u-boot is:

1. Press the backup button and power button at the same time. This will boot to recovery mode.
2. Open the the program in the zip folder and proceed with factory reset. NOTE: the zip file includes an old firmware, you can replace it with a newer firmware if you want. But dont forget to edit the textfile with the name of the firmware.
Josiah
Re: LG N1T1 NAS
November 06, 2017 07:10PM
When I try to reset it with the LGNAS Detector, it hangs at "Transferring firmware files." Any suggestions on how to move forward?
Re: LG N1T1 NAS
November 15, 2017 01:14PM
I have a LG N1D1DD1 and have tried this...

EDIT
Now I read in https://forum.doozan.com/read.php?2,12096 that "Note: all steps below must be done while logging in as root user (not sudo). If you are not the root user then don't continue, because the rootfs will not work.". This I have not done when I worked on Ubuntu. Could that be the problem?


EDIT2
Yes, that was it. But see next post...



Edited 10 time(s). Last edit at 11/16/2017 12:10PM by raffe.
Re: LG N1T1 NAS
November 15, 2017 04:05PM
raffe,

> Now I read in
> https://forum.doozan.com/read.php?2,12096 that
> "Note: all steps below must be done while logging
> in as root user (not sudo). If you are not the
> root user then don't continue, because the rootfs
> will not work.". This I have not done when I
> worked on Ubuntu. Could that be the problem?

Yes, there will be quite many problems with permission if you are not root when tarring the rootfs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 11/15/2017 04:07PM by bodhi.
Re: LG N1T1 NAS
November 16, 2017 12:09PM
OK, almost there, but near the goal... nothing. What I have done this time

I have a LG N1D1DD1

I read
Ron's mini howto: http://forum.doozan.com/read.php?2,26671,30371#msg-30371
bernd's additions: http://forum.doozan.com/read.php?2,26671,30643#msg-30643

I should use Bodhi's latest kernel from: http://forum.doozan.com/read.php?2,12096,12096#msg-12096

So I did this:
I soldered cables as in the picture in this post: https://forum.doozan.com/read.php?2,26671,30316#msg-30316

I could use a CP2102 or a PL-2303 or a FT232 USB to serial adapter, but in the end I bought the little more expensive FT232I (~$10) as I could get it directly (this one https://www.kjell.com/no/produkter/elektro-og-verktoy/arduino/moduler/luxorparts-usb-til-seriell-adapter-for-arduino-p90738 ).

========================
=== 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. I read in https://forum.doozan.com/read.php?2,12096 that say
"Note: all steps below must be done while logging in as root user (not sudo). If you are not the root user then don't continue, because the rootfs will not work."

I read https://askubuntu.com/questions/44418/how-to-enable-root-login and on my Ubuntu I do this
sudo passwd root
sudo passwd -u root

(I am not doing pkexec users-admin yet, I will first try if sudo -i works)...

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
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. The mini howto say I should now replace uImage, So I download https://drive.google.com/file/d/0B-uU4xdcKTB6dUFEeXFwdFVYWU0/view?usp=sharing with Firefox and then
cd ~/stuff
mv ../Downloads/uImage .


7. Copy uImage to USB
cd ~/stuff
mv /media/superuser/rootfs/boot/uImage uImageOLD
cp uImage /media/superuser/rootfs/boot/


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 adapter 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. 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


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


15. On LG. I set 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)


16. On LG. I try to boot the kernel
bootm 0x800000


17. After some stuff it says
...
...
[ 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...
1199 (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.
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
1198 (klogd)
. ok 
[ ok ] Running local boot scripts (/etc/rc.local).

Debian GNU/Linux 9 debian ttyS0

debian login:


18. On LG. I try to login with root/root and I get
debian login: root
Password: 
Linux debian 4.4.0-n1t1-tld-1 #1 PREEMPT Tue Mar 15 14:10:10 CET 2016 armv5tel

The programs included with the Debian GNU/Linux system are free software;
the exact distribution terms for each program are described in the
individual files in /usr/share/doc/*/copyright.

Debian GNU/Linux comes with ABSOLUTELY NO WARRANTY, to the extent
permitted by applicable law.

19. On LG. I start with checking my IP number with ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
inet 192.168.0.77  netmask 255.255.255.0  broadcast 192.168.222.255


20. Now I should upgrade the kernel to latest and ditch the custom uImage... Copy the kernel archive to the NAS. Ron used SCP to put it in /root, so I check https://kb.iu.edu/d/agye. One example is
scp ~/rebels.txt dvader@deathstar.com:~/revenge
Maybe I will try
scp ~/stuff/linux-4.13.5-kirkwood-tld-1-bodhi.tar.bz2 root@192.168.0.77:/root

21. On Ubuntu. I download the kernel again (did'nt find it, maybe I deleted it by mistake)
wget https://bitly.com/2yTkIaH
mv 2yTkIaH linux-4.13.5-kirkwood-tld-1-bodhi.tar.bz2


22. On Ubuntu I try to copy the kernel to LG
scp ~/stuff/linux-4.13.5-kirkwood-tld-1-bodhi.tar.bz2 root@192.168.0.77:/root

It seem to work well (after I answer 'yes'), it says
The authenticity of host '192.168.0.77 (192.168.0.77)' can't be established.
ECDSA key fingerprint is SHA256:X3OIRMgyzDLUVNcgHsfQK4eE+kAVMZ8JVkVPp2RLSH4.
Are you sure you want to continue connecting (yes/no)? yes
Warning: Permanently added '192.168.0.77' (ECDSA) to the list of known hosts.
root@192.168.0.77's password: 
linux-4.13.5-kirkwood-tld-1-bodhi.tar.bz2     100%   30MB   1.5MB/s   00:20


23. On LG. Extract the files
cd /root
tar jxvf linux-4.13.5-kirkwood-tld-1-bodhi.tar.bz2
tar xvf linux-dtb-4.13.5-kirkwood-tld-1.tar


24. On LG. Install the kernel (this will take some time)
dpkg -i linux-image-4.13.5-kirkwood-tld-1_1.0_armel.deb


25. On LG. Ron say: "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.13.5-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.13.5-kirkwood-tld-1 -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.13.5-kirkwood-tld-1 -d initrd.img-4.13.5-kirkwood-tld-1 uInitrd


26. On LG. Ron say: "Now there should be two u-boot images in the /boot directory. Sync and 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.)"
sync
reboot


27, On LG. As Ron say 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.

28. On LG. Ron say "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).". So I run
usb start
ext2load usb 0:1 0x800000 /boot/uImage

It says
LGE-NAS>> ext2load usb 0:1 0x800000 /boot/uImage
....
.

3860410 bytes read


29. On LG. Ron say "Load uInitrd too:"
ext2load usb 0:1 0x1100000 /boot/uInitrd

It says
...
.
7732059 bytes read


30. On LG. Ron say "These are the previously set arguments, set console and bootargs_usb if you didn't save them, e.g setenv bootargs $(console) $(bootargs_usb)". I do it old style
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)


31. On LG. Ron say "Cross fingers, boot (notice the uInitrd RAM address at the end): bootm 0x800000 0x1100000". I run this (and wait, and wait...)
bootm 0x800000 0x1100000


It says
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 = f66af729
hdr->ih_time = 88ca0d5a, hdr->ih_size = 003ae77a
hdr->ih_load = 00800000, hdr->ih_ep = 00800000
hdr->ih_dcrc = e23a0718
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 02, hdr->ih_comp = 00
hdr->ih_name = Linux-4.13.5-kirkwood-tld-1

   Image Name:   Linux-4.13.5-kirkwood-tld-1
   Created:      2017-11-16  17:27:36 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3860346 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 = e747bdca
hdr->ih_time = 23cb0d5a, hdr->ih_size = 0075fb1b
hdr->ih_load = 00000000, hdr->ih_ep = 00000000
hdr->ih_dcrc = 1403cfb0
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 03, hdr->ih_comp = 01
hdr->ih_name = initramfs-4.13.5-kirkwood-tld-1

   Image Name:   initramfs-4.13.5-kirkwood-tld-1
   Created:      2017-11-16  17:30:11 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7731995 Bytes =  7.4 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

And nothing more, it stops there for ever.

Any ideas?

It could be something about this
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -n Linux-4.13.5-kirkwood-tld-1 -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.13.5-kirkwood-tld-1 -d initrd.img-4.13.5-kirkwood-tld-1 uInitrd

Are Linux-4.13.5-kirkwood-tld-1 and initramfs-4.13.5-kirkwood-tld-1 real files that I can confirm? I don't think I have seen them...



Edited 1 time(s). Last edit at 11/16/2017 12:15PM by raffe.
Re: LG N1T1 NAS
November 16, 2017 03:59PM
raffe Wrote:
-------------------------------------------------------
> Are Linux-4.13.5-kirkwood-tld-1 and initramfs-4.13.5-kirkwood-tld-1 real files that I
> can confirm? I don't think I have seen them...

Those aren't files; they're names given to the created images. Check out mkimage usage info.
Re: LG N1T1 NAS
November 16, 2017 05:13PM
raffe,

Replace these steps with commands

28.

printenv
usb start
ext2load usb 0:1 0x800000 /boot/uImage


29.

ext2load usb 0:1 0x2100000 /boot/uInitrd



30.

setenv console 'console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)'
setenv bootargs_usb 'root=/dev/sda1 rootdelay=10 earlyprintk=serial'
setenv bootargs '$(console) $(bootargs_usb)'



31.

bootm 0x800000 0x2100000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 11/17/2017 05:56AM by bodhi.
Re: LG N1T1 NAS
November 17, 2017 04:03AM
Thank you bodhi!

I tried your suggestions (without changing or doing anything else), but it still stops after it tries boot the kernel
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
LGE-NAS>> ext2load usb 0:1 0x800000 /boot/uImage
....
.
3860410 bytes read
LGE-NAS>> ext2load usb 0:1 0x2100000 /boot/uInitrd
...
.
7732059 bytes read
LGE-NAS>> setenv console 'console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)'
LGE-NAS>> setenv bootargs_usb 'root=/dev/sda1 rootdelay=10 earlyprintk=serial'
LGE-NAS>> setenv bootargs '$(console) $(bootargs_usb)'
LGE-NAS>> bootm 0x800000 0x2100000
## Booting image at 00800000 ..., header_size = 00000040, header_addr = 0068dcdc
image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = f66af729
hdr->ih_time = 88ca0d5a, hdr->ih_size = 003ae77a
hdr->ih_load = 00800000, hdr->ih_ep = 00800000
hdr->ih_dcrc = e23a0718
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 02, hdr->ih_comp = 00
hdr->ih_name = Linux-4.13.5-kirkwood-tld-1

   Image Name:   Linux-4.13.5-kirkwood-tld-1
   Created:      2017-11-16  17:27:36 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3860346 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000, header_addr = 0068dcdc, header_size = 00000040 ...
RAMdisk image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = e747bdca
hdr->ih_time = 23cb0d5a, hdr->ih_size = 0075fb1b
hdr->ih_load = 00000000, hdr->ih_ep = 00000000
hdr->ih_dcrc = 1403cfb0
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 03, hdr->ih_comp = 01
hdr->ih_name = initramfs-4.13.5-kirkwood-tld-1

   Image Name:   initramfs-4.13.5-kirkwood-tld-1
   Created:      2017-11-16  17:30:11 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7731995 Bytes =  7.4 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Re: LG N1T1 NAS
November 17, 2017 06:01AM
raffe,

I changed step 28 above to list the envs.

I think your envs are not set up to boot with mainline Linux ketnel yet (ron used a special version).

So more envs changes is most likely needed to boot with my kernel. Let's see what they are.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: LG N1T1 NAS
November 17, 2017 08:51AM
OK, I got 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; 
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
mainlineLinux=no
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

Environment size: 2366/4092 bytes

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
LGE-NAS>> ext2load usb 0:1 0x800000 /boot/uImage
....
.
3860410 bytes read
LGE-NAS>> ext2load usb 0:1 0x2100000 /boot/uInitrd
...
.
7732059 bytes read
LGE-NAS>> setenv console 'console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)'
LGE-NAS>> setenv bootargs_usb 'root=/dev/sda1 rootdelay=10 earlyprintk=serial'
LGE-NAS>> setenv 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
mainlineLinux=no
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
filesize=75FB5B
console=console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)
bootargs_usb=root=/dev/sda1 rootdelay=10 earlyprintk=serial
bootargs=$(console) $(bootargs_usb)

Environment size: 2434/4092 bytes

LGE-NAS>> bootm 0x800000 0x2100000
## Booting image at 00800000 ..., header_size = 00000040, header_addr = 0068dcdc
image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = f66af729
hdr->ih_time = 88ca0d5a, hdr->ih_size = 003ae77a
hdr->ih_load = 00800000, hdr->ih_ep = 00800000
hdr->ih_dcrc = e23a0718
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 02, hdr->ih_comp = 00
hdr->ih_name = Linux-4.13.5-kirkwood-tld-1

   Image Name:   Linux-4.13.5-kirkwood-tld-1
   Created:      2017-11-16  17:27:36 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3860346 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000, header_addr = 0068dcdc, header_size = 00000040 ...
RAMdisk image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = e747bdca
hdr->ih_time = 23cb0d5a, hdr->ih_size = 0075fb1b
hdr->ih_load = 00000000, hdr->ih_ep = 00000000
hdr->ih_dcrc = 1403cfb0
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 03, hdr->ih_comp = 01
hdr->ih_name = initramfs-4.13.5-kirkwood-tld-1

   Image Name:   initramfs-4.13.5-kirkwood-tld-1
   Created:      2017-11-16  17:30:11 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7731995 Bytes =  7.4 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Re: LG N1T1 NAS
November 17, 2017 03:56PM
This env needs change:
mainlineLinux=no

to
mainlineLinux=yes

There might be other variables (I need to look at ron's post again), but try this one first, in addition to the envs I posted above.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: LG N1T1 NAS
November 18, 2017 01:09AM
I have tried with mainlineLinux=yes but the LG is still stubborn and stops with "Uncompressing Linux... done, booting the kernel."

I tried it like this (note that I've changed the numbering)


28. On LG.
printenv
I get
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
mainlineLinux=no
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

Environment size: 2366/4092 bytes


29. Then I do
usb start
ext2load usb 0:1 0x800000 /boot/uImage


I get
GE-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
LGE-NAS>> ext2load usb 0:1 0x800000 /boot/uImage
....
.
3860410 bytes read



30. On LG.
ext2load usb 0:1 0x2100000 /boot/uInitrd


It says
...
.
7732059 bytes read



31. On LG.
setenv console 'console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)'
setenv bootargs_usb 'root=/dev/sda1 rootdelay=10 earlyprintk=serial'
setenv bootargs '$(console) $(bootargs_usb)'
setenv mainlineLinux yes
printenv


I get
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
filesize=75FB5B
console=console=ttyS0,115200 mtdparts=spi_flash:0x78000@0(uboot),0x1000@0x78000(env)
bootargs_usb=root=/dev/sda1 rootdelay=10 earlyprintk=serial
bootargs=$(console) $(bootargs_usb)
mainlineLinux=yes

Environment size: 2435/4092 bytes


32. On LG.
bootm 0x800000 0x2100000


It say
LGE-NAS>> bootm 0x800000 0x2100000
## Booting image at 00800000 ..., header_size = 00000040, header_addr = 0068dcdc
image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = f66af729
hdr->ih_time = 88ca0d5a, hdr->ih_size = 003ae77a
hdr->ih_load = 00800000, hdr->ih_ep = 00800000
hdr->ih_dcrc = e23a0718
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 02, hdr->ih_comp = 00
hdr->ih_name = Linux-4.13.5-kirkwood-tld-1

   Image Name:   Linux-4.13.5-kirkwood-tld-1
   Created:      2017-11-16  17:27:36 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3860346 Bytes =  3.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 02100000, header_addr = 0068dcdc, header_size = 00000040 ...
RAMdisk image_header_t hdr contents
hdr->ih_magic = 56190527, hdr->ih_hcrc = e747bdca
hdr->ih_time = 23cb0d5a, hdr->ih_size = 0075fb1b
hdr->ih_load = 00000000, hdr->ih_ep = 00000000
hdr->ih_dcrc = 1403cfb0
hdr->ih_os = 05, hdr->ih_arch = 02
hdr->ih_type = 03, hdr->ih_comp = 01
hdr->ih_name = initramfs-4.13.5-kirkwood-tld-1

   Image Name:   initramfs-4.13.5-kirkwood-tld-1
   Created:      2017-11-16  17:30:11 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7731995 Bytes =  7.4 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Re: LG N1T1 NAS
November 18, 2017 01:58AM
raffe,

> Starting kernel ...
>
> Uncompressing Linux... done, booting the kernel.

The fact that it stuck here, most likely we have to try the stock load addresses. Let me take a look again.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: LG N1T1 NAS
November 18, 2017 12:28PM
Btw, I just went to bodhi's corner ( https://mibodhi.blogspot.com/ ). So I have now "bought you a beer :)" for €50. Respect and thumbs up for advertising Doctors Without Borders/Médecins Sans Frontières (MSF) this way!
Re: LG N1T1 NAS
November 18, 2017 04:13PM
raffe,

Much appreciated :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: LG N1T1 NAS
November 18, 2017 04:45PM
raffe,

Looking back at ron's post:

https://forum.doozan.com/read.php?2,26671,30371#msg-30371

ext2load usb 0:1 0x800000 /boot/uImage
  ext2load usb 0:1 0x1100000 /boot/uInitrd
  setenv bootargs $(console) $(bootargs_usb)
  bootm 0x800000 0x1100000  
......
......

  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

The above steps to run the new rootfs is pretty standard, using the same load addresses that we have always been using. So the fact that it stuck at loading kernel:

Quote

Uncompressing Linux... done, booting the kernel.

And even when we set earlyprintk, it did not print out anything.

Quote

bootargs_usb=root=/dev/sda1 rootdelay=10 earlyprintk=serial

I think you uImage might have problem. Let me suggest simpler steps in the next post, to see if it will work.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)



Edited 1 time(s). Last edit at 11/18/2017 04:45PM by bodhi.
Re: LG N1T1 NAS
November 18, 2017 05:08PM
raffe,

We are going to boot with the released rootfs as is. ron's DTB is already in this rootfs. That should be really all you need to boot this box.

Login to your Ubuntu as root user. You have downloaded the rootfs tarball Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

You can proceed and recreate the rootfs using another USB thumb drive, or reuse the one you have. Remember you should have only a single Ext3 partition.


Quote
https://forum.doozan.com/read.php?2,12096

Updated 24 Jul 2017:

Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:

- tarball size: 188M
- install size: 488M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root

Download at Dropbox:

Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2

md5:
bf3d29569943875df348fb5ca03b348c
sha256:
4ed5714fdb123cdb40e973f3d0754e91cd199b75a9874018f2b5dc9cfa8ae8bb

And remember to check the hash of what you download, as always.

Installation:

Installation can be done on any Linux box, with a fresh USB drive (SD card or HDD would work fine too).

Note: all steps below must be done while logging in as root user (not sudo). If you are not the root user then don't continue, because the rootfs will not work.

1. Format a new USB drive with a single Ext3 partition, and label it rootfs. If you are running the latest U-Boot for Kirkwood then you can use Ext4.

2. Mount the drive on a Linux box. cd to top level directory and extract it. It is assuming the USB drive is mounted at /media/sdb1
cd /media/sdb1 
tar -xjf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2


3. Adjust fstab (optional).

Edit /media/sdb1/etc/fstab entry for root device to match the rootfstype of your rootfstype if you use Ext4 or Ext2. However, you can keep it as is without problem in booting since the kernel will figure out which file system the rootfs was formatted.

LABEL=rootfs    /               ext3    noatime,errors=remount-ro 0 1


4. Create uImage with embedded DTB for booting with older u-boots (2012 or earlier). Skip this step if you have installed the latest U-Boot for Kirkwood (or are installing this u-boot at the same time).

Please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box (see the folder /media/sdb1/boot/dts for the exact spelling of your Kirkwood box name).

Generate the uImage with DTB embedded inside:
cd /media/sdb1/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
sync


If your Linux box does not have mkimage, then install it

apt-get install u-boot-tools


5. Done. Take this USB rootfs to your plug and cold start. After booted into Debian, see Note1 and Note2 below. It is very important that you do Note1 steps to secure your box

Now take this USB rootfs to your LG and power up. Interrupt serial console and run the revised commands:

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
usb start
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 (buy bodhi a beer)



Edited 2 time(s). Last edit at 11/18/2017 08:53PM 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: