Dual boot with Openwrt on NAND April 02, 2018 06:10AM |
Registered: 11 years ago Posts: 58 |
U-Boot 2014.10 (Jan 02 2016 - 02:33:53)Seagate FreeAgent DockStar SoC: Kirkwood 88F6281_A0 DRAM: 128 MiB WARNING: Caches not enabled NAND: 256 MiB In: serial Out: serial Err: serial Net: egiga0 88E1116 Initialized on egiga0Openwrt is running fine, but I wanted to use it as dual boot system, i.e. when there is a USB stick inserted, it should boot it, but is does not.
Re: Dual boot with Openwrt on NAND April 02, 2018 09:35AM |
Registered: 11 years ago Posts: 58 |
Hit any key to stop autoboot: 0 UBI: attaching mtd1 to ubi0 UBI: scanning is finished UBI: attached mtd1 (name "mtd=3", size 254 MiB) to ubi0 UBI: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes UBI: min./max. I/O unit sizes: 2048/2048, sub-page size 512 UBI: VID header offset: 512 (aligned 512), data offset: 2048 UBI: good PEBs: 2031, bad PEBs: 1, corrupted PEBs: 0 UBI: user volume: 2, internal volumes: 1, max. volumes count: 128 UBI: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 0 UBI: available PEBs: 0, total reserved PEBs: 2031, PEBs reserved for bad PEB handling: 39 Loading file '/boot/zImage' to addr 0x00800000 with size 1739190 (0x001a89b6)... Done Unmounting UBIFS volume rootfs! Kernel image @ 0x800000 [ 0x000000 - 0x1a61b0 ] Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 3.18.23 (buildbot@builder1) (gcc version 4.8.3 (OpenWrt/Linaro GCC 4.8-2014.04 r47269) ) #1 Sun Jan 31 11:40:01 CET 2016
Re: Dual boot with Openwrt on NAND April 02, 2018 03:16PM |
Admin Registered: 13 years ago Posts: 18,900 |
Re: Dual boot with Openwrt on NAND April 02, 2018 03:20PM |
Registered: 11 years ago Posts: 58 |
Re: Dual boot with Openwrt on NAND April 02, 2018 07:30PM |
Admin Registered: 13 years ago Posts: 18,900 |
Re: Dual boot with Openwrt on NAND April 03, 2018 01:10AM |
Registered: 11 years ago Posts: 58 |
Re: Dual boot with Openwrt on NAND April 03, 2018 02:55PM |
Registered: 11 years ago Posts: 58 |
root@OpenWrt-Dockstar:/tmp/tools# cat /proc/mtd dev: size erasesize name mtd0: 000e0000 00020000 "uboot" mtd1: 00020000 00020000 "uboot_env" mtd2: 00100000 00020000 "second_stage_uboot" mtd3: 0fe00000 00020000 "root"
Re: Dual boot with Openwrt on NAND April 03, 2018 06:48PM |
Admin Registered: 13 years ago Posts: 18,900 |
Re: Dual boot with Openwrt on NAND April 06, 2018 11:08AM |
Registered: 11 years ago Posts: 58 |
root@OpenWrt-Dockstar:/tmp/tools# ls busybox flash_erase fw_printenv nandwrite e2fsck fw_env.config nanddump root@OpenWrt-Dockstar:/tmp/tools# ./flash_erase /dev/mtd0 0 4 /bin/ash: ./flash_erase: not found root@OpenWrt-Dockstar:/tmp/tools# /tmp/tools/flash_erase /dev/mtd0 0 4 /bin/ash: /tmp/tools/flash_erase: not found root@OpenWrt-Dockstar:/tmp/tools#
mw 0x800000 0xffff 0x80000 tftpboot uboot.2017.07-tld-1.dockstar.mtd0.kwb nand erase 0x000000 0x100000 nand write.e 0x800000 0x000000 0x80000 setenv bootcmd nand read.e 0x2000000 0x100000 0x400000\; go 0x2000000 saveenv
Re: Dual boot with Openwrt on NAND April 06, 2018 05:01PM |
Admin Registered: 13 years ago Posts: 18,900 |
Re: Dual boot with Openwrt on NAND April 08, 2018 07:04AM |
Registered: 11 years ago Posts: 58 |
root@OpenWrt-Dockstar:/tmp# /usr/sbin/flash_erase /dev/mtd0 0 4 /bin/ash: /usr/sbin/flash_erase: not found
Re: Dual boot with Openwrt on NAND April 08, 2018 05:13PM |
Admin Registered: 13 years ago Posts: 18,900 |
Quote
Updated 24 Jul 2017:
Basic Debian stretch Kirkwood rootfs for most Kirwood plugs:
- tarball size: 188M
- install size: 488M
- The init system used in this rootfs is sysvinit . To boot with systemd, see note 2 below.
- Installed packages: nano, avahi, ntp, busybox-syslogd (log to RAM), htop, isc-dhcp-client, dialog, bzip2, nfs server/client, iperf, ethtool, sysvinit-core, sysvinit, and sysvinit-utils.
- see LED controls in /etc/rc.local, and /etc/init.d/halt
- see some useful aliases in /root/.profile
- root password: root
Download at Dropbox:
Debian-4.12.1-kirkwood-tld-1-rootfs-bodhi.tar.bz2
md5:
bf3d29569943875df348fb5ca03b348c
sha256:
4ed5714fdb123cdb40e973f3d0754e91cd199b75a9874018f2b5dc9cfa8ae8bb
And remember to check the hash of what you download, as always.
Re: Dual boot with Openwrt on NAND April 10, 2018 03:27PM |
Registered: 11 years ago Posts: 58 |
Re: Dual boot with Openwrt on NAND April 10, 2018 09:37PM |
Admin Registered: 13 years ago Posts: 18,900 |
Re: Dual boot with Openwrt on NAND April 11, 2018 03:56PM |
Registered: 11 years ago Posts: 58 |
U-Boot 2014.10 (Jan 02 2016 - 02:33:53)Seagate FreeAgent DockStar SoC: Kirkwood 88F6281_A0 DRAM: 128 MiB WARNING: Caches not enabled NAND: 256 MiB In: serial Out: serial Err: serial Net: egiga0 88E1116 Initialized on egiga0 Hit any key to stop autoboot: 0 dockstar => printenv baudrate=115200 bootargs_root=ubi.mtd=3 root=ubi0:rootfs rootfstype=ubifs rw bootcmd=setenv bootargs ${console} ${mtdparts} ${bootargs_root}; ubi part root; ubifsmount ubi:rootfs; run ubiboot_n1 bootdelay=3 console=console=ttyS0,115200 ethact=egiga0 ethaddr=00:10:75:1A:DD:17 fdt=/boot/dockstar.dtb fileaddr=800000 filesize=44e800 ipaddr=192.168.180.5 kernel=/boot/zImage mtddevname=uboot mtddevnum=0 mtdids=nand0=orion_nand mtdparts=mtdparts=orion_nand:0xe0000@0x0(uboot),0x20000@0xe0000(uboot_env),0x100 000@0x100000(second_stage_uboot),-@0x200000(root) netmask=255.255.255.0 partition=nand0,0 serverip=192.168.180.21 stderr=serial stdin=serial stdout=serial ubiboot_n1=ubifsload 0x800000 ${kernel}; ubifsumount; bootz 0x800000 Environment size: 776/131068 bytes dockstar =>
Re: Dual boot with Openwrt on NAND April 12, 2018 12:00AM |
Admin Registered: 13 years ago Posts: 18,900 |
cp -a uboot.2016.05-tld-1.environment.scr /media/sdb1/boot/
usb start ext2load usb 0:1 0x800000 /boot/uboot.2016.05-tld-1.environment.scr source 0x800000 printenv
setenv devices 'usb' setenv ethaddr xx:xx:xx:xx:xx:xx setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb' boot
Re: Dual boot with Openwrt on NAND April 12, 2018 12:49PM |
Registered: 11 years ago Posts: 58 |
dockstar => usb start (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 4 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found dockstar => ext2load usb 0:1 0x800000 /boot/uboot.2016.05-tld-1.environment.scr 3232 bytes read in 301 ms (9.8 KiB/s) dockstar => source 0x800000 ## Executing script at 00800000 ** Too many args (max. 16) ** ** Too many args (max. 16) ** ** Too many args (max. 16) ** ** Too many args (max. 16) ** ** Too many args (max. 16) ** ** Too many args (max. 16) ** ** Too many args (max. 16) ** dockstar =>
Re: Dual boot with Openwrt on NAND April 12, 2018 05:21PM |
Admin Registered: 13 years ago Posts: 18,900 |
Re: Dual boot with Openwrt on NAND April 15, 2018 01:00AM |
Admin Registered: 13 years ago Posts: 18,900 |
setenv bootdev usb setenv device 0:1 setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial' setenv load_dtb_addr 0x1c00000 setenv load_initrd_addr 0x1100000 setenv load_uimage_addr 0x800000 setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb' setenv load_dtb 'echo loading DTB $dtb_file ...; load $bootdev $device $load_dtb_addr $dtb_file' setenv load_initrd 'echo loading uInitrd ...; load $bootdev $device $load_initrd_addr /boot/uInitrd' setenv load_uimage 'echo loading uImage ...; load $bootdev $device $load_uimage_addr /boot/uImage' setenv bootcmd_exec 'run load_uimage; run load_initrd; run load_dtb; bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr' setenv bootcmd 'usb reset; run set_bootargs; run bootcmd_exec; reset'
boot
Re: Dual boot with Openwrt on NAND April 16, 2018 02:29PM |
Registered: 11 years ago Posts: 58 |
... dockstar => boot (Re)start USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 4 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found loading uImage ... Unknown command 'load' - try 'help' loading uInitrd ... Unknown command 'load' - try 'help' loading DTB $dtb_file ... Unknown command 'load' - try 'help' bootm - boot application image from memory Usage: bootm [addr [arg ...]] - boot application image stored in memory passing arguments 'arg ...'; when booting a Linux kernel, 'arg' can be the address of an initrd image When booting a Linux kernel which requires a flat device-tree a third argument is required which is the address of the device-tree blob. To boot that kernel without an initrd image, use a '-' for the second argument. If you do not pass a third a bd_info struct will be passed instead For the new multi component uImage format (FIT) addresses must be extened to include component or configuration unit name: addr:<subimg_uname> - direct component image specification addr#<conf_uname> - configuration specification Use iminfo command to get the list of existing component images and configurations. Sub-commands to do part of the bootm sequence. The sub-commands must be issued in the order below (it's ok to not issue all sub-commands): start [addr [arg ...]] loados - load OS image ramdisk - relocate initrd, set env initrd_start/initrd_end fdt - relocate flat device tree cmdline - OS specific command line processing/setup bdt - OS specific bd_t processing prep - OS specific prep before relocation or go go - start OS resetting ... U-Boot 2014.10 (Jan 02 2016 - 02:33:53)Seagate FreeAgent DockStar SoC: Kirkwood 88F6281_A0 DRAM: 128 MiB ...
Re: Dual boot with Openwrt on NAND April 16, 2018 03:15PM |
Registered: 10 years ago Posts: 94 |
setenv serverip <ip_von_ipconfig>
nand info nand bad# Wenn die Zahl größer ist als "0x00100000" ist das kein Problem!!
tftpboot 0x800000 uboot.2017.07-tld-1.dockstar.mtd0.kwb nand erase 0 0x80000 nand write.e 0x800000 0x0 0x80000--------------------------------------------------------------------------------
reset
tftpboot 0x800000 uboot.2016.05-tld-1.environment.img nand erase 0xc0000 0x20000 nand write.e 0x800000 0xc0000 0x20000
reset
setenv ethaddr <ethaddr Userbox> setenv arcNumber 2998 setenv machid setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb' saveenv reset# fertich das wars mit uboot und envs
# @bootloader setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)' setenv set_bootargs_lede 'setenv bootargs console=ttyS0,115200 $mtdparts' setenv bootcmd_lede 'run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000' setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede' setenv bootcmd_exec 'if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi' saveenv # Achtung hier wird der nand Speicher gelöscht und vorbereitet für LEDE Installation! nand erase.part ubi
usb reset; fatload usb 0 0x800000 lede-kirkwood-dockstar-initramfs-uImage; bootm 0x800000
opkg update opkg install ca-bundle ca-certificates libustream-openssl luci-ssl ubi-utils kmod-mtd-rw
Re: Dual boot with Openwrt on NAND April 16, 2018 05:39PM |
Admin Registered: 13 years ago Posts: 18,900 |
> ... > dockstar => boot > (Re)start USB... > USB0: USB EHCI 1.00 > scanning bus 0 for devices... 4 USB Device(s) > found > scanning usb for storage devices... 1 > Storage Device(s) found > loading uImage ... > Unknown command 'load' - try 'help' > loading uInitrd ... > Unknown command 'load' - try 'help' > loading DTB $dtb_file ... > Unknown command 'load' - try 'help' > bootm - boot application image from memory > > Usage: > bootm [addr [arg ...]] > - boot application image stored in memory > passing arguments 'arg ...'; when booting > a Linux kernel, > 'arg' can be the address of an initrd > image > When booting a Linux kernel which requires > a flat device-tree > a third argument is required which is the > address of the > device-tree blob. To boot that kernel > without an initrd image, > use a '-' for the second argument. If you > do not pass a third > a bd_info struct will be passed instead > > For the new multi component uImage format (FIT) > addresses > must be extened to include component or > configuration unit name: > addr:<subimg_uname> - direct component > image specification > addr#<conf_uname> - configuration > specification > Use iminfo command to get the list of > existing component > images and configurations. > > Sub-commands to do part of the bootm sequence. > The sub-commands must be > issued in the order below (it's ok to not issue > all sub-commands): > start [addr [arg ...]] > loados - load OS image > ramdisk - relocate initrd, set env > initrd_start/initrd_end > fdt - relocate flat device tree > cmdline - OS specific command line > processing/setup > bdt - OS specific bd_t processing > prep - OS specific prep before > relocation or go > go - start OS > resetting ... > > > U-Boot 2014.10 (Jan 02 2016 - 02:33:53)Seagate > FreeAgent DockStar > > SoC: Kirkwood 88F6281_A0 > DRAM: 128 MiB > ... >>
setenv bootdev usb setenv device 0:1 setenv set_bootargs 'setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 earlyprintk=serial' setenv load_dtb_addr 0x1c00000 setenv load_initrd_addr 0x1100000 setenv load_uimage_addr 0x800000 setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb' setenv load_dtb 'echo loading DTB $dtb_file ...; ext2load $bootdev $device $load_dtb_addr $dtb_file' setenv load_initrd 'echo loading uInitrd ...; ext2load $bootdev $device $load_initrd_addr /boot/uInitrd' setenv load_uimage 'echo loading uImage ...; ext2load $bootdev $device $load_uimage_addr /boot/uImage' setenv bootcmd_exec 'run load_uimage; run load_initrd; run load_dtb; bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr' setenv bootcmd 'usb reset; run set_bootargs; run bootcmd_exec; reset'
boot
Re: Dual boot with Openwrt on NAND April 19, 2018 01:21PM |
Registered: 11 years ago Posts: 58 |
root@LEDE:/# opkg install ca-bundle ca-certificates libustream-openssl luci-ssl ubi-utils kmod-mtd-rw Installing ca-bundle (20170717) to root... Installing ca-certificates (20170717) to root... Installing libustream-openssl (2016-07-02-ec80adaa-4) to root... Installing luci-ssl (git-18.098.72829-575e327-1) to root... Package ubi-utils (1.5.2-1) installed in root is up to date. Installing kmod-mtd-rw (4.4.92+git-20160214-1) to root... Collected errors: * verify_pkg_installable: Only have 0kb available on filesystem /overlay, pkg ca-bundle needs 132 * opkg_install_cmd: Cannot install package ca-bundle. * verify_pkg_installable: Only have 0kb available on filesystem /overlay, pkg ca-certificates needs 143 * opkg_install_cmd: Cannot install package ca-certificates. * verify_pkg_installable: Only have 0kb available on filesystem /overlay, pkg libustream-openssl needs 4 * opkg_install_cmd: Cannot install package libustream-openssl. * verify_pkg_installable: Only have 0kb available on filesystem /overlay, pkg luci-ssl needs 1 * opkg_install_cmd: Cannot install package luci-ssl. * verify_pkg_installable: Only have 0kb available on filesystem /overlay, pkg kmod-mtd-rw needs 2 * opkg_install_cmd: Cannot install package kmod-mtd-rw. root@LEDE:/# [ 55.777780] random: nonblocking pool is initializedIt seems, I am running out of file space.
Re: Dual boot with Openwrt on NAND April 19, 2018 05:21PM |
Admin Registered: 13 years ago Posts: 18,900 |
Re: Dual boot with Openwrt on NAND April 21, 2018 12:18PM |
Registered: 11 years ago Posts: 58 |
root@LEDE:/# cat /proc/mtd dev: size erasesize name mtd0: 000e0000 00020000 "u-boot" mtd1: 00100000 00020000 "u-boot environment" mtd2: 00200000 00020000 "second stage u-boot" mtd3: 0fe00000 00020000 "ubi"
DockStar> usb reset; fatload usb 0 0x800000 lede-kirkwood-dockstar-initramfs-uIm age; bootm 0x800000 resetting USB... USB0: USB EHCI 1.00 scanning bus 0 for devices... 4 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found reading lede-kirkwood-dockstar-initramfs-uImage 3219188 bytes read in 209 ms (14.7 MiB/s) ## Booting kernel from Legacy Image at 00800000 ... Image Name: ARM LEDE Linux-4.4.92 Created: 2017-10-17 17:46:20 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 3219124 Bytes = 3.1 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK Loading Kernel Image ... OK Starting kernel ... [ 0.000000] Booting Linux on physical CPU 0x0 [ 0.000000] Linux version 4.4.92 (buildbot@builds-02.infra.lede-project.org) (gcc version 5.4.0 (LEDE GCC 5.4.0 r3103-1b51a49) ) #0 Tue Oct 17 17:46:20 2017 [ 0.000000] CPU: Feroceon 88FR131 [56251311] revision 1 (ARMv5TE), cr=0005397 f [ 0.000000] CPU: VIVT data cache, VIVT instruction cache [ 0.000000] Machine model: Seagate FreeAgent Dockstar [ 0.000000] Memory policy: Data cache writeback [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pag es: 32512 [ 0.000000] Kernel command line: console=ttyS0,115200n8 earlyprintk root=/dev /sda1 rootdelay=10 [ 0.000000] PID hash table entries: 512 (order: -1, 2048 bytes) [ 0.000000] Dentry cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Inode-cache hash table entries: 8192 (order: 3, 32768 bytes) [ 0.000000] Memory: 119600K/131072K available (4082K kernel code, 142K rwdata , 652K rodata, 5128K init, 201K bss, 11472K reserved, 0K cma-reserved) [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xffc00000 - 0xfff00000 (3072 kB) [ 0.000000] vmalloc : 0xc8800000 - 0xff800000 ( 880 MB) [ 0.000000] lowmem : 0xc0000000 - 0xc8000000 ( 128 MB) [ 0.000000] modules : 0xbf000000 - 0xc0000000 ( 16 MB) [ 0.000000] .text : 0xc0008000 - 0xc04a7db4 (4736 kB) [ 0.000000] .init : 0xc04a8000 - 0xc09aa000 (5128 kB) [ 0.000000] .data : 0xc09aa000 - 0xc09cdbc8 ( 143 kB) [ 0.000000] .bss : 0xc09cdbc8 - 0xc0a0027c ( 202 kB) [ 0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1 [ 0.000000] NR_IRQS:16 nr_irqs:16 16 [ 0.000000] clocksource: orion_clocksource: mask: 0xffffffff max_cycles: 0xff ffffff, max_idle_ns: 9556302233 ns [ 0.000009] sched_clock: 32 bits at 200MHz, resolution 5ns, wraps every 10737 418237ns [ 0.000085] Calibrating delay loop... 1191.11 BogoMIPS (lpj=5955584) [ 0.090090] pid_max: default: 32768 minimum: 301 [ 0.090205] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.090225] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes) [ 0.090744] CPU: Testing write buffer coherency: ok [ 0.091086] Setting up static identity map for 0x81e0 - 0x821c [ 0.091330] mvebu-soc-id: MVEBU SoC ID=0x6281, Rev=0x2 [ 0.096044] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, ma x_idle_ns: 19112604462750000 ns [ 0.096071] futex hash table entries: 256 (order: -1, 3072 bytes) [ 0.096157] pinctrl core: initialized pinctrl subsystem [ 0.097227] NET: Registered protocol family 16 [ 0.097619] DMA: preallocated 256 KiB pool for atomic coherent allocations [ 0.098347] cpuidle: using governor ladder [ 0.098696] Feroceon L2: Enabling L2 [ 0.098741] Feroceon L2: Cache support initialised. [ 0.099014] [Firmware Info]: /ocp@f1000000/ethernet-controller@72000/ethernet 0-port@0: local-mac-address is not set [ 0.116643] SCSI subsystem initialized [ 0.117367] usbcore: registered new interface driver usbfs [ 0.117443] usbcore: registered new interface driver hub [ 0.117507] usbcore: registered new device driver usb [ 0.118335] clocksource: Switched to clocksource orion_clocksource [ 0.119226] NET: Registered protocol family 2 [ 0.119824] TCP established hash table entries: 1024 (order: 0, 4096 bytes) [ 0.119849] TCP bind hash table entries: 1024 (order: 0, 4096 bytes) [ 0.119868] TCP: Hash tables configured (established 1024 bind 1024) [ 0.119924] UDP hash table entries: 256 (order: 0, 4096 bytes) [ 0.119946] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes) [ 0.120138] NET: Registered protocol family 1 [ 0.206758] Crashlog allocated RAM at address 0x3f00000 [ 0.219357] squashfs: version 4.0 (2009/01/31) Phillip Lougher [ 0.219372] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORIT Y) (c) 2001-2006 Red Hat, Inc. [ 0.222071] io scheduler noop registered [ 0.222085] io scheduler deadline registered (default) [ 0.223200] kirkwood-pinctrl f1010000.pin-controller: registered pinctrl driv er [ 0.223762] irq: Cannot allocate irq_descs @ IRQ32, assuming pre-allocated [ 0.224115] irq: Cannot allocate irq_descs @ IRQ64, assuming pre-allocated [ 0.255553] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled [ 0.258590] console [ttyS0] disabled [ 0.258661] f1012000.serial: ttyS0 at MMIO 0xf1012000 (irq = 25, base_baud = 12500000) is a 16550A [ 0.706021] console [ttyS0] enabled [ 0.710954] nand: device found, Manufacturer ID: 0x2c, Chip ID: 0xda [ 0.717335] nand: Micron MT29F2G08AAD [ 0.721042] nand: 256 MiB, SLC, erase size: 128 KiB, page size: 2048, OOB siz e: 64 [ 0.728670] Scanning device for bad blocks [ 0.861721] Bad eraseblock 1697 at 0x00000d420000 [ 0.893060] 4 ofpart partitions found on MTD device orion_nand [ 0.898937] Creating 4 MTD partitions on "orion_nand": [ 0.904098] 0x000000000000-0x0000000e0000 : "u-boot" [ 0.910819] 0x0000000e0000-0x0000001e0000 : "u-boot environment" [ 0.917954] 0x000000100000-0x000000300000 : "second stage u-boot" [ 0.925194] 0x000000200000-0x000010000000 : "ubi" [ 0.932027] libphy: orion_mdio_bus: probed [ 0.936953] mv643xx_eth: MV-643xx 10/100/1000 ethernet driver version 1.4 [ 0.945386] mv643xx_eth_port mv643xx_eth_port.0 eth0: port 0 with MAC address 00:10:75:1a:dd:17 [ 0.954204] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 0.960781] ehci-pci: EHCI PCI platform driver [ 0.965309] ehci-platform: EHCI generic platform driver [ 0.970703] ehci-orion: EHCI orion driver [ 0.974883] orion-ehci f1050000.ehci: EHCI Host Controller [ 0.980444] orion-ehci f1050000.ehci: new USB bus registered, assigned bus nu mber 1 [ 0.988266] orion-ehci f1050000.ehci: irq 29, io mem 0xf1050000 [ 1.008355] orion-ehci f1050000.ehci: USB 2.0 started, EHCI 1.00 [ 1.015096] hub 1-0:1.0: USB hub found [ 1.019083] hub 1-0:1.0: 1 port detected [ 1.023475] usbcore: registered new interface driver usb-storage [ 1.338348] usb 1-1: new high-speed USB device number 2 using orion-ehci [ 1.490434] hub 1-1:1.0: USB hub found [ 1.494532] hub 1-1:1.0: 4 ports detected [ 1.778347] usb 1-1.1: new high-speed USB device number 3 using orion-ehci [ 1.890871] usb-storage 1-1.1:1.0: USB Mass Storage device detected [ 1.897504] scsi host0: usb-storage 1-1.1:1.0 [ 1.978349] usb 1-1.3: new high-speed USB device number 4 using orion-ehci [ 2.038346] rtc-mv f1010300.rtc: internal RTC not ticking [ 2.043873] i2c /dev entries driver [ 2.048113] orion_wdt: Initial timeout 21 sec [ 2.055929] marvell-cesa f1030000.crypto: CESA device successfully registered [ 2.064101] NET: Registered protocol family 10 [ 2.070229] NET: Registered protocol family 17 [ 2.074740] bridge: automatic filtering via arp/ip/ip6tables has been depreca ted. Update your scripts to load br_netfilter if you need this. [ 2.087438] 8021q: 802.1Q VLAN Support v1.8 [ 2.093803] UBI error: no valid UBI magic found inside mtd3 [ 2.099441] hctosys: unable to open rtc device (rtc0) [ 2.120558] Freeing unused kernel memory: 5128K [ 2.135967] usb 1-1.3: config 1 interface 0 altsetting 0 has 7 endpoint descr iptors, different from the interface descriptor's value: 5 [ 2.172321] init: Console is alive [ 2.175924] init: - watchdog - [ 2.185590] kmodloader: loading kernel modules from /etc/modules-boot.d/* [ 2.192809] kmodloader: done loading kernel modules from /etc/modules-boot.d/ * [ 2.202741] init: - preinit - [ 2.277428] random: jshn: uninitialized urandom read (4 bytes read, 5 bits of entropy available) [ 2.311044] random: jshn: uninitialized urandom read (4 bytes read, 5 bits of entropy available) [ 2.342715] random: jshn: uninitialized urandom read (4 bytes read, 5 bits of entropy available) [ 2.375142] random: jshn: uninitialized urandom read (4 bytes read, 5 bits of entropy available) [ 2.404796] random: jshn: uninitialized urandom read (4 bytes read, 5 bits of entropy available) [ 2.434065] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, ful l duplex, flow control disabled [ 2.443994] mv643xx_eth_port mv643xx_eth_port.0 eth0: link down [ 2.451122] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready [ 2.472121] random: procd: uninitialized urandom read (4 bytes read, 6 bits o f entropy available) Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level [ 3.184370] scsi 0:0:0:0: Direct-Access USB Flash Disk 1100 PQ : 0 ANSI: 4 [ 3.194960] sd 0:0:0:0: [sda] 7866368 512-byte logical blocks: (4.03 GB/3.75 GiB) [ 3.203557] sd 0:0:0:0: [sda] Write Protect is off [ 3.209427] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, does n't support DPO or FUA [ 3.226343] sda: sda1 [ 3.233182] sd 0:0:0:0: [sda] Attached SCSI removable disk [ 5.573775] procd: - early - [ 5.576739] procd: - watchdog - [ 6.404764] procd: - watchdog - [ 6.408130] procd: - ubus - [ 6.415373] random: ubusd: uninitialized urandom read (4 bytes read, 22 bits of entropy available) [ 6.461351] random: ubusd: uninitialized urandom read (4 bytes read, 22 bits of entropy available) [ 6.470678] random: ubusd: uninitialized urandom read (4 bytes read, 22 bits of entropy available) [ 6.479745] random: ubusd: uninitialized urandom read (4 bytes read, 22 bits of entropy available) [ 6.489723] procd: - init - Please press Enter to activate this console. [ 6.584780] kmodloader: loading kernel modules from /etc/modules.d/* [ 6.593422] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 6.604980] ip_tables: (C) 2000-2006 Netfilter Core Team [ 6.614459] nf_conntrack version 0.5.0 (1948 buckets, 7792 max) [ 6.637956] xt_time: kernel timezone is -0000 [ 6.648767] PPP generic driver version 2.4.2 [ 6.654600] NET: Registered protocol family 24 [ 6.661963] kmodloader: done loading kernel modules from /etc/modules.d/* [ 9.839591] mv643xx_eth_port mv643xx_eth_port.0 eth0: link up, 1000 Mb/s, ful l duplex, flow control disabled [ 9.885577] device eth0 entered promiscuous mode [ 9.911870] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready [ 10.818918] br-lan: port 1(eth0) entered forwarding state [ 10.824390] br-lan: port 1(eth0) entered forwarding state [ 10.868415] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready [ 12.818347] br-lan: port 1(eth0) entered forwarding state BusyBox v1.25.1 () built-in shell (ash) _________ / /\ _ ___ ___ ___ / LE / \ | | | __| \| __| / DE / \ | |__| _|| |) | _| /________/ LE \ |____|___|___/|___| lede-project.org \ \ DE / \ LE \ / ----------------------------------------------------------- \ DE \ / Reboot (17.01.4, r3560-79f57e422d) \________\/ ----------------------------------------------------------- === WARNING! ===================================== There is no root password defined on this device! Use the "passwd" command to set up a new password in order to prevent unauthorized SSH logins. --------------------------------------------------
Re: Dual boot with Openwrt on NAND April 22, 2018 05:41AM |
Registered: 10 years ago Posts: 94 |
# @bootloader setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)' saveenv # Attention, dont forget to nand erase your new mtd "ubi" before you flash LEDE on it. nand erase.part ubiyou should do the paket installation after
DockStar> usb reset; fatload usb 0 0x800000 lede-kirkwood-dockstar-initramfs-uImage; bootm 0x800000to install pakets before its not necessary anymore because you do your sysupgrade from LEDE-WIF and not from CLI.
Re: Dual boot with Openwrt on NAND April 22, 2018 01:50PM |
Registered: 11 years ago Posts: 58 |
U-Boot 2017.07-tld-1 (Oct 24 2017 - 22:32:36 -0700) Seagate FreeAgent DockStar SoC: Kirkwood 88F6281_A0 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 ping failed; host 192.168.180.21 is not alive Hit any key to stop autoboot: 0 ## Error: "bootcmd_uenv" not defined ## Error: "scan_disk" not defined ## Error: "set_bootargs" not defined ## Error: "load_uimage" not defined invalid partition number 2 for device nand0 (orion_nand) no such partition ubi0: attaching mtd1 ubi0: scanning is finished ubi0: attached mtd1 (name "mtd=1", size 255 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512 ubi0: VID header offset: 512 (aligned 512), data offset: 2048 ubi0: good PEBs: 2039, bad PEBs: 1, corrupted PEBs: 0 ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1517712165 ubi0: available PEBs: 8, total reserved PEBs: 2031, PEBs reserved for bad PEB handling: 39 Read 0 bytes from volume kernel to 800000 No size specified -> Using max size (1935360) ## Booting kernel from Legacy Image at 00800000 ... Image Name: ARM LEDE Linux-4.4.92
DockStar> printenv arcNumber=2998 baudrate=115200 bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede bootcmd_exec=if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi bootcmd_lede=run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000 bootdelay=3 console=ttyS0,115200 dtb_file=/boot/dts/kirkwood-dockstar.dtb ethact=egiga0 ethaddr=00:10:75:1A:DD:17 fileaddr=800000 filesize=20000 force_rescue=0 force_rescue_bootcmd=if test $force_rescue -eq 1 || ext2load usb 0:1 0x1700000 /rescueme 1 || fatload usb 0:1 0x1700000 /rescueme.txt 1; then run rescue_bootcmd; fi if_netconsole=ping $serverip ipaddr=192.168.180.64 led_error=orange blinking led_exit=green off led_init=green blinking mainlineLinux=yes mtdids=nand0=orion_nand mtdparts=mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi) partition=nand0,2 pogo_bootcmd=if fsload uboot-original-mtd0.kwb; then go 0x800200; fi preboot=run if_netconsole start_netconsole rescue_bootcmd=if test $rescue_installed -eq 1; then run rescue_set_bootargs; nand read.e 0x800000 0x100000 0x400000; bootm 0x800000; else run pogo_bootcmd; fi rescue_installed=1 rescue_set_bootargs=setenv bootargs console=$console ubi.mtd=2 root=ubi0:rootfs ro rootfstype=ubifs $mtdparts $rescue_custom_params serverip=192.168.180.21 set_bootargs_lede=setenv bootargs console=ttyS0,115200 $mtdparts start_netconsole=setenv ncip $serverip; setenv bootdelay 10; setenv stdin nc; setenv stdout nc; setenv stderr nc; version; stderr=serial stdin=serial stdout=serial ubifs_bootcmd=run ubifs_set_bootargs; if ubi part data && ubifsmount rootfs && ubifsload 0x800000 /boot/uImage && ubifsload 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; fi ubifs_mtd=3 ubifs_set_bootargs=setenv bootargs console=$console ubi.mtd=$ubifs_mtd root=ubi0:rootfs rootfstype=ubifs $mtdparts $ubifs_custom_params usb_boot=mw 0x800000 0 1; ext2load usb $usb_device 0x800000 /boot/uImage; if ext2load usb $usb_device 0x1100000 /boot/uInitrd; then bootm 0x800000 0x1100000; else bootm 0x800000; fi usb_bootcmd=run usb_init; run usb_set_bootargs; run usb_boot usb_device=0:1 usb_init=run usb_scan usb_root=/dev/sda1 usb_rootdelay=10 usb_rootfstype=ext2 usb_scan=usb_scan_done=0;for scan in $usb_scan_list; do run usb_scan_$scan; if test $usb_scan_done -eq 0 && ext2load usb $usb 0x800000 /boot/uImage 1; then usb_scan_done=1; echo "Found bootable drive on usb $usb"; setenv usb_device $usb; setenv usb_root /dev/$dev; fi; done usb_scan_1=usb=0:1 dev=sda1 usb_scan_2=usb=1:1 dev=sdb1 usb_scan_3=usb=2:1 dev=sdc1 usb_scan_4=usb=3:1 dev=sdd1 usb_scan_list=1 2 3 4 usb_set_bootargs=setenv bootargs console=$console root=$usb_root rootdelay=$usb_rootdelay rootfstype=$usb_rootfstype $mtdparts $usb_custom_params Environment size: 3093/131068 bytes DockStar>
Re: Dual boot with Openwrt on NAND April 22, 2018 02:01PM |
Registered: 10 years ago Posts: 94 |
resetthan you can tftp boot the new envs and fllash them in nand.
setenv ethaddr <ethaddr Userbox> setenv arcNumber 2998 setenv machid setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb' saveenv reset
Re: Dual boot with Openwrt on NAND April 22, 2018 02:16PM |
Registered: 11 years ago Posts: 58 |
Seagate FreeAgent DockStar SoC: Kirkwood 88F6281_A0 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 ping failed; host 192.168.180.21 is not alive Hit any key to stop autoboot: 0 DockStar> tftpboot 0x800000 uboot.2016.05-tld-1.environment.img Using egiga0 device TFTP from server 192.168.180.21; our IP address is 192.168.180.64 Filename 'uboot.2016.05-tld-1.environment.img'. Load address: 0x800000 Loading: ######### 2.7 MiB/s done Bytes transferred = 131072 (20000 hex) DockStar> nand erase 0xc0000 0x20000 NAND erase: device 0 offset 0xc0000, size 0x20000 Erasing at 0xc0000 -- 100% complete. OK DockStar> nand write.e 0x800000 0xc0000 0x20000 NAND write: device 0 offset 0xc0000, size 0x20000 131072 bytes written: OK DockStar> setenv ethaddr 00:10:75:1A:DD:17 DockStar> setenv arcNumber 2998 DockStar> setenv machid DockStar> setenv dtb_file '/boot/dts/kirkwood-dockstar.dtb' DockStar> saveenv Saving Environment to NAND... Erasing NAND... Erasing at 0xc0000 -- 100% complete. Writing to NAND... OK DockStar> setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)' DockStar> setenv set_bootargs_lede 'setenv bootargs console=ttyS0,115200 $mtdparts' DockStar> setenv bootcmd_lede 'run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000' DockStar> setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede' DockStar> bootcmd_exec 'if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi' Unknown command 'bootcmd_exec' - try 'help' DockStar> saveenv Saving Environment to NAND... Erasing NAND... Erasing at 0xc0000 -- 100% complete. Writing to NAND... OK DockStar> reset resetting ... U-Boot 2017.07-tld-1 (Oct 24 2017 - 22:32:36 -0700) Seagate FreeAgent DockStar SoC: Kirkwood 88F6281_A0 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 ping failed; host 192.168.180.21 is not alive Hit any key to stop autoboot: 0 ## Error: "bootcmd_uenv" not defined ## Error: "scan_disk" not defined ## Error: "set_bootargs" not defined ## Error: "load_uimage" not defined invalid partition number 2 for device nand0 (orion_nand) no such partition ubi0: attaching mtd1 ubi0: scanning is finished ubi0: attached mtd1 (name "mtd=1", size 255 MiB) ubi0: PEB size: 131072 bytes (128 KiB), LEB size: 129024 bytes ubi0: min./max. I/O unit sizes: 2048/2048, sub-page size 512 ubi0: VID header offset: 512 (aligned 512), data offset: 2048 ubi0: good PEBs: 2039, bad PEBs: 1, corrupted PEBs: 0 ubi0: user volume: 3, internal volumes: 1, max. volumes count: 128 ubi0: max/mean erase counter: 2/1, WL threshold: 4096, image sequence number: 1517712165 ubi0: available PEBs: 8, total reserved PEBs: 2031, PEBs reserved for bad PEB handling: 39 Read 0 bytes from volume kernel to 800000 No size specified -> Using max size (1935360) ## Booting kernel from Legacy Image at 00800000 ... Image Name: ARM LEDE Linux-4.4.92 Created: 2017-10-17 17:46:20 UTC Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 1810212 Bytes = 1.7 MiB Load Address: 00008000 Entry Point: 00008000 Verifying Checksum ... OK Loading Kernel Image ... OK Starting kernel ...
Re: Dual boot with Openwrt on NAND April 22, 2018 02:31PM |
Registered: 10 years ago Posts: 94 |
DockStar> setenv mtdparts 'mtdparts=orion_nand:0x100000@0x0(u-boot),-@0x100000(ubi)' DockStar> setenv set_bootargs_lede 'setenv bootargs console=ttyS0,115200 $mtdparts' DockStar> setenv bootcmd_lede 'run set_bootargs_lede; ubi part ubi; ubi read 0x800000 kernel; bootm 0x800000' DockStar> setenv bootcmd 'run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootcmd_lede' DockStar> bootcmd_exec 'if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi' Unknown command 'bootcmd_exec' - try 'help' DockStar> saveenv Saving Environment to NAND... Erasing NAND... Erasing at 0xc0000 -- 100% complete. Writing to NAND... OK DockStar> reset resetting ...the right command should be:
setenv bootcmd_exec 'if run load_uimage; then; if run load_initrd; then if run load_dtb; then bootm $load_uimage_addr $load_initrd_addr $load_dtb_addr; else bootm $load_uimage_addr $load_initrd_addr; fi; else if run load_dtb; then bootm $load_uimage_addr - $load_dtb_addr; else bootm $load_uimage_addr; fi; fi; fi'and everthing should be fine.