Welcome! Log In Create A New Profile

Advanced

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

Posted by bodhi 
Re: Linux Kernel 3.18 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 01, 2015 09:14PM
Tufkal,

> Which way is less risky? Getting your newer uboot
> installed, or giving the old uboot these
> parameters manually?

They are equally safe/risky. Given clear steps by steps instruction, carefully applied, the risk is minimized. Besides, there is a recovery path as described in the u-boot thread:

Quote
http://forum.doozan.com/read.php?3,16017
Recovery

Unlike the Kirkwood boxes, there is no option to boot with UART that we know of. Should you mess up your NAND mtds while flashing U-Boot, the recovery path for Pogo V3 is to boot with a SATA hardisk that was specially prepared to have all necessary files: Stage1 SPL, U-Boot, and rootfs in the HDD. This is possible because the Pogo V3 Oxnas ROM always tries to find the boot loader in SATA first if there is one attached. See this A new kernel for OXNAS thread (at Arch site) for how to do that in case you have to recover, or just want to follow that approach and avoid flashing U-Boot to NAND.

With that recovery path, I think you should flash new u-boot to take advantage of all new features. But before flashing, download the rootfs in this thread, and put that on USB. So you can boot into the new rootfs right away after flashing u-boot.

And please ask question about anything in the instruction that you're not sure!

-bodhi
===========================
Forum Wiki
bodhi's corner
bodhi Wrote:
-------------------------------------------------------
> Unlike the Kirkwood boxes, there is no option to
> boot with UART that we know of. Should you mess up
> your NAND mtds while flashing U-Boot, the recovery
> path for Pogo V3 is to boot with a SATA hardisk
> that was specially prepared to have all necessary
> files: Stage1 SPL, U-Boot, and rootfs in the HDD.
> This is possible because the Pogo V3 Oxnas ROM
> always tries to find the boot loader in SATA first
> if there is one attached.

I can attest to this fact, I actually just experienced a situation with a PP Biz which wouldn't boot because the nand memory that holds the boot.envs had some bad blocks which caused the boot instructions (in nand) to be corrupted no matter what I did to revise and save them. It took me a while to figure out what was going on and it was truly evidenced when I tried to reload the latest u-boot and I received an error when I went to save pogopro_uboot_env.img. The only thing I could do at that point was boot off of the specially prepared drive referenced above and earlier in this thread. That special drive has everything on the drive that the motherboard looks for (from nand usually) to boot the system into the kernel.

At this point I don't have a sata drive I can dedicate to keeping this one plug away from the parts bin. With a new replacement that can be had for less than $15.00 shipped, it's kind of pointless to put much more time on this one. But what I plan on doing is making an image of that drive which I will place on a cheap slow flash drive I have and keep it in the event I need to re-image it back to a sata drive that I would use on a plug that had no serial console to at least try to resurrect it.



Edited 3 time(s). Last edit at 03/02/2015 01:02AM by LeggoMyEggo.
Re: Linux Kernel 3.18 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 01, 2015 10:36PM
LeggoMyEggo,

> a PP Biz which
> wouldn't boot because the nand memory that holds
> the boot.envs had some bad blocks which caused the
> boot instructions (in nand) to be corrupted no
> matter what I did to revise and save them. It
> took me a while to figure out what was going on
> and it was truly evidenced when I tried to reload
> the latest u-boot and I received an error when I
> went to save u-env.img.

The next OXNAS u-boot release (2014 code) that I plan to do will help in this situation. It will allow you to ignore the NAND envs and use uEnv.txt to boot with (like the Kirkwood u-boot). That's the plan, but no ETA yet, my TODO list getting longer :) I guess I should post it and let people vote/recommend the highest priority one.

-bodhi
===========================
Forum Wiki
bodhi's corner
Bodhi,

