NSA320 Arch Linux Install Failure

This forum is for topics dealing with problems with software specifically in the ARMv5 repo.

Re: NSA320 Arch Linux Install Failure

Postby summers » Fri May 18, 2018 12:22 pm

Guess what is worth adding from the nsa320 installer
http://de4.mirror.archlinuxarm.org/os/nsa3x0/nsa320-alarm.tar.gz
The file usb_key_fun.sh.2 sents the env vaiables up as:
$this->bbcode_second_pass_code('', 'fw_setenv arcNumber 3956
fw_setenv mainlineLinux yes
fw_setenv 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'
fw_setenv 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=/dev/sda2 rw rootwait loglevel=8'
fw_setenv bootcmd_linux 'setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)'
fw_setenv bootcmd_stock 'setenv bootargs $(bootargs_stock); nand read.e $(loadaddr) $(kernel_addr) 0xA00000; bootm $(loadadr)'
fw_setenv to_stock "setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset"
fw_setenv to_linux "setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux\'; saveenv; reset"
')
The important bit is how linux is booted:
$this->bbcode_second_pass_code('', 'setenv bootargs $(bootargs_linux); ide reset; ext2load ide 0:1 $(loadaddr) /uImage; bootm $(loadaddr)')
So it just boots the old uImage with no device tree. So guess that has to be worth trying ...
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: NSA320 Arch Linux Install Failure

Postby artical » Fri May 18, 2018 5:10 pm

Hi Summers,

i did manage to update the uboot when i first started this little project, it is loading U-Boot 2017.07-tld-1 at start up.

I have now cleaned up the env variables a little as there seemed to be a lot of redundent code in there, i have applied the change to the bootarg you suggested, so the printenv now reports:
$this->bbcode_second_pass_code('', 'NSA320> printenv
arcNumber=3956
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa320.dtb
ethact=egiga0
ethaddr=00:19:CB:00:51:81
if_netconsole=ping $serverip
ipaddr=192.168.0.231
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file
load_dtb_addr=0x1c00000
load_uimage=echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage
load_uimage_addr=0x800000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start"; setenv scan_ide "ide reset"; setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=console=ttyS0,115200 root=0b5f2054-5dcc-4689-8efb-4d71559c3b5a rootdelay=10 $mtdparts $custom_params
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start"; setenv init_ide "ide reset"; setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read; fi; else if $devtype part $disknum; then run uenv_read; fi; fi
usb_ready_retry=15
')

the boot sequence report as follows:
$this->bbcode_second_pass_code('', 'U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:46:11 -0700)
ZyXEL NSA320 2-Bay Power Media Server

SoC: Kirkwood 88F6281_A1
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: WDC WD30EZRX-00DC0B0 Firm: 80.00A80 Ser#: WD-WCC1T1717336
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

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

Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000800 0x003e87ff "boot"
attrs: 0x0000000000000000
type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
type: system
guid: 1b7a8422-68ee-4442-abb7-b929228ea916
2 0x003e8800 0x15d509fff "rootfs"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
type: linux
guid: 0ea686f1-1c93-4279-9001-874ba5994b21
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: WDC WD30EZRX-00DC0B0 Firm: 80.00A80 Ser#: WD-WCC1T1717336
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
device ide 0:1
1 bytes read in 30 ms (0 Bytes/s)
Found bootable drive on ide 0
loading uImage ...
4600064 bytes read in 785 ms (5.6 MiB/s)
## Error: "load_initrd" not defined
loading DTB /boot/dts/kirkwood-nsa320.dtb ...
13175 bytes read in 16 ms (803.7 KiB/s)
## Booting kernel from Legacy Image at 00800000 ...
Image Name: Linux-4.4.97-1-ARCH
Created: 2017-11-11 4:51:55 UTC
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4600000 Bytes = 4.4 MiB
Load Address: 00008000
Entry Point: 00008000
Verifying Checksum ... OK
## Flattened Device Tree blob at 01c00000
Booting using the fdt blob at 0x1c00000
Loading Kernel Image ... OK
Loading Device Tree to 0fff9000, end 0ffff376 ... OK

Starting kernel ...
')

So with the latest uboot installed, do you still think i need to updates you suggested in your last post?
artical
 
Posts: 10
Joined: Sat Apr 14, 2018 3:13 pm

Re: NSA320 Arch Linux Install Failure

Postby summers » Sun May 20, 2018 11:31 am

Am at home now, and have half an hour to spare.

Whats unusual about your set up, is clearly you have had other operating systems running on the device. Your uboot env variables are very different than standard arm arch, and you managed to update uboot.

Anyway with modern uboot, yours is more modern than mainline arm arch. So with yours we should be able to do everything we need to do. Problem we have with your set up, is after kernel is loaded we get no output - so can't see what is failing.

Now this has to be in part because bootargs isn't being set correctly. Before we enter the kernel we want this sent to the command line so for you:
$this->bbcode_second_pass_code('', 'setenv bootargs 'console=ttyS0,115200 root=0b5f2054-5dcc-4689-8efb-4d71559c3b5a rootdelay=10 $mtdparts $custom_params'')
Now your code tries to set bootargs via the command
$this->bbcode_second_pass_code('', 'run set_bootargs')
and this runs
$this->bbcode_second_pass_code('', 'console=ttyS0,115200 root=0b5f2054-5dcc-4689-8efb-4d71559c3b5a rootdelay=10 $mtdparts $custom_params')
and that doesn't set bootargs, so you'll either need to set bootargs (as avove) or modify this code so it sets the bootargs variable. so something like
$this->bbcode_second_pass_code('', 'setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=0b5f2054-5dcc-4689-8efb-4d71559c3b5a rootdelay=10 $mtdparts $custom_params'')
can't be sure of that code, as I'm not trying it.

Now you can read you HDD, that is clear. So I'd find out what the current partitions are you may have a /boot partion, and also a root partition. The root partition may well have a /boot directory. We want to see whats in those directories - so we know what we can load. So anyway use commands like
$this->bbcode_second_pass_code('', 'ext4ls ide 0:1 /
ext4ls ide 0:1 /boot
ext4ls ide 0:2 /')
Get some idea of where your boots files are located.

Now on 2016 arm arch uboot, the load addresses for various bits are:
$this->bbcode_second_pass_code('', 'loadaddr=0x810000
fdtaddr=0x800000
rdaddr=0x1100000')
You are using:
$this->bbcode_second_pass_code('', 'load_uimage_addr=0x800000
load_dtb_addr=0x1c00000
')
So clearly your address are slightly different than arm arch uses. This may or may not cause a problem. Usually uboot works in the lowmem area, so we only get access to certain parts of memory. I've not looked into what these kirkwood devices need.

Now to boot, you have access to a uImage, do you have access to a zImage?

If zImage (arch default for dt and more modern uboot) then after loading the images into memory at your chosen locations, you would use a command like:
$this->bbcode_second_pass_code('', 'bootz ${loadaddr} ${rdaddr} ${fdtaddr}')
If a uImage then use a command like:
$this->bbcode_second_pass_code('', 'bootm ${loadaddr} ${rdaddr}')
I don't know if you can give a 3rd argument of the device tree address with bootm ...

Now this should be enough to point you in a useful direction. I guess most important is setting the "bootargs" correctly - so we can get the console output, and so see what is failing.

Hope this helps.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: NSA320 Arch Linux Install Failure

Postby artical » Fri May 25, 2018 12:45 pm

Hi Summers,

its seems i must have copied or loaded something incorrectly to get the env settings so complex and messed up. i haven't knowingly tried to run any other OS on the device, what I have basically done is the following:

- taken a stock NSA320 run the archlinux installer on it via a USB thumb drive (this failed, and the system wouldnt start)
- updated the uboot (well i think i did this correctly... not sure how to check if i have)
- created two partitions on the HDD (boot and rootfs).... (this done in ubuntu Virtual machine)
- extracted the archlinux installer to the rootfs partition (done in ubuntu Virtual machine)
- copied the boot folder from rootfs to boot partition#
- extracted linux-4.16.1-kirkwood-tld-1-bodhi.tar.bz2 in the boot folder
- extracted linux-dtb-4.16.1-kirkwood-tld-1.tar in the boot folder

perhaps doing it in this way hasn't created some of the files correctly, or loaded something into memory that should be, not sure.... am a noob to linux so trying to understand and figure it out as i go... with some help from yourself :)

so onto your last advise:

i updated the bootargs as you advised so they are now set as
$this->bbcode_second_pass_code('', 'NSA320> printenv set_bootargs
set_bootargs=setenv bootargs console=ttyS0,115200 root=0b5f2054-5dcc-4689-8efb-4d71559c3b5a rootdelay=10 $mtdparts $custom_params
')

output from the HDD look like:
$this->bbcode_second_pass_code('', 'NSA320> ext4ls ide 0:1 /
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
<DIR> 4096 boot
NSA320> ext4ls ide 0:1 /boot
<DIR> 4096 .
<DIR> 4096 ..
32871350 linux-4.16.1-kirkwood-tld-1-bodhi.tar.bz2
19501564 linux-image-4.16.1-kirkwood-tld-1_1.0_armel.deb
9034422 linux-headers-4.16.1-kirkwood-tld-1_1.0_armel.deb
157130 config-4.16.1-kirkwood-tld-1
4065544 zImage-4.16.1-kirkwood-tld-1
1239040 linux-dtb-4.16.1-kirkwood-tld-1.tar
143960 linux-4.16.1-kirkwood-tld-1.patch
<DIR> 4096 dts
4600064 uImage
4600064 uImage.new
4065544 uImage.old
11445 zImage.fdt
0 uInitrd
11509 uImage.old2
4600064 uImage.a
NSA320> ext4ls ide 0:2 /
<DIR> 4096 .
<DIR> 4096 ..
<DIR> 16384 lost+found
339729650 ArchLinuxARM-kirkwood-latest.tar.gz
<SYM> 7 bin
<DIR> 4096 boot
<DIR> 4096 dev
<DIR> 4096 etc
<DIR> 4096 home
<SYM> 7 lib
<DIR> 4096 mnt
<DIR> 4096 opt
<DIR> 4096 proc
<DIR> 4096 root
<DIR> 4096 run
<SYM> 7 sbin
<DIR> 4096 srv
<DIR> 4096 sys
<DIR> 4096 tmp
<DIR> 4096 usr
<DIR> 4096 var
')

I then executed the following:
$this->bbcode_second_pass_code('', 'NSA320> setenv loadaddr 0x810000
NSA320> setenv fdtaddr 0x800000
NSA320> setenv rdaddr 0x1100000
NSA320> saveenv
Saving Environment to NAND...
Erasing NAND...
Erasing at 0xc0000 -- 100% complete.
Writing to NAND... OK
NSA320> bootz ${loadaddr} ${rdaddr} ${fdtaddr}
Bad Linux ARM zImage magic!
')

which seems to indicate that the zImage file i have in the boot folder is not good?

i then tried:
$this->bbcode_second_pass_code('', 'NSA320> bootm ${loadaddr} ${rdaddr}
Wrong Image Format for bootm command
Error occured, error code = 112
ERROR: can't get kernel image!
')

which also seem to indicate that i should be using the bootz command.

thoughts?
artical
 
Posts: 10
Joined: Sat Apr 14, 2018 3:13 pm

Re: NSA320 Arch Linux Install Failure

Postby summers » Fri May 25, 2018 6:41 pm

Ok lets go through it. In $this->bbcode_second_pass_code('', 'ext4ls ide 0:1 /boot') you have your boot partition. When booted this will probably appear in /boot/boot as it isn't the root.

Now in $this->bbcode_second_pass_code('', ' ide 0:1 /boot') you have several uImage, and a strange zImage. Looks like bobhi, I guess from https://forum.doozan.com/ so you aren't running standard arch images. You don't have a valid ramdisk, so we will have to work without this, and hope it boots. Now your problem with booting is that you didn't load the images into memory, that is where uboot boots from. So seems two options:
$this->bbcode_second_pass_code('', 'run set_bootargs
load ide 0:1 ${loadaddr} /boot/uImage
load ide 0:1 ${fdtaddr} /boot/dts/kirkwood-nsa320.dtb
fdt addr ${fdtaddr}
bootm ${loadaddr} - ${fdtaddr}
')
This assumes you have dtb in /boot/dts - that different from usual, they are usually in /boot/dtbs

Now we could try the same with the zImage:
$this->bbcode_second_pass_code('', 'run set_bootargs
load ide 0:1 ${loadaddr} /boot/zImage-4.16.1-kirkwood-tld-1
load ide 0:1 ${fdtaddr} /boot/dts/kirkwood-nsa320.dtb
fdt addr ${fdtaddr}
bootz ${loadaddr} - ${fdtaddr}
')
My guess is once booted you will want to install the usual arch kernel, as it will make your life easier that getting from bobhi.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: NSA320 Arch Linux Install Failure

Postby artical » Sat May 26, 2018 8:53 am

Hi Summers,

Again thanks for your help, it really is appreciated.

so the good news is i was finally able to get the system booted and have successfully logged in. A major milestone achieved in my linux journey. Thought i would just document what i did for the benefit of others on the forum before i ask for further advise.

boot was achieved using the zImage method you advised, with a minor amendment so looked like:
$this->bbcode_second_pass_code('', 'ide reset
run set_bootargs
load ide 0:1 ${loadaddr} /boot/zImage-4.16.1-kirkwood-tld-1
load ide 0:1 ${fdtaddr} /boot/dts/kirkwood-nsa320.dtb
fdt addr ${fdtaddr}
bootz ${loadaddr} - ${fdtaddr}')

first time this actually produced a boot failure as it couldnt find the root device
$this->bbcode_second_pass_code('', '[ 17.767632] VFS: Cannot open root device "0b5f2054-5dcc-4689-8efb-4d71559c3b5a" or unknown-block(0,0): error -6
[ 17.777831] Please append a correct "root=" boot option; here are the available partitions:
[ 17.786234] 1f00 1024 mtdblock0
[ 17.786238] (driver?)
[ 17.792861] 1f01 512 mtdblock1
[ 17.792866] (driver?)
[ 17.799479] 1f02 512 mtdblock2
[ 17.799484] (driver?)
[ 17.806054] 1f03 512 mtdblock3
[ 17.806057] (driver?)
[ 17.812656] 1f04 10240 mtdblock4
[ 17.812661] (driver?)
[ 17.819251] 1f05 10240 mtdblock5
[ 17.819255] (driver?)
[ 17.825822] 1f06 48896 mtdblock6
[ 17.825825] (driver?)
[ 17.832407] 1f07 10240 mtdblock7
[ 17.832411] (driver?)
[ 17.839000] 1f08 48896 mtdblock8
[ 17.839005] (driver?)
[ 17.845573] 0800 2930266584 sda
[ 17.845577] driver: sd
[ 17.851731] 0801 2048000 sda1 1b7a8422-68ee-4442-abb7-b929228ea916
[ 17.851735]
[ 17.860329] 0802 2928217088 sda2 0ea686f1-1c93-4279-9001-874ba5994b21')

So a quick update of the bootargs addressed this, i am not sure if this is the best way to have defined it, but it works, will this be ok going forward or is there a better way?
$this->bbcode_second_pass_code('', 'set_bootargs 'setenv bootargs console=ttyS0,115200 root=0802 rootdelay=10 $mtdparts $custom_params'')

boot sequence output now shows:
$this->bbcode_second_pass_code('', 'U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:46:11 -0700)
ZyXEL NSA320 2-Bay Power Media Server

SoC: Kirkwood 88F6281_A1
DRAM: 512 MiB
WARNING: Caches not enabled
NAND: 128 MiB
In: serial
Out: serial
Err: serial
Net: egiga0
MV88E1318 PHY initialized on egiga0
Hit any key to stop autoboot: 0
starting USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found

Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: WDC WD30EZRX-00DC0B0 Firm: 80.00A80 Ser#: WD-WCC1T1717336
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0

## Unknown partition table type 0
loading envs from usb 0 ...
** Bad device usb 0 **

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

Part Start LBA End LBA Name
Attributes
Type GUID
Partition GUID
1 0x00000800 0x003e87ff "boot"
attrs: 0x0000000000000000
type: c12a7328-f81f-11d2-ba4b-00a0c93ec93b
type: system
guid: 1b7a8422-68ee-4442-abb7-b929228ea916
2 0x003e8800 0x15d509fff "rootfs"
attrs: 0x0000000000000000
type: 0fc63daf-8483-4772-8e79-3d69d8477de4
type: linux
guid: 0ea686f1-1c93-4279-9001-874ba5994b21
running scan_disk ...
Scan device usb
device usb 0:1
** Bad device usb 0 **
device usb 1:1
** Bad device usb 1 **
device usb 2:1
** Bad device usb 2 **
device usb 3:1
** Bad device usb 3 **
Scan device ide

Reset IDE: Bus 0: OK Bus 1: not available
Device 0: Model: WDC WD30EZRX-00DC0B0 Firm: 80.00A80 Ser#: WD-WCC1T1717336
Type: Hard Disk
Supports 48-bit addressing
Capacity: 2861588.4 MB = 2794.5 GB (5860533168 x 512)
device ide 0:1
load - load binary file from a filesystem

Usage:
load <interface> [<dev[:part]> [<addr> [<filename> [bytes [pos]]]]]
- Load binary file 'filename' from partition 'part' on device
type 'interface' instance 'dev' to address 'addr' in memory.
'bytes' gives the size to load in bytes.
If 'bytes' is 0 or omitted, the file is read until the end.
'pos' gives the file byte position to start reading from.
If 'pos' is 0 or omitted, the file is read from the start.
device ide 1:1
** Bad device ide 1 **
device ide 2:1
** Bad device ide 2 **
device ide 3:1
** Bad device ide 3 **
loading zImage...
4065544 bytes read in 684 ms (5.7 MiB/s)
loading DTB ...
13175 bytes read in 12 ms (1 MiB/s)
Setting FDT...
Kernel image @ 0x810000 [ 0x000000 - 0x3e0908 ]
## Flattened Device Tree blob at 00800000
Booting using the fdt blob at 0x800000
Loading Device Tree to 0fff9000, end 0ffff376 ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[ 0.000000] Booting Linux on physical CPU 0x0
[ 0.000000] Linux version 4.16.1-kirkwood-tld-1 (root@tldDebian) (gcc version 6.3.0 20170516 (Debian 6.3.0-18+deb9u1)) #1 PREEMPT Mon Apr 9 00:51:18 PDT 2018
[ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[ 0.000000] CPU: VIVT data cache, VIVT instruction cache
[ 0.000000] OF: fdt: Machine model: Zyxel NSA320
[ 0.000000] Memory policy: Data cache writeback
[ 0.000000] random: fast init done
[ 0.000000] Built 1 zonelists, mobility grouping on. Total pages: 130048
[ 0.000000] Kernel command line: console=ttyS0,115200 root=0802 rw rootdelay=10 mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
[ 0.000000] Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
[ 0.000000] Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
[ 0.000000] Memory: 506348K/524288K available (8192K kernel code, 754K rwdata, 2088K rodata, 1024K init, 282K bss, 17940K 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 : 0xe0800000 - 0xff800000 ( 496 MB)
[ 0.000000] lowmem : 0xc0000000 - 0xe0000000 ( 512 MB)
[ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB)
[ 0.000000] .text : 0x(ptrval) - 0x(ptrval) (9184 kB)
[ 0.000000] .init : 0x(ptrval) - 0x(ptrval) (1024 kB)
[ 0.000000] .data : 0x(ptrval) - 0x(ptrval) ( 755 kB)
[ 0.000000] .bss : 0x(ptrval) - 0x(ptrval) ( 283 kB)
[ 0.000000] Preemptible hierarchical RCU implementation.
[ 0.000000] Tasks RCU enabled.
[ 0.000000] NR_IRQS: 16, nr_irqs: 16, preallocated irqs: 16
[ 0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 9556302233 ns
[ 0.000009] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737418237ns
[ 0.000045] Switching to timer-based delay loop, resolution 5ns
[ 0.000631] Console: colour dummy device 80x30
[ 0.000673] Calibrating delay loop (skipped), value calculated using timer frequency.. 400.00 BogoMIPS (lpj=2000000)
[ 0.000697] pid_max: default: 32768 minimum: 301
[ 0.001015] Security Framework initialized
[ 0.001166] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.001191] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[ 0.002146] CPU: Testing write buffer coherency: ok
[ 0.003225] Setting up static identity map for 0x100000 - 0x100058
[ 0.003524] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[ 0.003785] Hierarchical SRCU implementation.
[ 0.007226] devtmpfs: initialized
[ 0.012595] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[ 0.012627] futex hash table entries: 256 (order: -1, 3072 bytes)
[ 0.013015] prandom: seed boundary self test passed
[ 0.017201] prandom: 100 self tests passed
[ 0.017214] pinctrl core: initialized pinctrl subsystem
[ 0.018418] NET: Registered protocol family 16
[ 0.018928] DMA: preallocated 256 KiB pool for atomic coherent allocations
[ 0.019577] audit: initializing netlink subsys (disabled)
[ 0.019877] audit: type=2000 audit(0.010:1): state=initialized audit_enabled=0 res=1
[ 0.020837] cpuidle: using governor ladder
[ 0.020909] cpuidle: using governor menu
[ 0.021435] Feroceon L2: Enabling L2
[ 0.021483] Feroceon L2: Cache support initialised.
[ 0.021846] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[ 0.027190] No ATAGs?
[ 0.035581] vgaarb: loaded
[ 0.035909] SCSI subsystem initialized
[ 0.036330] usbcore: registered new interface driver usbfs
[ 0.036399] usbcore: registered new interface driver hub
[ 0.036479] usbcore: registered new device driver usb
[ 0.037518] clocksource: Switched to clocksource orion_clocksource
[ 0.131944] VFS: Disk quotas dquot_6.6.0
[ 0.132030] VFS: Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[ 0.141165] NET: Registered protocol family 2
[ 0.141912] tcp_listen_portaddr_hash hash table entries: 512 (order: 0, 4096 bytes)
[ 0.141943] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.142001] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[ 0.142053] TCP: Hash tables configured (established 4096 bind 4096)
[ 0.142144] UDP hash table entries: 256 (order: 0, 4096 bytes)
[ 0.142168] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[ 0.142382] NET: Registered protocol family 1
[ 0.142942] RPC: Registered named UNIX socket transport module.
[ 0.142954] RPC: Registered udp transport module.
[ 0.142962] RPC: Registered tcp transport module.
[ 0.142970] RPC: Registered tcp NFSv4.1 backchannel transport module.
[ 0.143385] NetWinder Floating Point Emulator V0.97 (double precision)
[ 0.144349] Initialise system trusted keyrings
[ 0.144403] Key type blacklist registered
[ 0.144565] workingset: timestamp_bits=30 max_order=17 bucket_order=0
[ 0.144648] zbud: loaded
[ 0.145596] NFS: Registering the id_resolver key type
[ 0.145624] Key type id_resolver registered
[ 0.145633] Key type id_legacy registered
[ 0.145652] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[ 0.145663] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[ 0.145950] jffs2: version 2.2. (NAND) (SUMMARY) © 2001-2006 Red Hat, Inc.
[ 0.146154] fuse init (API version 7.26)
[ 0.146523] orangefs_debugfs_init: called with debug mask: :none: :0:
[ 0.146699] orangefs_init: module version upstream loaded
[ 0.146711] SGI XFS with ACLs, security attributes, realtime, scrub, no debug enabled
[ 6.071442] Key type asymmetric registered
[ 6.071459] Asymmetric key parser 'x509' registered
[ 6.071528] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 249)
[ 6.071541] io scheduler noop registered
[ 6.071550] io scheduler deadline registered
[ 6.071649] io scheduler cfq registered (default)
[ 6.072962] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[ 6.075018] mvebu-pcie mbus@f1000000:pcie@82000000: PCI host bridge to bus 0000:00
[ 6.075040] pci_bus 0000:00: root bus resource [io 0x1000-0xfffff]
[ 6.075055] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[ 6.075069] pci_bus 0000:00: root bus resource [bus 00-ff]
[ 6.075387] PCI: bus0: Fast back to back transfers disabled
[ 6.075413] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[ 6.075572] PCI: bus1: Fast back to back transfers enabled
[ 6.075630] pci 0000:00:01.0: PCI bridge to [bus 01]
[ 6.076236] mv_xor f1060800.xor: Marvell shared XOR driver
[ 6.138318] mv_xor f1060800.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[ 6.138558] mv_xor f1060900.xor: Marvell shared XOR driver
[ 6.198318] mv_xor f1060900.xor: Marvell XOR (Registers Mode): ( xor cpy intr )
[ 6.198744] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[ 6.199981] console [ttyS0] disabled
[ 6.200049] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 26, base_baud = 12500000) is a 16550A
[ 6.864233] console [ttyS0] enabled
[ 6.874142] loop: module loaded
[ 6.877910] sata_mv f1080000.sata: slots 32 ports 2
[ 6.885402] scsi host0: sata_mv
[ 6.889100] scsi host1: sata_mv
[ 6.892446] ata1: SATA max UDMA/133 irq 33
[ 6.896562] ata2: SATA max UDMA/133 irq 33
[ 6.901507] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[ 6.908010] nand: Samsung NAND 128MiB 3,3V 8-bit
[ 6.912651] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 6.920288] Scanning device for bad blocks
[ 6.959627] Bad eraseblock 364 at 0x000002d80000
[ 6.987402] Bad eraseblock 604 at 0x000004b80000
[ 7.032590] 9 cmdlinepart partitions found on MTD device orion_nand
[ 7.038909] Creating 9 MTD partitions on "orion_nand":
[ 7.044073] 0x000000000000-0x000000100000 : "uboot"
[ 7.049929] 0x000000100000-0x000000180000 : "stock_uboot_env"
[ 7.056544] 0x000000180000-0x000000200000 : "key_store"
[ 7.062684] 0x000000200000-0x000000280000 : "info"
[ 7.068381] 0x000000280000-0x000000c80000 : "etc"
[ 7.074028] 0x000000c80000-0x000001680000 : "kernel_1"
[ 7.080132] 0x000001680000-0x000004640000 : "rootfs1"
[ 7.086385] 0x000004640000-0x000005040000 : "kernel_2"
[ 7.092494] 0x000005040000-0x000008000000 : "rootfs2"
[ 7.099855] libphy: Fixed MDIO Bus: probed
[ 7.104706] libphy: orion_mdio_bus: probed
[ 7.109825] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[ 7.208001] mv643xx_eth: Set the PHY to fix link down
[ 7.208672] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address fc:f5:28:30:09:f0
[ 7.222668] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[ 7.229298] ehci-pci: EHCI PCI platform driver
[ 7.233825] ehci-orion: EHCI orion driver
[ 7.238169] orion-ehci f1050000.ehci: EHCI Host Controller
[ 7.243711] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[ 7.251608] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[ 7.287553] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[ 7.293837] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[ 7.300689] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[ 7.307968] usb usb1: Product: EHCI Host Controller
[ 7.312874] usb usb1: Manufacturer: Linux 4.16.1-kirkwood-tld-1 ehci_hcd
[ 7.319624] usb usb1: SerialNumber: f1050000.ehci
[ 7.324926] hub 1-0:1.0: USB hub found
[ 7.328798] hub 1-0:1.0: 1 port detected
[ 7.333422] usbcore: registered new interface driver usb-storage
[ 7.339820] mousedev: PS/2 mouse device common for all mice
[ 7.345952] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[ 7.353085] i2c /dev entries driver
[ 7.363095] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc1
[ 7.373022] hidraw: raw HID events driver (C) Jiri Kosina
[ 7.378836] drop_monitor: Initializing network drop monitor service
[ 7.385400] NET: Registered protocol family 17
[ 7.389993] Key type dns_resolver registered
[ 7.395024] registered taskstats version 1
[ 7.399173] Loading compiled-in X.509 certificates
[ 7.404050] zswap: loaded using pool lzo/zbud
[ 7.408487] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[ 7.417305] ata1.00: ATA-9: WDC WD30EZRX-00DC0B0, 80.00A80, max UDMA/133
[ 7.427590] ata1.00: 5860533168 sectors, multi 0: LBA48 NCQ (depth 31/32)
[ 7.435533] Key type big_key registered
[ 7.441720] Key type encrypted registered
[ 7.447679] rtc-mv f1010300.rtc: setting system clock to 2018-05-26 11:18:14 UTC (1527333494)
[ 7.456351] ata1.00: configured for UDMA/133
[ 7.461635] Waiting 10 sec before mounting root device...
[ 7.471219] scsi 0:0:0:0: Direct-Access ATA WDC WD30EZRX-00D 0A80 PQ: 0 ANSI: 5
[ 7.480389] sd 0:0:0:0: [sda] 5860533168 512-byte logical blocks: (3.00 TB/2.73 TiB)
[ 7.488695] sd 0:0:0:0: [sda] 4096-byte physical blocks
[ 7.494065] sd 0:0:0:0: [sda] Write Protect is off
[ 7.499076] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[ 7.697558] usb 1-1: new high-speed USB device number 2 using orion-ehci
[ 7.819105] ata2: SATA link down (SStatus 0 SControl F300)
[ 7.899242] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[ 7.905997] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[ 7.913203] usb 1-1: Product: USB2.0 Hub
[ 7.917896] hub 1-1:1.0: USB hub found
[ 7.921993] hub 1-1:1.0: 4 ports detected
[ 8.200206] sda: sda1 sda2
[ 8.204577] sd 0:0:0:0: [sda] Attached SCSI disk
[ 18.391410] EXT4-fs (sda2): couldn't mount as ext3 due to feature incompatibilities
[ 19.662123] EXT4-fs (sda2): recovery complete
[ 19.697651] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[ 19.705389] VFS: Mounted root (ext4 filesystem) on device 8:2.
[ 19.750885] devtmpfs: mounted
[ 19.756753] Freeing unused kernel memory: 1024K
[ 19.761950] Checked W+X mappings: passed, no W+X pages found
[ 20.486462] systemd[1]: Failed to insert module 'autofs4': No such file or directory
[ 20.540457] systemd[1]: systemd 238 running in system mode. (+PAM -AUDIT -SELINUX -IMA -APPARMOR +SMACK -SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD -IDN2 +IDN +PCRE2 default-hierarchy=hybrid)
[ 20.562496] systemd[1]: Detected architecture arm.

Welcome to Arch Linux ARM!

[ 20.600733] systemd[1]: Set hostname to <NSA320>.
[ 21.391369] systemd[1]: File /usr/lib/systemd/system/systemd-journald.service:35 configures an IP firewall (IPAddressDeny=any), but the local system does not support BPF/cgroup based firewalling.
[ 21.409001] systemd[1]: Proceeding WITHOUT firewalling in effect! (This warning is only shown for the first loaded unit using IP firewalling.)
[ 21.643083] systemd[1]: Listening on LVM2 poll daemon socket.
[ OK ] Listening on LVM2 poll daemon socket.
[ 21.677860] systemd[1]: Starting of Arbitrary Executable File Formats File System Automount Point not supported.
[UNSUPP] Starting of Arbitrary Executable Fi…tem Automount Point not supported.
[ 21.719760] systemd[1]: Created slice User and Session Slice.
[ OK ] Created slice User and Session Slice.
[ 21.758173] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[ OK ] Listening on /dev/initctl Compatibility Named Pipe.
[ 21.797769] systemd[1]: Reached target Remote File Systems.
[ OK ] Reached target Remote File Systems.
[ OK ] Listening on udev Kernel Socket.
[ OK ] Started Dispatch Password Requests to Console Directory Watch.
[ OK ] Listening on Journal Socket.
Mounting POSIX Message Queue File System...
Starting Remount Root and Kernel File Systems...
[ OK ] Created slice system-serial\x2dgetty.slice.
[ OK ] Listening on Process Core Dump Socket.
[ OK ] Reached target Slices.
[ OK ] Listening on LVM2 metadata daemon socket.
[ OK ] Listening on Network Service Netlink Socket.
[ OK ] Listening on Journal Socket (/dev/log).
Starting Apply Kernel Variables...
[ OK ] Created slice system-getty.slice.
Mounting FUSE Control File System...
Mounting Kernel Debug File System...
[ OK ] Listening on Device-mapper event daemon FIFOs.
Starting Monitoring of LVM2 mirrors…ng dmeventd or progress polling...
[ OK ] Listening on Journal Audit Socket.
Starting Journal Service...
[ OK ] Reached target Swap.
Mounting Temporary Directory (/tmp)...
[ OK ] Listening on udev Control Socket.
Starting udev Coldplug all Devices...
[ OK ] Started Forward Password Requests to Wall Directory Watch.
[ OK ] Reached target Paths.
[ OK ] Reached target Local Encrypted Volumes.
[ OK ] Mounted POSIX Message Queue File System.
[ OK ] Started Journal Service.
[ OK ] Started Remount Root and Kernel File Systems.
[ OK ] Started Apply Kernel Variables.
[ OK ] Mounted FUSE Control File System.
[ OK ] Mounted Kernel Debug File System.
[ OK ] Mounted Temporary Directory (/tmp).
[ OK ] Started LVM2 metadata daemon.
Starting Load/Save Random Seed...
Starting Create Static Device Nodes in /dev...
Starting Flush Journal to Persistent Storage...
[ OK ] Started Load/Save Random Seed.
[ OK ] Started Create Static Device Nodes in /dev.
[ 23.249520] systemd-journald[115]: Received request to flush runtime journal from PID 1
Starting udev Kernel Device Manager...
[ OK ] Started udev Coldplug all Devices.
[ 23.448587] systemd-journald[115]: File /var/log/journal/527516f266fd40528dfd594c29f6e379/system.journal corrupted or uncleanly shut down, renaming and replacing.
[ OK ] Started udev Kernel Device Manager.
Starting Network Service...
[ OK ] Started Flush Journal to Persistent Storage.
[ OK ] Started Network Service.
[ OK ] Found device /dev/ttyS0.
[ 24.757823] random: crng init done
[ OK ] Started Monitoring of LVM2 mirrors,…sing dmeventd or progress polling.
[ OK ] Reached target Local File Systems (Pre).
[ OK ] Reached target Local File Systems.
Starting Create Volatile Files and Directories...
[ OK ] Started Create Volatile Files and Directories.
Starting Update UTMP about System Boot/Shutdown...
Starting Network Name Resolution...
Starting Network Time Synchronization...
[ OK ] Started Update UTMP about System Boot/Shutdown.
[ OK ] Started Network Name Resolution.
[ OK ] Reached target Network.
[ OK ] Reached target Host and Network Name Lookups.
[ OK ] Started Network Time Synchronization.
[ OK ] Reached target System Initialization.
[ OK ] Started Daily Cleanup of Temporary Directories.
[ OK ] Listening on D-Bus System Message Bus Socket.
[ OK ] Reached target Sockets.
[ OK ] Reached target Basic System.
Starting Login Service...
Starting Permit User Sessions...
[ OK ] Started Entropy Harvesting Daemon.
[ OK ] Started OpenSSH Daemon.
[ OK ] Started D-Bus System Message Bus.
[ OK ] Reached target System Time Synchronized.
[ OK ] Started Daily man-db cache update.
[ OK ] Started Daily verification of password and group files.
[ OK ] Started Daily rotation of log files.
[ OK ] Reached target Timers.
[ 25.008200] mv643xx_eth: Set the PHY back to auto-negotiation mode
[ 26.934797] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 100 Mb/s, full duplex, flow control disabled
[ OK ] Started Permit User Sessions.
[ OK ] Started Getty on tty1.
[ OK ] Started Serial Getty on ttyS0.
[ OK ] Reached target Login Prompts.
[ OK ] Started Login Service.
Starting Hostname Service...
[ OK ] Reached target Multi-User System.
[ OK ] Reached target Graphical Interface.
[ OK ] Started Hostname Service.

Arch Linux 4.16.1-kirkwood-tld-1 (ttyS0)

NSA320 login:
')

With that bit out of the way i now need to understand how to straighten everything out and "install the usual arch kernel" on the HDD (and into memory?)..... is this as simple as running the command "pacman -Syu" as root ? is there any community guides i could review to help me with this?

current printenv:
$this->bbcode_second_pass_code('', 'arcNumber=3956
baudrate=115200
bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset
bootcmd_exec=run load_zImage; run load_dtb; run set_fdt; bootz ${loadaddr} - ${fdtaddr}
bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi
bootdelay=10
bootdev=usb
console=console=ttyS0,115200
device=0:1
devices=usb ide
disks=0 1 2 3
dtb_file=/boot/dts/kirkwood-nsa320.dtb
ethact=egiga0
ethaddr=fc:f5:28:30:09:f0
fdtaddr=0x800000
if_netconsole=ping $serverip
led_error=orange blinking
led_exit=green off
led_init=green blinking
load_dtb=echo loading DTB $dtp_file ...; load ide 0:1 ${fdtaddr} $dtb_file
load_zImage=echo loading zImage...; load ide 0:1 ${loadaddr} /boot/zImage-4.16.1-kirkwood-tld-1
loadaddr=0x810000
mainlineLinux=yes
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0x100000(uboot),0x80000(stock_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
partition=nand0,2
preboot_nc=run if_netconsole start_netconsole
scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start"; setenv scan_ide "ide reset"; setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 $load_uimage_addr /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done
serverip=192.168.0.220
set_bootargs=setenv bootargs console=ttyS0,115200 root=0802 rootdelay=10 $mtdparts $custom_params
set_fdt=echo Setting FDT...; fdt addr ${fdtaddr}
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version;
stderr=serial
stdin=serial
stdout=serial
uenv_addr=0x810000
uenv_import=echo importing envs ...; env import -t $uenv_addr $filesize
uenv_init_devices=setenv init_usb "usb start"; setenv init_ide "ide reset"; setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done;
uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in 0; do run uenv_read_disk; done; done;
uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 $uenv_addr /boot/uEnv.txt; then setenv uenv_loaded 1; fi
uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read; fi; else if $devtype part $disknum; then run uenv_read; fi; fi
usb_ready_retry=15

Environment size: 2687/131068 bytes
')
artical
 
Posts: 10
Joined: Sat Apr 14, 2018 3:13 pm

Re: NSA320 Arch Linux Install Failure

Postby summers » Sat May 26, 2018 1:11 pm

You probably want to do:
$this->bbcode_second_pass_code('', 'pacman -Suy linux-kirkwood-dt linux-kirkwood-dt-headers')
That should install the device tree kernel, which is the modern kernel, and you can access as you have a modern uboot.

You'll probably want to set up uboot by hand, as yours is different from the default arch, but also more modern - so probably worth keeping. For what its worth my env variables are:
$this->bbcode_second_pass_code('', 'bootcmd=run startboot;run bootubi
bootdir=/boot
bootfilem=uImage
bootfilez=zImage
bootpart=1:1
bootubi=echo Trying to boot from NAND ...;if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile};ubifsumount; setenv bootargs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts};bootz ${loadaddr} - ${fdtaddr};fi
console=ttyS0,115200
devnum=2
ethact=egiga0
ethaddr=5C:F4:AB:51:71:8F
fdtaddr=0x800000
fdtdir=/boot/dtbs
fdtfile=kirkwood-nsa325.dtb
ipaddr=10.10.10.3
loadaddr=0x810000
loadfdt=echo loading ${fdtdir}/${fdtfile} ...; load ${devtype} ${bootpart} ${fdtaddr} ${fdtdir}/${fdtfile} ; fdt addr ${fdtaddr} ; fdt set /mbus@f1000000/nand@12f chip-delay <40>
loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem}
loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile}
mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs}
mountubi=ubi part rootfs; ubifsmount ubi0:rootfs
mtddevname=uboot
mtddevnum=0
mtdids=nand0=orion_nand
mtdparts=mtdparts=orion_nand:0xC0000(uboot),0x40000(uboot_env),0x80000(old_uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2)
ncip=10.10.10.5
ncipk=10.10.10.4
netconsole=on
partition=nand0,0
preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncargsusr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; else echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi
rdaddr=0x1100000
rdfile=initramfs-linux.img
startboot=usb start; ide reset; for devtype in usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${fdtaddr}; fi; else if run loadrd; then echo Booting uImage with initrd; bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done;
')
Your root, well in uboot setting the kernel command line to "root=/dev/sda2" would probably work, better is the PARTUUID, you can find this by typing:
$this->bbcode_second_pass_code('', 'blkid')
Now the standard arch ubbot reads the file /boot/uEnv.txt, and so you can set the env there:$this->bbcode_second_pass_code('', 'root=PARTUUID=94a2dc27-01'), but with your PARTUUID.

Alternative look into boot.src, which isn't what mainline arm arch uses for kirkwood, but its the new uboot method, and used by many other arm arch devices.
summers
 
Posts: 984
Joined: Sat Sep 06, 2014 12:56 pm

Re: NSA320 Arch Linux Install Failure

Postby artical » Sat Jun 02, 2018 11:20 pm

Hi Summers,

So finally have everything up and running, and updated... Well as far as the OS goes.

So in terms of this post I guess it's resolved in terms of my original issue, thanks for all your assistance getting me this far in my Linux journey.

Next thing for me to tackle is setting up CUPS so I can print over the network.
artical
 
Posts: 10
Joined: Sat Apr 14, 2018 3:13 pm

Previous

Return to ARMv5

Who is online

Users browsing this forum: No registered users and 4 guests