Booting with kwboot February 25, 2019 04:21PM |
Registered: 7 years ago Posts: 337 |
Re: Booting with kwboot February 25, 2019 05:12PM |
Admin Registered: 14 years ago Posts: 19,547 |
[Type Ctrl-\ + c to quit]
Re: Booting with kwboot February 25, 2019 05:33PM |
Registered: 7 years ago Posts: 337 |
> [Type Ctrl-\ + c to quit] >
Re: Booting with kwboot February 25, 2019 05:50PM |
Admin Registered: 14 years ago Posts: 19,547 |
Re: Booting with kwboot February 26, 2019 07:20AM |
Registered: 7 years ago Posts: 337 |
System.map-4.12.1-kirkwood-tld-1 initrd.img-4.12.1-kirkwood-tld-1 uInitrd config-4.12.1-kirkwood-tld-1 linux-headers-4.12.1-kirkwood-tld-1_1.0_armel.deb zImage-4.12.1-kirkwood-tld-1 uImage
Re: Booting with kwboot February 26, 2019 12:03PM |
Registered: 7 years ago Posts: 337 |
cd /boot mkimage -A arm -O linux -T kernel -C none -a 0x00008000 -e 0x00008000 -n Linux-4.20.6-kirkwood-tld-1 -d vmlinuz-4.20.6-kirkwood-tld-1 uImage mkimage -A arm -O linux -T ramdisk -C gzip -a 0x00000000 -e 0x00000000 -n initramfs-4.20.6-kirkwood-tld-1 -d initrd.img-4.20.6-kirkwood-tld-1 uInitrd
Re: Booting with kwboot February 26, 2019 03:00PM |
Admin Registered: 14 years ago Posts: 19,547 |
> cd /boot > mkimage -A arm -O linux -T kernel -C none -a > 0x00008000 -e 0x00008000 -n > Linux-4.20.6-kirkwood-tld-1 -d > vmlinuz-4.20.6-kirkwood-tld-1 uImage > mkimage -A arm -O linux -T ramdisk -C gzip -a > 0x00000000 -e 0x00000000 -n > initramfs-4.20.6-kirkwood-tld-1 -d > initrd.img-4.20.6-kirkwood-tld-1 uInitrd >>
Quote
bodhi
Boot with the Debian rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 on USB. And then flash new u-boot.
Quote
https://forum.doozan.com/read.php?2,12096
Note: If this is your first time installation, then you need rootfs Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 (this has kernel 4.12.1-kirkwood-tld-1 already installed).
Re: Booting with kwboot February 26, 2019 04:43PM |
Registered: 7 years ago Posts: 337 |
Script started on Tue Feb 26 22:25:43 2019 You have mail. root@S07:~/projects/uboot # ssh 192.168.1.98 Last login: Tue Feb 26 22:18:25 2019 from 192.168.1.69 .]0;root@archlinux:~.[root@archlinux ~]# cd projects/u-boot/ .]0;root@archlinux:~/projects/u-boot.[root@archlinux u-boot]# sh bodhi Sending boot message. Please reboot the target....-.\.|./.-.\.|./.-.\.|./ Sending boot image... 0 % [......................................................................] 99 % [....................................] [Type Ctrl-\ + c to quit] . U-Boot 2017.07-tld-1 (Sep 05 2017 - 00:21:31 -0700) Seagate GoFlex Home SoC: Kirkwood 88F6281_A1 DRAM: 128 MiB WARNING: Caches not enabled NAND: 256 MiB In: serial Out: serial Err: serial Net: egiga0 88E1116 Initialized on egiga0 Using egiga0 device ARP Retry count exceeded; starting again ping failed; host 10.10.10.5 is not alive Hit any key to stop autoboot: 3 ... 2 ... 1 ... 0 starting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 2 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Reset IDE: ide_preinit failed USB device 0: Device 0: Vendor: Lexar Rev: 8.07 Prod: USB Flash Drive Type: Removable Hard Disk Capacity: 15276.0 MB = 14.9 GB (31285248 x 512) ... is now current device usb found on device 0 Checking for: /boot/uEnv.txt ... 747 bytes read in 799 ms (0 Bytes/s) Loaded environment from /boot/uEnv.txt Checking if uenvcmd is set ... ** File not found /boot/zImage ** ** ext4fs_devread read error - block ** SI ext2fs read block (indir 1)failed. ** No kernel found USB device 1: unknown device Device 0: device type unknown ... is now current device ide found on device 0 Checking for: /boot/uEnv.txt ... ** Bad device ide 0 ** ** Bad device ide 0 ** ** Bad device ide 0 ** No kernel found Device 1: device type unknown ... is now current device ide found on device 1 Checking for: /boot/uEnv.txt ... ** Bad device ide 1 ** ** Bad device ide 1 ** ** Bad device ide 1 ** No kernel found Device 2: unknown device Trying to boot from NAND ... ubi0: attaching mtd1 ubi0: scanning is finished UBI init error 22 Error reading superblock on volume 'ubi0:rootfs' errno=-19! ubifsmount - mount UBIFS volume Usage: ubifsmount <volume-name> - mount 'volume-name' volume GoFlexHome> printenv baudrate=115200 bootcmd=run startboot; run bootubi bootdelay=3 bootdir=/boot bootfilem=uImage bootfilez=zImage bootm=run load_debian; echo Booting from ${type} ${disk}:1 ...; bootm ${uimage_addr} ${initrd_addr} ${fdt_addr} bootpart=1:1 bootubi=echo Trying to boot from NAND ...; if run mountubi; then ubifsload ${loadaddr} /boot/zImage;ubifsload ${fdtaddr} /boot/dtbs/${fdtfile}; ubifsumount; setenv boota rgs console=${console} ubi.mtd=1 root=ubi0:rootfs ro rootfstype=ubifs rootwait ${mtdparts}; bootz ${loadaddr} - ${fdtaddr}; fi console=ttyS0,115200 devnum=2 ethact=egiga0 ethaddr=00:10:75:28:cc:00 fdt_addr=0x1c00000 fdt_file=/boot/dts/kirkwood-goflexhome.dtb fdtaddr=0x800000 fdtdir=/boot/dts fdtfile=kirkwood-goflexhome.dtb fileaddr=810000 filesize=2eb initrd=/boot/uInitrd initrd_addr=0x1100000 ipaddr=192.168.1.23 load_debian=setenv type usb; setenv disk 0; run set_bootargs; echo Running loadfdt ...;run loadfdt; echo Running loaduinitrd ...;run loaduinitrd; echo Running loaduimage ...; run loaduimage loadaddr=0x810000 loadfdt=ext2load ${type} ${disk}:1 ${fdt_addr} ${fdt_file} loadimage=load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilez} || load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/${bootfilem} loadrd=load ${devtype} ${bootpart} ${rdaddr} ${bootdir}/${rdfile} loaduimage=ext2load ${type} ${disk}:1 ${uimage_addr} ${uimage} loaduinitrd=ext2load ${type} ${disk}:1 ${initrd_addr} ${initrd} mainargs=setenv bootargs console=${console} ${mtdparts} root=${root} rw rootwait ${optargs} ${ncargs} mountubi=ubi part rootfs; ubifsmount ubi0:rootfs mtddevname=u-boot mtddevnum=0 mtdids=nand0=orion_nand mtdparts=mtdparts=orion_nand:1M(u-boot),-(rootfs) ncip=10.10.10.5 ncipk=10.10.10.4 netconsole=on partition=nand0,0 preboot=if env exists netconsole && test ${netconsole} = on; then if ping ${ncip}; then setenv stdin nc; setenv stdout nc; setenv stderr nc; version; if env exists ncarg susr; then echo ncargs has been defined by user; setenv ncargs ${ncargsusr}; else setenv ncargs ignore_loglevel netconsole=6665@${ipaddr}/eth0,6666@${ncipk}/; fi; fi; el se echo Netconsole has been turned off.; echo To turn it on, set netconsole variable to on.; setenv stdin; setenv stdout; setenv stderr; setenv ncargs; fi rdaddr=0x1100000 rdfile=initramfs-linux.img serverip=192.168.1.2 set_bootargs=setenv bootargs console=$console root=LABEL=rootfs rootdelay=10 $mtdparts startboot=usb start; ide reset; for devtype in usb ide; do setenv devnum 0; while ${devtype} dev ${devnum}; do echo ${devtype} found on device ${devnum}; setenv bootpart ${devnum}:1; echo Checking for: ${bootdir}/uEnv.txt ...; if test -e ${devtype} ${bootpart} ${bootdir}/uEnv.txt; then load ${devtype} ${bootpart} ${loadaddr} ${bootdir}/ uEnv.txt; env import -t ${loadaddr} ${filesize}; echo Loaded environment from ${bootdir}/uEnv.txt; echo Checking if uenvcmd is set ...; if test -n ${uenvcmd}; then echo Running uenvcmd ...; run uenvcmd; fi; fi; if run loadimage; then if env exists root; then echo root has been defined by user; else part uuid ${devtype} ${bootpart} uuid; setenv root PARTUUID=${uuid}; fi; run mainargs; if run loadfdt; then if run loadrd; then bootz ${loadaddr} ${rdaddr}:${filesize} ${fdtaddr}; else bootz ${loadaddr} - ${ fdtaddr}; fi; else if run loadrd; then bootm ${loadaddr} ${rdaddr}:${filesize}; else bootm ${loadaddr}; fi; fi; else echo No kernel found; fi; setexpr devnum ${devnum} + 1; done; done; uimage=/boot/uImage uimage_addr=0x800000 Environment size: 3560/131068 bytes GoFlexHome> .]0;root@archlinux:~/projects/u-boot.[root@archlinux u-boot]# exit logout
Re: Booting with kwboot February 27, 2019 02:28AM |
Admin Registered: 14 years ago Posts: 19,547 |
Quote
https://forum.doozan.com/read.php?3,12381
8. Flashing default u-boot envs image (if you are upgrading from 2016.05-tld-1 u-boot, you can skip this step 8).
setenv dtb_file '/boot/dts/kirkwood-goflexnet.dtb'should be
setenv dtb_file '/boot/dts/kirkwood-goflexhome.dtb'
Re: Booting with kwboot February 27, 2019 03:04AM |
Registered: 7 years ago Posts: 337 |
Re: Booting with kwboot February 27, 2019 04:06AM |
Admin Registered: 14 years ago Posts: 19,547 |
Quote
d. Flash u-boot envs to NAND location 0xC0000.
Quote
8. Flashing default u-boot envs image (if you are upgrading from 2016.05-tld-1 u-boot, you can skip this step 8).
As described in step 1, u-boot envs must be defined in /etc/fw_env.config as
# MTD device name Device offset Env. size Flash sector size Number of sectors
/dev/mtd0 0xc0000 0x20000 0x20000
This default envs image supports booting with multiple disk drives (and hubs) attached. The disk drives could be any type (usb, sata, sd card). The scanning logic and default envs were set to automatically boot the box with the following required configuration:
For whatever reason, if you can't set up your configuration to satisfy the following 4 requirements, then don't flash this defaut envs image. It might not boot properly. In this case, section C below can be used to tailor the envs to your specific configuration.
r1. There must be only one partition among all partitions from all drives that contains the kernel files. The 2 kernel files are /boot/uImage and /boot/uInitrd.
r2. The partition that contains the 2 kernel files must be partition 1 in a disk drive
r3. The partition that contains the rootfs must be labeled rootfs
r4. The rootfs partition is recommended to be type Ext3 (this is not a hard requirement, ext4 should boot OK, but Ext3 will ensure no problem).
So the bottom line is if you have only one rootfs in a single Ext3 partition, which is labeled as rootfs, then you're all set.
a. Download the default u-boot envs at Dropbox:
uboot.2016.05-tld-1.environment.bodhi.tar
md5:
3823eef10011b864859d31a76470e0e3
sha256:
c8db95a4225e8d78bdaaaa372bd5a87e4b98f3448dd9c62fc96c72b2df1a997c
This tarball includes 3 files:
uboot.2016.05-tld-1.environment.img (the default envs image to be flashed)
uboot.2016.05-tld-1.environment (the content of the default envs in text format)
uboot.2016.05-tld-1.environment.64K.img (small envs image to be flashed on HP T5325 only).
Re: Booting with kwboot February 27, 2019 01:57PM |
Registered: 7 years ago Posts: 337 |
# # *********************** adjust /dev/sdc to suit otherwise you will format the wrong disk!!!!!!!!! *********************** # # #create usb stick with single ext3 partition sfdisk /dev/sdc << EOF ; EOF #label as rootfs mkfs.ext3 -L rootfs /dev/sdc1 #mount usb stick mkdir /mnt/uboot mount /dev/sdc1 /mnt/uboot cd /tmp #get Debian rootfs wget http://bitly.com/2gW5oGg -O Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 #extract Debian rootfs tar jxf Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2 -C /mnt/uboot #get environment wget https://bitly.com/1sMwD7b -O uboot.2016.05-tld-1.environment.bodhi.tar. #extract environment to /boot. tar xf uboot.2016.05-tld-1.environment.bodhi.tar -C /mnt/uboot/boot uboot.2016.05-tld-1.environment
On another Linux box, mount the Debian rootfs that you meant to run on this box and put the attached u-boot script in the /boot folder (if it was mounted at /media/sdb1): cp -a uboot.2016.05-tld-1.environment.scr /media/sdb1/boot/ kwboot this box and interrupt serial console, run the script loading commands: usb start ext2load usb 0:1 0x800000 /boot/uboot.2016.05-tld-1.environment.scr source 0x800000 printenv
Re: Booting with kwboot February 28, 2019 01:06AM |
Admin Registered: 14 years ago Posts: 19,547 |
Re: Booting with kwboot February 28, 2019 04:01AM |
Registered: 7 years ago Posts: 337 |
Re: Booting with kwboot February 28, 2019 04:20AM |
Admin Registered: 14 years ago Posts: 19,547 |
Re: Booting with kwboot March 02, 2019 01:02PM |
Registered: 7 years ago Posts: 337 |
1. uBoot envs config should be defined as followed in your /etc/fw_env.config cat /etc/fw_env.config # MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd0 0xc0000 0x20000 0x20000 - And your mtd partitions should be: cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "u-boot" mtd1: 00400000 00020000 "uImage" mtd2: 02000000 00020000 "rootfs" mtd3: 0db00000 00020000 "data"
root@debian:~# cat /etc/fw_env.config # MTD device name Device offset Env. size Flash sector size Number of sectors /dev/mtd0 0xc0000 0x20000 0x20000 root@debian:~# cat /proc/mtd dev: size erasesize name mtd0: 00100000 00020000 "u-boot" mtd1: 0ff00000 00020000 "ubi"
6. Erase mtd0 flash_erase /dev/mtd0 0 4 Expected output: Erase Total 4 Units Performing Flash Erase of length 131072 at offset 0x60000 done
root@debian:~# flash_erase /dev/mtd0 0 4 Erasing 128 Kibyte @ 7f5d2f5c00000064 -- 4 % complete
Re: Booting with kwboot March 02, 2019 07:41PM |
Admin Registered: 14 years ago Posts: 19,547 |
> root@debian:~# flash_erase /dev/mtd0 0 4 > Erasing 128 Kibyte @ 7f5d2f5c00000064 -- 4 % > complete >>
Re: Booting with kwboot March 03, 2019 01:02PM |
Registered: 7 years ago Posts: 337 |
Re: Booting with kwboot March 03, 2019 03:58PM |
Admin Registered: 14 years ago Posts: 19,547 |
Re: Booting with kwboot March 03, 2019 04:17PM |
Admin Registered: 14 years ago Posts: 19,547 |
ls -lh <image> ls -l <image>
Re: Booting with kwboot March 09, 2019 01:30PM |
Registered: 7 years ago Posts: 337 |
> ls -lh <image> > ls -l <image> >
Re: Booting with kwboot March 11, 2019 02:51AM |
Registered: 7 years ago Posts: 337 |
> ls -lh <image> > ls -l <image> >
Re: Booting with kwboot March 11, 2019 04:22AM |
Admin Registered: 14 years ago Posts: 19,547 |
-rwxr-xr-x 1 root root 512K Jul 26 2017 uboot.2017.05-tld-2.goflexhome.mtd0.kwb
Re: Booting with kwboot March 11, 2019 06:12AM |
Registered: 7 years ago Posts: 337 |
> -rwxr-xr-x 1 root root 512K Jul 26 2017 > uboot.2017.05-tld-2.goflexhome.mtd0.kwb >>
Re: Booting with kwboot March 11, 2019 06:30AM |
Admin Registered: 14 years ago Posts: 19,547 |
Re: Booting with kwboot March 11, 2019 07:52PM |
Registered: 7 years ago Posts: 337 |
Re: Booting with kwboot March 11, 2019 09:32PM |
Admin Registered: 14 years ago Posts: 19,547 |
fw_setenv preboot