I went ahead and updated my device with the newer uboot as you suggested. I think it's working just fine, because I can see this from my nc connection:
U-Boot 2013.10-tld-3 (May 15 2014 - 14:54:14) 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... 3 USB Device(s) found
scanning usb for storage devices... 1 Storage Device(s) found
4102704 bytes read in 503 ms (7.8 MiB/s)
1953812 bytes read in 345 ms (5.4 MiB/s)
7029 bytes read in 237 ms (28.3 KiB/s)
## Booting kernel from Legacy Image at 60500000 ...
Image Name: Linux-3.17.0-oxnas-tld-1
Image Type: ARM Linux Kernel Image (uncompressed)
Data Size: 4102640 Bytes = 3.9 MiB
Load Address: 60008000
Entry Point: 60008000
Verifying Checksum ... OK
## Loading init Ramdisk from Legacy Image at 60e00000 ...
Image Name: initramfs-3.17.0-oxnas-tld-1
Image Type: ARM Linux RAMDisk Image (gzip compressed)
Data Size: 1953748 Bytes = 1.9 MiB
Load Address: 60000000
Entry Point: 60000000
Verifying Checksum ... OK
## Flattened Device Tree blob at 62c00000
Booting using the fdt blob at 0x62c00000
[/code]

...the problem is it stops there, and i keep scanning my network to find the device all booted up in debian, but nmap is showing me nothing.

The image I am using is the one from this thread, built as per instructions.

What did I do wrong? It won't even boot the original USB stick I used to go from factory->ALARM anymore because of the new uboot.

Help?


            

            

            

            
        
Re: Linux Kernel 3.18 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 02, 2015 06:20PM
Tufkal,

According to this output:
> ## Flattened Device Tree blob at 62c00000
>    Booting using the fdt blob at 0x62c00000

You have set up the new u-boot to boot the new rootfs with a separate DTB file. So recreate the USB rootfs Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2 per instruction in the first post, but be sure to skip this section:
4. Create uImage with embbeded DTB to run with older u-boot. Please see Note 2 below if you are running this kernel witht the new U-Boot.

Section 4 is to boot with either old or new u-boot, but with the DTB file embedded.

And indeed, your u-boot installation was successful. So netconsole is your recovery path now, much easier to fix any problem.

-bodhi
===========================
Forum Wiki
bodhi's corner
Right on the money bodhi. I installed the new uboot with the additional step to load seperate FDT, and I was making the step 4 modification to the rootfs flash drive that mashes the FDT into the zImage. I skipped step 4, everything is golden and im running my first apt-get update now.

Thanks so much!
If anyone is so inclined, I was able to get Asterisk 11.16.0 with chan_dongle and FreePBX 2.11 compiled and loaded on my Pro running bodhi's 3.18.5 kernel. The only struggle I had was the compiler kept crapping out trying to make chan_sip.so. I didn't figure out until a half dozen goes at it that my 'Plug was running out of RAM as I had no swap disk or file. As soon as I enabled a 256MB swap file it compiled which took about 2 1/2 hours for a fully configured Asterisk system. Google Voice works and I was able to add chan_dongle for voice over a Huawei USB modem. Note that my swap file also solved a problem I was having loading Mysql which hadn't worked right since I loaded it from the repository. I have my Pro running with wifi only (ath9k compatible card) and the performance is snappier than the same system running on a PP Mobile. I do have my Pro overclocked with WarheadSE's 850Mhz spl (edit: Bodhi's 850Mhz spl, sorry bodhi ) so I think that makes a big difference.

Here are the dependencies and assistance programs I used:

apt-get install -y build-essential linux-headers-`uname -r` wget libspeex-dev libspeexdsp-dev dialog unixODBC unixODBC-dev libmyodbc libcurl4-openssl-dev libiksemel-dev uuid-dev openssh-server apache2 mysql-client bison flex php5 php5-curl php5-cli php5-mysql php-pear php-db php5-gd curl sox libncurses5-dev libssl-dev libmysqlclient15-dev mpg123 libmpg123-0 libxml2-dev libnewt-dev sqlite3 libsqlite3-dev pkg-config automake libtool autoconf git subversion liblua5.1 liblua5.1-0-dev libwww-perl libsox-fmt-all alsa-base apmd alsa-oss oss-compat xapm portaudio19-dev python-setuptools pptpd libspandsp-dev libossp-uuid16 mysql-server libiksemel-utils sox libjson-perl flac libbluetooth-dev libgnutls-dev

I followed this guide for Asterisk and FreePBX: http://wiki.freepbx.org/display/HTGS/Installing+FreePBX+on+Debian+Wheezy

To compile chan_dongle I used the instructions at the very bottom of this page: http://www.adeleda.com/raspberry-pi-b-with-asterisk-and-chan_dongle-on-arch-linux-en.html. Don't worry about this being for Arch or RasPi, it works for Oxnas too as RasPi and Oxnas are both Armv6 with the RasPi being hard float too. You need to adjust the --with-asterisk=/usr/src/asterisk-11.11.0/include to be --with-asterisk=/usr/src/asterisk-11.16.0/include which is the currently available version. And the first time you go to 'aclocal && autoconf && automake -a' it will fail but don't work about it.



Edited 4 time(s). Last edit at 03/11/2015 02:29PM by LeggoMyEggo.
Re: Linux Kernel 3.18 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 03, 2015 05:58PM
@LeggoMyEggo,

Excellent! thanks for sharing your finding about Asterisk. It is very useful to a lot of users.

> I do have my Pro
> overclocked with WarheadSE's 850Mhz spl so I think
> that makes a big difference.

I did not know WarheadsSE has released a 850Mhz SPL, is that version on a SATA drive?

-bodhi
===========================
Forum Wiki
bodhi's corner
bodhi Wrote:
-------------------------------------------------------
> @LeggoMyEggo,
>
> Excellent! thanks for sharing your finding about
> Asterisk. It is very useful to a lot of users.
>
> > I do have my Pro
> > overclocked with WarheadSE's 850Mhz spl so I
> think
> > that makes a big difference.
>
> I did not know WarheadsSE has released a 850Mhz
> SPL, is that version on a SATA drive?

You're the one who pointed it out!

bodhi Wrote:
-------------------------------------------------------
> Gravelrash,
>
> It is default to 700 MHz. I've uploaded a 850 Mhz
> SPL somewhere in the forum. Let me see if I can
> find it.
>
> I think 850 is the safest limit. Faster than that,
> it'll become unstable.
>
> PS.
>
> I see shv already responded. But anyway the SPL is
> here in this post:
> http://forum.doozan.com/read.php?3,16017,17548#msg
> -17548

Edit: Oh, did you create the 850Mhz spl? I thought it was WSE's - apologies if it was yours. I have it working with a USB booting system.



Edited 1 time(s). Last edit at 03/03/2015 06:53PM by LeggoMyEggo.
Nice write-up for Asterisk. This is a great platform for Asterisk, and something I will look into very closely in the future.
Tufkal Wrote:
-------------------------------------------------------
> Nice write-up for Asterisk. This is a great
> platform for Asterisk, and something I will look
> into very closely in the future.

I'm going to try load rootfs on a sata drive and boot off of it. That should work even better than the USB flash drive I'm using. Believe it or not, I'm running it as a shairport (or squeezelite) client at the same time as Asterisk and it's still pretty usable. The only thing, the swap file, it's being used all the time and more than half of it is in use at any given time. That's why I want to get rootfs with a dedicated swap partition on either a 7200rpm sata drive or SSD as I think that level of constant swap file usage will lead to premature failure of the flash drive. Plus the interface speed of a SATA drive should be 2 to 3 times faster than what I have with the flash drive. I just have to poke a hole in the case and add an esata port. If someone could figure out how to make bluetooth work with the current kernel it would be golden. My mini-pci-e wifi card also has bluetooth as well. If bluetooth worked I could tether a cell phone to Asterisk and make PBX originated calls through it. Put all these things together and you have a complete Asterisk system with enough USB ports available for my USB voice modem, the USB sound adapter and two spares to connect drives to for backup or file serving. Can't complain about that :)
bodhi Wrote:
-------------------------------------------------------
> The next OXNAS u-boot release (2014 code) that I
> plan to do will help in this situation. It will
> allow you to ignore the NAND envs and use uEnv.txt
> to boot with (like the Kirkwood u-boot). That's
> the plan, but no ETA yet, my TODO list getting
> longer :) I guess I should post it and let people
> vote/recommend the highest priority one.

I have a question. I just came across this reference to a a chained bootloader:

Old: Install chained uBoot on mtd3

This section is for reference only. You should probably install uBoot to mtd0 as described above, unless you have a good reason not to.

This is the old 'chained' bootloader method. Don't run this if you have already upgraded uBoot on mtd0.

Remove your USB drive, boot into the default Pogoplug environment, and run the following commands:

