Welcome! Log In Create A New Profile

Advanced

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

Posted by bodhi 
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 07, 2015 01:34AM
gregg_a_g Wrote:
-------------------------------------------------------
> Hi, Bodhi -
>
> Thanks very much for creating a new 4.0
> kernel with cp437. It works like a champ and my
> VFAT partition mounted at boot!
>
> Kind regards,
> Gregg G.

Cool!

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

The u-boot, Debian path for Oxnas V3 you have devised works great - but there are some parts that are a little bit intricate and I'm not sure I quite follow the details.

I am able to boot with SATA no problem (since as you said in another post, the ROM on Pogoplug Pro V3 looks for SATA before anything else). I am also able to boot with USB stick. If I boot without a USB stick, I was thinking the "Pogoplug" OS would boot - but instead from netconsole I get:

**********************************************************************************************
U-Boot 2013.10-tld-4 (Sep 08 2014 - 19:43:38) for OXNAS
gcc (Debian 4.6.3-14) 4.6.3
GNU ld (GNU Binutils for Debian) 2.22
Hit any key to stop autoboot: 0
(Re)start USB...
USB0: USB EHCI 1.00
scanning bus 0 for devices... 2 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
** Bad device usb 0 **
** Bad device usb 0 **
** Bad device usb 0 **
Wrong Image Format for bootm command

Led: ORANGE (Failed)
ERROR: can't get kernel image!
stopping USB..
resetting ...

*****************************************************************

In some other threads, it looked like maybe I need to make an env.txt in /boot, but I don't understand how to make
it so that if there's not a USB stick plugged in the Pogo would boot from the "original" OS. Do I need to put in something like "rescue bootcmd"? Do any of the rescue systems work on V3, or only V2? If there's no rescue on V3, then I think I would like the Pogo to at least boot to the original OS if my USB stick fails.

Kind regards,
Gregg G.
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 08, 2015 04:53PM
@Gregg ,

At the moment, you can't boot back to Pogo OS. I did not set it up in the new u-boot installation. It is not a simple change in u-boot envs, so it's on my TODO list.

And the recue system should work on Pogo V3, but with modification and new kernel. But so far nobody has attempted this yet. If you want to try, watch for the differences in MTD layout, they are different from what the rescue system installation expects.

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



Edited 2 time(s). Last edit at 05/08/2015 06:44PM by bodhi.
Hey, Bodhi-

I've been studying this a little more - I want to make sure I am on the right path before "wiping out" anything.

1) Currently for the V3, MTD setup is:

dev: size erasesize name
mtd0: 00e00000 00020000 "boot" 14M
mtd1: 07200000 00020000 "data" 114M

2) mtd0 is "spl stage 1" + "u-boot" + "u-boot envs"
3) mtd1 doesn't have anything that's used right now - is that right? Or is there "leftover" stuff from Pogoplug kernel and OS?

Next steps would be to:

4) setup mtdparts so that I have
mtd0: 14M (don't want to break anything here)
mtd1: xxM (for a "rescue" kernel)
mtd2: yyM (for the "rescue" rootfs)

5) use ubiformat to put the rootfs on mtd2

6) setup u-boot envs (maybe in uEnv.txt ?) so that a USB stick boots first, but if no USB stick boot from mtd1/mtd2

Am I thinking about this correctly? I'm more interested in knowing how and why things work than in just following a "recipe" if you know what I mean! I'm not sure about all the details regarding sizes, addresses, etc.

Kind regards,
Gregg G.
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 09, 2015 02:41AM
Gregg,

> 1) Currently for the V3, MTD setup is:
>
> dev: size erasesize name
> mtd0: 00e00000 00020000 "boot" 14M
> mtd1: 07200000 00020000 "data" 114M
>
> 2) mtd0 is "spl stage 1" + "u-boot" + "u-boot
> envs"

Yes.

> 3) mtd1 doesn't have anything that's used right
> now - is that right? Or is there "leftover" stuff
> from Pogoplug kernel and OS?
>

The Pogo OS is still there. But it is considered empty.

> Next steps would be to:
>
> 4) setup mtdparts so that I have
> mtd0: 14M (don't want to break anything
> here)
> mtd1: xxM (for a "rescue" kernel)
> mtd2: yyM (for the "rescue" rootfs)
>
> 5) use ubiformat to put the rootfs on mtd2
>
> 6) setup u-boot envs (maybe in uEnv.txt ?) so
> that a USB stick boots first, but if no USB stick
> boot from mtd1/mtd2
>
> Am I thinking about this correctly?

Yes. You got it.

> I'm more
> interested in knowing how and why things work than
> in just following a "recipe" if you know what I
> mean! I'm not sure about all the details
> regarding sizes, addresses, etc.

At the moment, the rescue system will not work on the Pogo V3. It is for the other Kirkwood plugs. It must be modified with the Pogo V3 Oxnas kernel to be able to run. So it'll be a bit of works before we can use it.

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

Thanks for the info, I'll take a look and study your post! It looks very interesting!

Kind regards,
Gregg G.
Hello,

I'm struggling with the installation of my pogoplug pro... It was running perfectly (and stable) since 2 years for my domotica system without any issue, after what the USB key suddenly dead in 1 time...

So, I have now to restart the installation I did 2 years ago, and it's quite blurry in my mind now :) especially because it was the first version of the debian I installed on the system, and then, I've never updated it (it was working perfectly...)

Now, I restart the installation of the ArchLinux system (Alarm) and all is running perfectly, I can access the SSH server and connect the system...

But now, I'm really strugling with the debian installation...

The pogo starts, dmesg log is filled (at least, it starts to write sthg in it) and then, the pogo is not accessible from the net, I even can't see in the DMESG that it's trying to bind the network interface...

1 day that I'm searching, without success....

Do you have an idea ?

(for helping the debugging, I ran the boot on the stick, then mount it on a local Ubuntu and get back the DMESG log.
Seems weird to me : there are no other log than the dmesg.log.... So I guess that the startup isn't finished (I let it 10 minutes...)

root@Dell6400:/mnt/PogoStick/var/log# ls -lh
total 488K
drwxr-xr-x 2 root root 4,0K 2014-11-01 08:49 apt
-rw-r----- 1 root adm    31 2012-02-24 12:13 boot
-rw-rw---- 1 root utmp    0 2012-02-24 12:10 btmp
-rw-r--r-- 1 root adm   16K 1970-01-01 01:00 dmesg
drwxr-xr-x 2 root root 4,0K 1970-01-01 01:00 fsck
-rw-r--r-- 1 root root  292 2014-11-01 08:34 lastlog
-rw-rw-r-- 1 root utmp 452K 1970-01-01 01:00 wtmp
root@Dell6400:/mnt/PogoStick/var/log#


DSMEG log here -->


root@Dell6400:/mnt/PogoStick/var/log# cat dmesg|more
[    0.000000] Linux version 2.6.31.6_SMP_820 (root@hunchback) (gcc version 4.7.0 20120505 (prerelease) (GCC) ) #7 SMP Thu Jun 14 20:31:06 CDT 2012
[    0.000000] CPU: ARMv6-compatible processor [410fb025] revision 5 (ARMv7), cr=00c5387f
[    0.000000] CPU: VIPT nonaliasing data cache, VIPT nonaliasing instruction cache
[    0.000000] Machine: Oxsemi NAS
[    0.000000] 1 memory region
[    0.000000] Ignoring unrecognised tag 0x00000000
[    0.000000] Memory policy: ECC disabled, Data cache writealloc
[    0.000000] On node 0 totalpages: 32768
[    0.000000] free_area_init_node: node 0, pgdat c045a9e0, node_mem_map c0483000
[    0.000000]   Normal zone: 256 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 32512 pages, LIFO batch:7
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 32512
[    0.000000] Kernel command line: root=/dev/sda1 ubi.mtd=2,512 rootfstype=ext3 console=ttyS0,115200 elevator=cfq mac_adr=0x00,0x30,0xe0,0x00,0x00,0x01 rootdelay=15 mem=128M poweroutage=yes
[    0.000000] PID hash table entries: 512 (order: 9, 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: 128MB = 128MB total
[    0.000000] Memory: 125112KB available (4012K code, 316K data, 144K init, 0K highmem)
[    0.000000] Hierarchical RCU implementation.
[    0.000000] NR_IRQS:96
[    0.000000] OX820_RPS_init_irq: interrupts 64 to 96
[    0.010000] Console: colour dummy device 80x30
[    0.010000] console [ttyS0] enabled
[    0.020000] Calibrating delay loop... 279.34 BogoMIPS (lpj=1396736)
[    0.260000] Security Framework initialized
[    0.260000] Mount-cache hash table entries: 512
[    0.270000] CPU: Testing write buffer coherency: ok
[    0.270000] Calibrating local timer... 349.99MHz.
[    0.340000] CPU1: Booted secondary processor
[    0.440000] Calibrating delay loop... 279.34 BogoMIPS (lpj=1396736)
[    0.670000] Brought up 2 CPUs
[    0.680000] SMP: Total of 2 processors activated (558.69 BogoMIPS).
[    0.690000] tmpfs: No value for mount option 'mode'
[    0.690000] devtmpfs: initialized
[    0.700000] NET: Registered protocol family 16
[    0.700000] Number of DMA channels = 4, version = 4
[    0.710000] Reserving a DMA channel for DirectRAID
[    0.710000] Allocating 389 SRAM generic DMA descriptors
[    1.220000] PCIeA version/deviceID 082510b5
[    1.220000] PCIeB version/deviceID 082510b5
[    4.250000] ox820_pci_preinit() PCIEB link up timeout (00001814)
[    4.250000] ox820_pcie_setup_resources() Enabling PCIe Pre-Emphasis
[    4.260000] ox820_pciea_setup_resources() resource c781b140
[    4.260000] ox820_pciea_setup_resources()    io:      0x4be00000 - 0x4befffff
[    4.270000] ox820_pciea_setup_resources()    non-pre: 0x48000000 - 0x49ffffff
[    4.280000] ox820_pciea_setup_resources()    pre:     0x4a000000 - 0x4bdfffff
[    4.280000] pci 0000:00:00.0: reg 10 32bit mmio: [0x000000-0x00ffff]
[    4.280000] PCI: bus0: Fast back to back transfers disabled
[    4.290000] PCI: bus1: Fast back to back transfers enabled
[    4.310000] bio: create slab <bio-0> at 0
[    4.320000] SCSI subsystem initialized
[    4.320000] libata version 3.00 loaded.
[    4.320000] usbcore: registered new interface driver usbfs
[    4.330000] usbcore: registered new interface driver hub
[    4.330000] usbcore: registered new device driver usb
[    4.370000] NET: Registered protocol family 2
[    4.370000] IP route cache hash table entries: 1024 (order: 0, 4096 bytes)
[    4.380000] Switched to NOHz mode on CPU #0
[    4.380000] TCP established hash table entries: 4096 (order: 3, 32768 bytes)
[    4.380000] Switched to NOHz mode on CPU #1
[    4.390000] TCP bind hash table entries: 4096 (order: 3, 32768 bytes)
[    4.400000] TCP: Hash tables configured (established 4096 bind 4096)
[    4.400000] TCP reno registered
[    4.410000] NET: Registered protocol family 1
[    4.410000] Create fragment cache
[    4.440000] fuse init (API version 7.12)
[    4.440000] msgmni has been set to 244
[    4.450000] alg: No test for stdrng (krng)
[    4.450000] io scheduler noop registered
[    4.460000] io scheduler anticipatory registered
[    4.460000] io scheduler deadline registered
[    4.460000] io scheduler cfq registered (default)
[    4.490000] Serial: 8250/16550 driver, 2 ports, IRQ sharing disabled
[    4.500000] serial8250: ttyS0 at MMIO 0x44200000 (irq = 55) is a 16550A
[    4.510000] brd: module loaded
[    4.520000] loop: module loaded
[    4.530000] ox820sata: OX820 sata core.
[    4.530000] scsi0 : oxnassata
[    4.540000] scsi1 : oxnassata
[    4.540000] ata1: SATA max UDMA/133 irq 50
[    4.540000] ata2: SATA max UDMA/133 irq 50
[    4.550000] ox820sata: reseting SATA core
[    4.910000] ata1: SATA link down (SStatus 0 SControl 300)
[    4.910000] ox820sata: reseting SATA core
[    5.270000] ata2: SATA link down (SStatus 0 SControl 300)
[    5.270000] tun: Universal TUN/TAP device driver, 1.6
[    5.280000] tun: (C) 1999-2004 Max Krasnyansky <maxk@qualcomm.com>
[    5.280000] NAND: Page read time 40ms
[    5.290000] NAND device: Manufacturer ID: 0xad, Chip ID: 0xf1 (Hynix NAND 128MiB 3,3V 8-bit)
[    5.300000] Scanning device for bad blocks
[    5.310000] Bad eraseblock 97 at 0x000000c20000
[    5.330000] Bad eraseblock 393 at 0x000003120000
[    5.340000] Bad eraseblock 481 at 0x000003c20000
[    5.370000] Bad eraseblock 895 at 0x000006fe0000
[    5.380000] Bad eraseblock 987 at 0x000007b60000
[    5.390000] Creating 2 MTD partitions on "NAND 128MiB 3,3V 8-bit":
[    5.400000] 0x000000000000-0x000000e00000 : "boot"
[    5.410000] 0x000000e00000-0x000008000000 : "rootfs"
[    5.410000] UBI: attaching mtd2 to ubi0
[    5.420000] UBI: physical eraseblock size:   131072 bytes (128 KiB)
[    5.420000] UBI: logical eraseblock size:    129024 bytes
[    5.430000] UBI: smallest flash I/O unit:    2048
[    5.430000] UBI: sub-page size:              512
[    5.440000] UBI: VID header offset:          512 (aligned 512)
[    5.440000] UBI: VID header offset:          512 (aligned 512)
[    5.440000] UBI: data offset:                2048
[    5.850000] UBI: attached mtd2 to ubi0
[    5.860000] UBI: MTD device name:            "rootfs"
[    5.860000] UBI: MTD device size:            114 MiB
[    5.870000] UBI: number of good PEBs:        908
[    5.870000] UBI: number of bad PEBs:         4
[    5.870000] UBI: max. allowed volumes:       128
[    5.880000] UBI: wear-leveling threshold:    4096
[    5.880000] UBI: number of internal volumes: 1
[    5.890000] UBI: number of user volumes:     1
[    5.890000] UBI: available PEBs:             0
[    5.900000] UBI: total number of reserved PEBs: 908
[    5.900000] UBI: number of PEBs reserved for bad PEB handling: 9
[    5.910000] UBI: max/mean erase counter: 2/0
[    5.910000] UBI: image sequence number: 0
[    5.920000] UBI: background thread "ubi_bgt0d" started, PID 313
[    5.920000] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver
[    5.920000] ehci_hcd: block sizes: qh 128 qtd 96 itd 160 sitd 96
[    5.920000] <6>probe for usb
[    5.920000] <6>starting usb for 820
[    5.920000] ehci_hcd: block sizes: qh 128 qtd 96 itd 160 sitd 96
[    5.920000] <6>initialise for OX820 series USB
[    5.920000] <6>usb hsmph ctrl set to:0x2a5435e0
[    5.920000] <6>registers:
[    5.920000] <6>SYS_CTRL_CKEN_CTRL 0xf1e00024: 0x00000000
[    5.920000] <6>SYS_CTRL_RSTEN_CTRL 0xf1e00028: 0x00000000
[    5.920000] <6>SYS_CTRL_USBHSPHY_CTRL 0xf1e00084: 0x00002abd
[    5.920000] <6>SYS_CTRL_TERTIARY_SEL 0xf1e0008c: 0x00000000
[    5.920000] <6>SYS_CTRL_SECONDARY_SEL 0xf1e00014: 0x01fff018
[    5.920000] <6>SYS_CTRL_REF300_DIV 0xf1e000f8: 0x00001900
[    5.920000] <6>SYS_CTRL_USB_CTRL 0xf1e00090: 0x00000042
[    5.920000] <6>@ed200000 Device ID register 42fa05
[    5.920000] oxnas-ehci oxnas-ehci.0: OXNAS EHCI Host Controller
[    5.920000] drivers/usb/core/inode.c: creating file 'devices'
[    5.920000] drivers/usb/core/inode.c: creating file '001'
[    5.920000] oxnas-ehci oxnas-ehci.0: new USB bus registered, assigned bus number 1
[    5.920000] oxnas-ehci oxnas-ehci.0: reset
[    5.920000]  hcs_params 0x1210012 dbg=2 ind cc=0 pcc=0 ordered ports=2
[    5.920000] oxnas-ehci oxnas-ehci.0: reset
[    5.920000]  hcc_params 0006 thresh 0 uframes 256/512/1024 park
[    5.920000] oxnas-ehci oxnas-ehci.0: park 0
[    5.920000] oxnas-ehci oxnas-ehci.0: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT
[    5.920000] oxnas-ehci oxnas-ehci.0: ...powerdown ports...
[    5.950000] oxnas-ehci oxnas-ehci.0: irq 39, io mem 0x00000000
[    5.950000] oxnas-ehci oxnas-ehci.0: reset command 080b02 park=3 ithresh=8 period=1024 Reset HALT
[    5.950000] oxnas-ehci oxnas-ehci.0: init command 010009 (park)=0 ithresh=1 period=256 RUN
[    5.970000] oxnas-ehci oxnas-ehci.0: USB 0.0 started, EHCI 1.00
[    5.970000] usb usb1: default language 0x0409
[    5.970000] usb usb1: udev 1, busnum 1, minor = 0
[    5.970000] usb usb1: New USB device found, idVendor=1d6b, idProduct=0002
[    5.980000] usb usb1: New USB device strings: Mfr=3, Product=2, SerialNumber=1
[    5.980000] usb usb1: Product: OXNAS EHCI Host Controller
[    5.990000] usb usb1: Manufacturer: Linux 2.6.31.6_SMP_820 ehci_hcd
[    6.000000] usb usb1: SerialNumber: usb
[    6.000000] usb usb1: uevent
[    6.000000] usb usb1: usb_probe_device
[    6.000000] usb usb1: configuration #1 chosen from 1 choice
[    6.010000] usb usb1: adding 1-0:1.0 (config #1, interface 0)
[    6.010000] usb 1-0:1.0: uevent
[    6.010000] hub 1-0:1.0: usb_probe_interface
[    6.010000] hub 1-0:1.0: usb_probe_interface - got id
[    6.010000] hub 1-0:1.0: USB hub found
[    6.010000] hub 1-0:1.0: 2 ports detected
[    6.010000] hub 1-0:1.0: standalone hub
[    6.010000] hub 1-0:1.0: individual port power switching
[    6.010000] hub 1-0:1.0: individual port over-current protection
[    6.010000] hub 1-0:1.0: Single TT
[    6.010000] hub 1-0:1.0: TT requires at most 8 FS bit times (666 ns)
[    6.010000] hub 1-0:1.0: power on to power good time: 20ms
[    6.010000] hub 1-0:1.0: local power source is good
[    6.010000] hub 1-0:1.0: enabling power on all ports
[    6.020000] drivers/usb/core/inode.c: creating file '001'
[    6.020000] Initializing USB Mass Storage driver...
[    6.020000] usbcore: registered new interface driver usb-storage
[    6.030000] USB Mass Storage support registered.
[    6.030000] usbcore: registered new interface driver libusual
[    6.040000] mice: PS/2 mouse device common for all mice
[    6.040000] usbcore: registered new interface driver hiddev
[    6.050000] usbcore: registered new interface driver usbhid
[    6.060000] usbhid: v2.6:USB HID core driver
[    6.060000] TCP cubic registered
[    6.060000] NET: Registered protocol family 10
[    6.070000] lo: Disabled Privacy Extensions
[    6.070000] NET: Registered protocol family 17
[    6.080000] RPC: Registered udp transport module.
[    6.080000] RPC: Registered tcp transport module.
[    6.090000] Waiting 15sec before mounting root device...
[    6.110000] oxnas-ehci oxnas-ehci.0: GetStatus port 1 status 001803 POWER sig=j CSC CONNECT
[    6.110000] hub 1-0:1.0: port 1: status 0101 change 0001
[    6.210000] hub 1-0:1.0: state 7 ports 2 chg 0002 evt 0000
[    6.210000] hub 1-0:1.0: port 1, status 0101, change 0000, 12 Mb/s
[    6.330000] usb 1-1: new high speed USB device using oxnas-ehci and address 2
[    6.390000] oxnas-ehci oxnas-ehci.0: port 1 high speed
[    6.390000] oxnas-ehci oxnas-ehci.0: GetStatus port 1 status 8001205 POWER sig=se0 PE CONNECT
[    6.480000] usb 1-1: default language 0x0409
[    6.480000] usb 1-1: udev 2, busnum 1, minor = 1
[    6.480000] usb 1-1: New USB device found, idVendor=05e3, idProduct=0608
[    6.480000] usb 1-1: New USB device strings: Mfr=0, Product=1, SerialNumber=0
[    6.490000] usb 1-1: Product: USB2.0 Hub
[    6.490000] usb 1-1: uevent
[    6.500000] usb 1-1: usb_probe_device
[    6.500000] usb 1-1: configuration #1 chosen from 1 choice
[    6.500000] usb 1-1: adding 1-1:1.0 (config #1, interface 0)
[    6.500000] usb 1-1:1.0: uevent
[    6.500000] hub 1-1:1.0: usb_probe_interface
[    6.500000] hub 1-1:1.0: usb_probe_interface - got id
[    6.500000] hub 1-1:1.0: USB hub found
[    6.510000] hub 1-1:1.0: 4 ports detected
[    6.510000] hub 1-1:1.0: standalone hub
[    6.510000] hub 1-1:1.0: ganged power switching
[    6.510000] hub 1-1:1.0: global over-current protection
[    6.510000] hub 1-1:1.0: Single TT
[    6.510000] hub 1-1:1.0: TT requires at most 32 FS bit times (2664 ns)
[    6.510000] hub 1-1:1.0: Port indicators are supported
[    6.510000] hub 1-1:1.0: power on to power good time: 100ms
[    6.510000] hub 1-1:1.0: local power source is good
[    6.510000] hub 1-1:1.0: no over-current condition exists
[    6.510000] hub 1-1:1.0: enabling power on all ports
[    6.510000] drivers/usb/core/inode.c: creating file '002'
[    6.510000] hub 1-0:1.0: state 7 ports 2 chg 0000 evt 0002
[    6.610000] hub 1-1:1.0: port 1: status 0101 change 0001
[    6.710000] usb 1-1: link qh256-0001/ffc00100 start 1 [1/0 us]
[    6.710000] hub 1-1:1.0: state 7 ports 4 chg 0002 evt 0000
[    6.710000] hub 1-1:1.0: port 1, status 0101, change 0000, 12 Mb/s
[    6.790000] usb 1-1.1: new high speed USB device using oxnas-ehci and address 3
[    6.900000] usb 1-1.1: default language 0x0409
[    6.900000] usb 1-1.1: udev 3, busnum 1, minor = 2
[    6.900000] usb 1-1.1: New USB device found, idVendor=0930, idProduct=6545
[    6.910000] usb 1-1.1: New USB device strings: Mfr=0, Product=2, SerialNumber=3
[    6.910000] usb 1-1.1: Product: USB Flash Memory
[    6.920000] usb 1-1.1: SerialNumber: 0F40767082B32910
[    6.920000] usb 1-1.1: uevent
[    6.920000] usb 1-1.1: usb_probe_device
[    6.920000] usb 1-1.1: configuration #1 chosen from 1 choice
[    6.930000] usb 1-1.1: adding 1-1.1:1.0 (config #1, interface 0)
[    6.930000] usb 1-1.1:1.0: uevent
[    6.930000] usb-storage 1-1.1:1.0: usb_probe_interface
[    6.930000] usb-storage 1-1.1:1.0: usb_probe_interface - got id
[    6.930000] scsi2 : SCSI emulation for USB Mass Storage devices
[    6.940000] usb-storage: device found at 3
[    6.940000] usb-storage: waiting for device to settle before scanning
[    6.940000] drivers/usb/core/inode.c: creating file '003'
[    6.940000] hub 1-1:1.0: state 7 ports 4 chg 0000 evt 0002
[   11.940000] scsi 2:0:0:0: Direct-Access              USB Flash Memory 5.00 PQ: 0 ANSI: 0 CCS
[   13.690000] usb-storage: device scan complete
[   13.690000] sd 2:0:0:0: [sda] 4028416 512-byte logical blocks: (2.06 GB/1.92 GiB)
[   13.700000] sd 2:0:0:0: [sda] Write Protect is off
[   13.700000] sd 2:0:0:0: [sda] Mode Sense: 23 00 00 00
[   13.700000] sd 2:0:0:0: [sda] Assuming drive cache: write through
[   13.710000] sd 2:0:0:0: [sda] Assuming drive cache: write through
[   13.720000]  sda: sda1
[   13.730000] sd 2:0:0:0: [sda] Assuming drive cache: write through
[   13.730000] sd 2:0:0:0: [sda] Attached SCSI removable disk
[   23.110000] kjournald starting.  Commit interval 5 seconds
[   23.110000] EXT3-fs warning: maximal mount count reached, running e2fsck is recommended
[   23.110000] EXT3 FS on sda1, internal journal
[   23.110000] EXT3-fs: mounted filesystem with writeback data mode.
[   23.110000] VFS: Mounted root (ext3 filesystem) on device 8:1.
[   25.170000] devtmpfs: mounted
[   25.180000] Freeing init memory: 144K
[   38.760000] EXT3 FS on sda1, internal journal
root@Dell6400:/mnt/PogoStick/var/log#
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 14, 2015 04:37PM
Scanx_taz,

> [ 0.000000] Linux version 2.6.31.6_SMP_820
> (root@hunchback) (gcc version 4.7.0 20120505
> (prerelease) (GCC) ) #7 SMP Thu Jun 14 20:31:06
> CDT 2012

This shows you are still running the old kernel. The best way to update this for Debian or Arch is to install new U-boot. And create a new rootfs using my uploaded rootfs (in the 1st post of this thread), and use that for booting first.

Next, if you haved been using your existing Debian rootfs for a while, you can try to reuse that so you don't have to reinstall a lot of packages. This can be done by chroot into it and install new kernel. It is a whole different topic. Just make sure you make a backup of your current Debian rootfs if it contains things you want to save.

Note: the old Debian installation 2 years ago used Arch kernel and Debian rootfs (it's a hybrid approach).

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

Thanks for your quick reply !

Nevertheless, I'm not very confident to proceed, in your tutorial, you're saying two things that are making me quite uncomfortable :

  1. 2. The env image pogopro_uboot_env.img should only be flashed if your rootfs has FDT kernel. If your kernel is an older non-FDT kernel then do not flash this env image. If you plan to run with the new rootfs then flash this image.
  2. 4. Be sure there is no bad block in the first 1M of your NAND (check dmesg). This is very important, if there is bad block in the first 1M, don't flash u-boot, because you will almost certainly brick your box. Please post your question here (there is a work around for it).

when I've a look on bad blocks, here what I'm receiving :

[root@alarm etc]# dmesg |grep -i "bad"
[    5.300000] Scanning device for bad blocks
[    5.310000] Bad eraseblock 97 at 0x000000c20000
[    5.330000] Bad eraseblock 393 at 0x000003120000
[    5.340000] Bad eraseblock 481 at 0x000003c20000
[    5.370000] Bad eraseblock 895 at 0x000006fe0000
[    5.380000] Bad eraseblock 987 at 0x000007b60000
[    5.870000] UBI: number of bad PEBs:         4
[    5.900000] UBI: number of PEBs reserved for bad PEB handling: 9
[root@alarm etc]#

Are the bad blocks "well placed" ?
And how to know if my kernel is a "non-FDT kernel" ?

May I proceed with those two statements ?
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 15, 2015 12:58AM
Scanx_taz,

> Are the bad blocks "well placed" ?

The bad blocks are not in the first 8 blocks of mtd0, they are way out in different area. So it safe to flash.

> And how to know if my kernel is a "non-FDT kernel"

The new rootfs has FDT kernel. So flash u-boot default env pogopro_uboot_env.img only if you plan to run with the new rootfs. Your existing kernel is non-FDT. I've written the instruction that way because some people could have built and used their own non-FDT kernel for the Pogo V3 (a few among us did).

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

Thanks for your reply, I'm following i think :)

But, a small question anyway : when you say
(See caveat in step 2, do not do this step this if the kernel is stock kernel, or not a FDT kernel)

Are you speaking about the RUNNING kernel in memory when the command is launched or the one that will be loaded on the next boot and that is installed on the "newly fresh installed drive" ???
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 15, 2015 03:45AM
Scanx_taz Wrote:
-------------------------------------------------------
> Hi Bodhi,
>
> Thanks for your reply, I'm following i think :)
>
> But, a small question anyway : when you say
>
(See caveat in step 2, do not do this step
> this if the kernel is stock kernel, or not a FDT
> kernel) 
>
>
> Are you speaking about the RUNNING kernel in
> memory when the command is launched or the one
> that will be loaded on the next boot and that is
> installed on the "newly fresh installed drive" ???

Not the running kernel. It's the kernel for the next boot after the new u-boot image and the default u-boot envs were flashed.

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

i need some help. I am trying to make usb automount work with udev rules on the latest kernel. I copied the udev rule from the arch pogo system, which worked there fine. It works here but not properely: if the system is up and i plug a usb drive it gets mounted in the correct way (/medai/LABLE), if i remove it it unmounts and removes the directory. However if the device is pluged in at boot time it is not mounted.

I looked for udev errors, but /var/log/udev does not exists.

Here is the udev rule (/etc/udev/rules.d/11-media-by-lable-auto-mount.rules)
KERNEL!="sd[a-z][0-9]", GOTO="media_by_label_auto_mount_end"
PROGRAM="/bin/grep -q ' %M:%m /[^ ]* /' /proc/self/mountinfo", PROGRAM!="/bin/grep -q ' %M:%m / /media/' /proc/self/mountinfo", GOTO="media_by_label_auto_mount_end"

# Import FS infos
IMPORT{program}="/sbin/blkid -o udev -p %N"

# Get a label if present, otherwise specify one
ENV{ID_FS_LABEL}!="", ENV{dir_name}="%E{ID_FS_LABEL}"
ENV{ID_FS_LABEL}=="", ENV{dir_name}="hd-%k"

# Global mount options
ACTION=="add", ENV{mount_options}="noatime"
# Filesystem-specific mount options
ACTION=="add", ENV{ID_FS_TYPE}=="vfat|ntfs", ENV{mount_options}="$env{mount_options},utf8,gid=100,umask=002"

# Mount the device
ACTION=="add", RUN+="/bin/mkdir -p /media/%E{dir_name}", RUN+="/bin/mount -o $env{mount_options} /dev/%k /media/%E{dir_name}"

# Clean up after removal
ACTION=="remove", ENV{dir_name}!="", RUN+="/bin/umount -l /media/%E{dir_name}", RUN+="/bin/rmdir /media/%E{dir_name}"

# Exit
LABEL="media_by_label_auto_mount_end"

Thanks



Edited 2 time(s). Last edit at 05/19/2015 02:25PM by schnee.
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 19, 2015 04:12PM
schnee,

> However if the device is
> pluged in at boot time it is not mounted.
>

I'm most certain that udev rules file is not executed at boot time without setting it up further.

Normally, if you use a solution such as usbmount or autofs package, the drive will be automounted by those utilities. But if you set up your own automount with udev rules (I do this too), you would need a script to mount the USB drive, and that script can be executed in /etc/rc.local.

If you need the script, long ago kraqh3d and I have posted the script here in the forum, but I need to find it :)

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Found the problem.
- renamed 11-media-by-lable-auto-mount.rules to 91-media-by-lable-auto-mount.rules to make sure it executed after 60-persistent-storage.rules
- run "udevadm control --reload-rules ; /etc/init.d/udev reload ; reboot"
and now it is mounted on boot time :)
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 19, 2015 05:25PM
schnee Wrote:
-------------------------------------------------------
> Found the problem.
> - renamed 11-media-by-lable-auto-mount.rules to
> 91-media-by-lable-auto-mount.rules to make sure it
> executed after 60-persistent-storage.rules
> - run "udevadm control --reload-rules ;
> /etc/init.d/udev reload ; reboot"
> and now it is mounted on boot time :)

Cool :) good to know. They might have fixed this in more recent releases.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I've updated my pogoplug pro to the latest uboot and debian version booting reliably off a USB memory stick. I have serial port access. The USB memory stick has no /boot/uEnv.txt file present, so the internal u-Boot environment (which defaults to USB) variables are used to configure the boot process. I've tried to build the same system onto a Sata hard disk, but it fails to start the boot process unless there is a /boot/uEnv.txt file present on the Sata disk. If I add a /boot/uEnv.txt file to the Sata disk the system hangs part way through the boot process. If I have both the USB memory stick and the Sata disk present, the system appears to start the boot process from the USB memory stick and then completes the boot process from the Sata disk, ending up with the Sata disk as /dev/sda and the USB memory stick as /dev/sdb. I presume that if I have a correct /boot/uEnv.txt file on the Sata disk, I could get the system to boot completely from a Sata disk, ignoring any connected USB connected disks. Has anyone done this and what is required in the /boot/uEnv.txt file on the hard disk to make this happen?

Thanks

Peter
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 25, 2015 03:50PM
Peter,

If you don't need uEnv.txt, you can remove the "run bootcmd_uenv" from bootcmd. I'll take a look later for the case where the HDD spinning up slowly, which might cause the delay when you rebooted and had this problem.

So for now. Example, if your bootcmd is like this:
bootcmd=run bootcmd_uenv; run dt_bootcmd_usb; reset
then change it to:
fw_setenv bootcmd 'run dt_bootcmd_usb; reset'

If you're not sure or being extra careful, list your envs and I'll modify them for you.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
I have an interesting issue with the latest kernel and SATA. My system boots from SATA with the latest kernel + debian root image + wareheadSE's sataboot script. The sata drive have the following partitions:
1: 16 MB FAT
2: ~10 GB as root partiotion (ext3)
3. ~140 GB as home partiton (/home) (ext4)

The box works fine, syslog is usually clean etc. However when i run something (eg download) which has mass amount of write to the /home partition, the pogo starts to slow down and after a few minutes become unresponsive, did not hang but replies are extreme long and ssh sessions usually time out. I noticed that the syslog when the issue starts displays SATA disk errors:
May 26 23:22:52 schtr kernel: [11498.903813] ox820sata: reseting SATA core
May 26 23:22:52 schtr kernel: [11499.263528] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
May 26 23:22:52 schtr kernel: [11499.270566] ata1.00: failed command: DATA SET MANAGEMENT
May 26 23:22:52 schtr kernel: [11499.275921] ata1.00: cmd 06/01:01:00:00:00/00:00:00:00:00/a0 tag 21 dma 512 out
May 26 23:22:52 schtr kernel: [11499.275921]          res 51/04:01:00:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
May 26 23:22:52 schtr kernel: [11499.297021] ata1.00: status: { DRDY ERR }
May 26 23:22:52 schtr kernel: [11499.301450] ata1.00: error: { ABRT }
May 26 23:22:52 schtr kernel: [11499.305694] ata1: hard resetting link
May 26 23:22:52 schtr kernel: [11499.812989] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
May 26 23:22:52 schtr kernel: [11499.821593] ata1.00: configured for UDMA/133
May 26 23:22:52 schtr kernel: [11499.826332] ata1.00: device reported invalid CHS sector 0
May 26 23:22:52 schtr kernel: [11499.833564] sd 0:0:0:0: [sda] tag#21 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
May 26 23:22:52 schtr kernel: [11499.845212] sd 0:0:0:0: [sda] tag#21 Sense Key : 0xb [current] [descriptor] 
May 26 23:22:52 schtr kernel: [11499.854405] sd 0:0:0:0: [sda] tag#21 ASC=0x0 ASCQ=0x0 
May 26 23:22:52 schtr kernel: [11499.860846] sd 0:0:0:0: [sda] tag#21 CDB: opcode=0x93 93 08 00 00 00 00 03 38 e3 40 00 00 00 40 00 00
May 26 23:22:52 schtr kernel: [11499.874055] blk_update_request: I/O error, dev sda, sector 54059840
May 26 23:22:52 schtr kernel: [11499.882181] ata1: EH complete
May 26 23:22:52 schtr kernel: [11499.887659] ata1.00: Enabling discard_zeroes_data
May 26 23:22:52 schtr kernel: [11499.933719] ox820sata: reseting SATA core
May 26 23:22:52 schtr kernel: [11500.303523] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
May 26 23:22:52 schtr kernel: [11500.310627] ata1.00: failed command: DATA SET MANAGEMENT
May 26 23:22:52 schtr kernel: [11500.317237] ata1.00: cmd 06/01:01:00:00:00/00:00:00:00:00/a0 tag 27 dma 512 out
May 26 23:22:52 schtr kernel: [11500.317237]          res 51/04:01:00:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
May 26 23:22:52 schtr kernel: [11500.334968] ata1.00: status: { DRDY ERR }
May 26 23:22:52 schtr kernel: [11500.339847] ata1.00: error: { ABRT }
May 26 23:22:52 schtr kernel: [11500.345607] ata1: hard resetting link
May 26 23:22:53 schtr kernel: [11500.853004] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
May 26 23:22:53 schtr kernel: [11500.861404] ata1.00: configured for UDMA/133
May 26 23:22:53 schtr kernel: [11500.869749] ata1.00: device reported invalid CHS sector 0
May 26 23:22:53 schtr kernel: [11500.879680] sd 0:0:0:0: [sda] tag#27 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
May 26 23:22:53 schtr kernel: [11500.890053] sd 0:0:0:0: [sda] tag#27 Sense Key : 0xb [current] [descriptor] 
May 26 23:22:53 schtr kernel: [11500.901212] sd 0:0:0:0: [sda] tag#27 ASC=0x0 ASCQ=0x0 
May 26 23:22:53 schtr kernel: [11500.907927] sd 0:0:0:0: [sda] tag#27 CDB: opcode=0x93 93 08 00 00 00 00 03 38 ef 80 00 00 00 20 00 00
May 26 23:22:53 schtr kernel: [11500.923376] blk_update_request: I/O error, dev sda, sector 54062976
May 26 23:22:53 schtr kernel: [11500.931376] ata1: EH complete
May 26 23:22:53 schtr kernel: [11500.936734] ata1.00: Enabling discard_zeroes_data
May 26 23:22:53 schtr kernel: [11500.953223] ox820sata: reseting SATA core
May 26 23:22:53 schtr kernel: [11501.313505] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen
May 26 23:22:53 schtr kernel: [11501.320604] ata1.00: failed command: DATA SET MANAGEMENT
May 26 23:22:53 schtr kernel: [11501.326602] ata1.00: cmd 06/01:01:00:00:00/00:00:00:00:00/a0 tag 11 dma 512 out
May 26 23:22:53 schtr kernel: [11501.326602]          res 51/04:01:00:00:00/00:00:00:00:00/e0 Emask 0x1 (device error)
May 26 23:22:53 schtr kernel: [11501.350917] ata1.00: status: { DRDY ERR }
May 26 23:22:53 schtr kernel: [11501.354954] ata1.00: error: { ABRT }
May 26 23:22:53 schtr kernel: [11501.360706] ata1: hard resetting link
May 26 23:22:54 schtr kernel: [11501.872980] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
May 26 23:22:54 schtr kernel: [11501.880929] ata1.00: configured for UDMA/133
May 26 23:22:54 schtr kernel: [11501.886256] ata1.00: device reported invalid CHS sector 0
May 26 23:22:54 schtr kernel: [11501.893411] sd 0:0:0:0: [sda] tag#11 UNKNOWN(0x2003) Result: hostbyte=0x00 driverbyte=0x08
May 26 23:22:54 schtr kernel: [11501.903616] sd 0:0:0:0: [sda] tag#11 Sense Key : 0xb [current] [descriptor] 
May 26 23:22:54 schtr kernel: [11501.915904] sd 0:0:0:0: [sda] tag#11 ASC=0x0 ASCQ=0x0 
May 26 23:22:54 schtr kernel: [11501.921914] sd 0:0:0:0: [sda] tag#11 CDB: opcode=0x93 93 08 00 00 00 00 03 39 0b c0 00 00 00 40 00 00
May 26 23:22:54 schtr kernel: [11501.933946] blk_update_request: I/O error, dev sda, sector 54070208

But when i run smartmon test or mount the drive on my pc, a see no errors from the drive.

root@schtr:~# smartctl -l selftest /dev/sda 
smartctl 5.41 2011-06-09 r3365 [armv6l-linux-4.0.0-oxnas-tld-2] (local build)
Copyright (C) 2002-11 by Bruce Allen, http://smartmontools.sourceforge.net

=== START OF READ SMART DATA SECTION ===
SMART Self-test log structure revision number 1
Num  Test_Description    Status                  Remaining  LifeTime(hours)  LBA_of_first_error
# 1  Vendor (0x90)       Completed without error       150%      1001         -

Any idea what could cause this? Could it be an ext4 bug and ext2/3 will work?
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 27, 2015 03:44PM
schnee,

> I have an interesting issue with the latest kernel
> and SATA. My system boots from SATA with the
> latest kernel + debian root image + wareheadSE's
> sataboot script.

What is is WarheadsSE's sataboot script? could you list u-boot envs and other info here:
uname -a
mount
df -h
fw_printenv

The latest kernel has a EXT4 RAID problem. But you're not using RAID. Usually this problem is related to either the SATA controller or cable. Do you use a different cable to connect the HDD to your PC?

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
WarheadsSE's sataboot script is only a small script which prepares the sata drive to be bootable for oxnas (coming from the ArchLinux support for oxnas):

#!/bin/sh

# uncomment line below and set to the correct disk
disk=/dev/sde

if [ -z "${disk}" ] ; then
   echo "You must uncomment/set the 'disk' variable"
   exit -1
fi

workarea="."

stage1File=$workarea/stage1.wrapped
ubootFile=$workarea/u-boot.wrapped
kernelFile=$workarea/uImage

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

if [ -f $stage1File ];then
	echo "Writing stage 1"
	dd if=$stage1File    of="$disk" bs=512 seek=34
fi

if [ -f $ubootFile ];then
	echo "Writing uboot"
	dd if=$ubootFile     of="$disk" bs=512 seek=154
fi

if [ -f $kernelFile ];then
	echo "Writing kernel to "
	dd if=$kernelFile of="$disk"1 bs=512 
fi


root@schtr:~# uname -a
Linux schtr 4.0.0-oxnas-tld-2 #1 SMP PREEMPT Mon May 4 17:53:03 PDT 2015 armv6l GNU/Linux
root@schtr:~# mount
/dev/root on / type ext4 (rw,noatime,errors=remount-ro,data=ordered)
devtmpfs on /dev type devtmpfs (rw,relatime,size=60560k,nr_inodes=15140,mode=755)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=12132k,mode=755)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
/dev/sdb1 on /media/Data1 type ext4 (rw,noatime)
tmpfs on /run/shm type tmpfs (rw,nosuid,nodev,noexec,relatime,size=24260k)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620)
tmpfs on /tmp type tmpfs (rw,relatime)
/dev/sda3 on /home type ext4 (rw,noatime,errors=remount-ro)
rpc_pipefs on /var/lib/nfs/rpc_pipefs type rpc_pipefs (rw,relatime)
root@schtr:~# df -h
Filesystem      Size  Used Avail Use% Mounted on
/dev/root       9.8G  885M  8.4G  10% /
devtmpfs         60M     0   60M   0% /dev
tmpfs            12M  344K   12M   3% /run
tmpfs           5.0M     0  5.0M   0% /run/lock
/dev/sdb1       917G  648G  224G  75% /media/Data1
tmpfs            24M     0   24M   0% /run/shm
tmpfs            60M     0   60M   0% /tmp
/dev/sda3       137G  125G  5.8G  96% /home
root@schtr:~# fw_printenv
Warning: Bad CRC, using default environment
bootcmd=bootp; setenv bootargs root=/dev/nfs nfsroot=${serverip}:${rootpath} ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:${hostname}::off; bootm
bootdelay=5
baudrate=115200
root@schtr:~#

