Welcome! Log In Create A New Profile

Advanced

Linux Kernel 4.4.79 Oxnas (OX820) Pogo V3 package and Debian rootfs

Posted by bodhi 
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 09, 2016 10:33AM
tilator Wrote:
-------------------------------------------------------
> I suppose the problem might be this:
>
> OX820 processor can only boot from sata if there
> are some special bytes in start of the disk.
>
> The bytes are set using this script:
>
>
> perl <<EOF | dd of="$disk" bs=512
>     print "\x00" x 0x1a4;
>     print "\x00\x5f\x01\x00";
>     print "\x00\xdf\x00\x00";
>     print "\x00\x80\x00\x00";
>     print "\x00" x (0x1b0 -0x1a4 -12 );
>     print "\x22\x80\x00\x00";
>     print "\x22\x00\x00\x00";
>     print "\x00\x80\x00\x00";
> EOF
>
>
> It might be this that prevents kernel booting
> properly.

That's not reason. In SATA-only booting, once you have u-boot running, this is no longer relevant.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 09, 2016 04:45PM
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 10, 2016 04:54AM
bodhi Wrote:
-------------------------------------------------------
> Argrr! I got a different kernel panic now. I guess
> it's time to dig into the OpenWrt patch.

How about root device with that kernel? RW or RO?
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 10, 2016 11:14AM
tilator,

> How about root device with that kernel? RW or RO?

It is RW. The USB rootfs was mounted successfully.

You should check errors on your SATA rootfs. As I mentioned, I think too many kernel panics probably corrupted your FS (especially your SATA disk was already up during kernel panic). My rootfs was corrupted a few times. But I use a small USB rootfs for testing so I just restore it when that happened.

FWIW, this is precisely why I only want to use NAND u-boot, where you can boot with any type of devices so you don't have to use your real rootfs for testing.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 10, 2016 01:44PM
What's your swap size and type?
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 10, 2016 04:18PM
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 10, 2016 11:04PM
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 11, 2016 12:18AM
tilator,

I suspect that the Ext4 driver might be faulty.

[   16.968752] EXT4-fs (sda1): mounting ext3 file system using the ext4 subsystem
[   17.022627] EXT4-fs (sda1): mounted filesystem with ordered data mode. Opts: (null)
done.
Begin: Running /scripts/local-bottom ... done.
Begin: Running /scripts/init-bottom ... done.
INIT: version 2.88 booting
[   17.579955] oxnas-gmac 40400000.ethernet eth0: Link is Up - 1Gbps/Full - flow control rx/tx
[  153.010150] random: nonblocking pool is initialized
[  317.909847] EXT4-fs (sda1): error count since last fsck: 2
[  317.915338] EXT4-fs (sda1): initial error at time 18: :170: inode 229462
[  317.922081] EXT4-fs (sda1): last error at time 18: :170: inode 229422: block 1769168640


What is your rootfs FS type?

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 02/11/2016 12:20AM by bodhi.
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 11, 2016 11:25AM
bodhi Wrote:
-------------------------------------------------------
> tilator,
>
> I suspect that the Ext4 driver might be faulty.
>
> What is your rootfs FS type?

It's Ext4.

I'll try ext3 next.

B.T.W Original kernel source has different SATA settings. SATA0 and SATA1 has different addresses in original sorce, but this kernel FDT seems to have only one address and two ports assigned to it. Might this be a problem?
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 11, 2016 01:03PM
tilator,

> B.T.W Original kernel source has different SATA
> settings. SATA0 and SATA1 has different addresses
> in original sorce, but this kernel FDT seems to
> have only one address and two ports assigned to
> it. Might this be a problem?

You are using a different DTS (not Pogo Pro) so I'm not sure. However, if that was a change to go with your current sata_oxnas patch then it should be OK.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 11, 2016 04:32PM
Here is latest boot log:

## Booting kernel from Legacy Image at 60500000 ...
   Image Name:   Linux-4.4.0
   Image Type:   ARM Linux Kernel Image (uncompressed)
   Data Size:    3147328 Bytes = 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 6fe26000, end 6fe2affe ... OK

Starting kernel ...

