Pogoplug E02: tweak recent U-Boot to re-allow NAND fallback?

Discussion about U-Boot and the kernel.

Pogoplug E02: tweak recent U-Boot to re-allow NAND fallback?

Postby PogoDancer » Tue Mar 17, 2015 6:12 pm

Without saying much to that effect, U-Boot as installed this week per http://archlinuxarm.org/platforms/armv5 ... 2-pinkgray (unlike earlier versions, also Jeff Doozan's for Debian) does not boot from NAND anymore if no readable USB media is found.

With #/etc/init.d/hbmgr.sh start commented out in /etc/init.d/rcS, the stock OS can prove invaluable as an emergency partition though, when (rather than if) the USB stick fails.

How do I re-enable this very useful fallback from within a current, working Arch (after pacman -S uboot-env mtd-utils) ?
$this->bbcode_second_pass_code('', '# uname -a
Linux alarm 3.19.1-2-ARCH #1 PREEMPT Mon Mar 16 05:48:43 MDT 2015 armv5tel GNU/Linux
# dmesg
[ 14.618675] nand: Could not find valid ONFI parameter page; aborting
[ 14.625121] nand: device found, Manufacturer ID: 0xad, Chip ID: 0xf1
[ 14.631502] nand: Hynix NAND 128MiB 3,3V 8-bit
[ 14.635984] nand: 128 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB size: 64
[ 14.643598] Scanning device for bad blocks
[ 14.725395] 2 cmdlinepart partitions found on MTD device orion_nand
[ 14.731686] Creating 2 MTD partitions on "orion_nand":
[ 14.736870] 0x000000000000-0x000000100000 : "u-boot"
[ 14.742326] 0x000000100000-0x000008000000 : "rootfs"')
Moreover, is there a way to give it the ability to boot bodhi's Debian jessie http://forum.doozan.com/read.php?2,1209 ... #msg-12096 (FDT rootfs) as well?

P.S.: The above NAND partitioning (2 rather than 4, apparently set by http://os.archlinuxarm.org/os/armv5te/b ... go_e02.env) seems to contradict what http://archlinuxarm.org/os/armv5te/boot ... ogo_e02.sh saw according to its preserved log (and there's no valid line in /etc/fw_env.config either) - shouldn't this be fixed, and if so, how?$this->bbcode_second_pass_code('', 'erasing U-Boot NAND [OK]
erasing environment [OK]
writing U-Boot [OK]
writing environment [OK]

Validating..
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x00000000 and ending at 0x00080000...
Block size 131072, page size 2048, OOB size 64
Dumping data starting at 0x000c0000 and ending at 0x000e0000...')
PogoDancer
 
Posts: 14
Joined: Sun Dec 16, 2012 2:00 pm

Re: Pogoplug E02: tweak recent U-Boot to re-allow NAND fallb

Postby grayman4hire » Tue Mar 17, 2015 8:42 pm

This will not be possible with the current uBoot as I believe it is still missing the fsload command needed to chainload the original uboot.
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: Pogoplug E02: tweak recent U-Boot to re-allow NAND fallb

Postby moonman » Wed Mar 18, 2015 8:02 am

NAND Rescue system: viewtopic.php?f=30&t=8383
which is 100% arch.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: Pogoplug E02: tweak recent U-Boot to re-allow NAND fallb

Postby PogoDancer » Thu Mar 19, 2015 7:25 am

grayman4hire wrote:$this->bbcode_second_pass_quote('', 'T')his will not be possible with the current uBoot as I believe it is still missing the fsload command needed to chainload the original uboot.
In his instructions on the way back from Arch's "new not normal" :roll: (viewtopic.php?f=53&t=7573#p41342 & http://forum.doozan.com/read.php?4,16916,17027), bodhi mentioned (http://forum.doozan.com/read.php?3,1941 ... #msg-20501) you had posted guidance for reverting V2 to boot the stock OS (as in http://forum.doozan.com/read.php?3,16597,16602) as a fallback, but I could only find them for V4 so far (http://forum.doozan.com/read.php?3,16789,16800).

I am not actually interested in the Pogoplug service and would disable hbwd first thing, just want to have a working netconsole and to preserve the option of booting the most commonly known preinstalled environment, especially while it's the only internal one.

Overzealous to force-feed its idea of MTD layout, Arch's installer of course hasn't bothered to save the original uboot, so how do I restore that chainload for V2 (and also the 2nd through 4th NAND partition if damaged on mount by Arch's tweak), preferably as a fallback in bodhi's uBoot?
PogoDancer
 
Posts: 14
Joined: Sun Dec 16, 2012 2:00 pm

Re: Pogoplug E02: tweak recent U-Boot to re-allow NAND fallb

Postby grayman4hire » Thu Mar 19, 2015 4:42 pm

Not sure what you're getting at.

On the E02, if you want to boot the default Pogoplug OS and have netconsole support, my recommendation is to run Jeff's uBoot - http://blog.qnology.com/2013/03/tutoria ... linux.html.

If the above is not satisfactory let me know the issue and we'll go from there.

$this->bbcode_second_pass_quote('PogoDancer', 'g')rayman4hire wrote:$this->bbcode_second_pass_quote('', 'T')his will not be possible with the current uBoot as I believe it is still missing the fsload command needed to chainload the original uboot.
In his instructions on the way back from Arch's "new not normal" :roll: (viewtopic.php?f=53&t=7573#p41342 & http://forum.doozan.com/read.php?4,16916,17027), bodhi mentioned (http://forum.doozan.com/read.php?3,1941 ... #msg-20501) you had posted guidance for reverting V2 to boot the stock OS (as in http://forum.doozan.com/read.php?3,16597,16602) as a fallback, but I could only find them for V4 so far (http://forum.doozan.com/read.php?3,16789,16800).

I am not actually interested in the Pogoplug service and would disable hbwd first thing, just want to have a working netconsole and to preserve the option of booting the most commonly known preinstalled environment, especially while it's the only internal one.

Overzealous to force-feed its idea of MTD layout, Arch's installer of course hasn't bothered to save the original uboot, so how do I restore that chainload for V2 (and also the 2nd through 4th NAND partition if damaged on mount by Arch's tweak), preferably as a fallback in bodhi's uBoot?
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA
Top

Re: Pogoplug E02: tweak recent U-Boot to re-allow NAND fallb

Postby PogoDancer » Thu Mar 19, 2015 6:13 pm

$this->bbcode_second_pass_quote('', 'O')n the E02, if you want to boot the default Pogoplug OS and have netconsole support, my recommendation is to run Jeff's uBoot ... let me know the issue and we'll go from there
Simply had run Arch's rather than Jeff's uBoot installer first on the one Pogo E02 currently available to me.
Found out it overrides the stock partition scheme and can hardly be convinced to boot much else but Arch, without a netconsole.

Wouldn't have backed up the stock bootloader either, is this the one for Pogo V2?
b2d9681ef044e9ab6b058ef442b30b6e uboot-original-mtd0.kwb

So I switched to bodhi's uBoot instead, which starts current Arch just as well but retains all 4 MTDs and shows its actions on an interactive netconsole (though its use substantially slows down ssh and ping at least on my LAN).

He happened to point out you had already documented how to restore stock as fallback.

I understand I'll have to place a file holding a copy of the original bootloader on one of the mtdblocks (preferably where Jeff's uBoot would expect it too) and should then be able to test the way back into stock Pogo OS (or another NAND-based rescue system of course) through netconsole.
Since that's the one also capable of booting current FDT Debians, I would rather keep it unless there's a need to change back to Jeff's.

My reason for aiming at utmost flexibility as to kernels is that I need to use certain home control transceivers for LIRC et al. (besides DVB and WiFi) that aren't consistently well supported across distros and releases yet.
PogoDancer
 
Posts: 14
Joined: Sun Dec 16, 2012 2:00 pm
Top

Re: Pogoplug E02: tweak recent U-Boot to re-allow NAND fallb

Postby grayman4hire » Thu Mar 19, 2015 7:22 pm

Again, use Jeff's uBoot if you want netconsole support, flexibility of booting arch or debian and be able to boot the default Pogoplug OS.

$this->bbcode_second_pass_code('', '
#Install UBoot
cd /tmp
wget http://jeff.doozan.com/debian/uboot/install_uboot_mtd0.sh
chmod +x install_uboot_mtd0.sh
./install_uboot_mtd0.sh --no-uboot-check
')

You'll need to pass in the --no-uboot-check option since the script will not recognize bodhi's uboot. Since you're running bodhi's uBoot and you have your mtdparts defined as default, it should work like magic.
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA

Re: Pogoplug E02: tweak recent U-Boot to re-allow NAND fallb

Postby grayman4hire » Thu Mar 19, 2015 7:26 pm

$this->bbcode_second_pass_quote('PogoDancer', '')$this->bbcode_second_pass_quote('', '
')He happened to point out you had already documented how to restore stock as fallback.


I only bothered to do this for the Pogoplug V4 since Jeff's uBoot and script already take cares of the E02 (and the current archlinuxarm uboot can't do it because of the lack of the fsload command).
ALARM on PogoPlug Tutorial - SAMBA, AirPlay, SqueezeLite, Logitech Media Server, AirPrint/CloudPrint, Plex, Webmin, OpenVPN, Transmission, Sabnzbd, SickBeard, CouchPotato, BitTorrent Sync, OwnCloud - Pogoplug E02 Serial Connection
grayman4hire
 
Posts: 350
Joined: Sat Sep 29, 2012 12:03 am
Location: SF, CA
Top

Re: Pogoplug E02: tweak recent U-Boot to re-allow NAND fallb

Postby PogoDancer » Sat Mar 21, 2015 10:48 pm

$this->bbcode_second_pass_quote('grayman4hire', 'u')se Jeff's uBoot if you want netconsole support, flexibility of booting arch or debian and be able to boot the default Pogoplug OS.
You'll need to pass in the --no-uboot-check option since the script will not recognize bodhi's uboot. Since you're running bodhi's uBoot and you have your mtdparts defined as default, it should work like magic.
$this->bbcode_second_pass_quote('PogoDancer', '[')bodhi] happened to point out you had already documented how to restore stock as fallback.

I only bothered to do this for the Pogoplug V4 since Jeff's uBoot and script already take cares of the E02 (and the current archlinuxarm uboot can't do it because of the lack of the fsload command).

Then again why not keep bodhi's that can be turned into the "uBoot of all trades", booting Arch or Debian from USB as well as falling back to both Stock and Arch rescue on NAND if needed? Re: [HOW-TO ARMv5-Kirkwood] NAND rescue system (while in need of further fine-tuning) seems to make more sense to me than repeatedly changing uBoots (& risking bricking on E02) just to fit the respective flavour of OS.
PogoDancer
 
Posts: 14
Joined: Sun Dec 16, 2012 2:00 pm
Top

Re: Pogoplug E02: tweak recent U-Boot to re-allow NAND fallb

Postby moonman » Sun Mar 22, 2015 12:07 am

Out U-Boot environemnt can be easiliy modified to boot whatever: you just have to read documentation and/or follow examples.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Next

Return to U-Boot/Kernel

Who is online

Users browsing this forum: Google [Bot] and 3 guests