Welcome! Log In Create A New Profile

Advanced

Tutorial of native sata boot for pogoplug pro

Posted by youxiaojie 
Tutorial of native sata boot for pogoplug pro
March 12, 2017 01:06PM
I summed up the old post about sata boot for pogoplug pro and fixed some broken links

Just for reference to others, I made a very detailed summary.

Please revise my comment are there right in technical aspect. (?? if I have doubt - I will revise based on your comment)

Synopsys:
My device Pogo Plug P24 - V3 (nonpci) - oxnas 820
I have serial connection,

I Screw up UBoot in NAND - Therefore no boot from USB,
and NOTHING appears on Serial console!!!

Only way to boot is well prepared SATA because oxnas tries to boot Uboot on SATA then Uboot on NAND then USB. (?? is that right??)

Steps

1. Get a SATA HDD. You have to delete all partition from it. Sorry :(
2. Put it to USB HDD frame. Attache to PC. Umount all partition if automount happened.
3. remove partitions, and create new.

fdisk /dev/sdb
o - create a new empty DOS partition table
n - Create part 1 (start with 2048 ; size: +2G )
w - write
q - exit



4. mkext4 fs.

mkfs.ext4 /dev/sdb1




( If you have problems with "mkfs.ext4 /dev/sdb is not a block special device."
Detach USB _and_ reboot your PC. and attache again - will solve the problem...)

5 Labell it:

tune2fs -L "rootfs" /dev/sdb1




6.Mount rootfs

mount /dev/sdb1 /media/rootfs




7. Prepare Sata uboot file on PC :
a.) Extract the content Shv made ox820-sata-uboot.tar.gz to your PC

cd /yourpath
tar -xjf ox820-sata-uboot.tar.gz


(It is only a boot directory on your PC)
Navigate to /yourpath/boot/dts directory and rename this files:
-it is only needed in case noPCI devices like P24.

mv ox820-pogoplug-pro.dtb ox820-pogoplug-pro.dtb.ori
cp ox820-pogoplug-classic.dtb ox820-pogoplug-pro.dtb




b.) and copy modified /yourpath/boot directory to the rootfs partition.

c.)Modify 2 lines in disk create script on your PC:

c1.) disk=/dev/sdb
c2.) workarea="/yourpath"
d.) save changes

8. Now you have to run Sata uboot SCRIPT on your PC.
It will write U-Boot SPL to Sata disk on the beginning (in the first 2048 sector) on the disk.

8a.) Umount - Just to be safe side: Not write to disk which is mounted... - skip if brave.

umount rootfs



8b.) Run Sata uboot SCRIPT

./disk_create_shv




Prepare Debian Rootfs files.
9.) Mount rootfs again:

mount /dev/sdb1 /media/rootfs



10.) Extract debian files to your PC /yourpath directory. Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2

tar -xjf Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2




11. Copy all directory from PC to your rootfs partition BUT /boot . (It means do not overwrite the existing /boot on rootfs!!)

detach from PC and attache to Pogo.
Attache serial TTL connector and see output. Trust Bodhi, Picocom is better than GNU Screen. I learned :)

picocom -b 115200 /dev/ttyUSB0




Power on your POGO.

Debian will not boot because Uboot env not well set for this configuration. try it but for sure it will freeze. :) then power on - and - of again.

Now Stop the counter by press a key:

Hit any key to stop autoboot: 3


Now set the environment to this setup:


Looks like your V3 is trying to boot from ide. If what you posted is your complete printenv, you are missing some stuff.

Here is my ide boot setenv's (partial) for a frame of reference:

setenv uinitrd_addr '0x60e00000'
setenv uimage_addr '0x60500000'
setenv dtb_addr '0x62c00000'
setenv ide_set_bootargs 'setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10'
setenv dt_bootm 'bootm $uimage_addr $uinitrd_addr $dtb_addr'
setenv dt_load_dtb 'ext2load ide 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb'
setenv dt_load_initrd 'ext2load ide 0:1 $uinitrd_addr /boot/uInitrd'
setenv dt_load_uimage 'ext2load ide 0:1 $uimage_addr /boot/uImage'
setenv dt_ide_boot 'run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm'
setenv dt_ide_bootcmd 'run ide_set_bootargs; run dt_ide_boot'
setenv dt_bootcmd_ide 'ide reset; run dt_ide_bootcmd; reset'
setenv bootcmd 'run dt_bootcmd_ide'


And for usb booting it's this (complete):

setenv autoload no
setenv baudrate 115200
setenv bootargs console=ttyS0,115200n8
setenv bootdelay 10
setenv console console=ttyS0,115200n8
setenv ethact mii0
setenv ethaddr (removed for security)
setenv ipaddr 192.168.1.100
setenv mtdids nand0=41000000.nand
setenv mtdparts mtdparts=41000000.nand:14m(boot),-(data)
setenv serverip 192.168.1.110
setenv stderr serial
setenv stdin serial
setenv stdout serial
setenv usb_device 0:1
setenv if_netconsole ping $serverip
setenv preboot_nc run if_netconsole start_netconsole
setenv start_netconsole setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version
setenv usb_set_bootargs setenv bootargs console=ttyS0,115200 root=/dev/sda1 rootdelay=10
setenv uinitrd_addr 0x60e00000
setenv uimage_addr 0x60500000
setenv dtb_addr 0x62c00000
setenv dt_load_dtb ext2load usb 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
setenv dt_load_initrd ext2load usb 0:1 $uinitrd_addr /boot/uInitrd
setenv dt_load_uimage ext2load usb 0:1 $uimage_addr /boot/uImage
setenv dt_bootm bootm $uimage_addr $uinitrd_addr $dtb_addr
setenv dt_usb_boot run dt_load_uimage; run dt_load_initrd; run dt_load_dtb; run dt_bootm
setenv dt_usb_bootcmd run usb_set_bootargs; run dt_usb_boot
setenv dt_bootcmd_usb usb start; run dt_usb_bootcmd; usb stop; reset
setenv bootcmd run dt_bootcmd_usb



Do a printenv and try to determine what you are missing based on what I have posted. Note that my boot env's are pretty simple compared to some of the really complicated netconsole / tftp ones I have seen on the forum so you might want to take a look at some of those if you wanna get funky.





Boot success!!


I hope -you Masters (Bodhi, SHV, Morph) - find my guide is useful. :) and it is a little benefit give back to community. Respect.


To be continued



No! But if you put the right stage1 bootloader and the right uboot to your SATA drive it might boot with them. You can't use the files which are provided here for Flash install. Moreover you must put the stage1 bootloader to your drive as it is done by OXNAS-SATA-Boot skript from ALARM forum. The uboot can be put to the filesystem of the first partition (Fat32 or ext4 depends on the stage1 loader).

I tested the following setups:
sda1: just für boot files like u-boot.img, u-boot.env, uImage, uInitrd (ext4 or fat32)
sda2: rootfs (ext3 or ext4)
sda3: linux swap partition
sda4: data (ext4)

or
sda1: rootfs including boot files (ext4)
sda2: linux swap partition
sda3: data (ext4)

For both setups you can use the same stage1 bootloader (u-boot-spl.bin) which reads the boot files from and stores boot environment to the first ext4 partition of the SATA drive. The device must support 512 Byte sector size either natively or by simulation.

u-boot files for SATA booting: http://pogoplug.square7.ch/ox820-sata-uboot.tar.gz (environment must be adapted with the serial console to boot the uImage and uInitrd files) - uImage, uInitrd and dtb file are for Pogoplug Pro - you might replace them with the right files of your kernel

can be download at :
 http://forum.doozan.com/read.php?3,28162,28313#msg-28313

This is courtesy of LeggoMyEggo. I've upload the tarball Leggo sent me to Dropbox.

There are 2 tarballs in it. One from shv, one from WarheadsSE. It's easier to use the shv's: ox820-sata-uboot.tar.gz.

ox820-sata-uboot.tar.gz/*recommend and use modified disk_create.sh which not dd u-boot.img and uImage.img*/
oxnas_sata_boot.tgz   /*this file contain older kernel maybe3.12 and uboot 1.1.2.  the script need to dd uImage to first partition and rootfs on second partition,not success when booting kernel (uImage on partition 1,bad magic number)Try later*/


Dropbox download link:
https://www.dropbox.com/s/p9bo06us5fo2i3s/oxnasboottarball.zip
md5
8e016437146f40cdb51ad9dbd63b1bdd


Preparing SATA drive and storing u-boot-spl.bin alias stage1 to it:
http://archlinuxarm.org/forum/viewtopic.php?f=55&t=2146&sid=f4dc4863e3a93822a4f9e925b3cbda45


You must execute the steps from the ALARM script until stage1 file (u-boot-spl.bin from my package must be used instead the provided stage1 file) is stored to the HDD.

You must adapt the following lines of the boot environment:
dt_ide_bootcmd=run ide_set_bootargs; run dt_ide_boot
ide_set_bootargs=setenv bootargs root=/dev/sda1 rootfstype=ext4 console=ttyS0,115200 mem=128M


to be continued

http://forum.doozan.com/read.php?3,16017,19666#msg-19666

@Robert,
your boot environment looks OK for the old WarheadsSE booting procedure. It looks that you don't have the right rootfs on partition sda2 (ext3/partition name rootfs).

Nevertheless I want to recommend you to use new uboot. Bodhi already pointed you to my post: http://forum.doozan.com/read.php?3,16017,17297#msg-17297.

The device must support 512 Byte sector size either natively or by simulation.

Step1: prepare mbr partition table:

sda1: rootfs including boot files (ext4) with partition name rootfs
sda2: linux swap partition
sda3: data (ext4)

Step2: Extract the content of the archive http://pogoplug.cwsurf.de/ox820-sata-uboot.tar.gz (http://pogoplug.square7.ch/ox820-sata-uboot.tar.gz)to your rootfs partition

Step3: Prepare SATA booting by adapting and executing the following script

#!/bin/sh

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

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

workarea="/boot"

stage1File=$workarea/u-boot-spl.bin

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

Step4: Boot with serial cable connected and adapt the boot-env settings to your needs

Please also read the posts of morph027 starting from: http://forum.doozan.com/read.php?3,16017,18341#msg-18341

-shv

TBC


my really test:
1.gpt partition with one ext3 labeled "rootfs"

2.download
Dropbox download link:
https://www.dropbox.com/s/p9bo06us5fo2i3s/oxnasboottarball.zip
md5
8e016437146f40cdb51ad9dbd63b1bdd

ox820-sata-uboot.tar.gz/*recommend and use modified disk_create.sh which not dd u-boot.img and uImage.img*/
oxnas_sata_boot.tgz   /*this file contain older kernel maybe3.12 and uboot 1.1.2.  the script need to dd uImage to first partition and rootfs on second partition,not success when booting kernel (uImage on partition 1,bad magic number) ,320G hd not recognize correctly Try again later*/

3. make rootfs by untar Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2

mount /dev/sdb1 /mnt
cd /mnt
tar -xjvf /home/allan/Debian-3.17.0-oxnas-tld-1-rootfs-bodhi.tar.bz2

4.untar 0x820-sata-uboot.tar.gz ,there will be a boot direcotory and enter boot directory.
5 cp u-boot.img u-boot.env to /boot directory of rootfs we just made
6 umount /dev/sdb1
7 make script disk_create_mod.sh as following saving and running on ox820-sata-uboot/boot directory.
ox820-sata-uboot #
#!/bin/sh

# uncomment line below and set to the correct disk
disk=/dev/sdb
#pay attention to fit yourself.this is  my situation

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

workarea=.

stage1File=$workarea/u-boot-spl.bin

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

