Welcome! Log In Create A New Profile

Advanced

Linux Kernel 6.7.5 Kirkwood package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 11, 2015 01:16PM
Hi JanN,

> But there are some issues: leds and powerbutton
> don't work,

Please list the output of:
ls -lR /sys/class/leds

> and fw_-commands bring up the "Bad
> CRC, using default environment"-message. According
> to the latter, there are probably wrong settings
> in /etc/fw_env.config, as i read earlier in this
> thread.

Yes. You are running stock u-boot, so the envs are at a different location. It should look like this:

cat /etc/fw_env.config
# MTD device name	Device offset	Env. size	Flash sector size	Number of sectors
# nsa325
/dev/mtd1                0x0000         0x20000    0x20000

And when you do
cat /proc/mtd

It should show that mtd1 indicates that it contains u-boot envs.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 11, 2015 02:44PM
Hi bodhi,

thanks for your fast reply.

The leds:
root@debian:~# ls -lR /sys/class/leds
/sys/class/leds:
total 0
drwxr-xr-x  2 root root 0 Feb 11 12:30 .
drwxr-xr-x 38 root root 0 Feb 11 05:23 ..
lrwxrwxrwx  1 root root 0 Feb 11 12:30 nsa320:green:copy -> ../../devices/gpio-leds/leds/nsa320:green:copy
lrwxrwxrwx  1 root root 0 Feb 11 12:30 nsa320:green:hdd1 -> ../../devices/gpio-leds/leds/nsa320:green:hdd1
lrwxrwxrwx  1 root root 0 Feb 11 12:30 nsa320:green:hdd2 -> ../../devices/gpio-leds/leds/nsa320:green:hdd2
lrwxrwxrwx  1 root root 0 Feb 11 12:30 nsa320:green:sys -> ../../devices/gpio-leds/leds/nsa320:green:sys
lrwxrwxrwx  1 root root 0 Feb 11 12:30 nsa320:green:usb -> ../../devices/gpio-leds/leds/nsa320:green:usb
lrwxrwxrwx  1 root root 0 Feb 11 12:30 nsa320:orange:sys -> ../../devices/gpio-leds/leds/nsa320:orange:sys
lrwxrwxrwx  1 root root 0 Feb 11 12:30 nsa320:red:copy -> ../../devices/gpio-leds/leds/nsa320:red:copy
lrwxrwxrwx  1 root root 0 Feb 11 12:30 nsa320:red:hdd1 -> ../../devices/gpio-leds/leds/nsa320:red:hdd1
lrwxrwxrwx  1 root root 0 Feb 11 12:30 nsa320:red:hdd2 -> ../../devices/gpio-leds/leds/nsa320:red:hdd2


The NSA-320 is different to the NSA-325 - it doesn't have mtd1, just mtd0:
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 08000000 00020000 "orion_nand"

This is my fw_env.config. First line is original, second line was a dumb try with a different address and the following console-output:
root@debian:~# cat /etc/fw_env.config
# MTD device name       Device offset   Env. size       Flash sector size      Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000
# /dev/mtd0 0xb0000 0x20000 0x20000  "too few good blocks in range"

Any more ideas?

BR
Jan
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 11, 2015 03:29PM
Jan,

I'll look at the power button problem in the source.

For the leds, you can add this to /etc/rc.local to turn on the green led and turn off orange led when the kernel has finished booting:

if [ -d /sys/class/leds/nsa320:green:sys ]; then
   echo default-on  > /sys/class/leds/nsa320:green:sys/trigger 
   echo none          > /sys/class/leds/nsa320:orange:sys/trigger
fi

exit 0

I'm sure someone with stock u-boot will be able to post the env location here. Anyone?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 11, 2015 03:59PM
Many thanks again, bodhi.
Green led burns now after booting.
Btw.: Powerbutton worked with 3.17 and 3.16. ...

Where are you, highly respected owners of the NSA-320? You have the chance to save my soul by answering my question ;-)

BR
Jan



Edited 1 time(s). Last edit at 02/11/2015 04:01PM by JanN.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 11, 2015 04:43PM
JanN,

This is strange. Stock NSA320 mtds are:

Creating 9 MTD partitions on "nand_mtd":
0x00000000-0x00100000 : "uboot"
0x00100000-0x00180000 : "uboot_env"
0x00180000-0x00200000 : "key_store"
0x00200000-0x00280000 : "info"
0x00280000-0x00c80000 : "etc"
0x00c80000-0x01680000 : "kernel_1"
0x01680000-0x04640000 : "rootfs1"
0x04640000-0x05040000 : "kernel_2"
0x05040000-0x08000000 : "rootfs2"

Your mtdparts are not stock.

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



Edited 1 time(s). Last edit at 02/11/2015 05:16PM by bodhi.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 12, 2015 06:39AM
bodhi Wrote:
-------------------------------------------------------
> Kernel 3.18.5-kirkwood-tld-1 package has been
> uploaded. Please see 1st post for download link.
>

>
> 2. Also new in the kernel are various kernel
> configuration that are newly available in 3.18,
> and also various kernel configuration per forum
> users requests.
>


Thank you!

Have installed linux-image-3.18.5-kirkwood-tld-1_1_armel.deb for Asus-NAS-M25 , everything works.

dpkg -i linux-image-3.18.5-kirkwood-tld-1_1_armel.deb
cd /boot
cp -a zImage-3.18.5-kirkwood-tld-1  zImage.fdt
cat kirkwood-asus_m25.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.18.5-kirkwood-tld-1 -d /boot/zImage.fdt /boot/uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.18.5-kirkwood-tld-1 -d /boot/initrd.img-3.18.5-kirkwood-tld-1 /boot/uInitrd
#  Only for U-Boot 3.5.9 Asus-NAS-M25 
cp -a /boot/uImage /
cp -a /boot/uInitrd /

U-Boot Asus-NAS-M25 accepts only from USB disk ext2\ext3 and uImage uInitrd must be in the root USB or two separate partition boot and root.

root@nas-m25:~# fdisk -l

Disk /dev/sda: 3,8 GiB, 4027580416 bytes, 7866368 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00081fe2

Device     Boot  Start     End Sectors  Size Id Type
/dev/sda1  *      2048  411647  409600  200M 83 Linux
/dev/sda2       411648 7866367 7454720  3,6G 83 Linux

/dev/sda1 /boot ext3
/dev/sda2 / ext4

LED USB controls packages usbmount + esekeyd.
Attachments:
open | download - deb_bodhi.txt (87.2 KB)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 12, 2015 08:13AM
balbes150,

Execellent! great job, and thanks for sharing your Asus-NAS-M25 successful installation.

Could you attach the Asus-NAS-M25 DTS file here? I'd like to include it in the patch for the next release for general consumption.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 12, 2015 08:57AM
bodhi Wrote:
-------------------------------------------------------
> balbes150,
>
> Execellent! great job, and thanks for sharing your
> Asus-NAS-M25 successful installation.
>
> Could you attach the Asus-NAS-M25 DTS file here?
> I'd like to include it in the patch for the next
> release for general consumption.

In this file, is not yet complete section &nand.
Attachments:
open | download - kirkwood-asus_m25.dts (6.6 KB)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 12, 2015 11:43AM
bodhi Wrote:
> This is strange. Stock NSA320 mtds are:
>
>
> Creating 9 MTD partitions on "nand_mtd":
> 0x00000000-0x00100000 : "uboot"
> 0x00100000-0x00180000 : "uboot_env"
> 0x00180000-0x00200000 : "key_store"
> 0x00200000-0x00280000 : "info"
> 0x00280000-0x00c80000 : "etc"
> 0x00c80000-0x01680000 : "kernel_1"
> 0x01680000-0x04640000 : "rootfs1"
> 0x04640000-0x05040000 : "kernel_2"
> 0x05040000-0x08000000 : "rootfs2"
>
>
> Your mtdparts are not stock.

Hi bodhi,

i didn't change anything else than the envs in u-boot intenionally but perhaps without knowing about - as you can see: my level of knowledge about all this stuff isn't too high, so pleeaase be patient with me... :-)

I think, i know what i did wrong: i modified Jason Plums usb-key-func-script for setting the envs, but that is for the NSA-325, that perhaps has another mtd-partition scheme or at least different adresses than the NSA-320.

Strange is: in u-boot i can set and read envs manually and via script, and the box loads uImage und uInitrd from sda1 as i want it.

Where did you get the above table of mtd-partition from? How can i see the equivalent table on my machine? Are you sure, it's for the/from NSA-320. If so, does it make sense trying to fix the startaddresses of the mtd-partitions in the usb-key-func-script und run it again?

BR
Jan
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 12, 2015 11:47AM
@balbes150,

Thanks!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 12, 2015 12:03PM
JanN,

> Strange is: in u-boot i can set and read envs
> manually and via script, and the box loads uImage
> und uInitrd from sda1 as i want it.
>

It's OK not to have mtdparts definition at all in Linux. This comes into play only when you want to setup the envs for booting while inside a Linux shell. u-boot knows where the envs are, based on the the envs settings in that NAND area (or its default values if the NAND area does not contain valid values), it does not even need mtd definition to access it.

> Where did you get the above table of mtd-partition
> from? How can i see the equivalent table on my
> machine? Are you sure, it's for the/from NSA-320.

Here is the stock serial boot log:
http://zyxel.nas-central.org/wiki/Serial_Bootlog_NSA-320

> If so, does it make sense trying to fix the
> startaddresses of the mtd-partitions in the
> usb-key-func-script und run it again?

There is no need to do that. Since your mtd definition has only 1 mtd0, then you need to specify the correct offset and size in fw_env.config so that it can be accessed.

Please post your dmesg output. The kernel command line will show what is the actual mtd definition being passed into the kernel. This is just a precaution to cover all bases, (I've already guessed what it looks like based on /proc/mtd).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 13, 2015 02:44AM
Asus-NAS-M25 similar situation FDT cores, but the original U-Boot has the ability to boot from USB ext2\ext3 uImage and uInitrd.
But this does not prevent normal operation of Debian.
To make changes in U-Boot, you can use the system with non-FDT kernel (3.16 =<) and then move on FDT ?
This is possible ?

Part of the original log

  
Reading data from 0x5ff800 -- 100% complete.
 2097152 bytes read: OK
## Booting image at 00800000 ...
   Image Name:   Linux-2.6.22.18
   Created:      2011-03-31   3:09:43 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2047180 Bytes =  2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 00b00000 ...
   Image Name:   Ramdisk
   Created:      2014-10-22   7:09:14 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    1890089 Bytes =  1.8 MB
   Load Address: 00b00000
   Entry Point:  00b00000
   Verifying Checksum ... OK

Starting kernel ...

/// removed extra lines 

NAND device: Manufacturer ID: 0xec, Chip ID: 0xf1 (Samsung NAND 128MiB 3,3V 8-bit)
Scanning device for bad blocks
Bad eraseblock 239 at 0x01de0000
Bad eraseblock 297 at 0x02520000
Bad eraseblock 373 at 0x02ea0000
Bad eraseblock 378 at 0x02f40000
Creating 11 MTD partitions on "nand_mtd":
0x00000000-0x000e0000 : "u-boot"
0x000e0000-0x00100000 : "imagecfg"
0x00100000-0x00400000 : "uImage"
0x00400000-0x00600000 : "initrd"
0x00600000-0x00800000 : "jffs2"
0x00800000-0x03fe0000 : "squash"
0x03fe0000-0x04000000 : "NULL"
0x04000000-0x04300000 : "uImage_2"
0x04300000-0x04500000 : "initrd_2"
0x04500000-0x04700000 : "jffs2_2"
0x04700000-0x08000000 : "squash_2"
..................................


Part of the non-FTD log


2848684 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-3.16.7-m25.02
   Created:      2014-12-15  11:42:00 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    5257000 Bytes =  5 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-3.16.7-m25.02
   Created:      2014-12-15  11:42:13 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    2848620 Bytes =  2.7 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...
 	
////// removed extra lines

[    2.581125] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    2.587531] nand: Samsung NAND 128MiB 3,3V 8-bit
[    2.592166] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    2.597869] Scanning device for bad blocks
[    2.616413] Bad eraseblock 239 at 0x000001de0000
[    2.624506] Bad eraseblock 297 at 0x000002520000
[    2.633694] Bad eraseblock 373 at 0x000002ea0000
[    2.638612] Bad eraseblock 378 at 0x000002f40000
[    2.687472] Creating 11 MTD partitions on "orion_nand":
[    2.692731] 0x000000000000-0x0000000e0000 : "u-boot"
[    2.698788] 0x0000000e0000-0x000000100000 : "imagecfg"
[    2.704913] 0x000000100000-0x000000400000 : "uImage"
[    2.710904] 0x000000400000-0x000000600000 : "initrd"
[    2.716898] 0x000000600000-0x000000800000 : "jffs2"
[    2.722783] 0x000000800000-0x000003fe0000 : "squash"
[    2.728764] 0x000003fe0000-0x000004000000 : "NULL"
[    2.734495] 0x000004000000-0x000004300000 : "uImage_2"
[    2.740617] 0x000004300000-0x000004500000 : "initrd_2"
[    2.746765] 0x000004500000-0x000004700000 : "jffs2_2"
[    2.752794] 0x000004700000-0x000008000000 : "squash_2"

......................................................................


Part of the FDT log


2686376 bytes read
## Booting image at 00800000 ...
   Image Name:   Linux-3.17.0-kirkwood-tld-1
   Created:      2014-12-16  11:15:21 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2831434 Bytes =  2.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-3.17.0-kirkwood-tld-1
   Created:      2014-12-16  11:17:28 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    2686312 Bytes =  2.6 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

////// removed extra lines

[    1.199012] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    1.205427] nand: Samsung NAND 128MiB 3,3V 8-bit
[    1.210068] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    1.215778] Scanning device for bad blocks
[    1.234392] Bad eraseblock 239 at 0x000001de0000
[    1.242497] Bad eraseblock 297 at 0x000002520000
[    1.251712] Bad eraseblock 373 at 0x000002ea0000
[    1.256643] Bad eraseblock 378 at 0x000002f40000
[    1.307893] libphy: Fixed MDIO Bus: probed
[    1.312332] libphy: orion_mdio_bus: probed
[    1.322021] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    2.403935] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:50:43:24:2c:2f
[    2.412901] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    2.419501] ehci-pci: EHCI PCI platform driver
[    2.424053] ehci-orion: EHCI orion driver
........................



Edited 2 time(s). Last edit at 02/13/2015 04:25AM by balbes150.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 13, 2015 03:01AM
balbes150,

> To make changes in U-Boot, you can use the system
> with non-FDT kernel (3.16 =<) and then move on FDT
> ?
> This is possible ?
>

See if I understood your question: you want to have newer u-boot (e.g. 2014 or 2015) that can boot with non-FDT 3.16 and FDT 3.17+ kernel?

The answer is: u-boot that has FDT support can be used for booting both non-FDT and FDT kernel. u-boot that does not have FDT support can only boot FDT kernel with the DTB embedded in uImage.

With that said, adding FDT support to a modern u-boot is quite simple. So for modern u-boot such as 2014 and later, it is trivial to have FDT support. The hard part is to create the board file for u-boot that work for a specific box.

Looking at the dmesg log, is this the ASUS-M25 boot log or something else?
Marvell DB-88F6281-BP Development Board

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 13, 2015 03:50AM
bodhi Wrote:
-------------------------------------------------------

> Looking at the dmesg log, is this the ASUS-M25
> boot log or something else?
>
> Marvell DB-88F6281-BP Development Board
>


Yes. Out console Asus-NAS-M25.
first log - download Asus from NAND
the second and third log - download Asus from USB Debian


Sorry for my English translation.

FDT core 't see mtd parted.
Maybe I'm not correctly create section &nand in DTS-file ?


I'm compiled the kernel from sources 3.16 (bodhi config + patch) with support for FDT
install linux-image-3.16.7_FDT.deb
used the same DTB file (kirkwood-asus_m25.dtb) that was used to 3.17 and 3.18

cp -a zImage-3.16.7-m25.02  zImage.fdt
cat kirkwood-asus_m25.dtb  >> zImage.fdt
mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-3.16.7-m25.02 -d /boot/zImage.fdt /boot/uImage
mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-3.16.7-m25.02 -d /boot/initrd.img-3.16.7-m25.02 /boot/uInitrd

mtd partitions are visible (Attachments: 3.16.7_FDT.txt)


Then it turns out that DTB is correct, and the reason for the peculiarities of new kernel 3.17 and 3.18 ?



Edited 4 time(s). Last edit at 02/13/2015 07:52AM by balbes150.
Attachments:
open | download - 3.16.7_FDT.txt (57.7 KB)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 13, 2015 01:27PM
bodhi Wrote:

> Please post your dmesg output. The kernel command
> line will show what is the actual mtd definition
> being passed into the kernel. This is just a
> precaution to cover all bases, (I've already
> guessed what it looks like based on /proc/mtd).

Hi bodhi,

please excuse my late answer - i made some further experiments...