Uncompressing Linux... done, booting the kernel.
[    0.000000] Booting Linux on physical CPU 0x0
[    0.000000] Linux version 4.4.0 (root@Iomega2) (gcc version 4.6.3 (Debian 4.6.3-14) ) #13 SMP Fri Feb 12 00:29:22 EET 2016
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5787d
[    0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[    0.000000] Machine model: Akitio
[    0.000000] Memory policy: Data cache writealloc
[    0.000000] DT missing boot CPU MPIDR[23:0], fall back to default cpu_logical_map
[    0.000000] PERCPU: Embedded 11 pages/cpu @cffdb000 s16160 r8192 d20704 u45056
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 65024
[    0.000000] Kernel command line: root=/dev/sda1 console=ttyS0,115200 noinitrd rootwait elevator=cfq mac_adr=0x00,0x01,0xd2,0x12,0x26,0xce rootwait ubi.mtd=2,512 mem=256M poweroutage=yes
[    0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes)
[    0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes)
[    0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes)
[    0.000000] Memory: 253444K/262144K available (4453K kernel code, 192K rwdata, 1212K rodata, 188K init, 232K bss, 8700K reserved, 0K cma-reserved)
[    0.000000] Virtual kernel memory layout:
[    0.000000]     vector  : 0xffff0000 - 0xffff1000   (   4 kB)
[    0.000000]     fixmap  : 0xffc00000 - 0xfff00000   (3072 kB)
[    0.000000]     vmalloc : 0xd0800000 - 0xff800000   ( 752 MB)
[    0.000000]     lowmem  : 0xc0000000 - 0xd0000000   ( 256 MB)
[    0.000000]     modules : 0xbf000000 - 0xc0000000   (  16 MB)
[    0.000000]       .text : 0xc0008000 - 0xc05908e0   (5667 kB)
[    0.000000]       .init : 0xc0591000 - 0xc05c0000   ( 188 kB)
[    0.000000]       .data : 0xc05c0000 - 0xc05f0210   ( 193 kB)
[    0.000000]        .bss : 0xc05f0210 - 0xc062a4dc   ( 233 kB)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=2, Nodes=1
[    0.000000] Hierarchical RCU implementation.
[    0.000000]  Build-time adjustment of leaf fanout to 32.
[    0.000000] NR_IRQS:160
[    0.000000] clocksource: rps_clocksource_timer: mask: 0xffffff max_cycles: 0xffffff, max_idle_ns: 19112603332 ns
[    0.000010] sched_clock: 24 bits at 390kHz, resolution 2560ns, wraps every 21474835200ns
[    0.000204] Console: colour dummy device 80x30
[    0.000235] Calibrating delay loop... 319.48 BogoMIPS (lpj=1597440)
[    0.050032] pid_max: default: 32768 minimum: 301
[    0.050199] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.050219] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.051025] CPU: Testing write buffer coherency: ok
[    0.051450] Setting up static identity map for 0x60008220 - 0x60008258
[    0.110154] Brought up 2 CPUs
[    0.110177] SMP: Total of 2 processors activated (638.97 BogoMIPS).
[    0.111421] devtmpfs: initialized
[    0.116037] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.116231] pinctrl core: initialized pinctrl subsystem
[    0.116948] NET: Registered protocol family 16
[    0.117608] DMA: preallocated 256 KiB pool for atomic coherent allocations
[    0.122316] gpio-oxnas 44000000.gpio: at address d0848000
[    0.122677] gpio-oxnas 44100000.gpio: at address d084a000
[    0.123233] pinctrl-oxnas pinctrl: initialized OX820 pinctrl driver
[    0.132564] vgaarb: loaded
[    0.132958] SCSI subsystem initialized
[    0.133780] usbcore: registered new interface driver usbfs
[    0.133877] usbcore: registered new interface driver hub
[    0.133987] usbcore: registered new device driver usb
[    0.134092] pps_core: LinuxPPS API ver. 1 registered
[    0.134105] pps_core: Software ver. 5.3.6 - Copyright 2005-2007 Rodolfo Giometti <giometti@linux.it>
[    0.134146] PTP clock support registered
[    0.135424] clocksource: Switched to clocksource rps_clocksource_timer
[    0.149680] NET: Registered protocol family 2
[    0.150576] TCP established hash table entries: 2048 (order: 1, 8192 bytes)
[    0.150632] TCP bind hash table entries: 2048 (order: 2, 16384 bytes)
[    0.150686] TCP: Hash tables configured (established 2048 bind 2048)
[    0.150771] UDP hash table entries: 256 (order: 1, 8192 bytes)
[    0.150812] UDP-Lite hash table entries: 256 (order: 1, 8192 bytes)
[    0.151096] NET: Registered protocol family 1
[    0.151720] RPC: Registered named UNIX socket transport module.
[    0.151741] RPC: Registered udp transport module.
[    0.151751] RPC: Registered tcp transport module.
[    0.151761] RPC: Registered tcp NFSv4.1 backchannel transport module.
[    0.153041] futex hash table entries: 512 (order: 2, 16384 bytes)
[    0.171484] fuse init (API version 7.23)
[    0.179883] Block layer SCSI generic (bsg) driver version 0.4 loaded (major 252)
[    0.179919] io scheduler noop registered
[    0.180014] io scheduler deadline registered
[    0.180093] io scheduler cfq registered (default)
[    0.180628] Serial: 8250/16550 driver, 1 ports, IRQ sharing disabled
[    0.181926] console [ttyS0] disabled
[    0.181992] 44200000.uart: ttyS0 at MMIO 0x44200000 (irq = 6, base_baud = 390625) is a 16550A
[    0.637562] console [ttyS0] enabled
[    0.643530] scsi host0: sata_oxnas
[    0.647564] scsi host1: sata_oxnas
[    0.651287] ata1: SATA max UDMA/133 irq 7
[    0.655285] ata2: SATA max UDMA/133 irq 7
[    0.660408] nand: Could not find valid ONFI parameter page; aborting
[    0.663851] sata_oxnas: resetting SATA core
[    0.670960] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xda
[    0.677281] nand: Hynix NAND 256MiB 3,3V 8-bit
[    0.681745] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[    0.689303] Scanning device for bad blocks
[    0.860032] 2 ofpart partitions found on MTD device NAND 256MiB 3,3V 8-bit
[    0.866877] Creating 2 MTD partitions on "NAND 256MiB 3,3V 8-bit":
[    0.873059] 0x000000000000-0x0000026c0000 : "Boot partition"
[    0.880427] 0x000000e00000-0x00000e740000 : "Date partition"
[    0.888445] oxnas-gmac 40400000.ethernet: snps,phy-addr property is deprecated
[    0.895790] oxnas-gmac 40400000.ethernet: no reset control found
[    0.901800] stmmac - user ID: 0x12, Synopsys ID: 0x35
[    0.906821]  Ring mode enabled
[    0.909857]  DMA HW capability register supported
[    0.914380]  Enhanced/Alternate descriptors
[    0.918709]  Enabled extended descriptors
[    0.922716]  RX Checksum Offload Engine supported (type 2)
[    0.928166]  TX Checksum insertion supported
[    0.932431]  Wake-Up On Lan supported
[    0.936071]  Enable RX Mitigation via HW Watchdog Timer
[    0.944465] libphy: stmmac: probed
[    0.947863] eth0: PHY ID 001cc914 at 0 IRQ POLL (stmmac-0:00)
[    0.953640] eth0: PHY ID 001cc914 at 3 IRQ POLL (stmmac-0:03)
[    0.959639] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    0.966187] ehci-pci: EHCI PCI platform driver
[    0.971112] oxnas-ehci 40200100.ehci: EHCI Host Controller
[    0.976611] oxnas-ehci 40200100.ehci: new USB bus registered, assigned bus number 1
[    0.984448] oxnas-ehci 40200100.ehci: irq 10, io mem 0x40200100
[    1.010019] oxnas-ehci 40200100.ehci: USB 2.0 started, EHCI 1.00
[    1.016412] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    1.023242] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    1.030471] usb usb1: Product: EHCI Host Controller
[    1.035328] usb usb1: Manufacturer: Linux 4.4.0 ehci_hcd
[    1.040640] usb usb1: SerialNumber: 40200100.ehci
[    1.046241] hub 1-0:1.0: USB hub found
[    1.050140] hub 1-0:1.0: 2 ports detected
[    1.054850] usbcore: registered new interface driver usb-storage
[    1.061230] mousedev: PS/2 mouse device common for all mice
[    1.068206] usbcore: registered new interface driver usbhid
[    1.073817] usbhid: USB HID core driver
[    1.079613] NET: Registered protocol family 10
[    1.085509] sit: IPv6 over IPv4 tunneling driver
[    1.091087] NET: Registered protocol family 17
[    1.098575] UBI error: cannot open mtd 2, error -19
[    1.173598] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[    1.180761] ata1.00: ATA-8: Hitachi HTS545050A7E380, GG2OA6C0, max UDMA/133
[    1.187727] ata1.00: 976773168 sectors, multi 16: LBA48 NCQ (depth 0/32)
[    1.195338] ata1.00: configured for UDMA/133
[    1.200327] scsi 0:0:0:0: Direct-Access     ATA      Hitachi HTS54505 A6C0 PQ: 0 ANSI: 5
[    1.210204] sd 0:0:0:0: [sda] 976773168 512-byte logical blocks: (500 GB/465 GiB)
[    1.217722] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    1.223211] sata_oxnas: resetting SATA core
[    1.238154] sd 0:0:0:0: [sda] Write Protect is off
[    1.243184] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    1.252697] sata_oxnas: resetting SATA core
[    2.013619] ata1: exception Emask 0x10 SAct 0x0 SErr 0x0 action 0xe frozen
[    2.020485] ata1: hard resetting link
[    2.493591] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[    2.506053] ata2.00: ATA-8: SAMSUNG HN-M101MBB, 2AR10001, max UDMA/133
[    2.512558] ata2.00: 1953525168 sectors, multi 0: LBA48 NCQ (depth 0/32)
[    2.525608] ata2.00: configured for UDMA/133
[    2.530549] scsi 1:0:0:0: Direct-Access     ATA      SAMSUNG HN-M101M 0001 PQ: 0 ANSI: 5
[    2.540154] sd 1:0:0:0: [sdb] 1953525168 512-byte logical blocks: (1.00 TB/931 GiB)
[    2.548456] sd 1:0:0:0: [sdb] Write Protect is off
[    2.553479] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    2.933616] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[    2.941680] ata1.00: configured for UDMA/133
[    2.945999] ata1: EH complete
[    3.428710] GPT:disk_guids don't match.
[    3.428897]  sda: sda1 sda2 sda3
[    3.435811] GPT:partition_entry_array_crc32 values don't match: 0xe877fdb6 != 0x85d86836
[    3.443880] GPT: Use GNU Parted to correct GPT errors.
[    3.449088]  sdb: sdb1 sdb2 sdb3
[    3.455772] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.455869] sd 1:0:0:0: [sdb] Attached SCSI disk
[    3.465190] UBIFS error (pid: 1): cannot open "ubi0:rootfs", error -19
[    3.505456] EXT4-fs (sda1): couldn't mount as ext3 due to feature incompatibilities
[    3.565557] EXT4-fs (sda1): mounted filesystem without journal. Opts: (null)
[    3.572623] VFS: Mounted root (ext4 filesystem) readonly on device 8:1.
[    3.601953] devtmpfs: mounted
[    3.605335] Freeing unused kernel memory: 188K (c0591000 - c05c0000)
[    3.821696] Unable to handle kernel paging request at virtual address b6dcaf50
[    3.828899] pgd = cfb18000
[    3.831585] [b6dcaf50] *pgd=6fb0c831, *pte=6065a59f, *ppte=6065ae6e
[    3.837831] Internal error: Oops: 17 [#1] SMP ARM
[    3.842503] Modules linked in:
[    3.845544] CPU: 1 PID: 1 Comm: init Not tainted 4.4.0 #13
[    3.850997] Hardware name: PLXTECH NAS782X SoC (Flattened Device Tree)
[    3.857487] task: cf844000 ti: cf848000 task.ti: cf848000
[    3.862863] PC is at v6wbi_flush_user_tlb_range+0x28/0x48
[    3.868244] LR is at on_each_cpu_mask+0x58/0x60
[    3.872750] pc : [<c000aa2c>]    lr : [<c007ccd4>]    psr: 80000093
[    3.872750] sp : cf849eb8  ip : 00000000  fp : cfb1adc0
[    3.884170] r10: cfb14000  r9 : 00000002  r8 : cfb0a42c
[    3.889361] r7 : cf849ed4  r6 : c00184ec  r5 : cfb14160  r4 : 20000013
[    3.895848] r3 : 00000001  r2 : 00100071  r1 : b6f0c000  r0 : b6f0b001
[    3.902341] Flags: Nzcv  IRQs off  FIQs on  Mode SVC_32  ISA ARM  Segment none
[    3.909521] Control: 00c5787d  Table: 6fb1800a  DAC: 00000051
[    3.915233] Process init (pid: 1, stack limit = 0xcf848190)
[    3.920773] Stack: (0xcf849eb8 to 0xcf84a000)
[    3.925109] 9ea0:                                                       00000001 b6f0a000
[    3.933253] 9ec0: 6067f75f cfb0a430 b6f0c000 c00186dc 00000103 cfb064d0 b6f0a000 b6f0c000
[    3.941396] 9ee0: b6f0c000 c00b473c 00000000 6067f7df 00000002 b6f0c000 00000381 cfb064d0
[    3.949539] 9f00: b6f0bfff cfb14034 b6f0a000 cfb14000 cfb06528 cfb064d0 00000000 00100071
[    3.957680] 9f20: b6f0a000 00100073 00000000 cfb14000 b6f0c000 c00b4908 00000000 00000000
[    3.965821] 9f40: cfab3300 00000139 00000000 00000000 00000000 00000002 00000022 b6f0c000
[    3.973959] 9f60: b6f0c000 00000001 b6f0a000 00000000 cf848000 00000000 beea7abc c00b4af0
[    3.982097] 9f80: 00100071 c00b2130 00000022 cfb064d0 b6f508f0 b6f51fb8 b6dc9000 0000007d
[    3.990238] 9fa0: c0009884 c00096c0 b6f508f0 b6f51fb8 b6f0a000 00002000 00000001 b6f0a6cc
[    3.998382] 9fc0: b6f508f0 b6f51fb8 b6dc9000 0000007d b6f51fb8 b6e21440 b6f0c02c beea7abc
[    4.006520] 9fe0: 00000000 beea79f0 b6f36900 b6f42aac 80000010 b6f0a000 00000000 00000000
[    4.014671] [<c000aa2c>] (v6wbi_flush_user_tlb_range) from [<c007ccd4>] (on_each_cpu_mask+0x58/0x60)
[    4.023777] [<c007ccd4>] (on_each_cpu_mask) from [<c00186dc>] (flush_tlb_range+0x4c/0x6c)
[    4.031923] [<c00186dc>] (flush_tlb_range) from [<c00b473c>] (change_protection_range+0x2d8/0x32c)
[    4.040844] [<c00b473c>] (change_protection_range) from [<c00b4908>] (mprotect_fixup+0x174/0x21c)
[    4.049676] [<c00b4908>] (mprotect_fixup) from [<c00b4af0>] (SyS_mprotect+0x140/0x1c0)
[    4.057561] [<c00b4af0>] (SyS_mprotect) from [<c00096c0>] (ret_fast_syscall+0x0/0x3c)
[    4.065356] Code: e20330ff e1830600 e1a01601 e5922028 (ee080f36)
[    4.071416] ---[ end trace 28b1ebd3139a6bcc ]---
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 11, 2016 05:47PM
tilator,

I'm convinced that the new Ext4 module in kernel 4.4 has a serious problem with the old Oxnas rootfs. And it might be because of something in the kernel 4.4 Oxnas configuration that it does not like now (but was OK with before). Booting back to the old kernel 4.1 on the same rootfs is fine without any problem (I tried both Ext3 and Ext4 rootfs).

It's taking too much of my free time to work it out! So I'll have to revisit this problem later, hopefully somebody will report similar problem to the KML in the mean time.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 12, 2016 03:17AM
bodhi Wrote:
-------------------------------------------------------
> tilator,
>
> I'm convinced that the new Ext4 module in kernel
> 4.4 has a serious problem with the old Oxnas
> rootfs. And it might be because of something in
> the kernel 4.4 Oxnas configuration that it does
> not like now (but was OK with before). Booting
> back to the old kernel 4.1 on the same rootfs is
> fine without any problem

I figured that out too. Kernel 4.1.16 boots fine althoug DTB needed some fixing. Now it finds both SATA devices, but still there is something wrong with RTC driver.

RTC works fine after rebooting this 4.1.16 kernel, but powerdown does not power it properly down and after unplugging there must be some bits remaining somewhere preventing RTC to work. I suppose it would need some kind of RTC or I2C driver reset while booting. How difficult this might be to do?
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 12, 2016 08:30AM
tilator,

> RTC works fine after rebooting this 4.1.16 kernel,
> but powerdown does not power it properly down and
> after unplugging there must be some bits remaining
> somewhere preventing RTC to work. I suppose it
> would need some kind of RTC or I2C driver reset
> while booting. How difficult this might be to do?

I think you would need to run stock to find out the differences. If it does not do any extra stuff during start up, then it might be in the kernel, which we might see under /sys/class/rtc/rtc0. What is the definition of rtc in the Atikio DTS in the kernel 4.1?

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner



Edited 1 time(s). Last edit at 02/12/2016 08:31AM by bodhi.
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 12, 2016 01:10PM
> If it does not do any extra stuff
> during start up, then it might be in the kernel,

It's definitely in kernel. It updates system time from RTC before starting rootfs.

> which we might see under /sys/class/rtc/rtc0. What
> is the definition of rtc in the Atikio DTS in the
> kernel 4.1?

i2c-gpio {
		compatible = "i2c-gpio";
		gpios = <0x5 0x9 0x0 0x5 0xa 0x0>;
		i2c-gpio,delay-us = <0xa>;
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		rtc@68 {
			compatible = "ds1307";
			reg = <0x68>;
		};
	};

Simple as that and it works until device halt (incompletely).

B.T.W RTC is actually ST Microsystems m41t00, but it uses same driver as Dallas ds1307.



Edited 1 time(s). Last edit at 02/12/2016 01:12PM by tilator.
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 13, 2016 04:29PM
tilator,

The device property needs to be more specific to the hardware. The mt41t00 variation has extra processing in the ds1307 driver (in addition to the general case of a ds1307).
i2c-gpio {
		compatible = "i2c-gpio";
		gpios = <0x5 0x9 0x0 0x5 0xa 0x0>;
		i2c-gpio,delay-us = <0xa>;
		#address-cells = <0x1>;
		#size-cells = <0x0>;

		rtc@68 {
                        compatible = "st,m41t00";
			reg = <0x68>;
		};
	};

Recompile this DTS and use it in the next boot with kernel 4.1.

After boot, you need to set the date, and then use the hwclock command to set it so it will be saved.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 14, 2016 02:01AM
bodhi Wrote:
-------------------------------------------------------
> tilator,
>
> The device property needs to be more specific to
> the hardware. The mt41t00 variation has extra
> processing in the ds1307 driver (in addition to
> the general case of a ds1307).
>
>                         compatible = "st,m41t00";
>

bodhi,

I have had this in my mind too. I suppose it might even sound like this:

                        compatible = "stm,m41t00";

I have had my time in making this poweroff properly. It seems not to have poweroff code compiled in kernel.



Edited 2 time(s). Last edit at 02/14/2016 03:25AM by tilator.
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 14, 2016 12:48PM
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 15, 2016 10:56AM
bodhi Wrote:
-------------------------------------------------------
> tilator ,
>
> Try it. I think it will work.
>
>
> rtc@68 {
>                         compatible = "st,m41t00";
> 			reg = <0x68>;
>

Still exactly same situation. After booting first old 2.6.* kernel and then warm boot to 4.1.6 this works fine. I compiled it as a module. It can be loaded and removed just fine.

After cold boot there is no RTC whatever I do.

There must be some reset routine somewhere in the old kernel
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 15, 2016 11:12AM
tilator,

> There must be some reset routine somewhere in the
> old kernel

Apparently so. I agreed, seems like it needs to be more than what being done in the 4.1 driver. Wonder what's in 4.4 or 4.5-rc?

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 15, 2016 11:21AM
bodhi Wrote:
-------------------------------------------------------
> tilator,
>
> > There must be some reset routine somewhere in
> the
> > old kernel
>
> Apparently so. I agreed, seems like it needs to be
> more than what being done in the 4.1 driver.
> Wonder what's in 4.4 or 4.5-rc?

Here is what's in original 2.6.* source. Does it sound like there is some kind of initializing in it:

/* Copyright (C) 2010 PLX Technology Inc
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License as published by
 * the Free Software Foundation; either version 2 of the License, or
 * (at your option) any later version.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, write to the Free Software
 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 */

#include <linux/device.h>
#include <linux/errno.h>
#include <linux/fs.h>
#include <linux/init.h>
#include <linux/miscdevice.h>
#include <linux/module.h>
#include <linux/mutex.h>
#include <linux/types.h>

#include <asm/uaccess.h>
#include <linux/proc_fs.h>
#include <asm/io.h>
#include <mach/hardware.h>
#include <linux/delay.h>

#define DRIVER_NAME "gpio"

static char mac_adr[6];
static DEFINE_MUTEX(ox820_gpio_lock);

static char *INPUT_MASK = "0:0";
module_param(INPUT_MASK, charp, S_IRUGO|S_IWUSR);

static char *OUTPUT_MASK = "0:0";
module_param(OUTPUT_MASK, charp, S_IRUGO|S_IWUSR);

static u_int32_t input_a = 0;
static u_int32_t input_b = 0;
static u_int32_t output_a = 0;
static u_int32_t output_b = 0;

//#define DEBUG 
#ifdef DEBUG
#define db_print(...) printk(__VA_ARGS__)
#else
#define db_print(...)
#endif

static int gpio_setup(void)
{

	db_print("INPUT_MASK = %s\n", INPUT_MASK);
	db_print("OUTPUT_MASK = %s\n", OUTPUT_MASK);
	
	if (sscanf(INPUT_MASK, "%x:%x", &input_a, &input_b) != 2)
		return -EINVAL;

	if (sscanf(OUTPUT_MASK, "%x:%x", &output_a, &output_b) != 2)
		return -EINVAL;

	db_print("INPUT A = 0x%08x\n", input_a);
	db_print("INPUT B = 0x%08x\n", input_b);
	db_print("OUTPUT A = 0x%08x\n", output_a);
	db_print("OUTPUT B = 0x%08x\n", output_b);
	
	if (mutex_lock_interruptible(&ox820_gpio_lock))
                return -ERESTARTSYS;

	/* Disable primary, secondary and teriary GPIO functions */
	writel(readl(SYS_CTRL_SECONDARY_SEL)   & ~(input_a | output_a), SYS_CTRL_SECONDARY_SEL);
	writel(readl(SYS_CTRL_TERTIARY_SEL)    & ~(input_a | output_a), SYS_CTRL_TERTIARY_SEL);
	writel(readl(SYS_CTRL_QUATERNARY_SEL)  & ~(input_a | output_a), SYS_CTRL_QUATERNARY_SEL);
	writel(readl(SYS_CTRL_DEBUG_SEL)       & ~(input_a | output_a), SYS_CTRL_DEBUG_SEL);
	writel(readl(SYS_CTRL_ALTERNATIVE_SEL) & ~(input_a | output_a), SYS_CTRL_ALTERNATIVE_SEL);
	// Setup 2nd input source
	writel(readl(SEC_CTRL_SECONDARY_SEL)   & ~(input_b | output_b), SEC_CTRL_SECONDARY_SEL);
	writel(readl(SEC_CTRL_TERTIARY_SEL)    & ~(input_b | output_b), SEC_CTRL_TERTIARY_SEL);
	writel(readl(SEC_CTRL_QUATERNARY_SEL)  & ~(input_b | output_b), SEC_CTRL_QUATERNARY_SEL);
	writel(readl(SEC_CTRL_DEBUG_SEL)       & ~(input_b | output_b), SEC_CTRL_DEBUG_SEL);
	writel(readl(SEC_CTRL_ALTERNATIVE_SEL) & ~(input_b | output_b), SEC_CTRL_ALTERNATIVE_SEL);

	/* Enable GPIO input  */
	/* Enable GPIO input  */
	writel((input_a), GPIO_A_OUTPUT_ENABLE_CLEAR);
	writel((input_b), GPIO_B_OUTPUT_ENABLE_CLEAR);
	
	/* Enable GPIO output */
	writel(output_a, GPIO_A_OUTPUT_CLEAR);
	writel(output_a, GPIO_A_OUTPUT_ENABLE_SET);
	writel(output_b, GPIO_B_OUTPUT_CLEAR);
	writel(output_b, GPIO_B_OUTPUT_ENABLE_SET);

	mutex_unlock(&ox820_gpio_lock);

	return 0;
}

/*
 *  ox820_gpio_read - Read OTP pages
 *
 */
static ssize_t ox820_gpio_read(struct file *file, char __user *buf, size_t count, loff_t *pos)
{
	uint32_t val;
	int i, len = 0;
	char contents[300];
	char *p = contents, *p_tail = contents + 300;
	

//	db_print("%s():\n", __FUNCTION__);

	if (mutex_lock_interruptible(&ox820_gpio_lock))
		return -ERESTARTSYS;

	/* Read GPIO_A */
	val = readl(GPIO_A_DATA);

	p += snprintf(p, p_tail - p, "INPUT A:(MSB)");	
//	db_print("Data read back = 0x%08x\n", val);
	for (i = 31; i >= 0; i--) {
		if (input_a & (0x1UL << i)) {
			p += snprintf(p, p_tail - p, "%s", ((val >> i) & 0x1UL) ? "1" : "0");
		} else {
			p += snprintf(p, p_tail - p, ".");
		}
		if ( i % 4 == 0 )
			p += snprintf(p, p_tail - p, " | ");
	}

	p += snprintf(p, p_tail - p, "\nINPUT B:(MSB)");
	/* Read GPIO_B */
	val = readl(GPIO_B_DATA) ;

//	db_print("Data read back = 0x%08x\n", val);
	for (i = 31; i >=0; i--) {
		if (input_b & (0x1UL << i)) {
			p += snprintf(p, p_tail - p, "%s", ((val >> i) & 0x1UL) ? "1" : "0");
		} else {	
			p += snprintf(p, p_tail - p, ".");
		}
		if ( i % 4 == 0 )
                        p += snprintf(p, p_tail - p, " | ");
	}

	p += snprintf(p, p_tail - p, "\n");

	len = (p - contents) - *pos;

	if (len < 0)
		len = 0;

	count = (count >= len) ? len : count;

	if (copy_to_user(buf, contents + *pos, count)) {
		mutex_unlock(&ox820_gpio_lock);
                return -EFAULT;
        }

	*pos += count;		
	mutex_unlock(&ox820_gpio_lock);

	return count;

}

/*
 *  ox820_gpio_write - Write OTP pages
 *  .
 */
static ssize_t ox820_gpio_write(struct file *filp, const char __user *buf, size_t count, loff_t *pos)
{
	char data[128];
	int i;
	unsigned int gpio_num, val;
	char gpio_ch;

	db_print("%s():\n", __FUNCTION__);

	if (count > sizeof(data)-1) {
        	return -EINVAL;
	}

	if (mutex_lock_interruptible(&ox820_gpio_lock))
		return -ERESTARTSYS;

	if (copy_from_user(data, buf, count)) {
		return -EFAULT;
	}
	
	db_print("Data write = %d\n", count);

#ifdef DEBUG
	for (i=0; i < count; i++)
		db_print("Data write = %x\n", data);
#endif

	if (sscanf(data, "%c:%u:%u", &gpio_ch, &gpio_num, &val) != 3)
		return -EINVAL;

	db_print("GPIO A/B = %d\n", gpio_ch);
	db_print("GPIO write = %d\n", gpio_num);
	db_print("GPIO value = %d\n", val);

	if ((gpio_ch == 0x61) || (gpio_ch == 0x41)) {
		db_print("Output GPIO A\n");
		if (output_a & (0x1UL << gpio_num)) {
			val ? writel((0x1UL << gpio_num), GPIO_A_OUTPUT_SET) : writel((0x1UL << gpio_num), GPIO_A_OUTPUT_CLEAR);
		} else {
			printk(KERN_INFO "Wrong GPIO A number!!\n");
		}
	} else if ((gpio_ch == 0x62) || (gpio_ch == 0x42)) {
		db_print("Output GPIO B\n");
		if (output_b & (0x1UL << gpio_num)) {
			val ? writel((0x1UL << gpio_num), GPIO_B_OUTPUT_SET) : writel((0x1UL << gpio_num), GPIO_B_OUTPUT_CLEAR);
		} else {
			printk(KERN_INFO "Wrong GPIO B number!!\n");
		}
	} else {
		printk(KERN_INFO "Wrong GPIO channel!!\n");
		return -EINVAL;
	}

	mutex_unlock(&ox820_gpio_lock);

	*pos = count;

	return count;
}

static struct file_operations ox820_gpio_fops = {
	.owner    = THIS_MODULE,
	.read     = ox820_gpio_read,
	.write    = ox820_gpio_write,
};

static struct miscdevice ox820_gpio_misc_device = {
	.minor    = MISC_DYNAMIC_MINOR,
	.name     = DRIVER_NAME,
	.fops     = &ox820_gpio_fops,
};

/*
 *  ox820_gpio_init - Initialize module
 *
 */
static int __init ox820_gpio_init(void)
{
	int ret;
	struct proc_dir_entry *ent;

	printk("%s():\n", __FUNCTION__);

	ret = misc_register(&ox820_gpio_misc_device);
	if (ret) {
		printk(KERN_INFO "unable to register a misc device\n");
		return ret;
	}

	printk(KERN_INFO "OX820 GPIO initialized\n");

	ret = gpio_setup();
	if (ret) {
		printk(KERN_INFO "failedto setup ox820 GPIO\n");
		return ret;
	}
	return 0;
}

/*
 *  ox820_gpio_exit - Deinitialize module
 *  
 */
static void __exit ox820_gpio_exit(void)
{
	printk("%s():\n", __FUNCTION__);
	misc_deregister(&ox820_gpio_misc_device);
	remove_proc_entry("ox820_gpio", NULL);
}

module_init(ox820_gpio_init);
module_exit(ox820_gpio_exit);

MODULE_DESCRIPTION("OX820 GPIO Test driver");
MODULE_LICENSE("GPL");



Edited 1 time(s). Last edit at 02/15/2016 11:22AM by tilator.
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 15, 2016 12:12PM
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 15, 2016 12:30PM
I have it all. Do you want it? It is a little old, though ;)
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 15, 2016 11:32PM
tilator Wrote:
-------------------------------------------------------
> I have it all. Do you want it? It is a little old,
> though ;)