cd /tmp
wget http://projects.doozan.com/uboot/install_uboot_mtd3.sh
chmod +x install_uboot_mtd3.sh
./install_uboot_mtd3.sh
You can boot to the Pogoplug environment with the 'run bootcmd_pogo' command in the new uBoot. By default, the new uBoot will attempt to boot from a USB drive and, failing that, it will boot the original Pogoplug installation.


It looks like this technigue has been deprecated I realize . My question is, could you put boot.env's in mtd3 instead of mtd0 or is the firmware always going to look to mtd0 for the file? I'm curious
Re: Linux Kernel 3.18 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 04, 2015 02:35PM
LeggoMyEggo,

> It looks like this technigue has been deprecated I
> realize . My question is, could you put
> boot.env's in mtd3 instead of mtd0 or is the
> firmware always going to look to mtd0 for the
> file? I'm curious

This technique is still valid as always. But it depends on which version of u-boot being chainloaded. If it's old stock version, then it might work due to the way older u-boot code works. Newer u-boot versions most likely won't work. There was a logical reason for that.

u-boot envs can be stored in any place in NAND, since it is defined by u-boot code. mtd0 is a good place for them, because then the rest of NAND can be used for kernel/rootfs. So yes, you can build a customed u-boot version that looks for envs in mtdX, where mtdX is one of the defined mtds in mtdparts. We use the convention that was established by Jeff, i.e. u-boot envs at 0xC0000, and it is a really good convention (I could elaborate, but it's too long a post).

-bodhi
===========================
Forum Wiki
bodhi's corner
bodhi Wrote:
-------------------------------------------------------
> u-boot envs can be stored in any place in NAND,
> since it is defined by u-boot code. mtd0 is a good
> place for them, because then the rest of NAND can
> be used for kernel/rootfs. So yes, you can build a
> customed u-boot version that looks for envs in
> mtdX, where mtdX is one of the defined mtds in
> mtdparts. We use the convention that was
> established by Jeff, i.e. u-boot envs at 0xC0000,
> and it is a really good convention (I could
> elaborate, but it's too long a post).

No need to elaborate, your time is valuable. I was just wondering if there was any hope for having the boot.envs in nand for my one Oxnas board with the bad blocks in mtd0 right in the place where the boot.envs are stored. Based on what you are saying it would be against convention and would be alot of work. Essentially not worth it.....Thanks for the explanation though.
Re: Linux Kernel 3.18 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 04, 2015 03:53PM
LeggoMyEggo,

I'm starting to look at rebasing the OXNAS u-boot to 2014, and realized that I have already have u-boot 2013.10-tld-4 for OXNAS version :) This version has caught up to the Kirkwood u-boot in most capabilities (EFI,,.. including uEnv.txt). I think I just forgot to add that release on my Todo list. Let me verify that and see if it should be released.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 03/04/2015 04:17PM by bodhi.
Re: Linux Kernel 3.18 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 05, 2015 01:20AM
LeggoMyEggo,

> I was just wondering if there was any hope for
> having the boot.envs in nand for my one Oxnas
> board with the bad blocks in mtd0 right in the
> place where the boot.envs are stored.

This will help to get around the bad block:
http://forum.doozan.com/read.php?3,16017,20193,page=6#msg-20193

-bodhi
===========================
Forum Wiki
bodhi's corner
bodhi Wrote:
-------------------------------------------------------
> LeggoMyEggo,
>
> > I was just wondering if there was any hope for
> > having the boot.envs in nand for my one Oxnas
> > board with the bad blocks in mtd0 right in the
> > place where the boot.envs are stored.
>
> This will help to get around the bad block:
> http://forum.doozan.com/read.php?3,16017,20193,pag
> e=6#msg-20193

Cool. And thanks :) ! I'll have to pull that one board out of the parts bin and boot off a sata drive in order to boot into the kernel. I'll then reflash u-boot with your latest and try to figure out the new uenv.txt file system in /boot. Hopefully after that I can boot again off of a flash drive instead of being stuck with a sata only boot.
Re: Linux Kernel 3.18 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 05, 2015 02:34PM
LeggoMyEggo,

If you have serial console, you don't need SATA to boot. If you already flashed my previous u-boot version, then it's simple to chain load the new u-boot, and then boot into Debian with USB.

-bodhi
===========================
Forum Wiki
bodhi's corner
Hi Bodhi,

You planned to make new kernel for V3 Oxnas in the future with some kernel modules enabled.
-keyboard
May I ask to enable also
-nls_utf8

It is also not urgent at all... Im fine with the present 3.17. and my usb mouse button workaround.

Regards,
Robert
Re: Linux Kernel 3.18 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 12, 2015 03:50AM
@ Robert,

OK, will include it for kernel 4.0. I think it will be out in the near future.

-bodhi
===========================
Forum Wiki
bodhi's corner
Thank you Bodhi for such as quick -and good- answer!!!
bodhi Wrote:
-------------------------------------------------------
> @ Robert,
>
> OK, will include it for kernel 4.0. I think it
> will be out in the near future.

Bluetooth bluetooth please! I have a Atheros AR9485 combo wifi / bluetooth card in my Pro and while the wifi works perfectly (Ath9k driver), it would be nice to have bluetooth to use it for BT audio to connect to a a bluetooth speaker for use with the Shairport client I am running (http://drewlustro.com/hi-fi-audio-via-airplay-on-raspberry-pi/). The AR9485 uses the Ath3k driver.for bluetooth.



Edited 1 time(s). Last edit at 03/12/2015 08:17AM by LeggoMyEggo.
Re: Linux Kernel 3.18 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 12, 2015 02:51PM
LeggoMyEggo,

> would be nice to have bluetooth to use it for BT
> audio to connect to a a bluetooth speaker for use
> with the Shairport client I am running
> (http://drewlustro.com/hi-fi-audio-via-airplay-on-
> raspberry-pi/). The AR9485 uses the Ath3k
> driver.for bluetooth.

I'll take a look.

-bodhi
===========================
Forum Wiki
bodhi's corner
bodhi Wrote:
-------------------------------------------------------
> I'll take a look.

Thank YOU :)
me too for bluetooth please
denexo Wrote:
-------------------------------------------------------
> @bodhi,
>
> thanks once again for your effort!
> I installed patched kernel but i get same
> result...i get no image on mjpg_streamer when
> using the input_uvcvideo.so . I really hope i am
> not doing something wrong. Could someone else
> please check also?


mjpg-streamer from repo does not work on 3.18 - service running, but no video output. Fixed version of mjp-streamer can be found here:
https://github.com/oliv3r/mjpg-streamer

After compilation it works fine. I tested with running 3 cameras parallel and it worked like charm
schnee Wrote:
> mjpg-streamer from repo does not work on 3.18 -
> service running, but no video output. Fixed
> version of mjp-streamer can be found here:
> https
> ://github.com/oliv3r/mjpg-streamer

>
> After compilation it works fine. I tested with
> running 3 cameras parallel and it worked like
> charm

I tried to get both mjp-streamer and ffmpeg to stream webcams under 3.18.5 and had issues. I thought they were configuration related. Maybe not I guess. Do you know if an Oxnas compatible version of ffmpeg source is available for compilation?
Hi guys,

just out of curiosity:
Anyone tried anything else than a mini pcie wireless card in the mini pcie slot of the pro, lately?
I remember trying a mini pcie usb3.0 and sata card, a while back. But without success, as far as I can remember.
Could have been a power problem, though.

Regards

Ingmar
Re: Linux Kernel 3.17.0 Pogo V3 (Oxnas OX820) package and rootfs (Flattened Device Tree)
March 31, 2015 08:25PM
ingmar_k Wrote:
-------------------------------------------------------
> Hi guys,
>
> just out of curiosity:
> Anyone tried anything else than a mini pcie
> wireless card in the mini pcie slot of the pro,
> lately?
> I remember trying a mini pcie usb3.0 and sata
> card, a while back. But without success, as far as
> I can remember.
> Could have been a power problem, though.
>
> Regards
>
> Ingmar

Hi Ingmar,

I've tried and was not successful because the PCIe card was defective :) so I got a replacement just recently, will try again and let you know.

-bodhi
===========================
Forum Wiki
bodhi's corner



Edited 1 time(s). Last edit at 03/31/2015 08:26PM by bodhi.
Thanks bodhi!
I would've tried a long time ago, again, if I wasn't really time limited, due to my new job.

No so much time for tinkering with devices, like the pogoplug anymore. :-(
But anyway, that's how it goes. :-)
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: