A-P Posted April 30, 2017 Posted April 30, 2017 hi all i'm trying to boot my orange pi over the network. i have written u-boot into SPI-Flash memory. i modified boot.cmd script to download the kernel, init ram and script.bin from TFTP server. after downloading them all the kernel tries to start but it dose not proceed. I've attached the screenshot of the console. My boot.cmd Spoiler # DO NOT EDIT THIS FILE # # Please edit /boot/armbianEnv.txt to set supported parameters # setenv serverip 172.20.20.200 setenv load_addr "0x44000000" setenv overlay_error "false" # default values setenv rootdev "/dev/nfs" setenv verbosity "1" setenv console "both" setenv disp_mem_reserves "off" setenv disp_mode "1920x1080p60" setenv rootfstype "ext4" setenv docker_optimizations "on" setenv bootm_boot_mode sec # Print boot source itest.b *0x28 == 0x00 && echo "U-boot loaded from SD" itest.b *0x28 == 0x02 && echo "U-boot loaded from eMMC or secondary SD" itest.b *0x28 == 0x03 && echo "U-boot loaded from SPI" echo "Boot script loaded from ${devtype}" if test "${console}" = "display" || test "${console}" = "both"; then setenv consoleargs "console=tty1"; fi if test "${console}" = "serial" || test "${console}" = "both"; then setenv consoleargs "${consoleargs} console=ttyS0,115200"; fi setenv bootargs "root=${rootdev} rw nfsroot=172.20.20.90:/mnt/nfsroot ${consoleargs} hdmi.audio=EDID:0 disp.screen0_output_mode=${disp_mode} panic=10 consoleblank=0 loglevel=${verbosity} ubootpart=${partuuid} ubootsource=${devtype} ${extraargs} ${extraboardargs}" if test "${disp_mem_reserves}" = "off"; then setenv bootargs "${bootargs} sunxi_ve_mem_reserve=0 sunxi_g2d_mem_reserve=0 sunxi_fb_mem_reserve=16"; fi if test "${docker_optimizations}" = "on"; then setenv bootargs "${bootargs} cgroup_enable=memory swapaccount=1"; fi #load ${devtype} 0 ${ramdisk_addr_r} ${prefix}uInitrd #load ${devtype} 0 ${kernel_addr_r} ${prefix}zImage #setenv bootargs "root=${rootdev} rootwait nfsroot=172.20.20.90:/mnt/nfsroot console=ttyS0,115200 panic=10 consoleblank=0 loglevel=1" tftpboot ${kernel_addr_r} zImage tftpboot ${ramdisk_addr_r} uInitrd echo "Found legacy kernel configuration" #load ${devtype} 0 ${fdt_addr_r} ${prefix}script.bin tftpboot ${fdt_addr_r} script.bin bootz ${kernel_addr_r} ${ramdisk_addr_r} # Recompile with: # mkimage -C none -A arm -T script -d /boot/boot.cmd /boot/boot.scr
zador.blood.stained Posted April 30, 2017 Posted April 30, 2017 Please try to increase verbosity (loglevel), set console to serial (assuming this output is from serial). Also I don't see IP address related arguments on the kernel command line (ip=...): https://github.com/torvalds/linux/blob/master/Documentation/filesystems/nfs/nfsroot.txt
zador.blood.stained Posted April 30, 2017 Posted April 30, 2017 Also if you are using old enough u-boot build (and legacy kernel) you may need to add setenv machid 1029 setenv bootm_boot_mode sec to the boot script before starting the kernel Edit: you already have bootm_boot_mode but you still may need to set machid
A-P Posted April 30, 2017 Author Posted April 30, 2017 thanks zador i am using DHCP Server in my network so i did not fill all IP related arguments. when i use the same boot.cmd (boot.scr) on SD card every thing works fine and the NFS path will be mounted as root correctly.
A-P Posted May 1, 2017 Author Posted May 1, 2017 It seems that there is a problem with reading kernel from the network because when I try to read same kernel from SD card it works fine but with network no. Can you please give me a step by step guide how to boot from network ? I've already flashed my SPI Flash with uboot. Regards.
zador.blood.stained Posted May 1, 2017 Posted May 1, 2017 19 hours ago, A-P said: i am using DHCP Server in my network so i did not fill all IP related arguments. Did you add "ip=dhcp" then? 19 hours ago, A-P said: when i use the same boot.cmd (boot.scr) on SD card every thing works fine and the NFS path will be mounted as root correctly. Exactly the same boot.cmd with exactly the same u-boot binary?
A-P Posted May 2, 2017 Author Posted May 2, 2017 i have added setenv machid 1029 to boot.cmd and ip=dhcp to bootargs but nothing changed. when i copy boot.scr into SD card every thing works fine.
zador.blood.stained Posted May 2, 2017 Posted May 2, 2017 OK, this is definitely some progress. Please set higher loglevel (verbosity) and switch console to "serial"
A-P Posted May 2, 2017 Author Posted May 2, 2017 i tried with setenv verbosity "7" setenv console "both" but there was no progress. kernel hangs on ion_reserve_comm......
A-P Posted May 2, 2017 Author Posted May 2, 2017 i found a helpful website and followed the instructions. http://linux-sunxi.org/How_to_boot_the_A10_or_A20_over_the_network but there was no success can anybody tell me why the boot.scr on SD card works fine but the same boot.scr loaded from TFTP Server dose not load kernel?
A-P Posted May 3, 2017 Author Posted May 3, 2017 Any idea ? @Igor can you please give me a step by step guide how you boot images from network when you test images before release ? Because I've heard images are developed on network because this way development is much faster. best regards.
zador.blood.stained Posted May 3, 2017 Posted May 3, 2017 3 minutes ago, A-P said: I've heard images are developed on network because this way development is much faster. https://docs.armbian.com/Developer-Guide_FEL-boot/ Not exactly a step by step guide, but this is all we have.
A-P Posted June 25, 2017 Author Posted June 25, 2017 thanks dear zador after some hard work i fixed the problem and now kernel panic happens and the boor reboots. i also tried with mainline kernel and every thing works fine. for some driver problems i have to use kernel 3.4.113. i think there is a problem with the network interface that prevents NFS root file system to be mounted.
zador.blood.stained Posted June 25, 2017 Posted June 25, 2017 6 minutes ago, A-P said: i think there is a problem with the network interface that prevents NFS root file system to be mounted. Looks more like wrong script.bin file or invalid script.bin configuration for the wireless module.
A-P Posted July 1, 2017 Author Posted July 1, 2017 the script.bin file that i'm using is the same one i use on SD card after writing armbian image. even i disabled wifi but there was no success. i think more than one wifi module have error. disp module -> fails! UART module -> no regulator! EHCI -> cant setup! ALSA -> No sound card found! IP-Config: Failed to open eth0! so there is no network and there will be no NFS root!
A-P Posted July 9, 2017 Author Posted July 9, 2017 Problem Solved!!! the problem was U-boot. i was using the u-boot that was written by mainline kernel on SPI-Flash. i rewrote u-boot from armbian with kernel 3.4.113 and everything was ok.
elected Posted January 8, 2019 Posted January 8, 2019 Hello Сould you send me an example of boot.cmd , pxelinux.cfg, and dnsmasq ? Thanks
Recommended Posts