A new kernel for oxnas

This forum is for all other ARMv5 devices

A new kernel for oxnas

Postby navym » Tue Sep 24, 2013 3:20 am

I am learning kernel hacking recenly.
And in the progress, porting latest linux kernel (v3.11.1) & u-boot (2013.07) to pogoplug v3,
I have tried hard to fit all existing code into latest framework, to make it maintainable.
And dropped some messy code if better alternative available (GMAC => STMMAC)
It is not thoroughly tested, but works reasonably stable.

Is anyone willing to work with me test and stablize it, and finally make it available to the community?

Below is the bootlog
Code: Select all
U-Boot SPL 2013.07 (Sep 23 2013 - 23:13:54)
  Boot device: SATA
Attempting to set PLLA to 800 MHz ...
  plla_ctrl0 : 0000030a
  plla_ctrl1 : 00400000
  plla_ctrl2 : 007f0068
  plla_ctrl3 : 00000193

PLLA Set
Bus 0: OK
  Device 0:

U-Boot 2013.07 (Sep 23 2013 - 23:13:54) for OXNAS

DRAM:  128 MiB
IDE:   Bus 0: OK
  Device 0: Model: ST3120827AS  Firm: 3.42 Ser#: XXXXXXXXXX
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 114473.4 MB = 111.7 GB (234441648 x 512)
NAND:  128 MiB
reading u-boot.env
In:    serial
Out:   serial
Err:   serial
Net:   mii0
Hit any key to stop autoboot:  0
reading uImage
3438480 bytes read in 783 ms (4.2 MiB/s)
reading ox820.dtb
5934 bytes read in 13 ms (445.3 KiB/s)
## Booting kernel from Legacy Image at 60000000 ...
   Image Name:   Linux-3.11.1+
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3438416 Bytes = 3.3 MiB
   Load Address: 60008000
   Entry Point:  60008000
   Verifying Checksum ... OK
## Flattened Device Tree blob at 61000000
   Booting using the fdt blob at 0x61000000
   Loading Kernel Image ... OK
   Loading Device Tree to 67e28000, end 67e2c72d ... OK

Starting kernel ...

[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 3.11.1+ (mahaijun@ubuntu) (gcc version 4.7.3 (Ubuntu/Linaro 4.7.3-1ubuntu1) ) #827 SMP Mon Sep 23 22:4
2:59 CST 2013
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5387d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine: PLXTECH NAS782X SoC (Flattened Device Tree), model: plxtech,nas7820
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
[    0.000000] PERCPU: Embedded 7 pages/cpu @c07c3000 s6560 r8192 d13920 u32768
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: console=ttyS0,115200n8 root=/dev/sda2 rootfstype=ext4 ubi.mtd=data,512
[    0.000000] PID hash table entries: 512 (order: -1, 2048 bytes)
[    0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Memory: 122948K/131072K available (4684K kernel code, 238K rwdata, 1524K rodata, 178K init, 239K bss, 8124K reserved
)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xfff00000 - 0xfffe0000   ( 896 kB)
[    0.000000]     vmalloc : 0xc8800000 - 0xff000000   ( 872 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xc8000000   ( 128 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc0618278   (6209 kB)
[    0.000000]       .init : 0xc0619000 - 0xc06459a0   ( 179 kB)
[    0.000000]       .data : 0xc0646000 - 0xc0681938   ( 239 kB)
[    0.000000]        .bss : 0xc0681938 - 0xc06bd87c   ( 240 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:256
[    0.000000] sched_clock: 32 bits at 100 Hz, resolution 10000000ns, wraps every 4294967286ms
[    0.000000] Console: colour dummy device 80x30
[    0.010000] Calibrating delay loop... 319.48 BogoMIPS (lpj=1597440)
[    0.060000] pid_max: default: 32768 minimum: 301
[    0.060000] Mount-cache hash table entries: 512
[    0.060000] CPU: Testing write buffer coherency: ok
[    0.060000] Setting up static identity map for 0xc0473500 - 0xc047355c
[    0.060000] CPU1: Booted secondary processor
[    0.120000] Brought up 2 CPUs
[    0.120000] SMP: Total of 2 processors activated (638.97 BogoMIPS).
[    0.120000] devtmpfs: initialized
[    0.120000] pinctrl core: initialized pinctrl subsystem
[    0.120000] NET: Registered protocol family 16
[    0.120000] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.120000] gpio-oxnas 44000000.gpio: at address c884a000
[    0.120000] gpio-oxnas 44100000.gpio: at address c884c000
[    0.130000] pinctrl-oxnas pinctrl.5: initialized OX820 pinctrl driver
[    0.130000] bio: create slab <bio-0> at 0
[    0.240000] oxnas-pcie 47c00000.pcie-controller: PCIe version/deviceID 0x82510b5
[    0.240000] oxnas-pcie 47c00000.pcie-controller: link up
[    0.240000] oxnas-pcie 47c00000.pcie-controller: PCI host bridge to bus 0000:00
[    0.240000] pci_bus 0000:00: root bus resource [mem 0x48000000-0x49ffffff]
[    0.240000] pci_bus 0000:00: root bus resource [mem 0x4a000000-0x4bdfffff pref]
[    0.240000] pci_bus 0000:00: root bus resource [io  0x4be00000-0x4befffff]
[    0.240000] pci_bus 0000:00: root bus resource [bus 00-7f]
[    0.240000] PCI: bus0: Fast back to back transfers disabled
[    0.240000] pci 0000:00:00.0: BAR 0: assigned [mem 0x48000000-0x4800ffff 64bit]
[    0.240000] vgaarb: loaded
[    0.240000] SCSI subsystem initialized
[    0.250000] usbcore: registered new interface driver usbfs
[    0.250000] usbcore: registered new interface driver hub
[    0.250000] usbcore: registered new device driver usb
[    0.250000] pps_core: LinuxPPS API ver. 1 registered
[    0.250000] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.250000] PTP clock support registered
[    0.250000] cfg80211: Calling CRDA to update world regulatory domain
[    0.250000] Switched to clocksource rps_clocksource_timer
[    0.260000] NET: Registered protocol family 2
[    0.260000] TCP established hash table entries: 1024 (order: 1, 8192 bytes)
[    0.260000] TCP bind hash table entries: 1024 (order: 1, 8192 bytes)
[    0.260000] TCP: Hash tables configured (established 1024 bind 1024)
[    0.260000] TCP: reno registered
[    0.260000] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.260000] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.260000] NET: Registered protocol family 1
[    0.260000] RPC: Registered named UNIX socket transport module.
[    0.260000] RPC: Registered udp transport module.
[    0.260000] RPC: Registered tcp transport module.
[    0.260000] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.270000] fuse init (API version 7.22)
[    0.280000] msgmni has been set to 240
[    0.280000] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 251)
[    0.280000] io scheduler noop registered
[    0.280000] io scheduler deadline registered
[    0.280000] io scheduler cfq registered (default)
[    0.280000] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.280000] 44200000.uart: ttyS0 at MMIO 0x44200000 (irq = 55) is a 16550A
[    0.770000] console [ttyS0] enabled
[    0.780000] loop: module loaded
[    0.780000] scsi0 : sata_oxnas
[    0.780000] ata1: SATA max UDMA/133 irq 50
[    0.790000] ox820sata: reseting SATA core
[    0.790000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit), 128MiB, page size: 2048, OOB size:
 64
[    0.790000] Scanning device for bad blocks
[    0.910000] 2 ofpart partitions found on MTD device 41000000.nand
[    0.910000] Creating 2 MTD partitions on "41000000.nand":
[    0.920000] 0x000000000000-0x000000e00000 : "boot"
[    0.930000] 0x000000e00000-0x000008000000 : "data"
[    0.930000] stmmac - user ID: 0x12, Synopsys ID: 0x35
[    0.940000]  Ring mode enabled
[    0.940000]  DMA HW capability register supported
[    0.950000]  Enhanced/Alternate descriptors
[    0.950000]  Enabled extended descriptors
[    0.950000]  RX Checksum Offload Engine supported (type 2)
[    0.960000]  TX Checksum insertion supported
[    0.960000]  Wake-Up On Lan supported
[    0.970000]  Enable RX Mitigation via HW Watchdog Timer
[    0.980000] libphy: stmmac: probed
[    0.980000] eth0: PHY ID 001cc914 at 0 IRQ 0 (stmmac-0:00) active
[    0.980000] eth0: PHY ID 001cc914 at 3 IRQ 0 (stmmac-0:03)
[    0.990000] PCI: enabling device 0000:00:00.0 (0140 -> 0142)
[    1.090000] ieee80211 phy0: Atheros AR9287 Rev:2 mem=0xc8880000, irq=51
[    1.100000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    1.110000] ehci-pci: EHCI PCI platform driver
[    1.110000] oxnas-ehci 40200100.ehci: EHCI Host Controller
[    1.120000] oxnas-ehci 40200100.ehci: new USB bus registered, assigned bus number 1
[    1.120000] oxnas-ehci 40200100.ehci: irq 39, io mem 0x40200100
[    1.150000] oxnas-ehci 40200100.ehci: USB 2.0 started, EHCI 1.00
[    1.150000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.160000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.170000] usb usb1: Product: EHCI Host Controller
[    1.170000] usb usb1: Manufacturer: Linux 3.11.1+ ehci_hcd
[    1.180000] usb usb1: SerialNumber: 40200100.ehci
[    1.180000] hub 1-0:1.0: USB hub found
[    1.180000] hub 1-0:1.0: 2 ports detected
[    1.190000] usbcore: registered new interface driver usb-storage
[    1.200000] usbcore: registered new interface driver usbserial
[    1.200000] usbcore: registered new interface driver ch341
[    1.210000] usbserial: USB Serial support registered for ch341-uart
[    1.210000] usbcore: registered new interface driver pl2303
[    1.220000] usbserial: USB Serial support registered for pl2303
[    1.230000] mousedev: PS/2 mouse device common for all mice
[    1.230000] usbcore: registered new interface driver usbhid
[    1.240000] usbhid: USB HID core driver
[    1.240000] TCP: cubic registered
[    1.240000] NET: Registered protocol family 10
[    1.250000] sit: IPv6 over IPv4 tunneling driver
[    1.260000] NET: Registered protocol family 17
[    1.260000] Bridge firewalling registered
[    1.270000] VFP support v0.3: not present
[    1.270000] UBI: attaching mtd1 to ubi0
[    1.320000] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    1.320000] ata1.00: ATA-6: ST3120827AS, 3.42, max UDMA/133
[    1.330000] ata1.00: 234441648 sectors, multi 0: LBA48 NCQ (depth 0/32)
[    1.340000] ata1.00: configured for UDMA/133
[    1.340000] scsi 0:0:0:0: Direct-Access     ATA      ST3120827AS      3.42 PQ: 0 ANSI: 5
[    1.350000] sd 0:0:0:0: [sda] 234441648 512-byte logical blocks: (120 GB/111 GiB)
[    1.360000] sd 0:0:0:0: [sda] Write Protect is off
[    1.360000] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.380000]  sda: sda1 sda2 sda3
[    1.380000] sd 0:0:0:0: [sda] Attached SCSI disk
[    1.510000] usb 1-1: new high-speed USB device number 2 using oxnas-ehci
[    1.620000] UBI: scanning is finished
[    1.640000] UBI warning: print_rsvd_warning: cannot reserve enough PEBs for bad PEB handling, reserved 9, need 20
[    1.650000] UBI: attached mtd1 (name "data", size 114 MiB) to ubi0
[    1.660000] UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes
[    1.670000] UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512
[    1.670000] UBI: VID header offset: 512 (aligned 512), data offset: 2048
[    1.680000] UBI: good PEBs: 912, bad PEBs: 0, corrupted PEBs: 0
[    1.680000] UBI: user volume: 1, internal volumes: 1, max. volumes count: 128
[    1.680000] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    1.680000] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    1.680000] usb 1-1: Product: USB2.0 Hub
[    1.710000] UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0
[    1.710000] hub 1-1:1.0: USB hub found
[    1.720000] UBI: available PEBs: 0, total reserved PEBs: 912, PEBs reserved for bad PEB handling: 9
[    1.720000] hub 1-1:1.0: 4 ports detected
[    1.730000] UBI: background thread "ubi_bgt0d" started, PID 55
[    1.810000] EXT4-fs (sda2): mounted filesystem with ordered data mode. Opts: (null)
[    1.820000] VFS: Mounted root (ext4 filesystem) readonly on device 8:2.
[    1.850000] devtmpfs: mounted
[    1.850000] Freeing unused kernel memory: 176K (c0619000 - c0645000)
[    2.020000] usb 1-1.1: new high-speed USB device number 3 using oxnas-ehci
[    2.130000] usb 1-1.1: New USB device found, idVendor=152d, idProduct=2338
[    2.130000] usb 1-1.1: New USB device strings: Mfr=1, Product=2, SerialNumber=5
[    2.140000] usb 1-1.1: Product: USB to ATA/ATAPI Bridge
[    2.150000] usb 1-1.1: Manufacturer: JMicron
[    2.150000] usb 1-1.1: SerialNumber: XXXXXXXXXXXXXXXXX
[    2.160000] usb-storage 1-1.1:1.0: USB Mass Storage device detected
[    2.160000] scsi1 : usb-storage 1-1.1:1.0
[    2.250000] usb 1-1.3: new full-speed USB device number 4 using oxnas-ehci
[    2.360000] usb 1-1.3: New USB device found, idVendor=067b, idProduct=2303
[    2.360000] usb 1-1.3: New USB device strings: Mfr=1, Product=2, SerialNumber=0
[    2.370000] usb 1-1.3: Product: USB-Serial Controller
[    2.380000] usb 1-1.3: Manufacturer: Prolific Technology Inc.
[    2.380000] pl2303 1-1.3:1.0: pl2303 converter detected
[    2.390000] usb 1-1.3: pl2303 converter now attached to ttyUSB0
[    2.560000] systemd[1]: systemd 207 running in system mode. (+PAM -LIBWRAP -AUDIT -SELINUX -IMA -SYSVINIT +LIBCRYPTSETUP +GCRYPT
 +ACL +XZ)

Welcome to Arch Linux ARM!

[    2.600000] systemd[1]: Set hostname to <nas>.
[    2.720000] systemd-gpt-auto-generator[65]: Failed to verify GPT partition /dev/block/8:2: No such file or directory
[    2.740000] systemd[1]: /usr/lib/systemd/system-generators/systemd-gpt-auto-generator exited with exit status 1.
[    3.140000] systemd[1]: Starting Forward Password Requests to Wall Directory Watch.
[    3.150000] systemd[1]: Started Forward Password Requests to Wall Directory Watch.
[    3.150000] systemd[1]: Expecting device dev-ttyS0.device...
         Expecting device dev-ttyS0.device...
[    3.170000] scsi 1:0:0:0: Direct-Access     ST960821 A                     PQ: 0 ANSI: 2 CCS
[    3.180000] systemd[1]: Expecting device sys-subsystem-net-devices-wlp0s0.device...
         Expecting device[    3.180000] sd 1:0:0:0: [sdb] 117231408 512-byte logical blocks: (60.0 GB/55.8 GiB)
 sys-subsystem-n[    3.190000] sd 1:0:0:0: [sdb] Write Protect is off
et-devices-wlp0s[    3.200000] sd 1:0:0:0: [sdb] Asking for cache data failed
0.device...
[    3.210000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[    3.220000] sd 1:0:0:0: [sdb] Asking for cache data failed
[    3.220000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[    3.240000] systemd[1]: Expecting device sys-subsystem-net-devices-eth0.device...
         Expecting device sys-subsystem-net-devices-eth0.device...
[    3.270000] systemd[1]: Starting Remote File Systems.
[  OK  ] Reached target Remote File Systems.
[    3.290000] systemd[1]: Reached target Remote File Systems.
[    3.290000] systemd[1]: Starting LVM2 metadata daemon socket.
[  OK  ] Listening on LVM2 metadata daemon socket.
[    3.320000] systemd[1]: Listening on LVM2 metadata daemon socket.
[    3.320000] systemd[1]: Starting /dev/initctl Compatibility Named Pipe.
[  OK  ] Listening on /dev/initctl Compatibility Named Pipe.
[    3.350000] systemd[1]: Listening on /dev/initctl Compatibility Named Pipe.
[    3.350000] systemd[1]: Starting Delayed Shutdown Socket.
[  OK  ] Listening on Delayed Shutdown Socket.
[    3.380000] systemd[1]: Listening on Delayed Shutdown Socket.
[    3.380000] systemd[1]: Starting Device-mapper event daemon FIFOs.
[  OK  ] Listening on Device-mapper event daemon FIFOs.
[    3.410000] systemd[1]: Listening on Device-mapper event daemon FIFOs.
[    3.410000] systemd[1]: Starting Arbitrary Executable File Formats File System Automount Point.
[  OK  ] Set up automount Arbitrary Executable File Formats F...utomount Point.
[    3.450000] systemd[1]: Set up automount Arbitrary Executable File Formats File System Automount Point.
[    3.450000] systemd[1]: Starting Encrypted Volumes.
[  OK  ] Reached target Encrypted Volumes.
[    3.480000] systemd[1]: Reached target Encrypted Volumes.
[    3.480000] systemd[1]: Starting Journal Socket.
[  OK  ] Listening on Journal Socket.
[    3.500000]  sdb: sdb1 sdb2 sdb3 sdb4
[    3.500000] sd 1:0:0:0: [sdb] Asking for cache data failed
[    3.510000] sd 1:0:0:0: [sdb] Assuming drive cache: write through
[    3.520000] sd 1:0:0:0: [sdb] Attached SCSI disk
[    3.520000] systemd[1]: Listening on Journal Socket.
[    3.530000] systemd[1]: Started Load Kernel Modules.
[    3.550000] systemd[1]: Starting Apply Kernel Variables...
         Starting Apply Kernel Variables...
[    3.580000] systemd[1]: Mounting POSIX Message Queue File System...
         Mounting POSIX Message Queue File System...
[    3.600000] systemd[1]: Mounting FUSE Control File System...
         Mounting FUSE Control File System...
[    3.630000] systemd[1]: Starting Setup Virtual Console...
         Starting Setup Virtual Console...
[    3.660000] systemd[1]: Mounted Huge Pages File System.
[    3.660000] systemd[1]: Starting Journal Service...
         Starting Journal Service...
[  OK  ] Started Journal Service.
[    3.710000] systemd[1]: Started Journal Service.
[  OK  ] Listening on udev Kernel Socket.
[  OK  ] Listening on udev Control Socket.
         Starting udev Coldplug all Devices...
         Starting Create list of required static device nodes...rrent kernel...
[  OK  ] Reached target Paths.
[    3.880000] systemd-journald[77]: Vacuuming done, freed 0 bytes
         Mounting Debug File System...
         Mounting Temporary Directory...
         Starting File System Check on Root Device...
         Expecting device dev-sda1.device...
[  OK  ] Created slice Root Slice.
[  OK  ] Created slice User and Session Slice.
[  OK  ] Created slice System Slice.
[  OK  ] Created slice system-netctl.slice.
[  OK  ] Created slice system-getty.slice.
[  OK  ] Created slice system-serial\x2dgetty.slice.
[  OK  ] Reached target Slices.
[  OK  ] Started Apply Kernel Variables.
[  OK  ] Mounted POSIX Message Queue File System.
[  OK  ] Mounted FUSE Control File System.
[  OK  ] Started Setup Virtual Console.
[  OK  ] Mounted Debug File System.
[  OK  ] Mounted Temporary Directory.
[  OK  ] Started Create list of required static device nodes ...current kernel.
         Starting Create static device nodes in /dev...
[  OK  ] Started udev Coldplug all Devices.
systemd-fsck[88]: linux: clean, 89858/6553600 files, 1093520/26206210 blocks
[  OK  ] Started File System Check on Root Device.
         Starting Remount Root and Kernel File Systems...
[  OK  ] Started Create static device nodes in /dev.
         Starting udev Ke[    4.600000] EXT4-fs (sda2): re-mounted. Opts: (null)
rnel Device Manager...
[  OK  ] Started Remount Root and Kernel File Systems.
[  OK  ] Reached target Local File Systems (Pre).
[    4.670000] systemd-udevd[103]: starting version 207
         Activating swap /swapfile...
         Starting Load/Save Random Seed...
[  OK  ] Started udev Kernel Device Manager.
[  OK  ] Started Load/Save Random Seed.
[  OK  ] Found device /dev/ttyS0.
[  OK  ] Found device /sys/subsystem/net/devices/eth0.
[    5.390000] systemd-udevd[113]: renamed network interface wlan0 to wlp0s0
[  OK  ] Found device AR9287 Wireless Network Adapter (PCI-Express).
[    6.150000] FAT-fs (sda1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[  OK  ] Found device ST3120827AS.
         Mounting /boot...
[  OK  ] Mounted /boot.
[  OK  ] Reached target Local File Systems.
         Starting Recreate Volatile Files and Directories...
         Starting Trigger Flushing of Journal to Persistent Storage...
[  OK  ] Started Recreate Volatile Files and Directories.
         Starting Update [    6.440000] EXT4-fs (sda3): mounted filesystem with ordered data mode. Opts: (null)
UTMP about System Reboot/Shutdown...
[    6.490000] systemd-journald[77]: Received request to flush runtime journal from PID 1
[  OK  ] Started Trigger Flushing of Journal to Persistent Storage.
[  OK  ] Started Update UTMP about System Reboot/Shutdown.
[    7.340000] Adding 1048572k swap on /swapfile.  Priority:-1 extents:2 across:1155068k
[  OK  ] Activated swap /swapfile.
[  OK  ] Reached target Swap.
[  OK  ] Reached target System Initialization.
[  OK  ] Listening on SWAT Samba Web Admin Tool.
[  OK  ] Listening on D-Bus System Message Bus Socket.
[    8.170000] EXT4-fs (sdb3): mounting ext3 file system using the ext4 subsystem
[    8.280000] EXT4-fs (sdb3): mounted filesystem with ordered data mode. Opts: (null)
[    8.310000] EXT4-fs (sdb2): mounting ext2 file system using the ext4 subsystem
[    8.410000] EXT4-fs (sdb2): mounted filesystem without journal. Opts: (null)
[  OK  ] Reached target Sockets.
[  OK  ] Reached target Timers.
[  OK  ] Reached target Basic System.
         Starting A basic dhcp ethernet connection...
         Starting Automatically generated profile by wifi-menu...
         Starting D-Bus System Message Bus...
[  OK  ] Started D-Bus System Message Bus.
         Starting Login Service...
         Starting Permit User Sessions...
[  OK  ] Started Permit User Sessions.
         Starting Getty on tty1...
[  OK  ] Started Getty on tty1.
         Starting Serial Getty on ttyS0...
[  OK  ] Started Serial Getty on ttyS0.
[  OK  ] Reached target Login Prompts.
[  OK  ] Started Login Service.
[   10.390000] eth0: device MAC address XXXXXXXXXXXX
[   10.850000] IPv6: ADDRCONF(NETDEV_UP): wlp0s0: link is not ready
[   11.900000] wlp0s0: authenticate with XXXXXXXXXXXXXXXXX
[   11.920000] wlp0s0: send auth to XXXXXXXXXXXXXX (try 1/3)
[   11.930000] wlp0s0: authenticated
[   11.950000] wlp0s0: associate with XXXXXXXXXX (try 1/3)
[   11.950000] wlp0s0: RX AssocResp from XXXXXXXXXXX (capab=0x411 status=0 aid=3)
[   11.960000] wlp0s0: associated
[   11.970000] IPv6: ADDRCONF(NETDEV_CHANGE): wlp0s0: link becomes ready
[   12.390000] libphy: stmmac-0:00 - Link is Up - 100/Full
[  OK  ] Started Automatically generated profile by wifi-menu.

Arch Linux 3.11.1+ (ttyS0)

nas login:
navym
 
Posts: 17
Joined: Tue Sep 24, 2013 2:11 am

Re: A new kernel for oxnas

Postby moonman » Tue Sep 24, 2013 9:46 am

That's great. Glad to see someone working on support for these devices. Unfortunately I don't own one of these, so I can't help you much but I am sure someone will. Are there any problems that you might have notcied. I know WarheadsSE was working on 3.1 kernel and didn't get it to work reliably. Also It would be nice if you put the sources to something like github for others to contribute. Cheers
Pogoplug V4 | GoFlex Home | Raspberry Pi B 512 | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | |[armv5] How to install my.pogoplug.com service | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 2995
Joined: Sat Jan 15, 2011 3:36 am
Location: Calgary, Canada

Re: A new kernel for oxnas

Postby navym » Tue Sep 24, 2013 1:39 pm

navym
 
Posts: 17
Joined: Tue Sep 24, 2013 2:11 am

Re: A new kernel for oxnas

Postby WarheadsSE » Tue Sep 24, 2013 4:08 pm

Have you gotten around the sata performance bottleneck due to SRAM vs DMA paging?
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6427
Joined: Mon Oct 18, 2010 2:12 pm

Re: A new kernel for oxnas

Postby navym » Wed Sep 25, 2013 1:26 am

I think sata performance issue is because of the high overhead of mainstream kernel's dma cache coherence operation for arm11mpcore.
Switch to broadcast cache operation like PLX's kernel should allivate it.

oprofile seems confirm my guess, v6_dma_inv_range consumes a lot of cycles
[root@nas ~]# opreport -c
Using /var/lib/oprofile/samples/ for samples directory.
warning: [heap] (tgid:1461 range:0x1dce000-0x1e30000) could not be found.
warning: [stack] (tgid:1377 range:0xbeb40000-0xbeb61000) could not be found.
CPU: CPU with timer interrupt, speed 478 MHz (estimated)
Profiling through timer interrupt
samples % image name app name symbol name
-------------------------------------------------------------------------------
8488 49.7451 vmlinux vmlinux arch_cpu_idle
8575 50.2549 vmlinux vmlinux cpu_startup_entry
8488 66.0082 vmlinux vmlinux arch_cpu_idle
8488 49.6142 vmlinux vmlinux arch_cpu_idle
8488 49.6142 vmlinux vmlinux arch_cpu_idle [self]
132 0.7716 vmlinux vmlinux __irq_svc
-------------------------------------------------------------------------------
822 50.0000 vmlinux vmlinux dma_cache_maint_page
822 50.0000 vmlinux vmlinux v6_dma_inv_range
822 6.3924 vmlinux vmlinux v6_dma_inv_range
822 50.0000 vmlinux vmlinux v6_dma_inv_range
822 50.0000 vmlinux vmlinux v6_dma_inv_range [self]
-------------------------------------------------------------------------------
668 100.000 vmlinux dd memcpy
668 5.1948 vmlinux dd memcpy
668 50.0000 vmlinux dd memcpy
668 50.0000 vmlinux dd memcpy [self]
-------------------------------------------------------------------------------
92 49.7297 vmlinux dd get_page_from_freelist
93 50.2703 vmlinux dd __alloc_pages_nodemask
92 0.7155 vmlinux dd get_page_from_freelist
92 49.7297 vmlinux dd get_page_from_freelist
92 49.7297 vmlinux dd get_page_from_freelist [self]
1 0.5405 vmlinux dd next_zones_zonelist
-------------------------------------------------------------------------------
85 49.1329 vmlinux dd scsi_request_fn
88 50.8671 vmlinux dd __blk_run_queue
85 0.6610 vmlinux dd scsi_request_fn
85 49.1329 vmlinux dd scsi_request_fn
85 49.1329 vmlinux dd scsi_request_fn [self]
2 1.1561 vmlinux dd scsi_dispatch_cmd
1 0.5780 vmlinux dd put_device
-------------------------------------------------------------------------------
82 0.6377 dd dd /usr/bin/dd
82 100.000 dd dd /usr/bin/dd [self]
....

c00194f0 <v6_dma_inv_range>: /* v6_dma_inv_range total: 824 6.4080 */
:c00194f0: ldrb r2, [r0]
9 0.0700 :c00194f4: strb r2, [r0]
:c00194f8: tst r0, #31
:c00194fc: bic r0, r0, #31
:c0019500: mcrne 15, 0, r0, cr7, cr10, {1}
1 0.0078 :c0019504: tst r1, #31
:c0019508: ldrbne r2, [r1, #-1]
:c001950c: strbne r2, [r1, #-1]
:c0019510: bic r1, r1, #31
1 0.0078 :c0019514: mcrne 15, 0, r1, cr7, cr14, {1}
36 0.2800 :c0019518: mcr 15, 0, r0, cr7, cr6, {1}
136 1.0576 :c001951c: add r0, r0, #32
:c0019520: cmp r0, r1
27 0.2100 :c0019524: ldrcc r2, [r0]
614 4.7749 :c0019528: strcc r2, [r0]
:c001952c: bcc c0019518 <v6_dma_inv_range+0x28>
:c0019530: mov r0, #0
:c0019534: mcr 15, 0, r0, cr7, cr10, {4}
:c0019538: mov pc, lr


to further confirm this, we could
turn off CONFIG_DMA_CACHE_RWFO and add boot parameter maxcpus=1
see if disk performance improves

In my case, I do not see any performance difference, because I use an old GEN1 sata disk,
seems it becomes the bottleneck, maybe need a faster disk to see the difference

Code: Select all
dd if=/dev/sda of=/dev/null bs=4096 count=4000000                                                                   
794557+0 records in                                                                                                               
794556+0 records out                                                                                                               
3254501376 bytes (3.3 GB) copied, 55.1274 s, 59.0 MB/s
navym
 
Posts: 17
Joined: Tue Sep 24, 2013 2:11 am

Re: A new kernel for oxnas

Postby WarheadsSE » Wed Sep 25, 2013 4:14 pm

You have my interest piqued.
Core Developer
Remember: Arch Linux ARM is entirely community donation supported!
WarheadsSE
Developer
 
Posts: 6427
Joined: Mon Oct 18, 2010 2:12 pm

Re: A new kernel for oxnas

Postby shv » Sun Sep 29, 2013 6:45 am

I will do some SATA and USB throughput tests with your kernel next time. We can compare it to the results from a 850 MHz overclocked Pogoplug Pro with the 2.6.31.6 kernel which can be found in the following post: http://pogoplug.cwsurf.de/forum/viewtop ... 4&t=13#p74.
Debian @ Pogoplug Pro (actively used)
Debian @ Pogoplug E02
shv
 
Posts: 38
Joined: Fri Dec 21, 2012 6:35 am

Re: A new kernel for oxnas

Postby celemine1gig » Sun Sep 29, 2013 10:58 am

Very interesting!
Great that someone gives it a shot again with the newer kernel sources and OXNAS.

Unfortunately I lack(ed) the knowledge to do a proper rewrite of the 3.1.xx kernel sources for OXNAS.
Because of the SATA and USB performance problems, I personally came up with this:
https://github.com/ingmar-k/2.6.31.14_OXNAS_kernel

Works with Debian wheezy perfectly fine, and the SATA and USB performance seem to be OK, too.
So, for the purpose of comparison you could use it for performance tuning of the new kernel. ;)

I personally am quite excited to see how this "new" 3.1.11 kernel for OXNAS turns out.
celemine1gig
 
Posts: 54
Joined: Fri Apr 26, 2013 7:55 pm

Re: A new kernel for oxnas

Postby shv » Sun Sep 29, 2013 1:45 pm

@navym:

Can you please provide your kernel configuration file (.config) for this kernel? If such configuration file is also necessary for uboot it would be nice to provide such file as well. I want to test with more or less the same uboot and kernel like you.

- shv
Last edited by shv on Mon Sep 30, 2013 5:23 pm, edited 2 times in total.
Debian @ Pogoplug Pro (actively used)
Debian @ Pogoplug E02
shv
 
Posts: 38
Joined: Fri Dec 21, 2012 6:35 am

Re: A new kernel for oxnas

Postby pepedog » Sun Sep 29, 2013 7:03 pm

I think
make ox820_defconfig
May create .config file
pepedog
Developer
 
Posts: 2416
Joined: Mon Jun 07, 2010 3:30 pm
Location: London UK

Next

Return to Community Supported

Who is online

Users browsing this forum: Yahoo [Bot] and 1 guest