8
9
reboot.


boot log:
U-Boot SPL 2013.10-g3a0f380-dirty (Jul 26 2014 - 14:31:34)
  Boot device: SATA
Attempting to set PLLA to 850 MHz ...
  plla_ctrl0 : 0000020a
  plla_ctrl1 : 00330000
  plla_ctrl2 : 0065008b
  plla_ctrl3 : 000000f1

PLLA Set
Bus 0: OK 
  Device 0: 
** File not found /boot/bootargs.bin **


U-Boot 2013.10-g3a0f380-dirty (Jul 26 2014 - 10:18:57) for OXNAS

DRAM:  256 MiB
IDE:   Bus 0: OK 
  Device 0: Model: ST3320418AS  Firm: CC34 Ser#: 6VM1309B
            Type: Hard Disk
            Supports 48-bit addressing
            Capacity: 305245.3 MB = 298.0 GB (625142448 x 512)
NAND:  128 MiB                                                                  
In:    serial                                                                   
Out:   serial                                                                   
Err:   serial                                                                   
Net:                                                                            
Led:    GREEN                                                                   
mii0                                                                            
Main Loop                                                                       
Hit any key to stop autoboot:  0


opps! my 256M ram mod is recognized.
but due to improper uboot env ,the linux can not boot.




modify uboot env

you can edit env in uboot envirment or use
mkenvimage -s <environment partition size> -o <output> <input file>
command from "u-boot-tool" package. I prefer latter. just save following code to a plan txt say ide-only.txt
and run
"mkenvimage -s 16380 -o u-boot.env ide-only.txt"
at /boot directory, overwrite old u-boot.env.


mtdids=nand0=41000000.nand
mtdparts=mtdparts=41000000.nand:14m(boot),-(data)


autoload=no
baudrate=115200
bootargs=console=ttyS0,115200n8
bootcmd=run dt_bootcmd_ide
bootdelay=3
console=console=ttyS0,115200n8



dtb_addr=0x62c00000
uimage_addr=0x60500000
uinitrd_addr=0x60e00000
dt_bootm=bootm $uimage_addr $uinitrd_addr $dtb_addr

dt_ide_load_dtb=ext2load ide 0:1 $dtb_addr /boot/dts/ox820-pogoplug-pro.dtb
dt_ide_load_uinitrd=ext2load ide 0:1 $uinitrd_addr /boot/uInitrd
dt_ide_load_uimage=ext2load ide 0:1 $uimage_addr /boot/uImage
dt_ide_boot=run dt_ide_load_uimage; run dt_ide_load_uinitrd; run dt_ide_load_dtb; run dt_bootm

ide_set_bootargs=setenv bootargs root=/dev/sda1 rootfstype=ext3 console=ttyS0,115200 mem=256M
dt_ide_bootcmd=run ide_set_bootargs; run dt_ide_boot

dt_bootcmd_ide=ide start; run dt_ide_bootcmd; ide stop; reset





ethact=mii0
ethaddr=00:25:31:01:C6:76

serverip=192.168.0.1 // ip of pc running nc or Hercules SETUP utility
if_netconsole=ping $serverip
ipaddr=192.168.0.100 //pogo's ip
start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version

preboot_nc=run if_netconsole start_netconsole

stderr=serial
stdin=serial
stdout=serial


reboot.boot into linux, modify /etc/apt/sources.list
change the wheezy to jessie,
apt-get update; apt-get dist-upgrade
everything is ok
but if I change the wheezy to sid
apt-get update will show error.
install packages:mtd-utils and u-boot-tools for future use.



Edited 10 time(s). Last edit at 03/20/2017 02:42PM by youxiaojie.
Re: Tutorial of pure sata boot pogoplug pro
March 12, 2017 01:30PM
youxiaojie Wrote:
-------------------------------------------------------
> I summed up the old post about sata boot for pogoplug pro and fixed some broken links
>
> Just for reference to others, I made a very detailed summary.
>
> Please revise my comment are there right in technical aspect. (?? if I have doubt - I will revise based on your comment)
>
> Synopsys:
> My device Pogo Plug P24 - V3 (nonpci) - oxnas 820
> I have serial connection,
>
> I Screw up UBoot in NAND - Therefore no boot from USB, and NOTHING appears on Serial console!!!
>
> Only way to boot is well prepared SATA because oxnas tries to boot Uboot on SATA then Uboot on NAND then USB. (?? is that right??)
>
> Steps
>
> 1. Get a SATA HDD. You have to delete all partitio
> n from it. Sorry :(
> 2. Put it to USB HDD frame. Attache to PC. Umount
> all partition if automount happened.
> 3. remove partitions, and create new.
>
Shouldn't tte above steps #2 and #3 part of step 1, i.e. 1a and 1b, respectively?

> fdisk /dev/sdb
> o - create a new empty DOS partition table
> n - Create part 1 (start with 2048 ; size: +2G )
> w - write
> q - exit
>
>
>
> 4. mkext4 fs.
>
>
> mkfs.ext4 /dev/sdb1
>
>
I have never tried this. However, will the mkfs.ext4 (mkext4 fs) utility be able to format a DOS partition? BTW, mkfs.ext4 -L "Label" /dev/partition will create a label on the formatted partition at once.

>
>
> ( If you have problems with "mkfs.ext4 /dev/sdb is not a block special device."
> Detach USB _and_ reboot your PC. and attache again - will solve the problem...)
>
> 5 Labell it:
>
>
> tune2fs -L "rootfs" /dev/sdb1
>
>
>
>
>
> 6.Mount rootfs
>
>
> mount /dev/sdb1 /media/rootfs
>
>
>
>
>
> 7. Prepare Sata uboot file on PC :
> a.) Extract the content Shv made ox820-sata-uboot.tar.gz to your PC
>
> cd /yourpath
> tar -xjf ox820-sata-uboot.tar.gz
>
Can you please clarify the above /yourpath, i.e. is /yourpath = /media/rootfs?

>
> (It is only a boot directory on your PC)
> Navigate to /yourpath/boot/dts directory and rename this files:
> -it is only needed in case noPCI devices like P24.
>
>
> mv ox820-pogoplug-pro.dtb ox820-pogoplug-pro.dtb.ori
> cp ox820-pogoplug-classic.dtb ox820-pogoplug-pro.dtb
>
>
>
>
>
> b.) and copy modified /yourpath/boot directory to the rootfs partition.
>
> c.)Modify 2 lines in disk create script on your PC
> :
>
> c1.) disk=/dev/sdb
> c2.) workarea="/yourpath"
> d.) save changes
>
> 8. Now you have to run Sata uboot SCRIPT on your PC.
> It will write U-Boot SPL to Sata disk on the beginning (in the first 2048 sector) on the disk.
>
> 8a.) Umount - Just to be safe side: Not write to disk which is mounted... - skip if brave.
>
>
> umount rootfs
>
>
>
>
> 8b.) Run Sata uboot SCRIPT
>
>
> ./disk_create_shv
>
>
I am completely lost here. My understanding is you wanna use the host uboot utility to create a uboot SPL (Pardon me, what the heck is SPL?) on the SATA HDD mounted on the host computer?
Re: Tutorial of pure sata boot pogoplug pro
March 12, 2017 06:10PM
@youxiaojie,

Thanks for gathering the info into a tutorial and testing it, great job!

The instruction can be improved for clarity, so I will post suggestions to make it a little easier for users who are not familiar with embedded Linux..

-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: Tutorial of pure sata boot pogoplug pro
March 12, 2017 06:24PM
@habibie,

> I am completely lost here. My understanding is you
> wanna use the host uboot utility to create a uboot
> SPL (Pardon me, what the heck is SPL?) on the SATA
> HDD mounted on the host computer?

Our OX820 u-boot installation has 2 images. SPL image the 1st stage boot loader, u-boot image is the 2nd stage bootloader.

Quote
http://forum.doozan.com/read.php?3,16017
Download U-Boot image at Dropbox:

uboot.2015.10-tld-1.ox820.bodhi.tar
md5
90afc75a29601cdb60adc7afd8bbda26

This archive contains the following 4 files:

uboot.2015.10-tld-1.ox820.mtd0.img
uboot.spl.2013.10.ox820.850mhz.mtd0.img
uboot.2013.10-tld-5.ox820.environment
uboot.2013.10-tld-5.ox820.environment.img


The process of creating the SATA-only boot disk can be done on any Linux host. After that, you'd take the HDD to the Pogo V3 and boot it.This process is different from installing u-boot and SPL on NAND.

-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 03/12/2017 06:27PM by bodhi.
Re: Tutorial of pure sata boot pogoplug pro
March 13, 2017 01:28AM
@ youxiaojie,

1. When you are quoting other people, use the "insert quoted text" button.
2. Use "formatted code" button for all commands and logs.

-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
shv
Re: Tutorial of native sata boot for pogoplug pro
March 13, 2017 12:47PM
@ youxiaojie,

I want to recommend to start form a basic process and add additional description.

============================================================================

The device must support 512 Byte sector size either natively or by simulation.

Step1: Attach the target drive to any linux device, e.g. PC or a working Pogoplug

Step2: Prepare mbr partition table:
sda1: rootfs including boot files (ext4) with partition name rootfs
sda2: linux swap partition
sda3: data (ext4)

Step3: Format sda1 partition with ext4 filesystem and "rootfs" as name.

Step4: Mount sda1 partition

Step5: Extract the content of the archive http://pogoplug.cwsurf.de/ox820-sata-uboot.tar.gz to the rootfs partition. This should create a boot directory with uboot.img, uboot.env and other files. The outdated kernel and dts files can be deleted so that only uboot.img and uboot.env stay in the /boot directory.

Step6: Prepare SATA booting by adapting and executing the following script (disk is the drive you want to modify, workarea is the directory which contains the uboot-spl.bin, e.g. /boot of the rootfs partition)
#!/bin/sh

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

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

workarea="/boot"

stage1File=$workarea/u-boot-spl.bin

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

Step7: Extract bodhi's latest rootfs package to the rootfs partition and check if uImage, uInitrd and the right dts file are available in the /boot directory.

Step8: Attach the drive to the target Pogoplug device

Step9: Boot with serial cable connected, stop the boot countdown and adapt the boot-env settings to your needs, e.g. exchange the name of the dts file if you are using non Pro device

Step10: Check if Pogoplug boots the rootfs completely

Step11: (optional) Update the kernel to bodhi's latest one


Please also read the posts of morph027 starting from: http://forum.doozan.com/read.php?3,16017,18341#msg-18341

Source code download: http://pogoplug.square7.de/Pogoplug/u-boot-oxnas-sata.tar.bz2
Description how to compile: https://github.com/kref/u-boot-oxnas/wiki/uboot-for-sata but use ox820_ext4_config instead of ox820_fat_config

============================================================================


The idea behind is that some magic dust (WarheadsSE) and uboot-spl.bin is written to the beginning of the SATA disk. If this is done the processor will boot from SATA harddrive and not from flash - absolutely nothing is read from flash. If uboot-spl.bin is executed it will read uboot.img and uboot.env from the /boot directory of the first partition. If uboot is executed it will boot the system based on the content of uboot.env.

-shv



Edited 27 time(s). Last edit at 03/19/2017 03:44AM by shv.
shv
Re: Tutorial of native sata boot for pogoplug pro
March 13, 2017 03:57PM
This is the script to deactivate automatic booting from SATA HDD:
#!/bin/sh

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

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

perl <<EOF | dd of="$disk" bs=512
    print "\x00" x 0x1bc;
EOF
- shv



Edited 2 time(s). Last edit at 03/13/2017 04:02PM by shv.
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: