[OXNAS]uImage sans DTB file May 17, 2017 11:19AM |
Registered: 11 years ago Posts: 1,303 |
Re: [OXNAS]uImage sans DTB file May 17, 2017 11:30AM |
Admin Registered: 13 years ago Posts: 18,569 |
Quote
A. How to use the uEnv.txt script
This uEnv.txt script can be used to further customizing u-boot envs without saving to NAND or to boot with a completely different set of u-boot envs.
Create a text file in /boot directory with the content in the format that u-boot envs are listed.
Examples:
These 4 examples are only to demonstrate the syntax in uEnv.txt (they might or might not apply to your current settings):
- Load appropriate DTB file for the kernel to run the Pogo Classic box.
- Use only USB drives for kernel and rootfs during booting
- Use USB and SATA for booting. The kernel and rootfs search order is as they are appeared on the list: usb, ide.
- Define that there are 8 storage devices (i.e. disk partitions).
cat /boot/uEnv.txt dtb_file=/boot/dts/ox820-pogoplug-classic.dtb devices=usb devices=usb ide disks=0 1 2 3 4 5 6 7
Re: [OXNAS]uImage sans DTB file May 17, 2017 06:34PM |
Registered: 11 years ago Posts: 1,303 |
Re: [OXNAS]uImage sans DTB file May 18, 2017 12:47AM |
Admin Registered: 13 years ago Posts: 18,569 |
Re: [OXNAS]uImage sans DTB file May 18, 2017 06:35AM |
Registered: 11 years ago Posts: 1,303 |
Re: [OXNAS]uImage sans DTB file May 19, 2017 09:49AM |
Registered: 7 years ago Posts: 4 |
Wrong Image Format for bootm command ERROR: can't get kernel image!
#define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
Re: [OXNAS]uImage sans DTB file May 19, 2017 09:49AM |
Registered: 7 years ago Posts: 4 |
Wrong Image Format for bootm command ERROR: can't get kernel image!
#define FDT_MAGIC 0xd00dfeed /* 4: version, 4: total size */
Re: [OXNAS]uImage sans DTB file May 19, 2017 10:55AM |
Admin Registered: 13 years ago Posts: 18,569 |
> Wrong Image Format for bootm command > ERROR: can't get kernel image! >>
> #define FDT_MAGIC 0xd00dfeed /* 4: version, 4: tot > al size */ >>
printenv
Re: [OXNAS]uImage sans DTB file May 19, 2017 11:25AM |
Registered: 7 years ago Posts: 4 |
U-Boot SPL 2013.10-tld-4 (Sep 07 2014 - 14:10:12) Boot device: NAND Attempting to set PLLA to 850 MHz ... plla_ctrl0 : 0000020a plla_ctrl1 : 00330000 plla_ctrl2 : 0065008b plla_ctrl3 : 000000f1 PLLA Set U-Boot 2015.10-tld-1 (Nov 21 2015 - 01:17:59 -0800) OXNAS OX820 DRAM: 128 MiB NAND: 128 MiB In: serial Out: serial Err: serial Net: dwmac.40400000 Hit any key to stop autoboot: 0 OX820> printenv bootcmd=run bootcmd_uenv; run scan_disk; run set_bootargs; run bootcmd_exec; run bootz_ubi; reset bootcmd_exec=if run load_uimage; then 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; fi bootcmd_uenv=run uenv_load; if test $uenv_loaded -eq 1; then run uenv_import; fi bootdelay=10 bootdev=usb bootz_ubi=echo Booting from nand ...; run load_ubi; run set_ubi_args; bootz 0x60500000 - 0x62c00000 device=0:1 devices=usb ide disks=0 1 2 3 dtb_file=/boot/dts/ox820-pogoplug-pro.dtb ethact=dwmac.40400000 ethaddr=52:3b:20:9c:11:51 if_netconsole=ping $serverip ipaddr=192.168.1.222 load_dtb=echo loading DTB $dtb_file ...; ext2load $bootdev $device 0x62c00000 $dtb_file load_initrd=echo loading uInitrd ...; ext2load $bootdev $device 0x60e00000 /boot/uInitrd load_ubi=echo Trying to boot from NAND ...;if run mount_ubi; then run load_ubi_zimage; run load_ubi_dtb; ubifsumount; fi load_ubi_dtb=echo loading DTB from ubi /boot/dts/ox820-pogoplug-pro.dtb ...; ubifsload 0x62c00000 /boot/dts/ox820-pogoplug-pro.dtb load_ubi_zimage=echo loading zImage from ubi ...; ubifsload 0x60500000 /boot/zImage load_uimage=echo loading uImage ...; ext2load $bootdev $device 0x60500000 /boot/uImage mainlineLinux=yes mount_ubi=ubi part data; ubifsmount ubi0:rootfs mtdids=nand0=41000000.nand mtdparts=mtdparts=41000000.nand:14m(boot),-(data) preboot_nc=run if_netconsole start_netconsole 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 ext2load $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 serverip=192.168.1.220 set_bootargs=setenv bootargs console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts $custom_params set_ubi_args=setenv bootargs console=ttyS0,115200n8 ubi.mtd=1 root=ubi0:rootfs rw rootfstype=ubifs rootwait mtdparts=41000000.nand:14m(boot),-(data) 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 0x60500000 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=echo loading envs from $devtype $disknum ...; if load $devtype $disknum:1 0x60500000 /boot/uEnv.txt; then setenv uenv_loaded 1; fi 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 usb_custom_params=zswap.enabled=1 usb_ready_retry=15 Environment size: 3262/131068 bytes OX820>
Re: [OXNAS]uImage sans DTB file May 19, 2017 12:47PM |
Admin Registered: 13 years ago Posts: 18,569 |
Re: [OXNAS]uImage sans DTB file May 19, 2017 01:56PM |
Registered: 11 years ago Posts: 1,303 |
Re: [OXNAS]uImage sans DTB file May 19, 2017 02:13PM |
Admin Registered: 13 years ago Posts: 18,569 |
Quote
bodhi
You only need to do: copy the DTB file from OpenWrt build website to your OpenWrt rootfs and use it