Welcome! Log In Create A New Profile

Advanced

[SOLVED] NSA325 v2, new uBoot succesfully flashed, now can't boot any os

Posted by Amro 
[SOLVED] NSA325 v2, new uBoot succesfully flashed, now can't boot any os
February 19, 2015 02:41PM
I was running Debian on my NSA325 v2 for a few days and then decided to flash the new uBoot for NSA325. I did that successfully after a few good UART boots with a serial cable. After flashing the new uboot, I wasn't able to boot any os anymore and after fiddling with it for 10 hours today, I'm starting to get frustrated. I'm pretty sure that the problem is with my environments.

printenv gives this:

arcNumber=4495
baudrate=115200
bootargs=$(bootargs_linux)
bootargs_stock=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/nfs rw init=/init
bootargs_linux=console=ttyS0,115200 mtdparts=nand_mtd:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=LABEL=rootfs loglevel=8
bootcmd='run bootcmd_linux
bootcmd_linux=setenv bootargs $(bootargs_linux); mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 $(loadaddr) /uImage; ext2load usb 0:1 0x01100000 /uInitrd; bootm $(loadaddr) 0x01100000 
bootcmd_stock=setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)
bootdelay=5
ethact=egiga0
ethaddr=xx:xx:xx:xx:xx:xx
filesiza=5d4c1f
mainlineLinux=yes
stderr=serial
stdin=serial
stdout=serial

I'm trying to boot Debian from USB
bootm $loadaddr 0x1100000 gives:
## Booting kernel from Legacy Image at 01100000 ...
Image Name: initramfs-3.17.0-kirkwood-tld-1
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size 6114271 Bytes = 5.8 MiB
Load Address: 00000000
Entry Point: 00000000
Verifying Checksum ... OK
Wrong Image Type for bootm command
Error occured, error code = 5
ERROR: can't get kernel image!

I have two partitions on my USB-stick, one is a 100MB that is labeled boot and flagged as bootable, the other partition is labeled rootfs.



Edited 1 time(s). Last edit at 02/19/2015 06:09PM by Amro.
Re: NSA325 v2, new uBoot succesfully flashed, now can't boot any os
February 19, 2015 03:57PM
Amro,

I guess you were playing with the envs and has unintentionally removed the loadaddr! It has nothign to do with the USB /boot or rootfs.

Boot, interrupt serial console/netconsole and

setenv loadaddr 0x800000

And then
boot

And this is wrong (extra quote), setenv needs quotes to include space. But when you list the envs, there should be no quote.

bootcmd='run bootcmd_linux
should be
bootcmd=run bootcmd_linux

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



Edited 1 time(s). Last edit at 02/19/2015 04:02PM by bodhi.
Re: NSA325 v2, new uBoot succesfully flashed, now can't boot any os
February 19, 2015 04:33PM
Thanks for the answer bodhi!

Still not booting though. This is what I am getting now:
NSA325> boot
(Re)start USB...
USB0:   USB EHCI 1.00
scanning bus 0 for devices... 3 USB Device(s) found
       scanning usb for storage devices... 1 Storage Device(s) found
2822232 bytes read in 339 ms (7.9 MiB/s)
6114335 bytes read in 594 ms (9.8 MiB/s)
bootm - boot application image from memory

Usage:
bootm [addr [arg ...]]
    - boot application image stored in memory
        passing arguments 'arg ...'; when booting a Linux kernel,
        'arg' can be the address of an initrd image
        When booting a Linux kernel which requires a flat device-tree
        a third argument is required which is the address of the
        device-tree blob. To boot that kernel without an initrd image,
        use a '-' for the second argument. If you do not pass a third
        a bd_info struct will be passed instead

Sub-commands to do part of the bootm sequence.  The sub-commands must be
issued in the order below (it's ok to not issue all sub-commands):
        start [addr [arg ...]]
        loados  - load OS image
        ramdisk - relocate initrd, set env initrd_start/initrd_end
        fdt     - relocate flat device tree
        cmdline - OS specific command line processing/setup
        bdt     - OS specific bd_t processing
        prep    - OS specific prep before relocation or go
        go      - start OS
Re: NSA325 v2, new uBoot succesfully flashed, now can't boot any os
February 19, 2015 04:42PM
Amro,

Change your bootm
bootcmd_linux=setenv bootargs ${bootargs_linux}; mw.l f1010100 0020c000; usb reset; ext2load usb 0:1 ${loadaddr} /uImage; ext2load usb 0:1 0x01100000 /uInitrd; bootm ${loadaddr} 0x01100000

I forgot that with the new u-boot, you should change all $(var) to ${var} format. So change all your envs, but do one at the time. boot completly into Debian after each change to avoid mistakes.

And pls list all envs here if you still have problem.

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



Edited 1 time(s). Last edit at 02/19/2015 04:44PM by bodhi.
Re: NSA325 v2, new uBoot succesfully flashed, now can't boot any os
February 19, 2015 06:08PM
You helped me get on the right track. Had to mess with the envs a bit more to get it to work with 3.18 FDT. Now it's working perfectly. Thank you very much for the help!
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: