Hi bodhi,

I think the problem why the kernel is not booting might be memory map/offsets.

In your dts you declare RAM starting at 0x00000000 (and its size 256MB)

+	memory {
+		/* 256MB at address 0 */
+		reg = <0x00000000 0x10000000>;
+	};

while in Seagate's sources it starts at 0x20000000

/*
 * Memory map
 */
#define CNS3XXX_FLASH_BASE		0x10000000	/* Flash/SRAM Memory Bank 0 */
#define CNS3XXX_FLASH_SIZE		SZ_256M

#define CNS3XXX_DDR2SDRAM_BASE		0x20000000	/* DDR2 SDRAM Memory */

#define CNS3XXX_SPI_FLASH_BASE		0x60000000	/* SPI Serial Flash Memory */

#define CNS3XXX_SWITCH_BASE		0x70000000	/* Switch and HNAT Control */
#define CNS3XXX_SWITCH_BASE_VIRT	0xFFF00000

#define CNS3XXX_PPE_BASE		0x70001000	/* HANT	*/
#define CNS3XXX_PPE_BASE_VIRT		0xFFF50000

#define CNS3XXX_EMBEDDED_SRAM_BASE	0x70002000	/* HANT Embedded SRAM */
#define CNS3XXX_EMBEDDED_SRAM_BASE_VIRT	0xFFF60000

#define CNS3XXX_SSP_BASE		0x71000000	/* Synchronous Serial Port - SPI/PCM/I2C */
#define CNS3XXX_SSP_BASE_VIRT		0xFFF01000

#define CNS3XXX_DMC_BASE		0x72000000	/* DMC Control (DDR2 SDRAM) */
#define CNS3XXX_DMC_BASE_VIRT		0xFFF02000

#define CNS3XXX_SMC_BASE		0x73000000	/* SMC Control */
#define CNS3XXX_SMC_BASE_VIRT		0xFFF03000

The other thing I noticed is a difference in kernel configs between 2-disk boxes (that blackdevil and I have) and 4-disk boxes (that Mark has).
In config file for 2-disk box kernel parameters are set as follows:

CONFIG_CMDLINE="root=/dev/ram0 rw init=/sbin/init mem=256M console=ttyS0,38400"

while for 4-disk as follows:
CONFIG_CMDLINE="root=/dev/ram0 rw init=/sbin/init mem=512M console=ttyS0,38400"


It is also worth to list part of Kconfig:
config CNS3XXX_HIGH_PHYS_OFFSET
    bool "High physical base address for the CNS3XXX platform"
    depends on MMU
    default y
    help
      CNS3XXX boards have the RAM available at 0x20000000,
      256MB of which being mirrored at 0x00000000.
      If the board supports 512MB of RAM, this option allows the
      memory to be accessed contiguously at the high physical
      offset.

where CNS3XXX_HIGH_PHYS_OFFSET is set to "y" in our kernels.



In our boxes we have in fact 512MB RAM however it is initialized after kernel is loaded (I refer to original sources by Seagate). One of the first functions that gets called in kernel is a .fixup function which remaps memory addressing.

static __init void cns3420_fixup(struct machine_desc *desc,
				struct tag *tags, char **cmdline,
				struct meminfo *mi)
{
	mi->nr_banks = 1;
	mi->bank[0].start = PHYS_OFFSET;
	mi->bank[0].size = SZ_512M;
	mi->bank[0].node = 0;
}

where PHYS_OFFSET is set during compilation to UL(0x20000000)



Edited 3 time(s). Last edit at 03/10/2018 05:43PM by tommy79.
Re: (WIP) Linux Kernel and rootfs 4.14.24 for Seagate Business Storage NAS (CNS3xxx) package
March 10, 2018 06:04PM
Hi tommy,

This is a very good observation!

>
> I think the problem why the kernel is not booting
> might be memory map/offsets.
>
> In your dts you declare RAM starting at
> 0x00000000 (and its size 256MB)
>
> + memory {
> + /* 256MB at address 0 */
> + reg = <0x00000000 0x10000000>;
> + };

> while in Seagate's sources it starts at
> 0x20000000

However, during these tests, the memory is specified by command line and the ATAG structure passed by u-boot. So that memory definition in DTS is actually not used.

> In our boxes we have in fact 512MB RAM however it
> is initialized in quite an odd way (I refer to
> original sources by Seagate). One of the first
> functions that gets called in kernel is a .fixup
> function which remaps memory addressing.

>
> static __init void cns3420_fixup(struct
> machine_desc *desc,
> 				struct tag *tags, char **cmdline,
> 				struct meminfo *mi)
> {
> 	mi->nr_banks = 1;
> 	mi->bank[0].start = PHYS_OFFSET;
> 	mi->bank[0].size = SZ_512M;
> 	mi->bank[0].node = 0;
> } 
>

This fixup code is no longer in the FDT kernel we are building.

But yes. This might be the cause of the problem booting the 2-bay boxes. But Mark's 4-bay box apparently booted OK, until the kernel panic with an error that seems to be caused by a bug in ARM11 mpcore. This is the boot log I'm referring to:

https://forum.doozan.com/read.php?2,22114,53409#msg-53409

This result above was the reason I'm optimistic about the current kernel tld-1.1. I've tried a fix for this panic in it. I would like Mark to repeat that test to see if we get pass that panic.

> That might suggest in 4-disk boxes whole memory is
> available at boottime (in U-boot), while in 2-disk
> boxes it is only 256M and it is neccesary to do
> the trick with the fixup function (however the
> fixup function gets called in kernel for both
> types of boxes - but for 4-disk box might not have
> an effect I guess).
>

This is also a very good point!

> config CNS3XXX_HIGH_PHYS_OFFSET

But this is no longer in the kernel tld-1 or tld-1.1. That config was for a non FDT kernel such as 3.18.5.

-------

The current DTS that I am using is from mainline patch by Arnd Bergmann. So I only needed to fix some syntax errors, but I think that DTS is a very good starting point.

I think the problem with 2-bay box is likely the kernel ATAGs info was messed up by the obsolete u-boot data. So I am rebuilding a kernel tld-1.2 to ignore that, but taking only command line parameters. The command line parameters and the DTB combined together is what the kernel will see. I think this is related to what blackdevil mentioned (his kernel build only boots with hardcoded command line).

In previous version (tld-1, tld-1.1) I had the ATAG passing configured in (just like all other kernels I built such as Kirkood and MVEBU). They boot with modern u-boot so that is not a problem.

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



Edited 2 time(s). Last edit at 03/10/2018 06:07PM by bodhi.
This is Makefile.boot from 4.4.88 kernel that is working for us, Maybe this will be helpful as it sets atag, right?


zreladdr-y	+= 0x00008000
params_phys-y	:= 0x00000100
initrd_phys-y	:= 0x00C00000 
Re: (WIP) Linux Kernel and rootfs 4.14.24 for Seagate Business Storage NAS (CNS3xxx) package
March 10, 2018 07:15PM
Tommy,

I would try to ignore ATAG data completely and only rely on the DTS. That way we don't need to deal with what this stock u-boot does regarding it. u-boot is too old. We would not know how much is needed to ported until we can run with this initial DTS.

I meant if kernel 4.4.88 is working for you guys, then perhaps that's OK. We only do this FDT build for an experiment, but it is not important to have now :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: (WIP) Linux Kernel and rootfs 4.14.24 for Seagate Business Storage NAS (CNS3xxx) package
March 10, 2018 08:40PM
All, here is the kernel uImage for 4.14.24-cns3xxx-tld-1.2 that you can use to boot the box. After this test kernel I will temporarily pause my activity in this subject for a while!

In this version, I removed the ability to process ATAG data from the kernel. So the kernel bootargs is all info being passed from u-boot. This with the DTS will be what define the box. Thus, if you have 4-bay box, then it will only use 256MB RAM.

I'm interested to see if we can get pass the kernel panic, and allow the 2-bay boxes to boot.

Note that there is no uInitrd, so it might not mount the rootfs correctly. However, that will be another booting phase that we are not too worry about yet.


Dowload at Dropbox

uImage.4.14.24-cns3xxx-tld-1.2.tar

md5:
c230d9e9224934ecc9b4e702dbf4a2e6
sha256:
496c2c733f0f4a8f2752bff5367679b1df3f1a122df4a5809d944fbc68f44c78

This tarball contain 1 file
-rw-r--r--   1 root root   3333299 Mar 10 17:41 uImage.4.14.24-cns3xxx-tld-1.2

How to run this kernel

1. Download the tarball and extract it to the /boot folder on the rootfs Debian-4.14.24-cns3xxxx-tld-1-rootfs-bodhi.tar.bz2. Assuming the rootfs is mounted at /media/sdb1

cd /media/sdb1/boot
cp -a uImage.4.14.24-cns3xxx-tld-1.2  uImage
sync


2. Booting.

Attach the rootfs to your box, Power up and interrupt serial console.

Assuming your envs are like what blackdevil posted above:
Whitney # printenv
bootargs=root=/dev/mtdblock0 mem=256M console=ttyS0
baudrate=38400
port=0
netboot_cmd=tftp 0x4000000 bootpImage; go 0x4000000
boardtest_state_memory=none
model_name=whitney_2bay
cpu_clock=700
mfgmodel=halfdome
bootfile="/tftpboot/uImage"
tftp_bsize=512
udp_frag_size=512
whitney_state=saved
serial_number=5564S01001G3330032CJ0A1
opid=Z13020128
hddlocation=C
ethaddr=00:10:75:38:D0:CC
serialNo=NA6F0QHW
ethaddr0=00:10:75:38:D0:CC
ethaddr1=00:10:75:38:D0:CD
modelname=1BW5P2-500
mfgtest_state=final_tested_ok
raclient_securityKey=ZnV30cQdeHJH12DIVbHKKA==
raclient_leaseExpires=2014-09-20T11:19:43Z
preboot=run if_netconsole start_netconsole
netmask=255.255.255.0
bootargs_console=console=ttyS0,38400
bootargs_root=root=/dev/sda1 rootwait
bootdelay=15
current_kernel=kernel1
bootcmd_scsii=scsi init;ext2load scsi 1 0x8000000 /uImage; bootm 0x8000000
boot=run bootcmd
num_boot_tries=0
rtclog=5211d287
bootcmd=setenv bootargs $(bootargs_console) $(bootargs_root) earlyprintk=serial; run bootcmd_scsi
stdin=serial
stdout=serial
stderr=serial
verify=n

Set this env
setenv bootcmd_scsi 'scsi init; ext2load scsi 1 0x02000000 /uImage; bootm 0x02000000'

And then boot it
boot
or
run bootcmd

Please post serial console log here.

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

Whitney # tftp 0x02000000 uImage41424
TFTP from server 192.168.1.1; our IP address is 192.168.1.154
Filename 'uImage41424'.
Load address: 0x2000000
Loading: #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         #################################################################
         ##
done
Bytes transferred = 3333299 (32dcb3 hex)
Whitney # bootm 0x02000000
enter do_eth_down!!!
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.14.24-cns3xxx-tld-1.2
   Created:      2018-03-11   1:41:05 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3333235 Bytes =  3.2 MB
   Load Address: 00008000
   Entry Point:  00008000
   Loading Kernel Image ...

I went one step further using your files when I created uImage with LOADADDR=0x2000000 (then the kernel should be loaded in U-boot somewhere else, I used the default 0x8000000)
Then I got this extra line:
Uncompressing Linux... done, booting the kernel.

but nothing more. I think LOADADDR=0x2000000 should be set as default, however there was still something wrong with dts/atags etc.

I said we have kernel 4.4.88 running but it lacks a lot of features - no gpio and i2c (which means no temp and fancontrol), no rtc, no usb, segfault on powerdown, only 256MB (however I will try to get 512MB by patching it with the fixup code I mentioned above) so it is not really usable.



Edited 1 time(s). Last edit at 03/10/2018 09:26PM by tommy79.
I can't get tld-1.2 to boot at all. Changing LOADADDR doesn't seem to help, either at U-Boot or using mkimage. It either hangs on "Starting Kernel Image ..." or segfaults and dumps me back into U-Boot.

Incidentally, the kernels I can boot won't let me specify mem=512M. They won't load at all if I use that, so Tommy79's memory fixup seems to be necessary.

Could someone share a working 4.4.x config and/or patches please? I have been successful in getting my own 4.4.120 kernel to load into Debian but can't get Ethernet working, among other things. Getting 4.4 running successfully will speed up my own work in getting 4.14+ going. Thanks!

Thanks again to everyone's help thus far in getting this working!

Mark
I just found this repo today. Anything useful here?

https://github.com/lede-project/source/tree/master/target/linux/cns3xxx
Mark,
chech this repo: https://github.com/KL-Yang/seagate_central_linux

This is the 4.4.88 kernel that I mentioned above. It has some patches on smp, ethernet, etc. but many things still missing (rtc, fancontrol, usb, problems with poweroff).
Re: (WIP) Linux Kernel and rootfs 4.14.24 for Seagate Business Storage NAS (CNS3xxx) package
March 11, 2018 05:07PM
Mark,

> I can't get tld-1.2 to boot at all.

So the trying to help 2-bay, I broke the 4-bay :)

All,

I will rebuild and upload tld-3 kernel package. Hopefully, it will help everybody to build the FDT kernel.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Hi All,
I found out how to run 2-bay box (and most likely 4-bay as well) with 512MB of RAM:) I am using kernel 4.4.88 I mentioned above.

To do this you actually do not need to patch the kernel. You only change LOADADDR for uImage and change kernel parameters.

Our boxes have 512MB of ram and its physical adress is 0x20000000 to 0x3FFFFFFF. Out of it 256MB is mirrored at 0x00000000 to 0x0FFFFFFF. Normally only this mirrored portion is used (in 4.x.x kernels).

So we need to to change the standard LOADADDR=02000000 (which targets the 256MB mirrored block of RAM) to LOADADDR=22000000 (which will load the kernel to the contignous 512MB of RAM) when building uImage.

Then we have to change mem kernel argument:

mem=256M
to
mem=512M@0x20000000

After this the bootargs in u-Boot in my case (you should change /dev/sda3 to your needs) are as follows:

bootargs=console=ttyS0,38400 mem=512M@0x20000000 root=/dev/sda3 rootwait

Then you run (tftp in my case, but fat2load will be similar)
tftp 0x28000000 /uImage   // uImage with the 22000000 LOADADDR
bootm 0x28000000

And that's it :)

Edit: In fact the tftp can be executed with 0x8000000 as the RAM is mirrored and what we load in 0x00000000-0x0FFFFFFF range is seen in 0x20000000-0x2FFFFFFF range. Also bootm 0x8000000 is ok. What matters, is the LOADADDR.

Result is 512 MB in the system:


root@seagate-dev:~# cat /proc/meminfo
MemTotal:         514240 kB
MemFree:          440380 kB
MemAvailable:     480040 kB
...

root@seagate-dev:~# cat /proc/iomem
10000000-17ffffff : physmap-flash.0
20000000-3fffffff : System RAM
  20008000-2050efb3 : Kernel code
  20542000-205812e7 : Kernel data



Edited 1 time(s). Last edit at 03/12/2018 07:24PM by tommy79.
tommy79 Wrote:
-------------------------------------------------------
> Hi All,
> I found out how to run 2-bay box (and most likely
> 4-bay as well) with 512MB of RAM:) I am using
> kernel 4.4.88 I mentioned above.
>
> To do this you actually do not need to patch the
> kernel. You only change LOADADDR for uImage and
> change kernel parameters.

That's awesome, Tommy! I took a turn trying to patch the kernel earlier today and quickly got lost in the weeds. This is a much better solution!

I've been building 4.4.120 kernels all day and finally got my RAID arrays working! I learned today that a SATA Port Multiplier needs to be enabled for the 4-Bay. I was only ever getting two disks when I did get my kernel going, which was not enough for the RAID array I had created.

I have yet to see if U-Boot can boot from the RAID array directly which might be a challenge but I can work around that.

One big question: what do I need to enable to get /dev/mtd support going?

Mark
tommy79 Wrote:
-------------------------------------------------------
>
> To do this you actually do not need to patch the
> kernel. You only change LOADADDR for uImage and
> change kernel parameters.

Hey, this is also great news because it means a DTB kernel might work with the expanded memory! I was concerned when Bodhi mentioned the kernel "fixup" patch trick wouldn't be available with a DTB approach but now there's hope. Yay!
tommy79 Wrote:
-------------------------------------------------------
> Hi All,
> I found out how to run 2-bay box (and most likely
> 4-bay as well) with 512MB of RAM:) I am using
> kernel 4.4.88 I mentioned above.


Darn it. Doesn't seem to work for me on my 4-Bay.
I built my kernel's uImage at 22000000:

Image Name: Linux-4.4.120-jmt-1.2
Created: Mon Mar 12 21:47:27 2018
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 3146056 Bytes = 3072.32 kB = 3.00 MB
Load Address: 22000000
Entry Point: 22000000
Image arch/arm/boot/uImage is ready

Loaded it up as shown in the two attached boot logs but never got the kernel started.

Whitney # setenv serverip 192.168.3.140; setenv ipaddr 192.168.3.17
Whitney # setenv bootargs mem=512M@0x20000000 root=/dev/md127 rootwait console=ttyS0,38400; setenv arcNumber 2776
Whitney # tftpboot 0x2000000 disks/seagate/uImage-4.4.120-jmt-1.2
Initialize PHY s/w auto-polling
phy_id: 1c
Initialize RTL8211
phy_id: 1c
Initialize RTL8211
TFTP from server 192.168.3.140; our IP address is 192.168.3.17
Filename 'disks/seagate/uImage-4.4.120-jmt-1.2'.
Load address: 0x2000000
Loading: T T #################################################################
         	[snip]
done
Bytes transferred = 3146120 (300188 hex)
Whitney # tftpboot 0x1100000 disks/seagate/uInitrd-4.4.120-jmt-1.2
TFTP from server 192.168.3.140; our IP address is 192.168.3.17
Filename 'disks/seagate/uInitrd-4.4.120-jmt-1.2'.
Load address: 0x1100000
Loading: #################################################################
		 [snip]
done
Bytes transferred = 7470144 (71fc40 hex)
Whitney # bootm 0x2000000 0x1100000
enter do_eth_down!!!
## Booting kernel from Legacy Image at 02000000 ...
   Image Name:   Linux-4.4.120-jmt-1.2
   Created:      2018-03-13   1:47:27 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3146056 Bytes =  3 MB
   Load Address: 22000000
   Entry Point:  22000000
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initrd-4.4.120-jmt-1.2
   Created:      2018-03-13   1:40:17 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7470080 Bytes =  7.1 MB
   Load Address: 00000000
   Entry Point:  00000000
   Loading Kernel Image ... OK
OK

Starting kernel ...


here's 0x80000000
Whitney # setenv serverip 192.168.3.140; setenv ipaddr 192.168.3.17
Whitney # setenv bootargs mem=512M@0x80000000 root=/dev/md127 rootwait console=ttyS0,38400; setenv arcNumber 2776
Whitney # tftpboot 0x8000000 disks/seagate/uImage-4.4.120-jmt-1.2
Initialize PHY s/w auto-polling
phy_id: 1c
Initialize RTL8211
phy_id: 1c
Initialize RTL8211
TFTP from server 192.168.3.140; our IP address is 192.168.3.17
Filename 'disks/seagate/uImage-4.4.120-jmt-1.2'.
Load address: 0x8000000
Loading: T T T #################################################################
		 [snip]
done
Bytes transferred = 3146120 (300188 hex)
Whitney # tftpboot 0x1100000 disks/seagate/uInitrd-4.4.120-jmt-1.2
TFTP from server 192.168.3.140; our IP address is 192.168.3.17
Filename 'disks/seagate/uInitrd-4.4.120-jmt-1.2'.
Load address: 0x1100000
Loading: #################################################################
		 [snip]

done
Bytes transferred = 7470144 (71fc40 hex)
Whitney # bootm 0x8000000 0x1100000
enter do_eth_down!!!
## Booting kernel from Legacy Image at 08000000 ...
   Image Name:   Linux-4.4.120-jmt-1.2
   Created:      2018-03-13   1:47:27 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3146056 Bytes =  3 MB
   Load Address: 22000000
   Entry Point:  22000000
## Loading init Ramdisk from Legacy Image at 01100000 ...
   Image Name:   initrd-4.4.120-jmt-1.2
   Created:      2018-03-13   1:40:17 UTC
   Image Type:   ARM Linux RAMDisk Image (gzip compressed)
   Data Size:    7470080 Bytes =  7.1 MB
   Load Address: 00000000
   Entry Point:  00000000
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.

First I tried to patch the kernel, i.e. tried to port the fixup function from 2.65 kernel. But it did not work as the PHYS_OFFSET, which defined the start of physical memory in 2.65, on current kernel (at least for our architecture) can't be set to anything else than 0x00000000. So I assumed it somehow has to be passed in kernel args and then I found out that we can set the starting point of memory region in mem argument after the @

Now I started to work on porting rtc from 2.65 :)
I do not use initrd. I do not know how to handle this, but you may try to increase all adresses you use by 0x20000000. It means use 0x21100000 instead of 0x1100000 and so on.

Your init ramdisk is loaded at 00000000 while I think it should at 20000000. Check if you can supply LOADADDR when building ramdisk and try to change it to 20000000



Edited 1 time(s). Last edit at 03/12/2018 09:30PM by tommy79.
tommy79 Wrote:
-------------------------------------------------------
> I do not use initrd. I do not know how to handle
> this, but you may try to increase all adresses you
> use by 0x20000000. It means use 0x21100000 instead
> of 0x1100000 and so on.
>
> Your init ramdisk is loaded at 00000000 while I
> think it should at 20000000. Check if you can
> supply LOADADDR when building ramdisk and try to
> change it to 20000000

Success!
I was misreading your addresses above. When I loaded the image at 0x28000000 and booted it from there I successfully get all 512MB!

Whitney # setenv serverip 192.168.3.140; setenv ipaddr 192.168.3.17
Whitney # setenv bootargs mem=512M@0x20000000 root=/dev/md127 rootwait console=ttyS0,38400
Whitney # scsi init

Initialize SCSI
AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part 
scanning bus for devices...
Supprt LBA48 addressing.
  Device 0: (0:0) Vendor: ATA Prod.: WDC WD40EFRX-68N Rev: 82.0
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 3815447.8 MB = 3726.0 GB (7814037168 x 512)
Supprt LBA48 addressing.
  Device 1: (1:0) Vendor: ATA Prod.: WDC WD40EFRX-68N Rev: 82.0
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 3815447.8 MB = 3726.0 GB (7814037168 x 512)

Whitney # ext2load scsi 0:2 0x28000000 /uImage; bootm 0x28000000

3146120 bytes read
enter do_eth_down!!!
## Booting kernel from Legacy Image at 28000000 ...
   Image Name:   Linux-4.4.120-jmt-1.2
   Created:      2018-03-13   1:47:27 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3146056 Bytes =  3 MB
   Load Address: 22000000
   Entry Point:  22000000
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x900
Initializing cgroup subsys cpu
...


Thanks a TON, Tommy! :-)

Mark
Re: (WIP) Linux Kernel and rootfs 4.14.24 for Seagate Business Storage NAS (CNS3xxx) package
March 12, 2018 11:02PM
Good works, Tommy :)

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

You can check this out: https://www.dropbox.com/sh/vc0suib2su60b0d/AAA2lXRE2j5DfwO-VVFWVeYEa?dl=0

This is my brand new 4.4.121 kernel and modules for our machines :)

I used mainline newest 4.4 kernel and applied patches from here: https://github.com/KL-Yang/seagate_central_linux
This was the foundation and on top of this I ported a lot of stuff from Seagate's 2.65 kernel.
I added support for gpio, rtc, i2c, hwmon (fancontrol is possible, however I did not tested it yet), poweroff routine. PCIe bus and usb should also be working, however I had some issues with PCIe (I think they appeared when I rebooted from 4.4 kernel to 2.65 and vice-versa, hopefully they are gone if I do not reboot to older kernel).
What is not working are leds and buttons, wake-on-lan and second ethernet port. I will try to add some of this in the future. Also some drivers may be buggy/misbehaving as they come from old architecture. Porting them from 2.65 I tried to make as little changes as possible and probably they need more updates. In the following days I will publish the source code, everyone is invited to review my changes.

The uboot commands I use to boot the kernel are as follows (make changes accordingly)
dhcp
setenv serverip 192.168.1.1; setenv bootargs 'console=ttyS0,38400 mem=512M@0x20000000 root=/dev/sda3 rootwait';
tftp 0x28000000 uImage; bootm 0x28000000

Please test and let me know what are your opinions :)



Edited 1 time(s). Last edit at 03/18/2018 06:37PM by tommy79.
tommy79 Wrote:
-------------------------------------------------------
> Hi All,
>
> You can check this out:
> https://www.dropbox.com/sh/vc0suib2su60b0d/AAA2lXRE2j5DfwO-VVFWVeYEa?dl=0
>
> This is my brand new 4.4.121 kernel and modules
> for our machines :)
>
> I used mainline newest 4.4 kernel and applied
> patches from here:
> https://github.com/KL-Yang/seagate_central_linux

Woohoo! This is music to my ears, Tommy! I will test your kernel this evening!

I've been refilling my NAS 4-Bay via the single Gb Ethernet, restoring files from another array. With USB 3.0 this should be an order of magnitude or more faster. :)

One question I've had is why, if the first Ethernet port is activated, why isn't the second? Is this part of the PHY/VBUS stuff that KL Yang mentioned? Been a while since I've played with kernels like I'm doing now, but traditionally once a driver got loaded all the devices that matched that driver would become usable?

Also, once the hardware is fully supported via a 4.4.x kernel I would guess the task of crafting a DTB might be easier?

Mark
tommy79 Wrote:
-------------------------------------------------------
>
> Please test and let me know what are your opinions
> :)

Also, when can I get your source code? :-)
tommy79 Wrote:
-------------------------------------------------------

>
> Please test and let me know what are your opinions
> :)

Tommy, you do good work! It booted up fine on my 4-Bay and I have USB and an RTC! Boot log is attached.

I only have one active drive in my chassis. Did you add the SATA Port multiplier support? I can't do RAID without it on my box. Attached is my most recent config for 4.4.120 which is now obsolete with your new kernel. :)

Let me also say what a beautiful thing it is when I issue a shutdown command and the whole box shuts off. Glorious!

Mark



Edited 1 time(s). Last edit at 03/18/2018 08:50PM by MarkTurner.
Attachments:
open | download - linux-4.4.121-tommy.boot.log (13.2 KB)
open | download - config.4.4.120-jmt (79.7 KB)
Hi tommy,
I tested the kernel on my 2-bay NAS. It starts loading but dont get far. Also tested with 0x800000 and 0x2000000 as address.

Whitney # setenv loaduimage 'ext2load scsi 0 0x28000000 /boot/uImage.tommy'
Whitney # 	setenv bootcmd_scsi 'scsi init;run loaduimage;bootm 0x28000000'  
Whitney # run bootcmd

Initialize SCSI
AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part 
set feature error!
scanning bus for devices...
Supprt LBA48 addressing.
timeout exit!
  Device 0: (1:0) Vendor: ATA Prod.: HGST HTS725050A7 Rev: GH2Z
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)

3019912 bytes read
enter do_eth_down!!!
## Booting kernel from Legacy Image at 28000000 ...
   Image Name:   Linux-4.4.121-tommy
   Created:      2018-03-18  23:01:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3019848 Bytes =  2.9 MB
   Load Address: 22000000
   Entry Point:  22000000
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x900
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 4.4.121-tommy (root@debian9) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #26 SMP Sun Mar 18 23:57:36 CET 2018
CPU: ARMv6-compatible processor [410fb024] revision 4 (ARMv7), cr=00c5787d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Seagate CNS3420 NAS
bootconsole [earlycon0] enabled
Memory policy: Data cache writealloc

blackdevil Wrote:
-------------------------------------------------------
> Hi tommy,
> I tested the kernel on my 2-bay NAS. It starts
> loading but dont get far. Also tested with
> 0x800000 and 0x2000000 as address.
>
>
> Whitney # setenv loaduimage 'ext2load scsi 0
> 0x28000000 /boot/uImage.tommy'
> Whitney # 	setenv bootcmd_scsi 'scsi init;run
> loaduimage;bootm 0x28000000'  
> Whitney # run bootcmd
> 
> Initialize SCSI
> AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl
> SATA mode
> flags: ncq stag pm led clo only pmp pio slum part
> 
> set feature error!
> scanning bus for devices...
> Supprt LBA48 addressing.
> timeout exit!
>   Device 0: (1:0) Vendor: ATA Prod.: HGST
> HTS725050A7 Rev: GH2Z
>             Type: Hard Disk
>             Supports 48-bit addressing
>             Capacity: 476940.0 MB = 465.7 GB
> (976773168 x 512)
> 
> 3019912 bytes read
> enter do_eth_down!!!
> ## Booting kernel from Legacy Image at 28000000
> ...
>


Hi blackdevil,

you need to add
mem=512M@0x20000000
to your boot params, otherwise it won't boot. See my previous posts.

ext2load scsi 0 0x28000000 and bootm 0x28000000 is ok
MarkTurner Wrote:
-------------------------------------------------------
> tommy79 Wrote:
> -------------------------------------------------------
> >
> > Please test and let me know what are your
> opinions
> > :)
>
> Also, when can I get your source code? :-)

Hi Mark,
I will try to publish tomorrow, I do not have time today
tommy, I cannot boot with bootargs from uboot. I have to compile the bootargs into the kernel. i will give it a try when you uploaded the kernel and compile it myself.

thank you!
blackdevil Wrote:
-------------------------------------------------------
> tommy, I cannot boot with bootargs from uboot. I
> have to compile the bootargs into the kernel. i
> will give it a try when you uploaded the kernel
> and compile it myself.
>
> thank you!

blackdevil,

Why can't you run following code in u-boot? It works for me
setenv bootargs 'console=ttyS0,38400 mem=512M@0x20000000 root=/dev/sdXX rootwait'
ext2load scsi 0 0x28000000 /boot/uImage.tommy
bootm 0x28000000
AAAAH!
My bootcmd was wrong... Passing bootargs is working now :-)

The Kernel complaints about missing init. Is it a OS ( in my case debian) problem? I think I am using the system bodhi posted last week.

Whitney # setenv bootargs 'console=ttyS0,38400 mem=512M@0x20000000 root=/dev/sda1 rootwait'
Whitney # setenv loaduimage 'ext2load scsi 0 0x28000000 /boot/uImage.tommy'
Whitney # setenv bootcmd_scsi 'scsi init;run loaduimage;bootm 0x28000000'
Whitney # run bootcmd_scsi

Initialize SCSI
AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part 
set feature error!
scanning bus for devices...
Supprt LBA48 addressing.
timeout exit!
  Device 0: (1:0) Vendor: ATA Prod.: HGST HTS725050A7 Rev: GH2Z
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)

3019912 bytes read
enter do_eth_down!!!
## Booting kernel from Legacy Image at 28000000 ...
   Image Name:   Linux-4.4.121-tommy
   Created:      2018-03-18  23:01:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3019848 Bytes =  2.9 MB
   Load Address: 22000000
   Entry Point:  22000000
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x900
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 4.4.121-tommy (root@debian9) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #26 SMP Sun Mar 18 23:57:36 CET 2018
CPU: ARMv6-compatible processor [410fb024] revision 4 (ARMv7), cr=00c5787d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Seagate CNS3420 NAS
Memory policy: Data cache writealloc
PERCPU: Embedded 12 pages/cpu @dfbd9000 s17004 r8192 d23956 u49152
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyS0,38400 mem=512M@0x20000000 root=/dev/sda1 rootwait
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 513692K/524288K available (4211K kernel code, 159K rwdata, 1256K rodata, 212K init, 101K bss, 10596K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc055ef9c   (5468 kB)
      .init : 0xc055f000 - 0xc0594000   ( 212 kB)
      .data : 0xc0594000 - 0xc05bbe10   ( 160 kB)
       .bss : 0xc05bbe10 - 0xc05d5348   ( 102 kB)
Hierarchical RCU implementation.
	Build-time adjustment of leaf fanout to 32.
NR_IRQS:16 nr_irqs:16 16
clocksource: freerun: mask: 0xffffffffffff max_cycles: 0x179dd7f66, max_idle_ns: 28210892933900 ns
smp_twd: clock not found -2
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating local timer... 347.93MHz.
Calibrating delay loop... 277.70 BogoMIPS (lpj=1388544)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
Initializing cgroup subsys io
Initializing cgroup subsys devices
Initializing cgroup subsys net_cls
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x200082a0 - 0x200082fc
Brought up 2 CPUs
SMP: Total of 2 processors activated (555.41 BogoMIPS).
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
L2C: DT/platform modifies aux control register: 0x02040000 -> 0x02540000
L2C-310 cache controller enabled, 8 ways, 256 kB
L2C-310: CACHE_ID 0x410000c4, AUX_CTRL 0x06540000
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource freerun
FS-Cache: Loaded
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x78000000 (irq = 45, base_baud = 1500000) is a 16550A
loop: module loaded
mGine mflash driver, (c) 2008 mGine Co.
zram: Added device: zram0
ahci ahci.0: SSS flag set, parallel bus scan disabled
ahci ahci.0: AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl platform mode
ahci ahci.0: flags: ncq sntf stag pm led clo only pmp pio slum part ccc 
scsi host0: ahci
scsi host1: ahci
ata1: SATA max UDMA/133 mmio [mem 0x83000000-0x83ffffff] port 0x100 irq 65
ata2: SATA max UDMA/133 mmio [mem 0x83000000-0x83ffffff] port 0x180 irq 65
physmap platform flash device: 08000000 at 10000000
physmap-flash physmap-flash.0: map_probe failed
libphy: Fixed MDIO Bus: probed
libphy: CNS3xxx MII Bus: probed
eth0: RGMII PHY 0 on cns3xxx Switch
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ehci-platform: EHCI generic platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
ohci-platform: OHCI generic platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
CNS3XXX Real Time Clock, (c) 2009 Cavium Networks
rtc irq:23
rtc rtc0: invalid alarm value: 1900-1-20 0:0:0
cns3xxx-rtc cns3xxx-rtc: rtc core: registered cns3xxx-rtc as rtc0
i2c /dev entries driver
adt7475 0-002e: ADT7473 device, revision 0
adt7475 0-002e: Optional features: fan4 pwm2
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Initializing XFRM netlink socket
NET: Registered protocol family 17
NET: Registered protocol family 15
bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
PCI-E0 uses external clock source.
ata1: SATA link down (SStatus 0 SControl 300)
PCIe: Port[0] Enable PCIe LTSSM
PCIe: Port[0] Check data link layer...
ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-8: HGST HTS725050A7E630, GH2ZB550, max UDMA/133
ata2.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      HGST HTS725050A7 B550 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
sd 1:0:0:0: [sda] 4096-byte physical blocks
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
 sda: sda1
Device not found.
sd 1:0:0:0: [sda] Attached SCSI disk
EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext3 filesystem) on device 8:1.
devtmpfs: mounted
Freeing unused kernel memory: 212K
Starting init: /etc/init exists but couldn't execute it (error -13)
Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.
CPU: 1 PID: 1 Comm: swapper/0 Not tainted 4.4.121-tommy #26
Hardware name: Seagate CNS3420 NAS
Backtrace: 
[<c00131f0>] (dump_backtrace) from [<c00133e8>] (show_stack+0x18/0x1c)
 r7:00000000 r6:60000093 r5:00000000 r4:c05a36c8
[<c00133d0>] (show_stack) from [<c01f41a0>] (dump_stack+0x94/0xb0)
[<c01f410c>] (dump_stack) from [<c009fc20>] (panic+0x94/0x1fc)
 r7:00000000 r6:00000000 r5:c041ea40 r4:c05bc1e8
[<c009fb90>] (panic) from [<c041eb0c>] (kernel_init+0xcc/0xf0)
 r3:00000000 r2:0000000e r1:df516000 r0:c04e8498
 r7:00000000
[<c041ea40>] (kernel_init) from [<c000f870>] (ret_from_fork+0x14/0x24)
 r5:c041ea40 r4:00000000
CPU0: stopping
CPU: 0 PID: 0 Comm: swapper/0 Not tainted 4.4.121-tommy #26
Hardware name: Seagate CNS3420 NAS
Backtrace: 
[<c00131f0>] (dump_backtrace) from [<c00133e8>] (show_stack+0x18/0x1c)
 r7:c0595f10 r6:60000193 r5:00000000 r4:c05a36c8
[<c00133d0>] (show_stack) from [<c01f41a0>] (dump_stack+0x94/0xb0)
[<c01f410c>] (dump_stack) from [<c0016350>] (handle_IPI+0x17c/0x1bc)
 r7:c0595f10 r6:00000000 r5:00000000 r4:c05bc060
[<c00161d4>] (handle_IPI) from [<c00094b8>] (gic_handle_irq+0x8c/0xa0)
 r7:c0596550 r6:c0595f10 r5:000003ff r4:ff00010c
[<c000942c>] (gic_handle_irq) from [<c0013df4>] (__irq_svc+0x54/0x70)
Exception stack(0xc0595f10 to 0xc0595f58)
5f00:                                     00000001 00000000 00000000 00000000
5f20: c0594000 c059627c 00000000 00000000 c05962dc c058e2a0 c04246b8 c0595f6c
5f40: c0595f70 c0595f60 c00102b0 c00102b4 60000013 ffffffff
 r10:c04246b8 r9:c058e2a0 r8:c05962dc r7:c0595f44 r6:ffffffff r5:60000013
 r4:c00102b4
[<c0010284>] (arch_cpu_idle) from [<c005afe4>] (default_idle_call+0x28/0x34)
[<c005afbc>] (default_idle_call) from [<c005b21c>] (cpu_startup_entry+0x1d8/0x250)
[<c005b044>] (cpu_startup_entry) from [<c041ea28>] (rest_init+0x6c/0x84)
 r7:c0596220
[<c041e9bc>] (rest_init) from [<c055fcc0>] (start_kernel+0x340/0x3b4)
[<c055f980>] (start_kernel) from [<20008078>] (0x20008078)
---[ end Kernel panic - not syncing: No working init found.  Try passing init= option to kernel. See Linux Documentation/init.txt for guidance.


Your Kernel and debian ( from here https://github.com/KL-Yang/seagate_central_linux) is up!

Good work !

edit:

I think PCIe is not working and so USB is not working too.

Whitney # setenv bootargs 'console=ttyS0,38400 mem=512M@0x20000000 root=/dev/sda1';setenv loaduimage 'ext2load scsi 0 0x28000000 /boot/uImage';setenv bootcmd_scsi 'scsi init;run loaduimage;bootm 0x28000000'

Whitney # run bootcmd_scsi                                                                           

Initialize SCSI
AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl SATA mode
flags: ncq stag pm led clo only pmp pio slum part 
scanning bus for devices...
Supprt LBA48 addressing.
timeout exit!
  Device 0: (1:0) Vendor: ATA Prod.: HGST HTS725050A7 Rev: GH2Z
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 476940.0 MB = 465.7 GB (976773168 x 512)

3019912 bytes read
enter do_eth_down!!!
## Booting kernel from Legacy Image at 28000000 ...
   Image Name:   Linux-4.4.121-tommy
   Created:      2018-03-18  23:01:24 UTC
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3019848 Bytes =  2.9 MB
   Load Address: 22000000
   Entry Point:  22000000
   Loading Kernel Image ... OK
OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
Booting Linux on physical CPU 0x900
Initializing cgroup subsys cpu
Initializing cgroup subsys cpuacct
Linux version 4.4.121-tommy (root@debian9) (gcc version 6.3.0 20170516 (Debian 6.3.0-18) ) #26 SMP Sun Mar 18 23:57:36 CET 2018
CPU: ARMv6-compatible processor [410fb024] revision 4 (ARMv7), cr=00c5787d
CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
Machine: Seagate CNS3420 NAS
Memory policy: Data cache writealloc
PERCPU: Embedded 12 pages/cpu @dfbd9000 s17004 r8192 d23956 u49152
Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 130048
Kernel command line: console=ttyS0,38400 mem=512M@0x20000000 root=/dev/sda1
PID hash table entries: 2048 (order: 1, 8192 bytes)
Dentry cache hash table entries: 65536 (order: 6, 262144 bytes)
Inode-cache hash table entries: 32768 (order: 5, 131072 bytes)
Memory: 513692K/524288K available (4211K kernel code, 159K rwdata, 1256K rodata, 212K init, 101K bss, 10596K reserved, 0K cma-reserved)
Virtual kernel memory layout:
    vector  : 0xffff0000 - 0xffff1000   (   4 kB)
    fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
    vmalloc : 0xe0800000 - 0xff800000   ( 496 MB)
    lowmem  : 0xc0000000 - 0xe0000000   ( 512 MB)
    modules : 0xbf000000 - 0xc0000000   (  16 MB)
      .text : 0xc0008000 - 0xc055ef9c   (5468 kB)
      .init : 0xc055f000 - 0xc0594000   ( 212 kB)
      .data : 0xc0594000 - 0xc05bbe10   ( 160 kB)
       .bss : 0xc05bbe10 - 0xc05d5348   ( 102 kB)
Hierarchical RCU implementation.
	Build-time adjustment of leaf fanout to 32.
NR_IRQS:16 nr_irqs:16 16
clocksource: freerun: mask: 0xffffffffffff max_cycles: 0x179dd7f66, max_idle_ns: 28210892933900 ns
smp_twd: clock not found -2
sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 21474836475000000ns
Console: colour dummy device 80x30
console [ttyS0] enabled
Calibrating local timer... 347.98MHz.
Calibrating delay loop... 277.70 BogoMIPS (lpj=1388544)
pid_max: default: 32768 minimum: 301
Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
Initializing cgroup subsys io
Initializing cgroup subsys devices
Initializing cgroup subsys net_cls
CPU: Testing write buffer coherency: ok
Setting up static identity map for 0x200082a0 - 0x200082fc
Brought up 2 CPUs
SMP: Total of 2 processors activated (555.41 BogoMIPS).
devtmpfs: initialized
VFP support v0.3: implementor 41 architecture 1 part 20 variant b rev 4
clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
futex hash table entries: 512 (order: 2, 16384 bytes)
NET: Registered protocol family 16
DMA: preallocated 256 KiB pool for atomic coherent allocations
cpuidle: using governor ladder
cpuidle: using governor menu
L2C: DT/platform modifies aux control register: 0x02040000 -> 0x02540000
L2C-310 cache controller enabled, 8 ways, 256 kB
L2C-310: CACHE_ID 0x410000c4, AUX_CTRL 0x06540000
vgaarb: loaded
SCSI subsystem initialized
usbcore: registered new interface driver usbfs
usbcore: registered new interface driver hub
usbcore: registered new device driver usb
clocksource: Switched to clocksource freerun
FS-Cache: Loaded
NET: Registered protocol family 2
TCP established hash table entries: 4096 (order: 2, 16384 bytes)
TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
TCP: Hash tables configured (established 4096 bind 4096)
UDP hash table entries: 256 (order: 1, 8192 bytes)
UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
NET: Registered protocol family 1
Block layer SCSI generic (bsg) driver version 0.4 loaded (major 253)
io scheduler noop registered
io scheduler deadline registered (default)
Serial: 8250/16550 driver, 4 ports, IRQ sharing disabled
serial8250: ttyS0 at MMIO 0x78000000 (irq = 45, base_baud = 1500000) is a 16550A
loop: module loaded
mGine mflash driver, (c) 2008 mGine Co.
zram: Added device: zram0
ahci ahci.0: SSS flag set, parallel bus scan disabled
ahci ahci.0: AHCI 0001.0100 32 slots 2 ports 3 Gbps 0x3 impl platform mode
ahci ahci.0: flags: ncq sntf stag pm led clo only pmp pio slum part ccc 
scsi host0: ahci
scsi host1: ahci
ata1: SATA max UDMA/133 mmio [mem 0x83000000-0x83ffffff] port 0x100 irq 65
ata2: SATA max UDMA/133 mmio [mem 0x83000000-0x83ffffff] port 0x180 irq 65
physmap platform flash device: 08000000 at 10000000
physmap-flash physmap-flash.0: map_probe failed
libphy: Fixed MDIO Bus: probed
libphy: CNS3xxx MII Bus: probed
eth0: RGMII PHY 0 on cns3xxx Switch
ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
ehci-pci: EHCI PCI platform driver
ehci-platform: EHCI generic platform driver
ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver
ohci-pci: OHCI PCI platform driver
ohci-platform: OHCI generic platform driver
usbcore: registered new interface driver usb-storage
mousedev: PS/2 mouse device common for all mice
CNS3XXX Real Time Clock, (c) 2009 Cavium Networks
rtc irq:23
rtc rtc0: invalid alarm value: 1900-1-20 0:0:0
cns3xxx-rtc cns3xxx-rtc: rtc core: registered cns3xxx-rtc as rtc0
i2c /dev entries driver
adt7475 0-002e: ADT7473 device, revision 0
adt7475 0-002e: Optional features: fan4 pwm2
usbcore: registered new interface driver usbhid
usbhid: USB HID core driver
Initializing XFRM netlink socket
NET: Registered protocol family 17
NET: Registered protocol family 15
bridge: automatic filtering via arp/ip/ip6tables has been deprecated. Update your scripts to load br_netfilter if you need this.
PCI-E0 uses external clock source.
PCIe: Port[0] Enable PCIe LTSSM
PCIe: Port[0] Check data link layer...ata1: SATA link down (SStatus 0 SControl 300)

ata2: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
ata2.00: ATA-8: HGST HTS725050A7E630, GH2ZB550, max UDMA/133
ata2.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 31/32)
ata2.00: configured for UDMA/133
scsi 1:0:0:0: Direct-Access     ATA      HGST HTS725050A7 B550 PQ: 0 ANSI: 5
sd 1:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/466 GiB)
sd 1:0:0:0: [sda] 4096-byte physical blocks
sd 1:0:0:0: [sda] Write Protect is off
sd 1:0:0:0: [sda] Write cache: disabled, read cache: enabled, doesn't support DPO or FUA
Device not found.
 sda: sda1
sd 1:0:0:0: [sda] Attached SCSI disk
EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
VFS: Mounted root (ext3 filesystem) on device 8:1.
devtmpfs: mounted
Freeing unused kernel memory: 212K
systemd[1]: System time before build time, advancing clock.
ip_tables: (C) 2000-2006 Netfilter Core Team
random: systemd: uninitialized urandom read (16 bytes read, 24 bits of entropy available)
systemd[1]: systemd 232 running in system mode. (+PAM +AUDIT +SELINUX +IMA +APPARMOR +SMACK +SYSVINIT +UTMP +LIBCRYPTSETUP +GCRYPT +GNUTLS +ACL +XZ +LZ4 +SECCOMP +BLKID +ELFUTILS +KMOD +IDN)
systemd[1]: Detected architecture arm.

Welcome to Debian GNU/Linux 9 (stretch)!

systemd[1]: Set hostname to <seagate-dev>.
random: systemd: uninitialized urandom read (16 bytes read, 29 bits of entropy available)
random: systemd-sysv-ge: uninitialized urandom read (16 bytes read, 32 bits of entropy available)
random: systemd-cryptse: uninitialized urandom read (16 bytes read, 34 bits of entropy available)
random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 34 bits of entropy available)
random: systemd-gpt-aut: uninitialized urandom read (16 bytes read, 34 bits of entropy available)
random: systemd: uninitialized urandom read (16 bytes read, 42 bits of entropy available)
random: systemd: uninitialized urandom read (16 bytes read, 42 bits of entropy available)
random: systemd: uninitialized urandom read (16 bytes read, 42 bits of entropy available)
random: systemd: uninitialized urandom read (16 bytes read, 42 bits of entropy available)
systemd[1]: Listening on Journal Socket (/dev/log).
[  OK  ] Listening on Journal Socket (/dev/log).
systemd[1]: Listening on udev Kernel Socket.
[  OK  ] Listening on udev Kernel Socket.
systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
systemd[1]: Listening on Journal Socket.
[  OK  ] Listening on Journal Socket.
systemd[1]: Reached target Swap.
[  OK  ] Reached target Swap.
systemd[1]: Listening on Syslog Socket.
[  OK  ] Listening on Syslog Socket.
systemd[1]: Created slice User and Session Slice.
[  OK  ] Created slice User and Session Slice.
systemd[1]: Created slice System Slice.
[  OK  ] Created slice System Slice.
systemd[1]: Starting Load Kernel Modules...
         Starting Load Kernel Modules...
systemd[1]: Mounting Debug File System...
         Mounting Debug File System...
systemd[1]: Created slice system-getty.slice.
[  OK  ] Created slice system-getty.slice.
systemd[1]: Starting Remount Root and Kernel File Systems...
         Starting Remount Root and Kernel File Systems...
systemd[1]: Reached target Slices.
[  OK  ] Reached target Slices.
systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[  OK  ] Started Forward Password Requests to Wall Directory Watch.
systemd[1]: Created slice system-serial\x2dgetty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
systemd[1]: Reached target Remote File Systems.
[  OK  ] Reached target Remote File Systems.
systemd[1]: Started Dispatch Password Requests to Console Directory Watch.
[  OK  ] Started Dispatch Password Requests to Console Directory Watch.
systemd[1]: Reached target Encrypted Volumes.
[  OK  ] Reached target Encrypted Volumes.
systemd[1]: Reached target Paths.
[  OK  ] Reached target Paths.
systemd[1]: Starting Create list of required static device nodes for the current kernel...
         Starting Create list of required st…ce nodes for the current kernel...
systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
systemd[1]: Listening on udev Control Socket.
[  OK  ] Listening on udev Control Socket.
systemd[1]: dev-hugepages.mount: Couldn't determine result for ConditionVirtualization=!private-users, assuming failed: No such file or directory
systemd[1]: Starting Journal Service...
         Starting Journal Service...
systemd[1]: Mounted POSIX Message Queue File System.
[  OK  ] Mounted POSIX Message Queue File System.
systemd[1]: Mounted Debug File System.
[  OK  ] Mounted Debug File System.
systemd[1]: Started Load Kernel Modules.
[  OK  ] Started Load Kernel Modules.
systemd[1]: Started Remount Root and Kernel File Systems.
[  OK  ] Started Remount Root and Kernel File Systems.
systemd[1]: Started Create list of required static device nodes for the current kernel.
[  OK  ] Started Create list of required sta…vice nodes for the current kernel.
systemd[1]: Started Journal Service.
[  OK  ] Started Journal Service.
         Starting Create Static Device Nodes in /dev...
         Starting Flush Journal to Persistent Storage...
         Starting Load/Save Random Seed...
         Starting udev Coldplug all Devices...
         Starting Apply Kernel Variables...
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Started Create Static Device Nodes in /dev.
[  OK  ] Started Apply Kernel Variables.
         Starting udev Kernel Device Manager...
[  OK  ] Reached target Local File Systems (Pre).
[  OK  ] Reached target Local File Systems.
         Starting Raise network interfaces...
[  OK  ] Started udev Coldplug all Devices.
systemd-journald[488]: Received request to flush runtime journal from PID 1
[  OK  ] Started Flush Journal to Persistent Storage.
[  OK  ] Started udev Kernel Device Manager.
         Starting Create Volatile Files and Directories...
[  OK  ] Started Create Volatile Files and Directories.
         Starting Update UTMP about System Boot/Shutdown...
         Starting Network Time Synchronization...
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Started Update UTMP about System Boot/Shutdown.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[  OK  ] Reached target Sockets.
[  OK  ] Started Daily Cleanup of Temporary Directories.
[  OK  ] Reached target Basic System.
[  OK  ] Started Regular background program processing daemon.
         Starting Login Service...
[  OK  ] Started D-Bus System Message Bus.
         Starting System Logging Service...
[  OK  ] Reached target System Time Synchronized.
[  OK  ] Started Login Service.
[  OK  ] Started System Logging Service.
random: nonblocking pool is initialized
         Stopping Network Time Synchronization...
[  OK  ] Stopped Network Time Synchronization.
         Starting Network Time Synchronization...
[  OK  ] Started Network Time Synchronization.
         Stopping Network Time Synchronization...
[  OK  ] Stopped Network Time Synchronization.
         Starting Network Time Synchronization...
[  OK  ] Started Raise network interfaces.
[  OK  ] Reached target Network.
         Starting OpenBSD Secure Shell server...
         Starting Permit User Sessions...
[  OK  ] Reached target Network is Online.
[  OK  ] Started Daily apt download activities.
[  OK  ] Started Daily apt upgrade and clean activities.
[  OK  ] Reached target Timers.
[  OK  ] Started Network Time Synchronization.
[  OK  ] Started Permit User Sessions.
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Started Getty on tty1.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started OpenBSD Secure Shell server.
[  OK  ] Reached target Multi-User System.
[  OK  ] Reached target Graphical Interface.
         Starting Update UTMP about System Runlevel Changes...
[  OK  ] Started Update UTMP about System Runlevel Changes.

Debian GNU/Linux 9 seagate-dev ttyS0

seagate-dev login: eth0: link up, speed 1000 Mb/s, full duplex

Debian GNU/Linux 9 seagate-dev ttyS0

seagate-dev login: root



Edited 3 time(s). Last edit at 03/19/2018 03:36PM by blackdevil.
Re: (WIP) Linux Kernel and rootfs 4.14.24 for Seagate Business Storage NAS (CNS3xxx) package
March 19, 2018 04:18PM
Good works Tommy :)

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

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: