vhlemoine Posted November 26, 2015 Posted November 26, 2015 After downloading and installing (legacy ubuntu trusty) v 4.5 and doing apt-get update && apt-get upgrade (to v4.6) I ran nand-sata-install to boot and run from nand, my board won't boot because of script is invalid and unable to parser boot.ini. I still can boot from my SD-card the following information is displayed boot0 version : 1.5.0 dram size =1024 Succeed in opening nand flash. Succeed in reading Boot1 file head. The size of Boot1 is 0x00056000. The file stored in 0X00000000 of block 2 is perfect. Check is correct. Ready to disable icache. Succeed in loading Boot1. Jump to Boot1. [ 0.177] boot1 version : 1.5.0 [ 0.177] pmu type = 3 [ 0.178] bat vol = 0 [ 0.210] axi:ahb:apb=3:2:2 [ 0.210] set dcdc2=1400, clock=1008 successed [ 0.212] key [ 0.225] no key found [ 0.225] flash init start [ 0.259] flash init finish [ 0.261] fs init ok [ 0.263] fattype FAT16 [ 0.263] fs mount ok [ 0.269] script finish [ 0.270] power finish [ 0.270] storage_type=0 [ 0.280] BootMain start [ 0.280] 0 [ 0.311] script is invalid [ 0.312] unable to parser boot.ini [ 0.313] try to fel in 1 secend Any idea what might the problem
Igor Posted November 26, 2015 Posted November 26, 2015 Let's check first if your upgrade was successful ? The script is new, old one should be removed on upgrade since it's deprecated and probably won't work. What do you get: which nand-sata-install and ls -l /boot
vhlemoine Posted November 26, 2015 Author Posted November 26, 2015 which nand-sata-install /usr/sbin/nand-sata-install (the one with 3 options (1.boot from NAND, system on NAND, 2 boot from NAND system on SATA, 3 Boot from SD, system on SATA) ls -l /boot (sd card) total 13484 drwxr-xr-x 2 root root 4096 Nov 24 17:36 bin -rw-r--r-- 1 root root 6944 Oct 12 08:37 boot.bmp -rw-r--r-- 1 root root 1804 Oct 12 08:53 boot.cmd -rw-r--r-- 1 root root 1876 Oct 12 08:53 boot.scr -rw-r--r-- 1 root root 94895 Nov 23 17:36 config-3.4.110-sun4i -rw-r--r-- 1 root root 3130889 Oct 12 08:37 initrd.img-3.4.109-sun4i -rw-r--r-- 1 root root 3131868 Nov 24 17:39 initrd.img-3.4.110-sun4i lrwxrwxrwx 1 root root 24 Oct 12 08:38 script.bin -> /boot/bin/cubieboard.bin -rw-r--r-- 1 root root 1941812 Nov 23 17:36 System.map-3.4.110-sun4i -rwxr-xr-x 1 root root 5473704 Nov 23 17:36 vmlinuz-3.4.110-sun4i lrwxrwxrwx 1 root root 27 Nov 24 17:38 zImage -> /boot/vmlinuz-3.4.110-sun4i ls -l /boot (on nand1) total 5854 drwxr-xr-x 3 root root 16384 Jan 1 1970 . drwxr-xr-x 24 root root 4096 Nov 25 09:46 .. -rwxr-xr-x 1 root root 84132 Nov 23 18:50 boot.axf -rwxr-xr-x 1 root root 116 Nov 23 18:50 boot.ini drwxr-xr-x 2 root root 2048 Nov 24 17:36 linux -rwxr-xr-x 1 root root 43724 Nov 25 11:33 script.bin -rwxr-xr-x 1 root root 361212 Nov 23 18:50 u-boot.bin -rwxr-xr-x 1 root root 145 Nov 25 11:33 uEnv.txt -rwxr-xr-x 1 root root 5473768 Nov 25 11:33 uImage
technik007_cz Posted November 26, 2015 Posted November 26, 2015 I tested this new script on debian Jessie and it is working. Could you post output of this command? ls -la /usr/sbin/nand-sata-install
vhlemoine Posted November 26, 2015 Author Posted November 26, 2015 ls -la /usr/sbin/nand-sata-install -rwxr-xr-x 1 root root 10820 Nov 23 18:50 /usr/sbin/nand-sata-install
Igor Posted November 26, 2015 Posted November 26, 2015 Yes, it's a bug. It will be gone in next update ... if you overwrite files on nand boot with this: https://github.com/igorpecovnik/lib/tree/second/scripts/nand-sata-install/usr/lib/nand-sata-install/a10/bootloader it should boot. Please try.
vhlemoine Posted November 27, 2015 Author Posted November 27, 2015 Copied those files to /dev/nand1 and reboot. Now a new error shows up. HELLO! BOOT0 is starting! boot0 version : 1.5.0 dram size =1024 Succeed in opening nand flash. Succeed in reading Boot1 file head. The size of Boot1 is 0x00056000. The file stored in 0X00000000 of block 2 is perfect. Check is correct. Ready to disable icache. Succeed in loading Boot1. Jump to Boot1. [ 0.178] boot1 version : 1.5.0 [ 0.178] pmu type = 3 [ 0.179] bat vol = 0 [ 0.211] axi:ahb:apb=3:2:2 [ 0.211] set dcdc2=1400, clock=1008 successed [ 0.213] key [ 0.226] no key found [ 0.226] flash init start [ 0.260] flash init finish [ 0.262] fs init ok [ 0.264] fattype FAT16 [ 0.264] fs mount ok [ 0.270] script finish [ 0.271] power finish [ 0.271] storage_type=0 [ 0.277] elf file header magic not match [ 0.277] elf file c:\boot.axf load fail ls /mnt/bootfs/ -la (mount /dev/nand1 /mnt/bootfs) total 5506 drwxr-xr-x 3 root root 16384 Jan 1 1970 . drwxr-xr-x 4 root root 4096 Nov 25 10:49 .. -rwxr-xr-x 1 root root 30593 Nov 27 07:59 boot.axf -rwxr-xr-x 1 root root 32479 Nov 27 07:59 boot.ini drwxr-xr-x 2 root root 2048 Nov 24 17:36 linux -rwxr-xr-x 1 root root 43724 Nov 25 11:33 script.bin -rwxr-xr-x 1 root root 30614 Nov 27 07:59 u-boot.bin -rwxr-xr-x 1 root root 145 Nov 25 11:33 uEnv.txt -rwxr-xr-x 1 root root 5473768 Nov 25 11:33 uImage
Igor Posted November 27, 2015 Posted November 27, 2015 There is something wrong with a file - they are wrong size. Check if you download files properly (RAW). I had the same error and I only copy those files over and it's booting fine.
vhlemoine Posted November 27, 2015 Author Posted November 27, 2015 How did you copy the files? I used wget https//.../boot.axf etc
Igor Posted November 27, 2015 Posted November 27, 2015 1. git clone https://github.com/igorpecovnik/lib cd lib/scripts/nand-sata-install/usr/lib/nand-sata-install/a10/bootloader rsync -aqc * /XXXXXXXXXXXXXXXXXX # directory where is your /dev/nand1 mounted or file by file, this way: 2. RAW github dl wget https://github.com/igorpecovnik/lib/raw/second/scripts/nand-sata-install/usr/lib/nand-sata-install/a10/bootloader/boot.axf
vhlemoine Posted November 27, 2015 Author Posted November 27, 2015 Nope. No cheese! Ran this: git clone https://github.com/igorpecovnik/libcd lib/scripts/nand-sata-install/usr/lib/nand-sata-install/a10/bootloaderrsync -aqc * /mnt/bootfs Reboot and (old) error is back again HELLO! BOOT0 is starting! boot0 version : 1.5.0 dram size =1024 Succeed in opening nand flash. Succeed in reading Boot1 file head. The size of Boot1 is 0x00056000. The file stored in 0X00000000 of block 2 is perfect. Check is correct. Ready to disable icache. Succeed in loading Boot1. Jump to Boot1. [ 0.178] boot1 version : 1.5.0 [ 0.178] pmu type = 3 [ 0.179] bat vol = 0 [ 0.211] axi:ahb:apb=3:2:2 [ 0.211] set dcdc2=1400, clock=1008 successed [ 0.213] key [ 0.226] no key found [ 0.226] flash init start [ 0.260] flash init finish [ 0.262] fs init ok [ 0.264] fattype FAT16 [ 0.264] fs mount ok [ 0.270] script finish [ 0.271] power finish [ 0.271] storage_type=0 [ 0.281] BootMain start [ 0.281] 0 [ 0.314] script is invalid [ 0.314] unable to parser boot.ini [ 0.315] try to fel in 1 secend ls /mnt/bootfs/ -la total 5854 drwxr-xr-x 3 root root 16384 Jan 1 1970 . drwxr-xr-x 4 root root 4096 Nov 25 10:49 .. -rwxr-xr-x 1 root root 84132 Nov 27 08:45 boot.axf -rwxr-xr-x 1 root root 116 Nov 27 08:45 boot.ini drwxr-xr-x 2 root root 2048 Nov 27 08:45 linux -rwxr-xr-x 1 root root 43724 Nov 25 11:33 script.bin -rwxr-xr-x 1 root root 361212 Nov 27 08:45 u-boot.bin -rwxr-xr-x 1 root root 145 Nov 25 11:33 uEnv.txt -rwxr-xr-x 1 root root 5473768 Nov 25 11:33 uImage
Igor Posted November 27, 2015 Posted November 27, 2015 Now I am a bit consed. I just build a new image for A10 from clean sources and install it to NAND with root on SATA drive. Zero problems. What's clean image different from upgrade? I'll upload a complete pack later and try that first. There is one common issues .. sometimes, when NANDs boot part gets corrupted it's necessary to install stock Android / Ubuntu to NAND with factory tools (Phoenix suite) and do the install part again. It doean't look that you need to do this but it's an option to try.
Recommended Posts