Welcome! Log In Create A New Profile

Advanced

NSA320 u-boot installation problem 1

Posted by herb 
NSA320 u-boot installation problem 1
June 27, 2018 03:31PM
I'm trying to update a couple of NSA320 servers and find that the "environlent" files give me errors when it try to un-tar them.
Are the default environment (without specific entries ethaddr etc.) available in the u-boot image that can be modified and then saved via serial command??

Herb



Edited 1 time(s). Last edit at 06/28/2018 02:47PM by bodhi.
NSA320 u-boot installation problem
June 28, 2018 09:47AM
I'm trying to updatemy NSA320's to this latest u-boot.
I have flashed the uboot image BUT i cannot find a environment file to flash.
The best (?) choice would be "uboot.2016.05-tld1" but I get this when I try to ubtar it.

/tmp# tar -xf uboot.2016.05-tld-1.environment.bodhi.tar
tar: This does not look like a tar archive
tar: Skipping to next header
tar: Exiting with failure status due to previous errors

Is there a way to get a environment.image that works with uboot 2017.07???

Herb



Edited 1 time(s). Last edit at 06/28/2018 02:46PM by bodhi.
Re: NSA320 u-boot installation problem
June 28, 2018 02:50PM
herb,

uboot.2016.05-tld-1.environment.bodhi.tar Is the latest u-boot env image. It should work fine.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA320 u-boot installation problem
June 28, 2018 02:58PM
Quote

Is there some mismatch with tar on my NSA320 or tar on my laptop running Linux Mint Mate 18.3???

All Linux system tar works the same way. Redownload the tarball and try again.

-bodhi
===========================
Forum Wiki
bodhi's corner
Re: NSA320 u-boot installation problem 1
June 29, 2018 04:45PM
Thanks Bodhi.
It seems I did an update on my laptop and now the latest Firefox (60) does not do things like the previous one did.
I'm going to have to be careful because I have a number of files that DO NOT match their MD5sums!

Herb
Re: NSA320 u-boot installation problem 2
June 29, 2018 05:14PM
Bodhi, I got my NSA320 uboot updated but I think i did not do something quite right.
I left my rootfs unchanged except for labelling my sda1 as rootfs.
There are 3 partitions on this drive as follows:
sda1 for boot and rootfs
sda2 swap
sda3 is just a filesystem for backups

When I boot from this drive I get a kernel panic.

Is there something I did that caused this? Any suggestions?

Herb
Attachments:
open | download - bootfaillog.txt (14.2 KB)
open | download - printenv.txt (2.7 KB)
Re: NSA320 u-boot installation problem 2
June 29, 2018 05:32PM
herb,

> When I boot from this drive I get a kernel panic.
>
> Is there something I did that caused this? Any
> suggestions?

Yes. The rootfs you have created or reused has the DTB embedded inside uImage. That has intefered with the DTB loaded by the new u-boot.

Quote

4a. Boot with DTB file (standard way to boot FDT kernel). Recommended.

- Generate the uImage and uInitrd (the kernel files vmlinuz-4.17.2-kirkwood-tld-1 and initramfs-4.17.2-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.17.2-kirkwood-tld-1 -d vmlinuz-4.17.2-kirkwood-tld-1 uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.17.2-kirkwood-tld-1 -d initrd.img-4.17.2-kirkwood-tld-1 uInitrd

- Set U-Boot envs for booting. The u-boot envs below are for 1st time upgrading, you don't need to do this step if you've installed the latest U-Boot for Kirkwood. Or you are upgrading from my previous released kernel. Just make sure the DTB file is the correct one for your box, replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

fw_setenv load_dtb 'ext2load usb 0:1 0x1c00000 /boot/dts/kirkwood-goflexnet.dtb'
fw_setenv load_initrd 'ext2load usb 0:1 0x1100000 /boot/uInitrd'
fw_setenv load_uimage 'ext2load usb 0:1 0x800000 /boot/uImage'
fw_setenv usb_boot 'run load_dtb; run load_uimage; if run load_initrd; then bootm 0x800000 0x1100000 0x1c00000; else bootm 0x800000 - 0x1c00000; fi'


4b. Boot with DTB file embedded in the kernel image (no U-Boot envs changes are needed if your system already booting on USB or HDD)

Again, please replace kirkwood-goflexnet.dtb below with the correct DTB name for your box.

Generate the uImage and uInitrd (the kernel files vmlinuz-4.17.2-kirkwood-tld-1 and initramfs-4.17.2-kirkwood-tld-1 were generated by dpkg in Step 3):
cd /boot
mv uImage uImage.orig
cp -a zImage-4.17.2-kirkwood-tld-1 zImage.fdt
cat dts/kirkwood-goflexnet.dtb >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.17.2-kirkwood-tld-1 -d zImage.fdt uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.17.2-kirkwood-tld-1 -d initrd.img-4.17.2-kirkwood-tld-1 uInitrd

So you need to reverse that 4b step by restoring the original uImage:
cp -a uImage.orig uImage

Usually by mouting this drive on another Linux box. But since you have serial console, you could do this to avoid having to take the HDD out:

Power up, interrupt serial console and clear this env temporarily.

setenv dtb_file
boot
After it booted into Debian,

cd /boot
cp -a uImage.orig uImage
sync
and reboot.

-bodhi
===========================
Forum Wiki
bodhi's corner
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: