Lope Posted September 22, 2017 Posted September 22, 2017 I used the Armbian test image. I did apt-get upgrade I changed eth0 to static IP. But now, I started it up and eth0 green light won't stay on. Can't ping it or SSH. I connected a USB PL-2303HX from my PC to the NanoPi Neo2 (first time for me ever connecting to a Linux computer's serial console) With no configuration at all I got this output in minicom. U-Boot SPL 2017.09-armbian (Sep 17 2017 - 03:48:48) DRAM: 4096 MiB Trying to boot from MMC1 NOTICE: BL3-1: Running on H5 (1718) in SRAM A2 (@0x44000) NOTICE: Configuring SPC Controller NOTICE: BL3-1: v1.0(debug):aa75c8d NOTICE: BL3-1: Built : 02:45:22, Sep 17 2017 INFO: BL3-1: Initializing runtime services INFO: BL3-1: Preparing for EL3 exit to normal world INFO: BL3-1: Next image address: 0x4a000000, SPSR: 0x3c9 Looks like U-Boot can't find the kernel or whatever? Okay I removed the 5v wire from the USB serial adapter so I can rather power the board via microUSB 2A adapter than weak USB port power. I unplugged and replugged the 2A microUSB but it didn't help. With the microUSB unplugged the PCB's green LED still glowed faintly somehow powered from GND and tx/rx. rneese suggested I unplug and replug everything. I did and now it booted up and I can see it on the console. It's saying no ethernet found and it looks like a console so I'll give it a go. U-Boot 2017.09-armbian (Sep 17 2017 - 03:48:48 +0200) Allwinner Technology CPU: Allwinner H5 (SUN50I) Model: FriendlyARM NanoPi NEO 2 DRAM: 512 MiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial Net: No ethernet found. Hit any key to stop autoboot: 0 38518 bytes read in 134 ms (280.3 KiB/s) Unknown command 'bmp' - try 'help' switch to partitions #0, OK mmc0 is current device Scanning mmc 0:1... Found U-Boot script /boot/boot.scr 3362 bytes read in 179 ms (17.6 KiB/s) ## Executing script at 4fc00000 U-boot loaded from SD Boot script loaded from mmc 116 bytes read in 149 ms (0 Bytes/s) ** File not found /boot/dtb/allwinner/allwinner/sun50i-h5-nanopi-neo2.dtb ** libfdt fdt_check_header(): FDT_ERR_BADMAGIC No FDT memory address configured. Please configure the FDT address via "fdt addr <address>" command. Aborting! 4179 bytes read in 362 ms (10.7 KiB/s) Applying kernel provided DT fixup script (sun50i-h5-fixup.scr) ## Executing script at 44000000 5001834 bytes read in 452 ms (10.6 MiB/s) 12285960 bytes read in 868 ms (13.5 MiB/s) ## Loading init Ramdisk from Legacy Image at 4fe00000 ... Image Name: uInitrd Image Type: AArch64 Linux RAMDisk Image (gzip compressed) Data Size: 5001770 Bytes = 4.8 MiB Load Address: 00000000 Entry Point: 00000000 Verifying Checksum ... OK ERROR: Did not find a cmdline Flattened Device Tree Could not find a valid device tree SCRIPT FAILED: continuing... starting USB... No controllers found USB is stopped. Please issue 'usb start' first. starting USB... No controllers found No ethernet found. missing environment variable: pxeuuid missing environment variable: bootfile Retrieving file: pxelinux.cfg/00000000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/0000000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/000000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/00000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/0000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/000 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/00 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/0 No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/default-arm-sunxi No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/default-arm No ethernet found. missing environment variable: bootfile Retrieving file: pxelinux.cfg/default No ethernet found. Config file not found starting USB... No controllers found No ethernet found. No ethernet found. => => ls ls - list files in a directory (default /) Usage: ls <interface> [<dev[:part]> [directory]] - List files in directory 'directory' of partition 'part' on device type 'interface' instance 'dev'. => su Unknown command 'su' - try 'help' => help ? - alias for 'help' base - print or set address offset bdinfo - print Board Info structure 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 booti - boot arm64 Linux Image image from memory bootm - boot application image from memory bootp - boot image via network using BOOTP/TFTP protocol bootvx - Boot vxWorks from an ELF image 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 /) 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 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 lcdputs - print string on video framebuffer 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 setcurs - set cursor position within screen 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
Igor Posted September 22, 2017 Posted September 22, 2017 Boot process changed. Start with a new image and don't' update. I hope you understand that we don't care to provide any stability for testing images? They work or not. Quote ** File not found /boot/dtb/allwinner/allwinner/sun50i-h5-nanopi-neo2.dtb ** The file is one path up. Copy it there.
Lope Posted September 23, 2017 Author Posted September 23, 2017 Thanks Igor I reflashed a fresh image and it's working now. I was planning to test stability of the image using it as a home router. I thought I can contribute by doing an upgrade and then seeing what breaks or how to keep it working after upgrade? If you don't reply before I get this maybe I'll try upgrade again and then copy the file as you suggest. BTW it's amazing having one of these USB PL-2303HX hooked up to the NanoPi Neo2 for testing. It just works instantly and perfectly on Ubuntu 16.04 with 4.10 kernel with zero configuration of baud settings, parity etc, and I expect it will work with other SBC's like the Orange Pi's and RbPi's ? After re-flashing I saw the whole boot process all the way from U-Boot and then was offered a root console and could login and use the PC just like if I had attached a screen, kb and mouse, but so much more convenient of course because it's a terminal on my dev PC and I can probably paste into minicom.
Igor Posted September 23, 2017 Posted September 23, 2017 6 hours ago, Lope said: I thought I can contribute by doing an upgrade and then seeing what breaks or how to keep it working after upgrade? At least this bug is known. Since we only produce testing images for those boards at the moment failed upgrading is not considered as a bug. Stable images are expected in 1-2 months. If you like to contribute, start with some simple problems. Anything that saves us time. If you are familiar with bash scripts, this needs extensive testing and some code cleanup. Serial console is a must debug tool in our world.
Lope Posted September 23, 2017 Author Posted September 23, 2017 Thanks Igor. I have some familiarity with Bash scripts, however every time I have worked on a complicated bash script I've sworn to myself to never work on a complicated bash script ever again. So I only use bash for very simple stuff. For complex things I use php7-cli scripts For very complex things I use node.js. I'll check it out though. ====== I found an alternative to apt-get upgrade, to upgrade things without breaking the image. `apt-get upgrade` N (then see what needs upgrading that's not firmware etc related) `apt-get upgrade apt hostapd` (etc)
Igor Posted September 23, 2017 Posted September 23, 2017 16 minutes ago, Lope said: I have some familiarity with Bash scripts, however every time I have worked on a complicated bash script I've sworn to myself to never work on a complicated bash script ever again. For basic system stuff and for compatibility reasons, we have no much alternatives than using bash scripts. They are just fine for the job. I also follow a similar pattern and since I currently don't need very complex scriptings php CLI is my top level. 32 minutes ago, Lope said: I found an alternative to apt-get upgrade, to upgrade things without breaking the image. Check apt-mark ... it's integrated into armbian-config https://github.com/armbian/config/blob/dev/debian-config-jobs#L477
Lope Posted September 23, 2017 Author Posted September 23, 2017 This reply is just for anyone interested in using NanoPi Neo2 to do useful things (which ideally should be apt-get upgradable) I completely respect that you don't support this and there's no need for armbian devs to spend time reading this, cos it's working. Okay I upgraded everything except armbian-firmware armbian-tools-xenial linux-dtb-dev-sun50iw2 linux-headers-dev-sun50iw2 linux-image-dev-sun50iw2 linux-u-boot-nanopineo2-dev linux-xenial-root-dev-nanopineo2 sunxi-tools And then just for fun I ran the upgrade to try your fix. The upgrade completed successfully. I rebooted. It was fine but gave the error about missing dtb file. I created the allwinner dir inside the allwinner dir, copied the file there. rebooted, nomore errors, except this CRC error U-Boot 2017.09-armbian (Sep 22 2017 - 09:14:02 +0200) Allwinner Technology CPU: Allwinner H5 (SUN50I) Model: FriendlyARM NanoPi NEO 2 DRAM: 512 MiB MMC: SUNXI SD/MMC: 0 *** Warning - bad CRC, using default environment In: serial Out: serial Err: serial but it boots and there's nothing more to upgrade.
Lope Posted September 23, 2017 Author Posted September 23, 2017 3 minutes ago, Igor said: php CLI is my top level The reason PHP-cli is not my top level is at times when I need to do asynchronous stuff or maybe need functionality not available in PHP. But that's more in the terrirory of software than scripts. I've also come to much prefer ES6 syntax over PHP. PHP is really badly designed language. Not as bad as bash, but still very bad. It is however very useful, simple and convenient.
Igor Posted September 23, 2017 Posted September 23, 2017 44 minutes ago, Lope said: Warning - bad CRC, using default environment This is normal. Regarding Neo2. I recommend building an image from sources - I can add one testing image later.
Recommended Posts