Here is the serial bootlog from the latest state of my box:
         __  __                      _ _
        |  \/  | __ _ _ ____   _____| | |
        | |\/| |/ _` | '__\ \ / / _ \ | |
        | |  | | (_| | |   \ V /  __/ | |
        |_|  |_|\__,_|_|    \_/ \___|_|_|
 _   _     ____              _
| | | |   | __ )  ___   ___ | |_
| | | |___|  _ \ / _ \ / _ \| __|
| |_| |___| |_) | (_) | (_) | |_
 \___/    |____/ \___/ \___/ \__|
 ** MARVELL BOARD: RD-88F6281A LE

U-Boot 1.1.4 (Mar 18 2010 - 23:12:09) Marvell version: 3.4.19

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

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

DRAM CAS Latency = 5 tRP = 5 tRAS = 18 tRCD=6
DRAM CS[0] base 0x00000000   size 256MB
DRAM CS[1] base 0x10000000   size 256MB
DRAM Total size 512MB  16bit width
Addresses 10M - 0M are saved for the U-Boot usage.
Mem malloc Initialization (10M - 7M): Done
NAND:128 MB
Flash:  0 kB

CPU : Marvell Feroceon (Rev 1)
//---  stateButtonBit = 3, recovery ---//
Kernel address is 0x4640000.
Erasing Nand...Writing to Nand... done

Streaming disabled
Write allocate disabled

Module 0 is RGMII
Module 1 is TDM

USB 0: host mode
PEX 0: interface detected no Link.
Net:   egiga0, egiga1 [PRIME]
Hit any key to stop autoboot:  0

Reset IDE:
Marvell Serial ATA Adapter
Integrated Sata device found
[0 0 0]: Enable DMA mode (6)
  Device 0 @ 0 0:
Model: ST380815AS                               Firm: 4.ADA    Ser#:             5RW3Q7VN
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 76293.9 MB = 74.5 GB (156250000 x 512)


2878838 bytes read

6180007 bytes read
## Booting image at 02000000 ...
   Image Name:   Linux-3.18.5-kirkwood-tld-1
   Created:      2015-02-09  17:52:28 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    2878774 Bytes =  2.7 MB
   Load Address: 00008000
   Entry Point:  00008000
   Verifying Checksum ... OK
OK
## Loading Ramdisk Image at 01100000 ...
   Image Name:   initramfs-3.18.5-kirkwood-tld-1
   Created:      2015-02-09  17:55:12 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    6179943 Bytes =  5.9 MB
   Load Address: 00000000
   Entry Point:  00000000
   Verifying Checksum ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Initializing cgroup subsys cpuset
[    0.000000] Initializing cgroup subsys cpu
[    0.000000] Initializing cgroup subsys cpuacct
[    0.000000] Linux version 3.18.5-kirkwood-tld-1 (root@tldDebian) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 PREEMPT Thu Feb 5 17:58:07 PST 2015
[    0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397f
[    0.000000] CPU: VIVT data cache, VIVT instruction cache
[    0.000000] Machine model: Zyxel NSA320
[    0.000000] Memory policy: Data cache writeback
[    0.000000] On node 0 totalpages: 131072
[    0.000000] free_area_init_node: node 0, pgdat c0802d40, node_mem_map dfbfa000
[    0.000000]   DMA zone: 1024 pages used for memmap
[    0.000000]   DMA zone: 0 pages reserved
[    0.000000]   DMA zone: 131072 pages, LIFO batch:31
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
[    0.000000] Kernel command line: 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/sda1 rootdelay=5 loglevel=8
[    0.000000] PID hash table entries: 2048 (order: 1, 8192 bytes)
[    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: 505120K/524288K available (5640K kernel code, 365K rwdata, 1920K rodata, 268K init, 305K bss, 19168K reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xffe00000   (2048 kB)
[    0.000000]     vmalloc : 0xe0800000 - 0xff000000   ( 488 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc076a240   (7561 kB)
[    0.000000]       .init : 0xc076b000 - 0xc07ae000   ( 268 kB)
[    0.000000]       .data : 0xc07ae000 - 0xc08096fc   ( 366 kB)
[    0.000000]        .bss : 0xc08096fc - 0xc0855d84   ( 306 kB)
[    0.000000] Preemptible hierarchical RCU implementation.
[    0.000000] NR_IRQS:16 nr_irqs:16 16
[    0.000014] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 21474836475ns
[    0.000379] Console: colour dummy device 80x30
[    0.000407] Calibrating delay loop... 1196.85 BogoMIPS (lpj=5984256)
[    0.090106] pid_max: default: 32768 minimum: 301
[    0.090241] Security Framework initialized
[    0.090335] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.090354] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.091033] Initializing cgroup subsys devices
[    0.091063] Initializing cgroup subsys freezer
[    0.091092] Initializing cgroup subsys net_cls
[    0.091113] Initializing cgroup subsys blkio
[    0.091204] CPU: Testing write buffer coherency: ok
[    0.091589] Setting up static identity map for 0x557418 - 0x557470
[    0.091891] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x3
[    0.094050] devtmpfs: initialized
[    0.096510] prandom: seed boundary self test passed
[    0.100575] prandom: 100 self tests passed
[    0.100602] pinctrl core: initialized pinctrl subsystem
[    0.101052] regulator-dummy: no parameters
[    0.106088] NET: Registered protocol family 16
[    0.106497] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.130103] cpuidle: using governor ladder
[    0.160104] cpuidle: using governor menu
[    0.160511] Feroceon L2: Enabling L2
[    0.160554] Feroceon L2: Cache support initialised.
[    0.160931] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet0-port@0: local-mac-address is not set
[    0.165789] No ATAGs?
[    0.201732] vgaarb: loaded
[    0.202108] usbcore: registered new interface driver usbfs
[    0.202189] usbcore: registered new interface driver hub
[    0.202252] usbcore: registered new device driver usb
[    0.203312] Switched to clocksource orion_clocksource
[    0.240721] NET: Registered protocol family 2
[    0.241449] TCP established hash table entries: 4096 (order: 2, 16384 bytes)
[    0.241505] TCP bind hash table entries: 4096 (order: 2, 16384 bytes)
[    0.241557] TCP: Hash tables configured (established 4096 bind 4096)
[    0.241618] TCP: reno registered
[    0.241631] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.241652] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.241846] NET: Registered protocol family 1
[    0.242195] RPC: Registered named UNIX socket transport module.
[    0.242206] RPC: Registered udp transport module.
[    0.242213] RPC: Registered tcp transport module.
[    0.242220] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.242241] PCI: CLS 0 bytes, default 32
[    0.242475] Unpacking initramfs...
[    0.743743] Freeing initrd memory: 6036K (c1100000 - c16e5000)
[    0.743875] NetWinder Floating Point Emulator V0.97 (double precision)
[    0.745205] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.745236] Initialise system trusted keyring
[    0.745328] audit: initializing netlink subsys (disabled)
[    0.745380] audit: type=2000 audit(0.740:1): initialized
[    0.746138] zpool: loaded
[    0.746155] zbud: loaded
[    0.746449] VFS: Disk quotas dquot_6.5.2
[    0.746510] Dquot-cache hash table entries: 1024 (order 0, 4096 bytes)
[    0.747102] NFS: Registering the id_resolver key type
[    0.747140] Key type id_resolver registered
[    0.747150] Key type id_legacy registered
[    0.747176] nfs4filelayout_init: NFSv4 File Layout Driver Registering...
[    0.747191] Installing knfsd (copyright (C) 1996 okir@monad.swb.de).
[    0.747407] jffs2: version 2.2. (NAND) (SUMMARY)  © 2001-2006 Red Hat, Inc.
[    0.747732] msgmni has been set to 998
[    0.747890] Key type big_key registered
[    0.750650] alg: No test for stdrng (krng)
[    0.750693] Key type asymmetric registered
[    0.750710] Asymmetric key parser 'x509' registered
[    0.750800] bounce: pool size: 64 pages
[    0.750886] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.750908] io scheduler noop registered
[    0.750924] io scheduler deadline registered
[    0.750981] io scheduler cfq registered (default)
[    0.752246] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driver
[    0.752903] irq: Cannot allocate irq_descs @ IRQ34, assuming pre-allocated
[    0.753394] irq: Cannot allocate irq_descs @ IRQ66, assuming pre-allocated
[    0.754223] mvebu-pcie mbus:pcie-controller: PCI host bridge to bus 0000:00
[    0.754242] pci_bus 0000:00: root bus resource [io  0x1000-0xfffff]
[    0.754255] pci_bus 0000:00: root bus resource [mem 0xe0000000-0xefffffff]
[    0.754268] pci_bus 0000:00: root bus resource [bus 00-ff]
[    0.754311] pci 0000:00:01.0: [11ab:6281] type 01 class 0x060400
[    0.754590] PCI: bus0: Fast back to back transfers disabled
[    0.754606] pci 0000:00:01.0: bridge configuration invalid ([bus 00-00]), reconfiguring
[    0.754771] PCI: bus1: Fast back to back transfers enabled
[    0.754788] pci_bus 0000:01: busn_res: [bus 01-ff] end is updated to 01
[    0.754818] pci 0000:00:01.0: PCI bridge to [bus 01]
[    0.755098] mv_xor f1060800.xor: Marvell shared XOR driver
[    0.793389] mv_xor f1060800.xor: Marvell XOR: ( xor cpy )
[    0.833373] mv_xor f1060800.xor: Marvell XOR: ( xor cpy )
[    0.833555] mv_xor f1060900.xor: Marvell shared XOR driver
[    0.873371] mv_xor f1060900.xor: Marvell XOR: ( xor cpy )
[    0.913371] mv_xor f1060900.xor: Marvell XOR: ( xor cpy )
[    0.913768] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    0.915048] console [ttyS0] disabled
[    0.915107] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 27, base_baud = 12500000) is a 16550A
[    1.625830] console [ttyS0] enabled
[    1.630714] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    1.637128] nand: Samsung NAND 128MiB 3,3V 8-bit
[    1.641770] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    1.647480] Scanning device for bad blocks
[    1.656404] Bad eraseblock 59 at 0x000000760000
[    1.685317] Bad eraseblock 362 at 0x000002d40000
[    1.698212] Bad eraseblock 465 at 0x000003a20000
[    1.725685] Bad eraseblock 749 at 0x000005da0000
[    1.743496] Bad eraseblock 913 at 0x000007220000
[    1.754543] Bad eraseblock 993 at 0x000007c20000
[    1.769316] libphy: Fixed MDIO Bus: probed
[    1.773831] libphy: orion_mdio_bus: probed
[    1.783730] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4
[    1.791654] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:19:cb:00:51:81
[    1.800736] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.807351] ehci-pci: EHCI PCI platform driver
[    1.811890] ehci-orion: EHCI orion driver
[    1.816132] orion-ehci f1050000.ehci: EHCI Host Controller
[    1.821670] orion-ehci f1050000.ehci: new USB bus registered, assigned bus number 1
[    1.829566] orion-ehci f1050000.ehci: irq 30, io mem 0xf1050000
[    1.853349] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00
[    1.859558] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.866408] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.873683] usb usb1: Product: EHCI Host Controller
[    1.878580] usb usb1: Manufacturer: Linux 3.18.5-kirkwood-tld-1 ehci_hcd
[    1.885330] usb usb1: SerialNumber: f1050000.ehci
[    1.890776] hub 1-0:1.0: USB hub found
[    1.894632] hub 1-0:1.0: 1 port detected
[    1.899445] mousedev: PS/2 mouse device common for all mice
[    1.905713] rtc-mv f1010300.rtc: rtc core: registered f1010300.rtc as rtc0
[    1.912788] i2c /dev entries driver
[    1.922139] rtc-pcf8563 0-0051: chip found, driver version 0.4.3
[    1.933452] rtc-pcf8563 0-0051: rtc core: registered rtc-pcf8563 as rtc1
[    1.942535] hidraw: raw HID events driver (C) Jiri Kosina
[    1.948434] drop_monitor: Initializing network drop monitor service
[    1.955001] TCP: cubic registered
[    1.958340] NET: Registered protocol family 17
[    1.962920] Key type dns_resolver registered
[    1.968075] Loading compiled-in X.509 certificates
[    1.972909] registered taskstats version 1
[    1.978027] rtc-mv f1010300.rtc: setting system clock to 2015-02-13 10:28:01 UTC (1423823281)
[    1.987760] PM: Hibernation image not present or could not be loaded.
[    1.995376] Freeing unused kernel memory: 268K (c076b000 - c07ae000)
Loading, please wait...
[    2.074246] udevd[61]: starting version 175
[    2.213487] usb 1-1: new high-speed USB device number 2 using orion-ehci
[    2.375224] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    2.381983] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    2.403416] usb 1-1: Product: USB2.0 Hub
[    2.411202] hub 1-1:1.0: USB hub found
[    2.419844] hub 1-1:1.0: 4 ports detected
[    2.461533] SCSI subsystem initialized
[    2.538430] libata version 3.00 loaded.
[    2.558724] sata_mv f1080000.sata: version 1.28
[    2.581571] sata_mv f1080000.sata: slots 32 ports 2
[    2.621991] scsi host0: sata_mv
[    2.641250] scsi host1: sata_mv
[    2.648225] ata1: SATA max UDMA/133 irq 33
[    2.652342] ata2: SATA max UDMA/133 irq 33
[    3.183378] ata1: SATA link up 3.0 Gbps (SStatus 123 SControl F300)
[    3.263389] ata1.00: ATA-7: ST380815AS, 4.ADA, max UDMA/133
[    3.268995] ata1.00: 156250000 sectors, multi 0: LBA48 NCQ (depth 31/32)
[    3.353395] ata1.00: configured for UDMA/133
[    3.373688] scsi 0:0:0:0: Direct-Access     ATA      ST380815AS       A    PQ: 0 ANSI: 5
[    3.733354] ata2: SATA link down (SStatus 0 SControl F300)
[    3.776120] sd 0:0:0:0: [sda] 156250000 512-byte logical blocks: (80.0 GB/74.5 GiB)
[    3.785205] sd 0:0:0:0: [sda] Write Protect is off
[    3.790025] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.795269] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.829403]  sda: sda1
[    3.833522] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.850021] sd 0:0:0:0: Attached scsi generic sg0 type 0
Begin: Loading essential drivers ... done.
Begin: Running /scripts/init-premount ... done.
Begin: Mounting root file system ... Begin: Running /scripts/local-top ... done.
Begin: Running /scripts/local-premount ... done.
[    9.220263] EXT3-fs (sda1): mounted filesystem with ordered data mode
[    9.226804] kjournald starting.  Commit interval 5 seconds
Begin: Running /scripts/local-bottom ... done.
done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[info] Using makefile-style concurrent boot in runlevel S.
[....] Starting the hotplug events dispatcher: udevd[   10.874297] udevd[275]: starting version 175
. ok
[ ok ] Synthesizing the initial hotplug events...done.
[....] Waiting for /dev to be fully populated...[   11.256819] input: gpio_keys as /devices/gpio_keys/input/input0
[   11.624782] orion_wdt: Initial timeout 21 sec
[   11.781341] USB Power: 5000 mV
done.
[ ok ] Activating swap...done.
[....] Checking root file system...fsck from util-linux 2.20.1
rootfs: clean, 54260/4890624 files, 727225/19530767 blocks
done.
[   13.457639] EXT3-fs (sda1): using internal journal
[   13.614241] random: nonblocking pool is initialized
[ ok ] Loading kernel modules...done.
[ ok ] Cleaning up temporary files... /tmp /lib/init/rw.
[ ok ] Activating lvm and md swap...done.
[....] Checking file systems...fsck from util-linux 2.20.1
done.
[ ok ] Mounting local filesystems...done.
[ ok ] Activating swapfile swap...done.
[ ok ] Cleaning up temporary files....
[ ok ] Setting kernel variables ...done.
[....] Configuring network interfaces...[   18.222123] NET: Registered protocol family 10
Internet Systems Consortium DHCP Client 4.2.2
Copyright 2004-2011 Internet Systems Consortium.
All rights reserved.
For info, please visit https://www.isc.org/software/dhcp/

[   18.420642] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
Listening on LPF/eth0/00:19:cb:00:51:81
Sending on   LPF/eth0/00:19:cb:00:51:81
Sending on   Socket/fallback
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 4
[   21.508646] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, full duplex, flow control disabled
[   21.518571] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPREQUEST on eth0 to 255.255.255.255 port 67
DHCPOFFER from 192.168.151.1
DHCPACK from 192.168.151.1
bound to 192.168.151.214 -- renewal in 276450 seconds.
done.
[ ok ] Starting rpcbind daemon....
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Cleaning up temporary files....
INIT: Entering runlevel: 2
[info] Using makefile-style concurrent boot in runlevel 2.
[....] Starting busybox' syslogd implementation : syslogdStarting /sbin/syslogd...
1817 (syslogd)
. ok
[....] Starting busybox' klogd implementation : klogdStarting /sbin/klogd...
[ ok ] Starting system message bus: dbus.
[ ok ] Starting NFS common utilities: statd idmapd.
[ ok ] Starting Avahi mDNS/DNS-SD Daemon: avahi-daemon.
[ ok ] Starting NTP server: ntpd.
[ ok ] Starting rpcbind daemon...[....] Already running..
[ ok ] Starting OpenBSD Secure Shell server: sshd.
[warn] Not starting NFS kernel daemon: no exports. ... (warning).
1815 (klogd)
. ok

Debian GNU/Linux 7 debian ttyS0

debian login: root
Password:
Last login: Fri Feb 13 02:10:51 PST 2015 on ttyS0
Linux debian 3.18.5-kirkwood-tld-1 #1 PREEMPT Thu Feb 5 17:58:07 PST 2015 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.
root@debian:~# cat /proc/mtd
dev:    size   erasesize  name
mtd0: 08000000 00020000 "orion_nand"

And this are the envs:
NSA320>> printenv
bootargs=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
bootdelay=2
baudrate=115200
loads_echo=0
ethaddr=00:19:CB:00:51:81
eth1addr=00:19:CB:00:51:82
ipaddr=10.4.50.165
serverip=10.4.50.5
rootpath=/mnt/ARM_FS/
netmask=255.255.255.0
nandEcc=1bit
MODEL_ID=DD01
PRODUCT_NAME=NSA-320
FEATURE_BIT=00
CONTRY_TYPE=FF
VENDOR_NAME=ZyXEL Communications Corp.
run_diag=yes
console=100000
=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
CASset=min
ethprime=egiga1
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
ethmtu=1500
eth1mtu=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
arcNumber=3956
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
bootargs_sata1linux=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/sda1 rootdelay=5 loglevel=8
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 $(loadaddr)
bootcmd_sata1linux=setenv bootargs $(bootargs_sata1linux); mw 0x800000 0 1; ide reset; ext2load ide 0:1 $(loadaddr) /uImage; ext2load ide 0:1 0x01100000 /uInitrd; bootm $(loadaddr) 0x01100000
to_stock=setenv mainlineLinux no; setenv bootcmd \'run bootcmd_stock\'; saveenv; reset
to_linux=setenv mainlineLinux yes; setenv bootcmd \'run bootcmd_linux\'; saveenv; reset
to_sata1linux=setenv mainlinelinux yes; setenv bootcmd \'run bootcmd_sata1linux\'; saveenv; reset
MALLOC_len=3
mainlinelinux=yes
bootcmd='run bootcmd_sata1linux'
stdin=serial
stdout=serial
stderr=serial
nandEnvBase=100000
mainlineLinux=yes
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
disaMvPnp=no
hddPowerCtrl=no
enaAutoRecovery=yes
kernel_addr=0x4640000
pcieTune=no
ethact=egiga1

Environment size: 3092/131068 bytes

What did you guess, and: were you right?

BR
Jan
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 13, 2015 03:02PM
balbes150 Wrote:
-------------------------------------------------------
> bodhi Wrote:
> --------------------------------------------------
> -----
>
> > Looking at the dmesg log, is this the ASUS-M25
> > boot log or something else?
> >
> > Marvell DB-88F6281-BP Development Board
> >
>
>
> Yes. Out console Asus-NAS-M25.
> first log - download Asus from NAND
> the second and third log - download Asus from USB
> Debian
>
>
> Sorry for my English translation.
>
> FDT core 't see mtd parted.
> Maybe I'm not correctly create section &nand in
> DTS-file ?
>
>
> I'm compiled the kernel from sources 3.16 (bodhi
> config + patch) with support for FDT
> install linux-image-3.16.7_FDT.deb
> used the same DTB file (kirkwood-asus_m25.dtb)
> that was used to 3.17 and 3.18
>
>
> cp -a zImage-3.16.7-m25.02  zImage.fdt
> cat kirkwood-asus_m25.dtb  >> zImage.fdt
> mkimage -A arm -O linux -T kernel -C none -a
> 0x00008000 -e 0x00008000 -n Linux-3.16.7-m25.02 -d
> /boot/zImage.fdt /boot/uImage
> mkimage -A arm -O linux -T ramdisk -C gzip -a
> 0x00000000 -e 0x00000000 -n
> initramfs-3.16.7-m25.02 -d
> /boot/initrd.img-3.16.7-m25.02 /boot/uInitrd
>
>
> mtd partitions are visible (Attachments:
> 3.16.7_FDT.txt)
>
>
> Then it turns out that DTB is correct, and the
> reason for the peculiarities of new kernel 3.17
> and 3.18 ?

Not really. Kernel 3.16 patch was non-FDT. Are you sure that device tree was executed and populated?

ls -l /proc/device-tree/

PS.

If you put mtdparts definition in the kernel command line for 3.18, will it take?

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



Edited 1 time(s). Last edit at 02/13/2015 03:41PM by bodhi.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 13, 2015 03:39PM
@Jan,


> What did you guess, and: were you right?

Yes, there must have been a subtle change in 3.18 that seems to affect stock u-boot only.

In the following bootargs, try changing it as followed (the bold part). And please do this in serial console only (don't save).
bootargs_sata1linux=console=ttyS0,115200 mtdparts=orion_nand:0x100000(uboot),0x80000(uboot_env),0x80000(key_store),0x80000(info),0xA00000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda1 rootdelay=5 loglevel=8

And then boot into Debian. Check your mtds in dmesg.

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



Edited 1 time(s). Last edit at 02/13/2015 08:46PM by bodhi.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 14, 2015 12:48AM
bodhi Wrote:

>
> Not really. Kernel 3.16 patch was non-FDT. Are you
> sure that device tree was executed and populated?
>
> ls -l /proc/device-tree/
>
> PS.
>
> If you put mtdparts definition in the kernel
> command line for 3.18, will it take?

I'm not correctly described, after applying your patch and configuration, I also changed the configuration included the option to build FDT kernel


two days I'll try to check your instructions


The result of the command

root@nas-m25:~# ls -l /proc/device-tree/ 
итого 0
-r--r--r--  1 root root  4 фев 14 12:32 #address-cells
drwxr-xr-x  2 root root  0 фев 14 12:32 aliases
drwxr-xr-x  2 root root  0 фев 14 12:32 chosen
-r--r--r--  1 root root 78 фев 14 12:32 compatible
drwxr-xr-x  3 root root  0 фев 14 12:32 cpus
drwxr-xr-x  5 root root  0 фев 14 12:32 gpio_keys
drwxr-xr-x 10 root root  0 фев 14 12:32 gpio-leds
drwxr-xr-x  2 root root  0 фев 14 12:32 gpio_poweroff
-r--r--r--  1 root root  4 фев 14 12:32 interrupt-parent
drwxr-xr-x  5 root root  0 фев 14 12:32 mbus
drwxr-xr-x  2 root root  0 фев 14 12:32 memory
-r--r--r--  1 root root  9 фев 14 12:32 model
-r--r--r--  1 root root  1 фев 14 12:32 name
drwxr-xr-x 30 root root  0 фев 14 12:32 ocp@f1000000
drwxr-xr-x  4 root root  0 фев 14 12:32 regulators
-r--r--r--  1 root root  4 фев 14 12:32 #size-cells



Edited 1 time(s). Last edit at 02/14/2015 03:44AM by balbes150.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 14, 2015 07:02PM
balbes150,

I think you should put the mtdparts definition in the kernel command line (looks like it is not currently). See if it will appear.

[    0.000000] Kernel command line: console=ttyS0,115200n8 user_debug=31 :::DB88FXX81:eth0:none

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 16, 2015 03:01AM
bodhi Wrote:
-------------------------------------------------------
> balbes150,
>
> I think you should put the mtdparts definition in
> the kernel command line (looks like it is not
> currently). See if it will appear.
>
>
> [    0.000000] Kernel command line:
> console=ttyS0,115200n8 user_debug=31
> :::DB88FXX81:eth0:none
>


I looked at the result of the command printenv Asus-NAS-M25 :

Hit any key to stop autoboot:  0
Marvell>> printenv
baudrate=115200
loads_echo=0
ipaddr=10.4.52.165
serverip=10.4.52.7
rootpath=/srv/ubuntu
netmask=255.255.255.0
run_diag=yes
stdin=serial
stdout=serial
stderr=serial
console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
mainlineLinux=no
enaMonExt=no
enaCpuStream=no
enaWrAllo=no
pexMode=RC
disL2Cache=no
setL2CacheWT=yes
disL2Prefetch=yes
enaICPref=yes
enaDCPref=yes
sata_dma_mode=yes
MALLOC_len=1
ethprime=egiga0
netbsd_en=no
vxworks_en=no
bootargs_root=root=/dev/nfs rw
bootargs_end=:::DB88FXX81:eth0:none
image_name=uImage
bootcmd=tftpboot 0x2000000 $(image_name); setenv bootargs $(console) $(bootargs_root) nfsroot=$(serverip):$(rootpath) ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvNetConfig) $(mvPhoneConfig) video=dovefb:lcd0:$(lcd0_params) clcd.lcd0_enable=$(lcd0_enable);  bootm 0x2000000;
standalone=fsload 0x2000000 $(image_name);setenv bootargs $(console) root=/dev/mtdblock0 rw ip=$(ipaddr):$(serverip)$(bootargs_end) $(mvPhoneConfig); bootm 0x2000000;
bootdelay=3
disaMvPnp=no
ethaddr=00:50:43:60:30:02
ethmtu=1500
mvPhoneConfig=mv_phone_config=dev[0]:fxs,dev[1]:fxo
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
nandEcc=1bit
netretry=no
rcvrip=169.254.100.100
loadaddr=0x02000000
autoload=no
image_multi=yes
enaAutoRecovery=yes
pcieTune=no
ethact=egiga0

Environment size: 1367/131068 bytes




I need to do, as recommended @Jan ?
Edit the line as You recommend him mtdparts=orion_nand ?

console=console=ttyS0,115200 mtdparts=nand_mtd:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 16, 2015 03:12AM
Yes,
console=console=ttyS0,115200 mtdparts=orion_nand:0xc0000@0(uboot)ro,0x7f00000@0x100000(root)

Your dmesg showed that the mtdparts did not get into the command line.

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



Edited 2 time(s). Last edit at 02/16/2015 12:42PM by bodhi.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 16, 2015 04:50AM
U-Boot Asus-NAS-M25 Doesn't support booting from SATA (HDD).
There is only support for USB and NAND.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 16, 2015 08:37AM
bodhi Wrote:

> Yes, there must have been a subtle change in 3.18
> that seems to affect stock u-boot only.
>
> In the following bootargs, try changing it as
> followed (the bold part). And please do this in
> serial console only (don't save).
>
> bootargs_sata1linux=console=ttyS0,115200
> mtdparts=orion_nand:0x100000(uboot),0x80000
> (uboot_env),0x80000(key_store),0x80000(info),0xA00
> 000(etc),0xA00000(kernel_1),0x2FC0000(rootfs1),0xA
> 00000(kernel_2),0x2FC0000(rootfs2) root=/dev/sda1
> rootdelay=5 loglevel=8
>
>
> And then boot into Debian. Check your mtds in
> dmesg.

Hi bodhi,

maaany thanks, you made it:
dmesg
...
[    1.630855] nand: device found, Manufacturer ID: 0xec, Chip ID: 0xf1
[    1.637276] nand: Samsung NAND 128MiB 3,3V 8-bit
[    1.641918] nand: 128MiB, SLC, page size: 2048, OOB size: 64
[    1.647628] Scanning device for bad blocks
[    1.656552] Bad eraseblock 59 at 0x000000760000
[    1.685461] Bad eraseblock 362 at 0x000002d40000
[    1.698351] Bad eraseblock 465 at 0x000003a20000
[    1.725823] Bad eraseblock 749 at 0x000005da0000
[    1.743634] Bad eraseblock 913 at 0x000007220000
[    1.754683] Bad eraseblock 993 at 0x000007c20000
[    1.761755] 9 cmdlinepart partitions found on MTD device orion_nand
[    1.768071] Creating 9 MTD partitions on "orion_nand":
[    1.773242] 0x000000000000-0x000000100000 : "uboot"
[    1.778571] 0x000000100000-0x000000180000 : "uboot_env"
[    1.784221] 0x000000180000-0x000000200000 : "key_store"
[    1.789826] 0x000000200000-0x000000280000 : "info"
[    1.795025] 0x000000280000-0x000000c80000 : "etc"
[    1.800129] 0x000000c80000-0x000001680000 : "kernel_1"
[    1.805698] 0x000001680000-0x000004640000 : "rootfs1"
[    1.811213] 0x000004640000-0x000005040000 : "kernel_2"
[    1.816806] 0x000005040000-0x000008000000 : "rootfs2"
...

Now there's just one question left: what do i have to write in /etc/fw_env.config?
;-)

BR
Jan
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 16, 2015 12:39PM
balbes150 Wrote:
-------------------------------------------------------
> U-Boot Asus-NAS-M25 Doesn't support booting from
> SATA (HDD).
> There is only support for USB and NAND.

Ah, I've mixed up yours and Jan's :) then try that change "orion_nand" on USB.

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



Edited 1 time(s). Last edit at 02/16/2015 12:41PM by bodhi.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 16, 2015 12:58PM
@JanN,

Try
cat /etc/fw_env.config
# MTD device name        Device offset   Env. size   Flash sector size	Number of sectors
/dev/mtd1                        0x0000            0x20000    0x20000

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 17, 2015 02:41AM
Hi, bodhi,

Can you please compile the kernel with following options opened? I need to run docker.io in the pogoplug v4, and found that the docker refuse to run complained no CONFIG_DM_THIN_PROVISIONING in the kernel. You may also run the script to test if the kernel supports docker.io: https://raw.githubusercontent.com/docker/docker/master/contrib/check-config.sh

CONFIG_MEMCG_SWAP
CONFIG_CGROUP_PERF
CONFIG_AUFS_FS
CONFIG_DM_THIN_PROVISIONING

Thank you for your excellent work!
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 17, 2015 04:04AM
yhfudev,

Unfortunately, AUFS is not in the mainline Linux kernel. So I can't add it without patching. Also, there are some inpact to the current kernel with other config options above (will alter the behavior).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 17, 2015 06:01AM
Hi, bodhi,

That's a bad news. I'm trying to re-compile the kernel image from your source. I used the the latest 3.19 version, and I'll report the results once it's done.

I run "make menuconfig" and added some options, and found that there's some options missed in 3.19 compared with yours. Do I need some extra paches for the standard linux kernel downloaded from kernel.org or it's due to changes from 3.18 to 3.19?

-CONFIG_TREE_PREEMPT_RCU=y
-CONFIG_RESOURCE_COUNTERS=y
-CONFIG_PM_RUNTIME=y
-CONFIG_BT_6LOWPAN=m # this one is missing even I select in the menu
-CONFIG_IEEE802154_FAKEHARD=m
-CONFIG_IR_IMG_HW=y
-CONFIG_IR_IMG_NEC=y
-CONFIG_IR_IMG_JVC=y
-CONFIG_IR_IMG_SONY=y
-CONFIG_IR_IMG_SHARP=y
-CONFIG_IR_IMG_SANYO=y
-CONFIG_VIDEO_TLG2300=m
-CONFIG_SND_FIREWIRE_SPEAKERS=m
-CONFIG_SND_SOC_CS4271=m
-CONFIG_OF_IOMMU=y
-CONFIG_RCU_CPU_STALL_VERBOSE=y
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 17, 2015 12:15PM
@yhfudev,

> 
> -CONFIG_TREE_PREEMPT_RCU=y
> -CONFIG_RESOURCE_COUNTERS=y
> -CONFIG_PM_RUNTIME=y
> -CONFIG_BT_6LOWPAN=m # this one is missing even I
> select in the menu
> -CONFIG_IEEE802154_FAKEHARD=m
> -CONFIG_IR_IMG_HW=y
> -CONFIG_IR_IMG_NEC=y
> -CONFIG_IR_IMG_JVC=y
> -CONFIG_IR_IMG_SONY=y
> -CONFIG_IR_IMG_SHARP=y
> -CONFIG_IR_IMG_SANYO=y
> -CONFIG_VIDEO_TLG2300=m
> -CONFIG_SND_FIREWIRE_SPEAKERS=m
> -CONFIG_SND_SOC_CS4271=m
> -CONFIG_OF_IOMMU=y
> -CONFIG_RCU_CPU_STALL_VERBOSE=y

afaict, these are from mainline, so it's OK to either ignore them or select them. It won't cause problem.

NOTE:

should select CONFIG_TREE_PREEMPT_RCU=y

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



Edited 1 time(s). Last edit at 02/17/2015 12:22PM by bodhi.
Re: Linux Kernel 3.18 (FDT) and 3.16 (non-FDT) Kirkwood package and rootfs
February 21, 2015 06:13PM
FYI,

I will release a jessie rootfs for 3.18.5 in the next few days.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Sorry, you can't reply to this topic. It has been closed.