Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 03, 2017 02:35AM |
Registered: 7 years ago Posts: 88 |
[root@alarm hd-sda4]# uname -a Linux alarm 2.6.31.6_SMP_820 #6 SMP Thu Jun 14 19:49:57 CDT 2012 armv6l GNU/Linux
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 03, 2017 03:18AM |
Admin Registered: 12 years ago Posts: 17,629 |
[root@alarm hd-sda4]# uname -a Linux alarm 2.6.31.6_SMP_820 #6 SMP Thu Jun 14 19:49:57 CDT 2012 armv6l GNU/Linux
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 03, 2017 05:42PM |
Registered: 7 years ago Posts: 88 |
cat /proc/mtd dev: size erasesize name mtd0: 00e00000 00020000 "boot" mtd1: 07200000 00020000 "data"
[root@alarm /]# cat /proc/mtd dev: size erasesize name mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit" mtd1: 00e00000 00020000 "boot" mtd2: 07200000 00020000 "rootfs" [root@alarm /]#
root@debian:~# root@debian:~# mkfs.ext3 -L rootfs /dev/sdb1 mke2fs 1.42.12 (29-Aug-2014) /dev/sdb1 contains a exfat file system Proceed anyway? (y,n) y Creating filesystem with 978688 4k blocks and 244800 inodes Filesystem UUID: 0d34295e-6aec-4c16-a92d-3f5697ef2ce6 Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912, 819200, 884736 Allocating group tables: done Writing inode tables: done Creating journal (16384 blocks): done Writing superblocks and filesystem accounting information: done root@debian:~# mkdir /media/sdb1 root@debian:~# mount /dev/sdb1 /media/sdb1 root@debian:~# root@debian:~# root@debian:~# cd /media/sdb1 root@debian:/media/sdb1# root@debian:/media/sdb1# root@debian:/media/sdb1# tar -xjf Debian-4.4.54-oxnas-tld-1-rootfs-bodhi.tar.bz2 root@debian:/media/sdb1# cat etc/fstab # /etc/fstab: static file system information. # # <file system> <mount point> <type> <options> <dump> <pass> LABEL=rootfs / ext3 noatime,errors=remount-ro 0 1 tmpfs /tmp tmpfs defaults 0 0 root@debian:/media/sdb1# cd boot root@debian:/media/sdb1/boot# ls dts/*classic* dts/ox820-pogoplug-classic.dtb root@debian:/media/sdb1/boot# cp -a zImage-4.4.54-oxnas-tld-1 zImage.fdt root@debian:/media/sdb1/boot# cat dts/ox820-pogoplug-classic.dtb >> zImage.fdt root@debian:/media/sdb1/boot# mkimage -A arm -O linux -C none -T kernel -a 0x60008000 -e 0x60008000 -n 'Linux-4.4.54-oxnas-tld-1' -d zImage.fdt uImage Image Name: Linux-4.4.54-oxnas-tld-1 Created: Fri Nov 3 15:16:21 2017 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 4628835 Bytes = 4520.35 kB = 4.41 MB Load Address: 60008000 Entry Point: 60008000 root@debian:/media/sdb1/boot# sync root@debian:/media/sdb1/boot#
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 03, 2017 09:00PM |
Admin Registered: 12 years ago Posts: 17,629 |
Quote
4. Create uImage with embedded DTB for booting with stock u-boot. Skip this step if you have installed the latest released uboot for OXNAS, or are installing this u-boot at the same time.
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 04, 2017 02:28AM |
Registered: 7 years ago Posts: 88 |
Quote
4. Create uImage with embedded DTB for
> booting with stock u-boot. Skip
> this step if you have installed the latest
> released uboot for OXNAS, or are installing this
> u-boot at the same time.
mkimage -A arm -O linux -C none -T kernel -a 0x60008000 -e 0x60008000 -n 'Linux-4.4.54-oxnas-tld-1' -d zImage-4.4.54-oxnas-tld-1 uImageIs that right?
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 04, 2017 02:42AM |
Registered: 7 years ago Posts: 88 |
cat /etc/fw_env.config [root@alarm /]# cat /etc/fw_env.config /dev/mtd0 0x00100000 0x20000 0x20000
cat /proc/mtd [root@alarm /]# cat /proc/mtd dev: size erasesize name mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit" mtd1: 00e00000 00020000 "boot" mtd2: 07200000 00020000 "rootfs"
mtd1: 07200000 00020000 "data"
mtd2: 07200000 00020000 "rootfs"
Dumping NAND mtd0: nanddump --noecc --omitoob -f mtd0 /dev/mtd0
Debian command: fw_printenv > current_envs.txt
cd /tmp tar -xf uboot.2015.10-tld-2.ox820.bodhi.tar
Be extra careful with the next 5 commands--Roger that
/usr/sbin/flash_erase /dev/mtd0 0x0 6
/usr/sbin/flash_erase /dev/mtd1 0x0 6instead.
U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12) U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700) OXNAS OX820
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 04, 2017 03:27AM |
Admin Registered: 12 years ago Posts: 17,629 |
mkimage -A arm -O linux -T kernel -C none -a 0x60008000 -e 0x60008000 -n Linux-4.4.54-oxnas-tld-1 -d vmlinuz-4.4.54-oxnas-tld-1 uImage
cd /media/sdb1/boot cp -a uImage uImage.orig cp -a zImage-4.4.54-oxnas-tld-1 zImage.fdt cat dts/ox820-pogoplug-pro.dtb >> zImage.fdt mkimage -A arm -O linux -C none -T kernel -a 0x60008000 -e 0x60008000 -n 'Linux-4.4.54-oxnas-tld-1' -d zImage.fdt uImage sync
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 04, 2017 05:38AM |
Admin Registered: 12 years ago Posts: 17,629 |
Quote
> I'll list the steps as you have them numbered
> under "Flashing Instruction"...
>
> 1. uBoot envs config and mtd partitions must be
> defined as followed in your rootfs
>
>> cat /etc/fw_env.config > > [root@alarm /]# cat /etc/fw_env.config > /dev/mtd0 0x00100000 0x20000 0x20000 >>
> My fw_env.config file looks as you expect, but I'm
> assuming I need to edit it on my USB stick,
> changing mtd0 to mtd1, correct?
>
Quote
> I'm more guessing than assuming that I should
> *not* change the size/offset numbers.
>
>> cat /proc/mtd > > [root@alarm /]# cat /proc/mtd > dev: size erasesize name > mtd0: 08000000 00020000 "NAND 128MiB 3,3V 8-bit" > mtd1: 00e00000 00020000 "boot" > mtd2: 07200000 00020000 "rootfs" >>
> [That file is on the root of my running Classic
> running ARM (i.e. on my SATA boot drive). On my
> USB stick the proc directory exists but is empty.
> So I'm assuming I need to copy the desired file to
> /media/sda1/proc to get it in the right place]
Quote
>
> As stated, my mtd file looks different, but I'm
> guessing I don't have to edit/change this file.
> The size & erasesize numbers for "boot" are the
> same as in your instructions, just at a different
> device name (mtd1). I don't know if I need to do
> anything about the fact that your suggested file
> has the line...
>
>> mtd1: 07200000 00020000 "data" >>
>
> ...while mine has...
>
>> mtd2: 07200000 00020000 "rootfs" >>
>
> Do I just leave it as is?
Quote
> 3. Be sure to save your current uBoot image in
> mtd0, or have a backup image saved somewhere as
> precaution.
>
>> Dumping NAND mtd0: > nanddump --noecc --omitoob -f mtd0 /dev/mtd0 >>
>
> &
>
> Save envs:
>
>> Debian command: > fw_printenv > current_envs.txt >>
> --Understood. I'll backup these files, again
> replacing mtd0 with mtd1.
> --I assume I should perform the same backup on the
> other mtd device names just to be paranoid
nanddump --noecc --omitoob -f mtd.uboot /dev/mtd1
Quote
> 4. Be sure there is no bad block in the first 2M
> of your NAND
>
> --Understood (haven't run into any bad blocks yet,
> knock wood)
>
>
>
> 5. Extract the archive to /tmp
>
>> cd /tmp > tar -xf uboot.2015.10-tld-2.ox820.bodhi.tar >>
>
> --Understood, and I'll remain in /tmp for the
> remainder
>
>
>> Be extra careful with the next 5 commands >> --Roger that
>
>
>
> 6. Erase 6 blocks on mtd0
>> /usr/sbin/flash_erase /dev/mtd0 0x0 6 >>
> --I should enter
>> /usr/sbin/flash_erase /dev/mtd1 0x0 6 >> instead.
/usr/sbin/flash_erase /dev/mtd1 0x0 6
Quote
> 7. Flash encoded spl stage1 to 0x0
>
> --Again, replace mtd0 with mtd1
Quote
>
>
> Steps 8,9,10: Enter your commands but with mtd1
> instead of mtd0. Stop if any output looks wrong.
>
Quote
>
> 11. Required setup for default envs (only 1
> kernel/rootfs partition, etc)
>
> --I believe I meet all of these requirements. I'm
> going to build a USB stick to boot from now, and
> then hopefully get it working again to boot from
> SATA, where partition 1 will have the kernel files
> and will be labeled rootfs, and where there will
> not be any other partitions that might confuse
> u-Boot.
>
>
> 12. Set up netconsole. --Understood
>
>
> 13. For sanity check, print out uBoot envs to see
> if they were flashed OK. If there is error in
> listing the envs, do not reboot and post your
> problem here.
>
> --Understood. I'll probably just post them here
> even if there isn't an error.
>
>
> 14. Make sure ethaddr is set in uBoot env. Note
> that the ethaddr in the default envs image was
> generated randomly as a local MAC address. It
> should allow the Pogo V3 to boot into Debian
> without problem. But you should set it to the
> correct one after the system running to avoid
> conflicts (in case you have 2 or more Pogo
> Pro/Classic boxes).
>
> --Understood, I think. I assume I just (might)
> have to reset the ethaddr to the MAC address on
> the case, using fw_setenv.
>
Quote> > 15. Reboot. Upon reboot, in either serial console > or netconsole, uBoot banner should show the SPL > and U-Boot versions as: > >> U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12) > > U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 > -0700) > OXNAS OX820 >>
> --Understood. Fingers crossed
>
> 16. Done.
>
> --Toes crossed.
>
> A. How to use the uEnv.txt script (Optional)
>
> --Understood. Don't think I need this as long as
> my envs are set right to befin with, right?
>
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 04, 2017 06:44AM |
Registered: 7 years ago Posts: 88 |
[root@alarm tmp]# /usr/sbin/fw_printenv bootcmd_exec=run load_uimage; if run load_initrd; then if run load_dtb; then bootm 0x60500000 0x60e00000 0x62c00000; else bootm 0x60500000 0x60e00000; fi; else if run load_dtb; then bootm 0x60500000 - 0x62c00000; else bootm 0x60500000; fi; fi bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; reset bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi bootdelay=10 bootdev=usb usb_custom_params=zswap.enabled=1 device=0:1 devices=usb ide disks=0 1 2 3 ethaddr=52:3b:20:9c:11:51 ethact=mii0 if_netconsole=ping $serverip load_dtb=echo loading DTB $dtb_file ...; load $bootdev $device 0x62c00000 $dtb_file load_initrd=echo loading uInitrd ...; load $bootdev $device 0x60e00000 /boot/uInitrd load_uimage=echo loading uImage ...; load $bootdev $device 0x60500000 /boot/uImage mainlineLinux=yes mtdids=nand0=41000000.nand mtdparts=mtdparts=41000000.nand:14m(boot),-(data) preboot_nc=setenv nc_ready 0; for pingstat in 1 2 3 4 5; do; sleep 1; if run if_netconsole; then setenv nc_ready 1; fi; done; if test $nc_ready -eq 1; then run start_netconsole; fi scan_disk=echo running scan_disk ...; scan_done=0; setenv scan_usb "usb start"; setenv scan_ide "ide reset"; setenv scan_mmc "mmc rescan"; for dev in $devices; do if test $scan_done -eq 0; then echo Scan device $dev; run scan_$dev; for disknum in $disks; do if test $scan_done -eq 0; then echo device $dev $disknum:1; if load $dev $disknum:1 0x60500000 /boot/uImage 1; then scan_done=1; echo Found bootable drive on $dev $disknum; setenv device $disknum:1; setenv bootdev $dev; fi; fi; done; fi; done set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version; stderr=serial stdin=serial stdout=serial uenv_import=echo importing envs ...; env import -t 0x60510000 $filesize uenv_init_devices=setenv init_usb "usb start"; setenv init_ide "ide reset"; setenv init_mmc "mmc rescan"; for devtype in $devices; do run init_$devtype; done; uenv_load=run uenv_init_devices; setenv uenv_loaded 0; for devtype in $devices; do for disknum in 0; do run uenv_read_disk; done; done; uenv_read_disk=if test $devtype -eq mmc; then if $devtype part; then run uenv_read; fi; else if $devtype part $disknum; then run uenv_read; fi; fi uenv_read=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x60500000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi usb_ready_retry=15 ipaddr=192.168.222.160 serverip=192.168.222.164 dtb_file=/boot/dts/ox820-pogoplug-classic.dtb [root@alarm tmp]#
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 04, 2017 03:47PM |
Admin Registered: 12 years ago Posts: 17,629 |
Quote
10. Set up netconsole. It's important to set up neconsole if you don't already have serial console connected. If you've flashed the default environments in step 8 then activate netconsole with the following envs:
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 04, 2017 06:42PM |
Registered: 7 years ago Posts: 88 |
Quote
10. Set up netconsole. It's important to
> set up neconsole if you don't already have
> serial console connected. If you've flashed
> the default environments in step 8 then activate
> netconsole with the following envs:
root@PogoV4Debian:/boot# nc.traditional -l -u -p 6666 & [1] 23395 root@PogoV4Debian:/boot# nc.traditional -u -p 6666 192.168.222.160 6666 U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 -0700) OXNAS OX820 gcc (Debian 6.3.0-18) 6.3.0 20170516 GNU ld (GNU Binutils for Debian) 2.28 Hit any key to stop autoboot: 0 starting 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 Reset IDE: SATA PHY not ready for device 0 ide_preinit failed Partition Map for USB device 0 -- Partition Type: DOS Part Start Sector Num Sectors UUID Type 1 2048 7829504 2b44e28e-01 83 Boot loading envs from usb 0 ... ** File not found /boot/uEnv.txt ** no IDE devices available running scan_disk ... Scan device usb device usb 0:1 1 bytes read in 189 ms (0 Bytes/s) Found bootable drive on usb 0 loading uImage ... 4621824 bytes read in 478 ms (9.2 MiB/s) loading uInitrd ... 4594376 bytes read in 444 ms (9.9 MiB/s) loading DTB /boot/dts/ox820-pogoplug-classic.dtb ... 7075 bytes read in 183 ms (37.1 KiB/s) ## Booting kernel from Legacy Image at 60500000 ... Image Name: Linux-4.4.54-oxnas-tld-1 Created: 2017-11-04 10:50:28 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 4621760 Bytes = 4.4 MiB Load Address: 60008000 Entry Point: 60008000 Verifying Checksum ... OK ## Loading init Ramdisk from Legacy Image at 60e00000 ... Image Name: initramfs-4.4.54-oxnas-tld-1 Created: 2017-08-01 7:51:04 UTC Image Type: ARM Linux RAMDisk Image (gzip compressed) Data Size: 4594312 Bytes = 4.4 MiB Load Address: 60000000 Entry Point: 60000000 Verifying Checksum ... OK ## Flattened Device Tree blob at 62c00000 Booting using the fdt blob at 0x62c00000 Starting kernel ...
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 05, 2017 06:09AM |
Admin Registered: 12 years ago Posts: 17,629 |
>Quote
10. Set up netconsole. It's important to
> > set up neconsole if you don't already have
> > serial console connected. If you've flashed
> > the default environments in step 8 then
> activate
> > netconsole with the following envs:
> root@PogoV4Debian:/boot# nc.traditional -l -u -p > 6666 & > [1] 23395 > root@PogoV4Debian:/boot# nc.traditional -u -p > 6666 192.168.222.160 6666 > > U-Boot 2015.10-tld-2 (Oct 21 2017 - 22:00:02 > -0700) > OXNAS OX820 > gcc (Debian 6.3.0-18) 6.3.0 20170516 > GNU ld (GNU Binutils for Debian) 2.28 > Hit any key to stop autoboot: 0 > starting 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 > > Reset IDE: SATA PHY not ready for device 0 > ide_preinit failed > > Partition Map for USB device 0 -- Partition > Type: DOS > > Part Start Sector Num Sectors UUID > Type > 1 2048 7829504 > 2b44e28e-01 83 Boot > loading envs from usb 0 ... > ** File not found /boot/uEnv.txt ** > > no IDE devices available > running scan_disk ... > Scan device usb > device usb 0:1 > 1 bytes read in 189 ms (0 Bytes/s) > Found bootable drive on usb 0 > loading uImage ... > 4621824 bytes read in 478 ms (9.2 MiB/s) > loading uInitrd ... > 4594376 bytes read in 444 ms (9.9 MiB/s) > loading DTB /boot/dts/ox820-pogoplug-classic.dtb > ... > 7075 bytes read in 183 ms (37.1 KiB/s) > ## Booting kernel from Legacy Image at 60500000 > ... > Image Name: Linux-4.4.54-oxnas-tld-1 > Created: 2017-11-04 10:50:28 UTC > Image Type: ARM Linux Kernel Image > (uncompressed) > Data Size: 4621760 Bytes = 4.4 MiB > Load Address: 60008000 > Entry Point: 60008000 > Verifying Checksum ... OK > ## Loading init Ramdisk from Legacy Image at > 60e00000 ... > Image Name: initramfs-4.4.54-oxnas-tld-1 > Created: 2017-08-01 7:51:04 UTC > Image Type: ARM Linux RAMDisk Image (gzip > compressed) > Data Size: 4594312 Bytes = 4.4 MiB > Load Address: 60000000 > Entry Point: 60000000 > Verifying Checksum ... OK > ## Flattened Device Tree blob at 62c00000 > Booting using the fdt blob at 0x62c00000 > > > Starting kernel ... > > >>
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 07, 2017 02:59PM |
Registered: 5 years ago Posts: 5 |
[ 1.224471] Scanning device for bad blocks [ 1.293665] Bad eraseblock 806 at 0x0000064c0000Am I correct in thinking that since the eraseblock is 806, it's way out the range to worry about? Or is it the 1.293665 that's the number to be afraid of?
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 07, 2017 03:54PM |
Admin Registered: 12 years ago Posts: 17,629 |
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 07, 2017 03:55PM |
Registered: 6 years ago Posts: 310 |
> [ 1.224471] Scanning device for bad blocks > [ 1.293665] Bad eraseblock 806 at > 0x0000064c0000 >> Am I correct in thinking that since the
Re: Installing new U-Boot for Pogoplug V3 - from Arch u-boot November 07, 2017 04:19PM |
Registered: 5 years ago Posts: 5 |