I could have used this long ago :) I don't see the need for this now. Except if we need to find out what it does with the RTC driver m41t00.

I think you should try to resolve the shutdown problem first (perhaps it is related to the RTC problem).

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 16, 2016 01:34AM
> I think you should try to resolve the shutdown
> problem first (perhaps it is related to the RTC
> problem).

If they were related, the device should find RTC with 4.1 kernel if it was shutted down properly with old kernel and then cold booted in the new one. I expect the old kernel does shut it down properly.

B.T.W the shutdown process in official kernel source code is here:

/*
 *  arch/arm/mach-ox820/hotplug.c
 *
 *  Copyright (C) 2002 ARM Ltd.
 *  All Rights Reserved
 *
 * This program is free software; you can redistribute it and/or modify
 * it under the terms of the GNU General Public License version 2 as
 * published by the Free Software Foundation.
 */
#include <linux/kernel.h>
#include <linux/errno.h>
#include <linux/smp.h>
#include <linux/completion.h>

#include <asm/cacheflush.h>

static DECLARE_COMPLETION(cpu_killed);

static inline void cpu_enter_lowpower(void)
{
	unsigned int v;

	flush_cache_all();
	asm volatile(
	"	mcr	p15, 0, %1, c7, c5, 0\n"
	"	mcr	p15, 0, %1, c7, c10, 4\n"
	/*
	 * Turn off coherency
	 */
	"	mrc	p15, 0, %0, c1, c0, 1\n"
	"	bic	%0, %0, #0x20\n"
	"	mcr	p15, 0, %0, c1, c0, 1\n"
	"	mrc	p15, 0, %0, c1, c0, 0\n"
	"	bic	%0, %0, #0x04\n"
	"	mcr	p15, 0, %0, c1, c0, 0\n"
	  : "=&r" (v)
	  : "r" (0)
	  : "cc");
}

static inline void cpu_leave_lowpower(void)
{
	unsigned int v;

	asm volatile(	"mrc	p15, 0, %0, c1, c0, 0\n"
	"	orr	%0, %0, #0x04\n"
	"	mcr	p15, 0, %0, c1, c0, 0\n"
	"	mrc	p15, 0, %0, c1, c0, 1\n"
	"	orr	%0, %0, #0x20\n"
	"	mcr	p15, 0, %0, c1, c0, 1\n"
	  : "=&r" (v)
	  :
	  : "cc");
}

static inline void platform_do_lowpower(unsigned int cpu)
{
	/* Copied from Realview where they use a pen_release variable to tell if
	   the CPU has been intentionally woken from interrupt. They don't do
	   anything if the wake is unintentional, so may as well ignore for now */
	asm(".word	0xe320f003\n"
		:
		:
		: "memory", "cc");
}

int platform_cpu_kill(unsigned int cpu)
{
	return wait_for_completion_timeout(&cpu_killed, 5000);
}

/*
 * platform-specific code to shutdown a CPU
 *
 * Called with IRQs disabled
 */
void platform_cpu_die(unsigned int cpu)
{
#ifdef DEBUG
	unsigned int this_cpu = hard_smp_processor_id();

	if (cpu != this_cpu) {
		printk(KERN_CRIT "Eek! platform_cpu_die running on %u, should be %u\n",
			   this_cpu, cpu);
		BUG();
	}
#endif

	printk(KERN_NOTICE "CPU%u: shutdown\n", cpu);
	complete(&cpu_killed);

	/*
	 * we're ready for shutdown now, so do it
	 */
	cpu_enter_lowpower();
	platform_do_lowpower(cpu);

	/*
	 * bring this CPU back into the world of cache
	 * coherency, and then restore interrupts
	 */
	cpu_leave_lowpower();
}

int mach_cpu_disable(unsigned int cpu)
{
	/*
	 * we don't allow CPU 0 to be shutdown (it is still too special
	 * e.g. clock tick interrupts)
	 */
	return cpu == 0 ? -EPERM : 0;
}

It would just be "nice" to have the device still alive and updated. It's not easy to find other similar devices with internal sata, esata, two usbs, passive cooling, small footprint and so on.

B.T.W. I found at least one reason to the problem. Memory allocation seems to be some kind of fixed while original uses dynamic. Oxnas pincontrol driver is cause to this trouble. Not RTC driver.



Edited 2 time(s). Last edit at 02/16/2016 12:22PM by tilator.
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 17, 2016 02:16PM
Can you tell me one more thing.

Compiling u-boot 2014.10 does make u-boot binary, but not SPL. What might I do wrong?
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 17, 2016 03:13PM
tilator Wrote:
-------------------------------------------------------
> Can you tell me one more thing.
>
> Compiling u-boot 2014.10 does make u-boot binary,
> but not SPL. What might I do wrong?

Nothing wrong. You can build u-boot separately, which is what I do normaly (there is no need to rebuild SPL, 2013 version works just fine). If you want to rebuild SPL, then use the option "all" to make.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 18, 2016 01:22AM
>
> It would just be "nice" to have the device still
> alive and updated. It's not easy to find other
> similar devices with internal sata, esata,
> two usbs, passive cooling, small footprint
> and so on.

Yeah, I plan to revisit this so we can upgrade the kernel. Just need to find more time... or a good hint from mr google :) or perhaps from someone who has installed 4.4 OpenWrt for Oxnas.

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 18, 2016 03:01PM
bodhi Wrote:
-------------------------------------------------------
> tilator Wrote:
> --------------------------------------------------
> -----
> > Can you tell me one more thing.
> >
> > Compiling u-boot 2014.10 does make u-boot
> binary,
> > but not SPL. What might I do wrong?
>
> Nothing wrong. You can build u-boot separately,
> which is what I do normaly (there is no need to
> rebuild SPL, 2013 version works just fine). If you
> want to rebuild SPL, then use the option "all" to
> make.

Thanks. It seems to be so, that kernel inherits some values from u-boot at least in 2.6 kernel. Unfortunately names of the variables are not same in old and new kernel. This makes it difficult to investigate how it goes and of coure some of these values are related to pincontrol reset/setting.
Re: Linux Kernel 4.1 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
February 18, 2016 03:55PM
I did some testing with what we already have. Using an Ext4 rootfs. The interesting behavior of Ext4 driver:

Booting with kernel 4.1, there is no problem running it for a while.

And then, booting with kernel 4.4 caused an error:
[   26.608547] EXT4-fs error (device sda1): ext4_get_branch:170: inode #409672: block 1684366702: comm mv: invalid block

After booting back to kernel 4.1, this error was recorded in the rootfs. But the Ext4 driver in kernel 4.1 kept the system going.
[  317.909934] EXT4-fs (sda1): error count since last fsck: 2
[  317.915435] EXT4-fs (sda1): initial error at time 17: ext4_get_branch:170: inode 409642: block 2137154996
[  317.925053] EXT4-fs (sda1): last error at time 18: ext4_get_branch:170: inode 197458: block 3068516108
while kernel 4.4 Ext4 driver basically set the rootfs to RO, rendering it useless.

So it seems kernel 4.1 Ext4 can deal with this successfully. Tthe rootfs was corrupted by 4.4 Ext4, but not to the point that the 4.1 Ext4 driver can't deal with it.

However, I've concluded that this rootfs is no longer good to use (we can't say that if those invalid inodes will not cause problem in the future).

-bodhi
===========================
Wiki
latest Kirkwood kernel builds and rootfs
latest u-boot-kirkwood builds
latest Oxnas kernel builds and rootfs
latest u-boot-oxnas builds
latest MVEBU Armada kernel builds and rootfs
U-Boot & Kernel Booting process
bodhi's u-boot GitHub
bodhi's corner
Author:

Your Email:


Subject:


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