Attached the u-boot.env file used for the boot.

I tried the image on 2 different pogoplug, i tried it with different SATA cables etc. I also tried a different disk. Same result.
Attachments:
open | download - u-boot.env (16 KB)
formating the drive to ext2 did not help either:
root@schnas:~/hombck# mkfs.ext2 /dev/sda3                                       
mke2fs 1.42.5 (29-Jul-2012)                                                     
[ 1825.100513] ox820sata: reseting SATA core                                    
[ 1825.460510] ata1.00: exception Emask 0x0 SAct 0x0 SErr 0x0 action 0x6 frozen 
[ 1825.467545] ata1.00: failed command: DATA SET MANAGEMENT                     
[ 1825.472880] ata1.00: cmd 06/01:01:00:00:00/00:00:00:00:00/a0 tag 23 dma 512 t
[ 1825.472880]          res 40/00:00:00:00:00/00:00:00:00:00/00 Emask 0x4 (time)
[ 1825.487526] ata1.00: status: { DRDY }                                        
[ 1825.491200] ata1: hard resetting link                                        
[ 1826.000619] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)           
[ 1826.007662] ata1.00: configured for UDMA/133                                 
[ 1826.011973] ata1.00: device reported invalid CHS sector 0                    
[ 1826.017423] ata1: EH complete                                                
[ 1856.140518] ox820sata: reseting SATA core

FYI - this is a different drive / cable / pogo with the same problem



Edited 1 time(s). Last edit at 05/27/2015 05:25PM by schnee.
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
May 27, 2015 07:44PM
I see, you're booting directly from SATA only. You have not installed the new u-boot in NAND?

Correcting the mistmatched rootfs type as below might help. But I am not sure if this was the reason (usually this error is lower level HW/FW errror). But who knows, the SATA driver might not like the timing. I don't recall anybody has reported this problem on this box. Perhaps they are all using SATA II (3 Gbs) HDDs.

However, this should be fixed anyway:

Your rootfs partition is Ext3
1: 16 MB FAT 
2: ~10 GB as root partiotion (ext3) 
3. ~140 GB as home partiton (/home) (ext4)
And you've mounted rootfs as Ext4
/dev/root on / type ext4 (rw,noatime,errors=remount-ro,data=ordered)

And you don't have a bootargs in you u-boot.env. It means that the bootargs is the one current set in NAND.

Double check your booargs
cat /proc/cmdline
If it was set to Ext4 then set it to Ext3. In theory, Ext4 filesystem takes care of Ext3 fine. In any case, to eliminate possible problem, the correct file system should be used. If you don't want to change anything related to u-boot, then reformat your root partition to Ext4.

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

thanks for the suggestions. I converted the root fs to ext4 and converted sda3 to ext2. It seems that the problem now disappeared (still testing).

To answer your question about uboot: yes i did not flash it. It is loaded from the 1st FAT partition on the sata drive. I am planning to write up the complete process to create the config if anybody interested....

schnee
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
June 25, 2015 10:08AM
LeggoMyEggo Wrote:
-------------------------------------------------------
> Regarding bluetooth, I was able to get a USB BT adapter working but unfortunately the bluetooth module on my Atheros model AR5B225 combo wifi / bluetooth card is not enabling. The modules load - Ath3k, btusb, etc but when I do a hcitool dev it does not indicate a device.
>
Is this Atheros AR5B22 300M Dual Band Wireless-N + Bluetooth 4.0 Wireless wifi mini pci-e Card the same one?

> I also tried an Intel Centrino 300M Wireless-N 2230 combo wifi/bt card and had the same result.
>
Is this Intel Wireless-N 2200BNHMW 300M minipci-e notebook built-in wireless card module WiFi 802.11b/g/n the same one?

If the above two are the same ones, then I probably should avoid them.
HI All,

i am trying to build a cloudprint server with the latest kernel + rootfs from bodhi@ following this tutorial: http://blog.onslow-web.co.uk/?p=71

I have cups installed and working, but i am failing with the installation of pycups. I got the following error message:

root@nas:/home/nas# pip install pycups
Downloading/unpacking pycups
  Running setup.py egg_info for package pycups
    
Installing collected packages: pycups
  Running setup.py install for pycups
    building 'cups' extension
    gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="1.9.72" -I/usr/include/python2.7 -c cupsmodule.c -o build/temp.linux-armv6l-2.7/cupsmodule.o
    as: error while loading shared libraries: libopcodes-2.22-system.so: cannot open shared object file: No such file or directory
    error: command 'gcc' failed with exit status 1
    Complete output from command /usr/bin/python -c "import setuptools;__file__='/home/schnee/build/pycups/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-gEYLrK-record/install-record.txt:
    running install

running build

running build_ext

building 'cups' extension

gcc -pthread -fno-strict-aliasing -DNDEBUG -g -fwrapv -O2 -Wall -Wstrict-prototypes -fPIC -DVERSION="1.9.72" -I/usr/include/python2.7 -c cupsmodule.c -o build/temp.linux-armv6l-2.7/cupsmodule.o

as: error while loading shared libraries: libopcodes-2.22-system.so: cannot open shared object file: No such file or directory

error: command 'gcc' failed with exit status 1

----------------------------------------
Command /usr/bin/python -c "import setuptools;__file__='/home/schnee/build/pycups/setup.py';exec(compile(open(__file__).read().replace('\r\n', '\n'), __file__, 'exec'))" install --single-version-externally-managed --record /tmp/pip-gEYLrK-record/install-record.txt failed with error code 1 in /home/schnee/build/pycups
Storing complete log in /root/.pip/pip.log

I can't find libopcodes in the filesystem. Libopcodes is part of binutils, but binutils are installed on the system. Does anybody have an idea how to step forward?
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
June 28, 2015 11:28AM
schnee,

You should have libopcodes-2.25-system.so in your system. You can make a symlink for libopcodes.so to point to that:
cd /usr/lib
ln -s libopcodes-2.25-system.so libopcodes.so

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

interestingly i do not have libopcodes-2.25-system.so in /usr/lib

lrwxrwxrwx  1 root root      18 Feb 18 18:29 liblwres.so.80 -> liblwres.so.80.0.3
-rw-r--r--  1 root root   66916 Feb 18 18:29 liblwres.so.80.0.3
lrwxrwxrwx  1 root root      16 Mar 19 21:25 liblzma.so.2 -> liblzma.so.2.0.0
-rw-r--r--  1 root root  127380 Nov 11  2010 liblzma.so.2.0.0
-rw-r--r--  1 root root   43110 Mar 11  2011 libminiupnpc.a
-rw-r--r--  1 root root   27596 Mar 11  2011 libminiupnpc.so.5
-rw-r--r--  1 root root    7268 Sep  8  2011 libnatpmp.so.1
lrwxrwxrwx  1 root root      24 Apr  9  2012 libneon-gnutls.so.27 -> libneon-gnutls.so.27.2.6
-rw-r--r--  1 root root  129932 Apr  9  2012 libneon-gnutls.so.27.2.6
lrwxrwxrwx  1 root root      18 Mar 19 21:25 libopts.so.25 -> libopts.so.25.10.0
-rw-r--r--  1 root root  107288 Jul 10  2011 libopts.so.25.10.0
lrwxrwxrwx  1 root root      17 Sep 30  2014 libperl.so.5.14 -> libperl.so.5.14.2
-rw-r--r--  1 root root 1368092 Sep 30  2014 libperl.so.5.14.2
lrwxrwxrwx  1 root root      31 Mar 23  2014 libpython2.7.a -> python2.7/config/libpython2.7.a
lrwxrwxrwx  1 root root      17 Mar 23  2014 libpython2.7.so -> libpython2.7.so.1
lrwxrwxrwx  1 root root      19 Mar 23  2014 libpython2.7.so.1 -> libpython2.7.so.1.0
-rw-r--r--  1 root root 2646820 Mar 23  2014 libpython2.7.so.1.0
lrwxrwxrwx  1 root root      19 Apr  8  2011 libsigsegv.so.2 -> libsigsegv.so.2.0.2
-rw-r--r--  1 root root    8116 Apr  8  2011 libsigsegv.so.2.0.2
lrwxrwxrwx  1 root root      15 Feb  7  2012 libslp.so.1 -> libslp.so.1.0.1
-rw-r--r--  1 root root   53668 Feb  7  2012 libslp.so.1.0.1
-rw-r--r--  1 root root  271152 Jan 22  2012 libssl.so.0.9.8

Also checked Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2 rootfs and it does not contain the library.

After running
apt-get install --reinstall binutils
now i have libopcodes-2.22-system.so installed on the system and was able to install pycups.
Re: Linux Kernel 4.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
June 29, 2015 03:29PM
schnee,

Quote

> After running
apt-get install --reinstall
> binutils
now i have
> libopcodes-2.22-system.so installed on the system
> and was able to install pycups.

Thanks, I'll make sure to check this for future basic rootfs releases.

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