dfgsdgdfgf Posted March 17, 2019 Posted March 17, 2019 I read a lot of U Boot documentation the last hours but I still fail at fundamental understanding, like: - where can variables be set? boot.scr obviously, but there is also uEnv.txt boot.cmd armbianEnv.txt ... and in which order and precendence are they parsed? (If I set a variable in different files, which value will be used? first? last? ...) - how is a change made persistent (saveenv does not work) - Can sub-variables be changed, e.g. root in bootargs what I am trying to achieve atm is to change the boot partion rootdev from p1 to p2. Even thou I think I patched the relevant files, printenv shows that bootargs and rootdev are still set to p1. Even if I set rootdev to ps (verified by printenv) running boot fails (and afterwards its set to p1 again). I did not try to edit bootargs because I dont know how to do this without retyping the entire variable content (which is error-prone and annoying) A lot of documentation is done on compiling/building, I basically want to now how to mange the "grub" part of u boot. Would be nice if someone has a few hints or url(s) for me. Tahnk you. 0 Quote
lanefu Posted March 17, 2019 Posted March 17, 2019 3 hours ago, dfgsdgdfgf said: I read a lot of U Boot documentation the last hours but I still fail at fundamental understanding, like: - where can variables be set? boot.scr obviously, but there is also uEnv.txt boot.cmd armbianEnv.txt ... and in which order and precendence are they parsed? (If I set a variable in different files, which value will be used? first? last? ...) - how is a change made persistent (saveenv does not work) - Can sub-variables be changed, e.g. root in bootargs what I am trying to achieve atm is to change the boot partion rootdev from p1 to p2. Even thou I think I patched the relevant files, printenv shows that bootargs and rootdev are still set to p1. Even if I set rootdev to ps (verified by printenv) running boot fails (and afterwards its set to p1 again). I did not try to edit bootargs because I dont know how to do this without retyping the entire variable content (which is error-prone and annoying) A lot of documentation is done on compiling/building, I basically want to now how to mange the "grub" part of u boot. Would be nice if someone has a few hints or url(s) for me. Tahnk you. its super confusing to say the least.... here's my best understanding.. 1. If u-boot is running from SPI flash on the board (ex: espressobin).. then you're relying on the parameters stored in the flash. saveenv is how that those parameters are updated in flash. So first precedence here 2. If u-boot is being loaded from the sdcard.. then boot.scr is what is read first and "saveenv" wont be relevant.... boot.scr is generated via the mkimage command and typically using boot.cmd as the source 3. ArmbianEnv is loaded via an Armbian friendly boot.cmd. It loads only a few values in that file and treats them as variables to be used within the rest of the purpose-made boot.cmd. (see extraargs inside boot.cmd for a hint) 4. Modifying boot.cmd and then regenerating boot.scr will be the most staightforward way to make quick changes (see bottom of boot.cmd script own how to recreate) 5. Once you master above, you can probably take advantage to ArmbianEnv.txt to make changes so that the boot.scr file doesnt have to be created each time you make a change 0 Quote
FRANK333 Posted September 8, 2019 Posted September 8, 2019 Hello, lanefu. if I understand correctly boot.cmd is generated based on armbianEnv.txt ; but how do you make it generate? I ask you this because I'm trying to start armbian from hhd usb without using the SD 0 Quote
Igor Posted September 9, 2019 Posted September 9, 2019 7 hours ago, FRANK333 said: if I understand correctly boot.cmd is generated based on armbianEnv.txt No.boot.cmd script reads this file and use their variables as override. If any. 0 Quote
FRANK333 Posted September 9, 2019 Posted September 9, 2019 Hello igor, I tried to modify ArmbianEnv.txt adding setenv rootdev "/dev/sda1 "to boot from hdd without SD , recompiled boot.cmd but it does not work yet. I ask you you can boot completely from hdd (if you like) or I have to settle for boot on sd? P.S. I opened a dedicated post for the problem https://forum.armbian.com/topic/11514-opzero-boot-from-external-usb20-drive-hdd-without-any-sd/ 0 Quote
Igor Posted September 9, 2019 Posted September 9, 2019 1 hour ago, FRANK333 said: I tried to modify ArmbianEnv.txt adding setenv rootdev "/dev/sda1 "to boot from hdd without SD If you boot from SPI (speaking from head, not sure) we search for boot.cmd on various devices, starting from ... I don't know. I was not doing much with booting from SPI and I am not aware of the defaults, but I am sure its possible to boot directly SPI -> SATA/USB. 0 Quote
FRANK333 Posted September 9, 2019 Posted September 9, 2019 SPI -> SATA/USB boot is just what I'm trying to do. You can tell me (if it's not too complicated) how to do it or where to read a recent tutorial. Below is all I could do. Spoiler U-Boot SPL 2019.04-armbian (Jul 06 2019 - 00:40:48 +0200) DRAM: 512 MiB Trying to boot from sunxi SPI U-Boot 2019.04-armbian (Jul 06 2019 - 00:40:48 +0200) Allwinner Technology CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi Zero DRAM: 512 MiB MMC: mmc@1c0f000: 0, mmc@1c10000: 1 Loading Environment from EXT4... MMC: no card present In: serial Out: serial Err: serial Net: phy interface0 eth0: ethernet@1c30000 starting USB... USB0: USB EHCI 1.00 USB1: USB OHCI 1.0 USB2: USB EHCI 1.00 USB3: USB OHCI 1.0 USB4: USB EHCI 1.00 USB5: USB OHCI 1.0 scanning bus 0 for devices... 1 USB Device(s) found scanning bus 1 for devices... 1 USB Device(s) found scanning bus 2 for devices... 3 USB Device(s) found scanning bus 3 for devices... 1 USB Device(s) found scanning bus 4 for devices... 1 USB Device(s) found scanning bus 5 for devices... 1 USB Device(s) found scanning usb for storage devices... 1 Storage Device(s) found Autoboot in 1 seconds, press <Space> to stop MMC: no card present Device 0: Vendor: Maxtor 6 Rev: 0811 Prod: Y080L0 Type: Hard Disk Capacity: 78167.2 MB = 76.3 GB (160086528 x 512) ... is now current device Scanning usb 0:1... Found U-Boot script /boot/boot.scr data abort pc : [<5ffa9612>] lr : [<5ffa905d>] reloc pc : [<4a02b612>] lr : [<4a02b05d>] sp : 5bf570e8 ip : 00000003 fp : 00000005 r10: 5bfbaf78 r9 : 5bf5dee0 r8 : 00000001 r7 : 5bf60e48 r6 : 5af56040 r5 : 5bf57110 r4 : 00000022 r3 : 0000005c r2 : 5af560a3 r1 : 5bf60eb4 r0 : 5af5609f Flags: nzCv IRQs off FIQs off Mode SVC_32 Code: 4630fd7f 81f0e8bd e7d84606 bf082b2f (f822235c) Resetting CPU ... resetting ... U-Boot SPL 2019.04-armbian (Jul 06 2019 - 00:40:48 +0200) => printenv arch=arm baudrate=115200 board=sunxi board_name=sunxi boot_a_script=load ${devtype} ${devnum}:${distro_bootpart} ${scriptaddr} ${prefix}${script}; source ${scriptaddr} boot_efi_binary=if fdt addr ${fdt_addr_r}; then bootefi bootmgr ${fdt_addr_r};else bootefi bootmgr ${fdtcontroladdr};fi;load ${devtype} ${devnum}:${distro_bootpart} ${kernel_addr_r} efi/boot/bootarm.efi; if fdt addr ${fdt_addr_r}; then bootefi ${kernel_addr_r} ${fdt_addr_r};else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi boot_extlinux=sysboot ${devtype} ${devnum}:${distro_bootpart} any ${scriptaddr} ${prefix}${boot_syslinux_conf} boot_net_usb_start=usb start boot_prefixes=/ /boot/ boot_script_dhcp=boot.scr.uimg boot_scripts=boot.scr.uimg boot.scr boot_syslinux_conf=extlinux/extlinux.conf boot_targets=fel mmc0 usb0 pxe dhcp bootcmd=run distro_bootcmd bootcmd_dhcp=run boot_net_usb_start; if dhcp ${scriptaddr} ${boot_script_dhcp}; then source ${scriptaddr}; fi;setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; setenv efi_old_vci ${bootp_vci};setenv efi_old_arch ${bootp_arch};setenv bootp_vci PXECli ent:Arch:00010:UNDI:003000;setenv bootp_arch 0xa;if dhcp ${kernel_addr_r}; then tftpboot ${fdt_addr_r} dtb/${efi_fdtfile};if fdt addr ${fdt_addr_r}; then bootefi ${k ernel_addr_r} ${fdt_addr_r}; else bootefi ${kernel_addr_r} ${fdtcontroladdr};fi;fi;setenv bootp_vci ${efi_old_vci};setenv bootp_arch ${efi_old_arch};setenv efi_fdtfi le;setenv efi_old_arch;setenv efi_old_vci; bootcmd_fel=if test -n ${fel_booted} && test -n ${fel_scriptaddr}; then echo '(FEL boot)'; source ${fel_scriptaddr}; fi bootcmd_mmc0=devnum=0; run mmc_boot bootcmd_pxe=run boot_net_usb_start; dhcp; if pxe get; then pxe boot; fi bootcmd_usb0=devnum=0; run usb_boot bootdelay=1 bootm_size=0xa000000 console=ttyS0,115200 cpu=armv7 devlist=1 dfu_alt_info_ram=kernel ram 0x42000000 0x1000000;fdt ram 0x43000000 0x100000;ramdisk ram 0x43300000 0x4000000 distro_bootcmd=for target in ${boot_targets}; do run bootcmd_${target}; done efi_dtb_prefixes=/ /dtb/ /dtb/current/ eth1addr=12:42:55:5d:02:ae ethaddr=02:42:55:5d:02:ae fdt_addr_r=0x43000000 fdtcontroladdr=5bf58060 fdtfile=sun8i-h2-plus-orangepi-zero.dtb kernel_addr_r=0x42000000 load_efi_dtb=load ${devtype} ${devnum}:${distro_bootpart} ${fdt_addr_r} ${prefix}${efi_fdtfile} loadsplash= for prefix in ${boot_prefixes}; do if test -e mmc 0 ${prefix}boot.bmp; then load mmc 0 ${splashimage} ${prefix}boot.bmp; bmp d ${splashimage}; fi; done mmc_boot=if mmc dev ${devnum}; then devtype=mmc; run scan_dev_for_boot_part; fi partitions=name=loader1,start=8k,size=32k,uuid=${uuid_gpt_loader1};name=loader2,size=984k,uuid=${uuid_gpt_loader2};name=esp,size=128M,bootable,uuid=${uuid_gpt_esp};name=system,size=-,uuid=${uuid_gpt_system}; preboot=usb start pxefile_addr_r=0x43200000 ramdisk_addr_r=0x43300000 scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi; scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist scan_dev_for_efi=setenv efi_fdtfile ${fdtfile}; if test -z "${fdtfile}" -a -n "${soc}"; then setenv efi_fdtfile ${soc}-${board}${boardver}.dtb; fi; for prefix in ${efi_dtb_prefixes}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${efi_fdtfile}; then run load_efi_dtb; fi;done;if test -e ${devtype} ${devnum}:${distro_bootpart} efi/boot/bootarm.efi; then echo Found EFI removable media binary efi/boot/bootarm.efi; run boot_efi_binary; echo EFI LOAD FAILED: continuing...; fi; setenv efi_fdtfile scan_dev_for_extlinux=if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${boot_syslinux_conf}; then echo Found ${prefix}${boot_syslinux_conf}; run boot_extlinux; echo SCRIPT FAILED: continuing...; fi scan_dev_for_scripts=for script in ${boot_scripts}; do if test -e ${devtype} ${devnum}:${distro_bootpart} ${prefix}${script}; then echo Found U-Boot script ${prefix}${script}; run boot_a_script; echo SCRIPT FAILED: continuing...; fi; done scriptaddr=0x43100000 serial#=02c00042555d02ae soc=sunxi splashimage=66000000 splashpos=m,m stderr=serial stdin=serial,usbkbd stdout=serial usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi uuid_gpt_esp=c12a7328-f81f-11d2-ba4b-00a0c93ec93b uuid_gpt_system=69dad710-2ce4-4e3c-b16c-21a1d49abed3 Environment size: 4637/131068 bytes usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi; => help ? - alias for 'help' base - print or set address offset bdinfo - print Board Info structure blkcache - block cache diagnostics and control boot - boot default, i.e., run 'bootcmd' bootd - boot default, i.e., run 'bootcmd' bootefi - Boots an EFI payload from memory bootelf - Boot from an ELF image in memory bootm - boot application image from memory bootp - boot image via network using BOOTP/TFTP protocol bootvx - Boot vxWorks from an ELF image bootz - boot Linux zImage image from memory cmp - memory compare coninfo - print console devices and information cp - memory copy crc32 - checksum calculation dhcp - boot image via network using DHCP/TFTP protocol dm - Driver model low level access echo - echo args to console editenv - edit environment variable env - environment handling commands exit - exit script ext2load - load binary file from a Ext2 filesystem ext2ls - list files in a directory (default /) ext4load - load binary file from a Ext4 filesystem ext4ls - list files in a directory (default /) ext4size - determine a file's size false - do nothing, unsuccessfully fatinfo - print information about filesystem fatload - load binary file from a dos filesystem fatls - list files in a directory (default /) fatmkdir - create a directory fatrm - delete a file fatsize - determine a file's size fatwrite - write file into a dos filesystem fdt - flattened device tree utility commands fstype - Look up a filesystem type go - start application at address 'addr' gpio - query and control gpio pins gpt - GUID Partition Table help - print command description/usage iminfo - print header information for application image imxtract - extract a part of a multi-image itest - return true/false on integer compare load - load binary file from a filesystem loadb - load binary file over serial line (kermit mode) loads - load S-Record file over serial line loadx - load binary file over serial line (xmodem mode) loady - load binary file over serial line (ymodem mode) loop - infinite loop on address range ls - list files in a directory (default /) md - memory display mdio - MDIO utility commands mii - MII utility commands mm - memory modify (auto-incrementing address) mmc - MMC sub system mmcinfo - display MMC info mw - memory write (fill) nfs - boot image via network using NFS protocol nm - memory modify (constant address) part - disk partition related commands ping - send ICMP ECHO_REQUEST to network host printenv - print environment variables pxe - commands to get and boot from pxe files reset - Perform RESET of the CPU run - run commands in an environment variable save - save file to a filesystem saveenv - save environment variables to persistent storage setenv - set environment variables setexpr - set environment variable as the result of eval expression showvar - print local hushshell variables size - determine a file's size sleep - delay execution for some time source - run script from memory sysboot - command to get and boot from syslinux files test - minimal test like /bin/sh tftpboot - boot image via network using TFTP protocol true - do nothing, successfully usb - USB sub-system usbboot - boot from USB device version - print monitor, compiler and linker version 0 Quote
umiddelb Posted September 10, 2019 Posted September 10, 2019 IMHO some of the recent mainline u-boot versions had difficulties to save the u-boot environment, which means that `saveenv´ will override not only the environment itself but also code-parts nearby, rendering the firmware unusable. Therefore changes to the u-boot environment can only performed at build time for some boards. 0 Quote
FRANK333 Posted September 10, 2019 Posted September 10, 2019 Hi, umiddelb, I tried to clean up the nor spi and recharge an old U-boat but I didn't notice any difference. I noticed a strange thing U-boot when it starts and finds the USB disk looks for a file boot.env not finding it continues finding boot.cmd processes it with error and restarts (this probably because boot.cmd is the one written on the sd card. Even if I recompiled and modified it) . The matter becomes more and more complicated ... 0 Quote
martinayotte Posted September 10, 2019 Posted September 10, 2019 6 hours ago, FRANK333 said: The matter becomes more and more complicated ... I've 2x OPiZero booting from USB without issue ! I don't see where your setup is choking, but I would recommend to check it step by step : - stop U-Boot for getting command prompt. - do "usb start" for the scanning. - check your USB boot partition with "ls usb 0 /boot" to verify that everything is present. - finally, try to boot using "run usb_boot" 0 Quote
FRANK333 Posted September 10, 2019 Posted September 10, 2019 Hello Martinayotte , Departed from a clean installation, I cleaned up both hdd and µSD and installed armbian on hdd with the appropriate option in armbian-config. Of course if I restart the OP0 with the µSD inserted everything works fine. I gave the commands you wrote above these are the results (without µSD insertd). Spoiler => usb start => ls usb 0 / <DIR> 4096 . <DIR> 4096 .. <DIR> 4096 bin <DIR> 4096 boot <DIR> 4096 dev <DIR> 4096 etc <DIR> 4096 home <DIR> 4096 lib <DIR> 4096 lost+found <DIR> 4096 media <DIR> 4096 mnt <DIR> 4096 opt <DIR> 4096 proc <DIR> 4096 root <DIR> 4096 run <DIR> 4096 sbin <DIR> 4096 selinux <DIR> 4096 srv <DIR> 4096 sys <DIR> 4096 tmp <DIR> 4096 usr <DIR> 4096 var => => ls usb 0 /boot <DIR> 4096 . <DIR> 4096 .. => run usb_boot IDE device 0: Vendor: Maxtor 6 Rev: 0811 Prod: Y080L0 Type: Hard Disk Capacity: 78167.2 MB = 76.3 GB (160086528 x 512) ** Bad device specification usb -bootable ** Scanning usb :1... 0 Quote
martinayotte Posted September 10, 2019 Posted September 10, 2019 6 minutes ago, FRANK333 said: => ls usb 0 /boot <DIR> 4096 . <DIR> 4096 .. This means your /boot directory of your USB drive is empty ... Copy the /boot from SDCard into the USB drive and tweak the /boot/armbianEnv.txt of this USB copy so that "rootdev" is pointing to proper UUID found by "blkid". EDIT: The issue of having empty /boot on USB is probably due to the fact that when you've ran the "nand-sata-install" you choose "boot from SD with USB rootfs". If you have added "spi-jedec-nor" overlay, "nand-sata-install" would have show you an additional option named "boot from SPI with USB rootfs", which would not caused the issue. 0 Quote
FRANK333 Posted September 10, 2019 Posted September 10, 2019 here I copied the directory /boot and changed UUID (there was already written the UUID of the hdd) Spoiler => usb start => ls usb 0 /boot <DIR> 4096 . <DIR> 4096 .. <SYM> 17 dtb <DIR> 12288 dtb-4.19.62-sunxi <DIR> 4096 overlay-user 230 armbianEnv.txt 0 armbianEnv.txt.out 1536 armbian_first_run.txt.template 230454 boot.bmp 3726 boot.cmd 3798 boot.scr 4882 boot-desktop.png 162659 config-4.19.62-sunxi <SYM> 17 dtb.old 8128198 initrd.img-4.19.62-sunxi 3299149 System.map-4.19.62-sunxi <SYM> 21 uInitrd 8128262 uInitrd-4.19.62-sunxi 7497384 vmlinuz-4.19.62-sunxi <SYM> 21 zImage 0 .next => run usb_boot IDE device 0: Vendor: Maxtor 6 Rev: 0811 Prod: Y080L0 Type: Hard Disk Capacity: 78167.2 MB = 76.3 GB (160086528 x 512) ** Bad device specification usb -bootable ** Scanning usb :1... Found U-Boot script /boot/boot.scr data abort pc : [<5ffa9612>] lr : [<5ffa905d>] reloc pc : [<4a02b612>] lr : [<4a02b05d>] sp : 5bf57500 ip : 00000003 fp : 00000005 r10: 5bfbc930 r9 : 5bf5dee0 r8 : 00000001 r7 : 5bf60e48 r6 : 5af56040 r5 : 5bf57528 r4 : 00000022 r3 : 0000005c r2 : 5af560a3 r1 : 5bf60eb4 r0 : 5af5609f Flags: nzCv IRQs off FIQs off Mode SVC_32 Code: 4630fd7f 81f0e8bd e7d84606 bf082b2f (f822235c) Resetting CPU ... resetting ... 0 Quote
Igor Posted September 10, 2019 Posted September 10, 2019 1 hour ago, FRANK333 said: Scanning usb :1... Found U-Boot script /boot/boot.scr data abort Did you alter boot.scr? 0 Quote
FRANK333 Posted September 10, 2019 Posted September 10, 2019 I think not, I copied with administrator privileges (ubuntu) the whole boot directory from sd to disk 0 Quote
Igor Posted September 10, 2019 Posted September 10, 2019 1 hour ago, FRANK333 said: run usb_boot Then go step by step executing commands and see which is wrong ... 0 Quote
FRANK333 Posted September 10, 2019 Posted September 10, 2019 Spoiler usb_boot=usb start; if usb dev ${devnum}; then devtype=usb; run scan_dev_for_boot_part; fi scan_dev_for_boot_part=part list ${devtype} ${devnum} -bootable devplist; env exists devplist || setenv devplist 1; for distro_bootpart in ${devplist}; do if fstype ${devtype} ${devnum}:${distro_bootpart} bootfstype; then run scan_dev_for_boot; fi; done; setenv devplist scan_dev_for_boot=echo Scanning ${devtype} ${devnum}:${distro_bootpart}...; for prefix in ${boot_prefixes}; do run scan_dev_for_extlinux; run scan_dev_for_scripts; done;run scan_dev_for_efi; => run scan_dev_for_extlinux Found extlinux/extlinux.conf Invalid filesystem: 0x43100000 SCRIPT FAILED: continuing... => run scan_dev_for_scripts Found U-Boot script boot.scr.uimg ## Executing script at 43100000 Wrong image format for "source" command SCRIPT FAILED: continuing... Found U-Boot script boot.scr ## Executing script at 43100000 Wrong image format for "source" command SCRIPT FAILED: continuing... => I've tried these 0 Quote
martinayotte Posted September 10, 2019 Posted September 10, 2019 15 minutes ago, FRANK333 said: I've tried these I think you will save a lot of time if you restart from scratch : fresh SD image, make sure you add "spi-jedec-nor" overlay, and then reboot before doing a new "nand-sata-install" with "Boot from SPI, RootFS on USB". 0 Quote
FRANK333 Posted September 10, 2019 Posted September 10, 2019 I tried martin twice as you suggested, but now when I start nand-sata-install I no longer appear the installation options but only the indication /dev/sda1 the type of formatting and then starts writing armbian on HDD. Mysteries!!! Spoiler 0 Quote
martinayotte Posted September 11, 2019 Posted September 11, 2019 16 hours ago, FRANK333 said: when I start nand-sata-install I no longer appear the installation options Did you rebooted after adding "spi-jedec-nor" overlay ? Doing "cat /proc/mtd" command, is it reporting the presence of SPI partitions ? 0 Quote
FRANK333 Posted September 11, 2019 Posted September 11, 2019 2 hours ago, martinayotte said: Did you rebooted after adding "spi-jedec-nor" overlay ? Doing "cat /proc/mtd" command, is it reporting the presence of SPI partitions ? Yes, I restarted. Finds the mtd0 partition root@orangepizero:~# cat /proc/mtd dev: size erasesize name mtd0: 00200000 00001000 "spi0.0" 0 Quote
FRANK333 Posted September 12, 2019 Posted September 12, 2019 I also have an OP0+ I checked nand-sata-install and the option SPI=> USB instead exists. attached under the screen . Mysteries! Spoiler 0 Quote
FRANK333 Posted September 13, 2019 Posted September 13, 2019 (edited) continues my battle with U-boats, and I appeal to anyone who knows anything. Reading on the forum I found this command to control U-boot strings /dev/mtd0 | grep U-Boot and the result I wrote it in the spoiler below. I did not understand exactly what it means surely is an error during the installation of U-boot that I did with these commands : flash_erase /dev/mtd0 0 128 flashcp /usr/lib/linux-u-boot-next-orangepizero_5.90_armhf/u-boot-sunxi-with-spl.bin /dev/mtd0 Last experiment I compared the script nand-sata install on OP0 and OP0+ but I did not notice differences so the lack of recognition of the spi is to be found upstream. Spoiler Edited September 13, 2019 by FRANK333 0 Quote
FRANK333 Posted September 28, 2019 Posted September 28, 2019 (edited) On 9/25/2019 at 11:26 AM, jhoney said: If you boot from SPI (speaking from head, not sure) we search for boot.cmd on various devices, starting from ... I don't know. I was not doing much with booting from SPI and I am not aware of the defaults, but I am sure its possible to boot directly SPI -> SATA/USB. [edit out spam links] jhoney, uboot finds the .cmd file on the hdd, but this file is not written correctly (it seems to be an exact copy of the one on the sd) and then repeats for about ten times the operation and then freezes. If I could write the .cmd file correctly as it happens for the orangePizero+ it would work. Edited February 11, 2020 by TRS-80 edit out spam links 0 Quote
phier Posted June 10, 2021 Posted June 10, 2021 hi, where exactly is stored uboot env storage? How can i read/modify it using fw_printenv/fw_setenv ? thanks 0 Quote
mongoose Posted April 19 Posted April 19 (edited) similar to what @phier asked, I'm trying to change the u-boot environment variable bootdelay . I've tried adding Quote bootdelay=10 to armbianEnv.txt with no effect (it is still at the default of 2). I then added Quote setenv bootdelay "10" to boot.cmd and ran Quote mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr This completed and I can see that boot.scr got the line, but still the boot delay is at the default of 2. Any idea what I am missing @lanefu ? I'm on a Le Potato booting from the microsd card Edited April 19 by mongoose 0 Quote
FRANK333 Posted April 19 Posted April 19 (edited) @mongoose I didn't understand the problem, but if you need help here is a tutorial on the orange pi zero. https://hackaday.io/project/181169-orange-pi-zero-native-network-boot/log/196475-step-2-enable-spi-flash-and-and-write-u-boot Edited April 19 by FRANK333 0 Quote
mongoose Posted April 20 Posted April 20 (edited) Thanks @FRANK333 , I actually have an orange pi too so bookmarked that guide. For future readers: As for changing u-boot on Le Potato, I just followed https://docs.u-boot.org/en/latest/build/gcc.html https://docs.u-boot.org/en/latest/board/amlogic/libretech-cc.html they've guides for lots of boards. Everything seems to work so far as I was able to boot into armbian. Also, I recommend getting a USB U-art cable and using the terminal program minicom so you can see what happens during u-boot and with timestamps Edited April 20 by mongoose 0 Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.