BHak Posted August 5, 2020 Share Posted August 5, 2020 Hi guys. i am able to connect via serial. But the problem is that the unit keep rebooting with the following message: Any idea how i can stop this from running continuously and i have already tried pressing any key or press it continuously, it still does not seem to stop the auto booting ================================ Reg 0x01c20060: 0x0004ade6 Reg 0x01c202c0: 0x0004ade6 NAND_SetClk, nand_index: 0x0000000a Reg 0x01c20080: 0x0004adf7 NB0 : nand phy init ok sum=94b0105e src_sum=94b0105e Ready to disable icache. Jump to secend Boot. SUNXI_NORMAL_MODE [ 0.284]e mode U-Boot 2011.09-rc1-00000-g9175927 (Dec 31 2019 - 09:37:39) Allwinner Technology [ 0.293]version: 1.1.0 [ 0.295]uboot commit : 9175927ae3597c2c4daf8427cb06b0e2dae94389 normal mode [ 0.306]pmbus: ready not set main pmu id axp_probe error [board_vendor] vid_used not used [ 0.346]PMU: pll1 1200 Mhz,PLL6=600 Mhz AXI=400 Mhz,AHB=200 Mhz, APB1=100 Mhz sid read already fel key new mode run key detect no key found no key input dram_para_set start dram_para_set end normal mode [ 0.377]DRAM: 512 MiB relocation Offset is: 15b14000 [box standby] read rtc = 0xf [box_start_os] mag be start_type no use user_gpio config user_gpio ok gic: normal or no secure os mode workmode = 0 [ 0.449]NAND: NAND_UbootInit NAND_UbootInit start NB1 : enter NAND_LogicInit uboot:nand version: 2 22 20150401 1122 nand : get id_number_ctl fail, 5fb9d10b uboot:nand info: 4b04882c ffffffff 20c 0 2 nand : get CapacityLevel fail, 5fb9c4d2 not burn nand partition table! boot_mode 1: nftl num: 2 init nftl: 0 NB1 : NAND_LogicInit ok, result = 0x0 [ 2.269]sunxi flash init ok In: serial Out: serial Err: serial --------fastboot partitions-------- -total partitions:9- -name- -start- -size- bootloader : 1000000 1000000 env : 2000000 1000000 boot : 3000000 1000000 system : 4000000 d0000000 recovery : d4000000 2000000 mass_storage: d6000000 70000000 sysrecovery : 46000000 2e000000 cache : 74000000 50000000 UDISK : c4000000 0 ----------------------------------- base bootcmd=run setargs_nand boot_normal bootcmd set setargs_nand to be run cmd=run setargs_nand boot_normal WORK_MODE_BOOT Switch: run command: sunxi_gpio input switch1 0x5ffe8584 gpio value = 1 Switch: run command: sunxi_gpio input switch2 0x5ffe8584 gpio value = 1 Switch: run command: sunxi_gpio input switch3 0x5ffe8584 gpio value = 1 switch1: 1, switch2: 1, switch3: 1 run command: aw_fatload bootloader tar_fail.txt 0x5ffe8585 1 argc = 5, argv = aw_fatload, bootloader, tar_fail.txt f_open error: aw_fat_fsload: filename = tar_fail.txt, code = 4 boot recovery !!!!!!!!!!!!!!!!!!! [ 2.461]Hit any key to stop autoboot: 0 read boot or recovery all boota: bad boot image magic, maybe not a boot.img? try to read all [ 2.729]sunxi flash read :offset d4000000, 33554432 bytes OK ## Booting kernel from Legacy Image at 40007800 ... Image Name: Linux-3.4.39 Image Type: ARM Linux Kernel Image (uncompressed) Data Size: 4149512 Bytes = 4 MiB Load Address: 40008000 Entry Point: 40008000 Verifying Checksum ... OK Loading Kernel Image ... OK OK [ 2.821][mmc]: MMC Device 2 not found [ 2.825][mmc]: mmc not find,so not exit NAND_UbootExit NB1 : NAND_LogicExit nand release dma:0 [ 2.829] Starting kernel ... [sun8i_fixup]: From boot, get meminfo: Start: 0x40000000 Size: 512MB ion_carveout reserve: 160m@0 300m@0 130m@1 200m@1 ion_reserve_select: ion chipid [0x2c00181! ion_reserve_common: ion reserve: [0x56000000, 0x60000000]! [ 0.185873] failed to get normal led pin assign [ 0.185885] failed to get standby led pin assign [ 0.565807] ls_fetch_sysconfig_para: type err device_used = -1064843484. [ 0.575199] [cpu_freq] ERR:get cpu extremity frequency from sysconfig failed, use max_freq [ 0.589857] sunxi_oops: heming add OOPS_INFO_ADDR = -20 [ 2.333817] ths_fetch_sysconfig_para: type err device_used = 1. --- We are doing upgrade or recovery ... umount: can't umount /dev/nanda: Invalid argument --- bootcountpart = /dev/nanda, bootcountfolder = /root/bootcount, bootcount_filename = /root/bootcount/bootcnt.txt --- bootcount = 0 --- do_recovery.sh: we are upgrading ... --- We are doing upgrade, Source is /dev/nandf, Destination is /dev/nandd umount: can't umount /root/bootcount: Invalid argument umount: can't umount /root/cache: Invalid argument umount: can't umount /root/rootfs: Invalid argument --- Stage 1: Mounting Partitions --- We are upgrading firmware ... umount: can't umount /dev/nandf: Invalid argument --- Clearing boot counter ... mkfs.fat 3.0.27 (2014-11-12) unable to get drive geometry, using default 255/63 --- Stage 2: Checking for upgrade file ... --- No update file found. Writing error and exiting ... --- Exiting script and writing log file ... --- Unmounting everything ... umount: can't umount /dev/nandh: Invalid argument umount: can't umount /root/rootfs: Invalid argument HELLO! BOOT0 is starting! boot0 version : boot0 commit : 368945ad3c87c1814bfe3eea5aab3ffc0e9d2d5c fel_flag = 0x00000000 rtc[0] value = 0x00000000 rtc[1] value = 0x00000000 rtc[2] value = 0x00000000 rtc[3] value = 0x0000000f rtc[4] value = 0x00000000 rtc[5] value = 0x00000000 rtc[6] value = 0x00000000 rtc[7] value = 0x00000000 DRAM DRIVE INFO: V1.3 the chip id is 0x00000081 the chip id is 0x00000081 the chip id is 0x00000081 the chip id is 0x00000081 the chip id is 0x00000081 READ DQS LCDL = 00242424 DRAM Type = 3 (2:DDR2,3:DDR3,6:LPDDR2,7:LPDDR3) DRAM CLK = 576 MHz DRAM zq value: 003b3bfb DRAM dram para1: 10f20200 DRAM dram para2: 00000001 DRAM workmode1: 000009f4 DRAM SIZE =512 M odt delay dram size =512 NAND_PIORequest, nand_index: 0x00001000 Reg 0x01c20848: 0x0004adeb Reg 0x01c2084c: 0x0004adde Reg 0x01c20850: 0x0004adde NAND_ClkRequest, nand_index: 0x0004adf6 Reg 0x01c20080: 0x0004adf3 Reg 0x01c20060: 0x0004ade6 Reg 0x01c202c0: 0x0004ade6 NAND_SetClk, nand_index: 0x0000000a Reg 0x01c20080: 0x0004adf7 NB0 : nand phy init ok sum=94b0105e src_sum=94b0105e Ready to disable icache. Jump to secend Boot. SUNXI_NORMAL_MODE [ 0.285]e mode U-Boot 2011.09-rc1-00000-g9175927 (Dec 31 2019 - 09:37:39) Allwinner Technology [ 0.294]version: 1.1.0 [ 0.296]uboot commit : 9175927ae3597c2c4daf8427cb06b0e2dae94389 normal mode [ 0.307]pmbus: ready not set main pmu id axp_probe error [board_vendor] vid_used not used [ 0.347]PMU: pll1 1200 Mhz,PLL6=600 Mhz AXI=400 Mhz,AHB=200 Mhz, APB1=100 Mhz sid read already fel key new mode run key detect no key found no key input dram_para_set start dram_para_set end normal mode [ 0.378]DRAM: 512 MiB relocation Offset is: 15b14000 --- We are doing upgrade or recovery ... umount: can't umount /dev/nanda: Invalid argument --- bootcountpart = /dev/nanda, bootcountfolder = /root/bootcount, bootcount_filename = /root/bootcount/bootcnt.txt --- bootcount = 0 --- do_recovery.sh: we are upgrading ... --- We are doing upgrade, Source is /dev/nandf, Destination is /dev/nandd umount: can't umount /root/bootcount: Invalid argument umount: can't umount /root/cache: Invalid argument umount: can't umount /root/rootfs: Invalid argument --- Stage 1: Mounting Partitions --- We are upgrading firmware ... umount: can't umount /dev/nandf: Invalid argument --- Clearing boot counter ... mkfs.fat 3.0.27 (2014-11-12) unable to get drive geometry, using default 255/63 --- Stage 2: Checking for upgrade file ... --- No update file found. Writing error and exiting ... --- Exiting script and writing log file ... --- Unmounting everything ... umount: can't umount /dev/nandh: Invalid argument umount: can't umount /root/rootfs: Invalid argument Sent SIGTERM to all processes Sent SIGKILL to all processes Requesting system reboot [ 6.152356] Restarting system. [ 6.155752] Restarting Linux version 3.4.39 (root@keycroc-build) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #2 SMP PREEMPT Fri Mar 20 05:44:18 UTC 2020 [ 6.155764] ▒[XZ ▒▒Ձid axp_probe error [board_vendor] vid_used not used [ 0.346]PMU: pll1 1200 Mhz,PLL6=600 Mhz AXI=400 Mhz,AHB=200 Mhz, APB1=100 Mhz sid read already fel key new mode run key detect no key found no key input dram_para_set start dram_para_set end normal mode [ 0.377]DRAM: 512 MiB relocation Offset is: 15b14000 [box standby] read rtc = 0xf [box_start_os] mag be start_type no use user_gpio config user_gpio ok gic: normal or no secure os mode workmode = 0 [ 0.449]NAND: NAND_UbootInit NAND_UbootInit start NB1 : enter NAND_LogicInit uboot:nand version: 2 22 20150401 1122 nand : get id_number_ctl fail, 5fb9d10b uboot:nand info: 4b04882c ffffffff 20c 0 2 ▒j sysrecovery : 46000000 2e000000 cache : 74000000 50000000 UDISK : c4000000 0 ----------------------------------- base bootcmd=run setargs_nand boot_normal bootcmd set setargs_nand to be run cmd=run setargs_nand boot_normal WORK_MODE_BOOT Switch: run command: sunxi_gpio input switch1 0x5ffe8584 gpio value = 1 Switch: run command: sunxi_gpio input switch2 0x5ffe8584 gpio value = 1 Switch: run command: sunxi_gpio input switch3 0x5ffe8584 gpio value = 1 switch1: 1, switch2: 1, switch3: 1 run command: aw_fatload bootloader tar_fail.txt 0x5ffe8585 1 argc = 5, argv = aw_fatload, bootloader, tar_fail.txt Link to comment Share on other sites More sharing options...
Lain__D Posted December 2, 2020 Share Posted December 2, 2020 Thank you @Doridian for posting the node script to manually flash the ROM. I corrupted my file system trying to get my GPS dongle to work and mounting it to the "wrong" folder. I'm currenting using the script to "restore" my owl now...I'm glad I had an extra FT232 laying around from another project. Question for you @Doridian I know Node pretty well, but not the serial library, so excuse me if this is a dumb question, but wouldn't the script run significantly faster if you didn't push each data write to the stdout...AFAIK node.js does not have a write buffer for output to the console, and even though its non-blocking constantly writing each piece of data received to the stdout could still significantly slow down the process. I wasn't brave enough to try this myself though, yet, I just want my owl to work again. Link to comment Share on other sites More sharing options...
Doridian Posted December 2, 2020 Share Posted December 2, 2020 2 minutes ago, Lain__D said: Question for you @Doridian I know Node pretty well, but not the serial library, so excuse me if this is a dumb question, but wouldn't the script run significantly faster if you didn't push each data write to the stdout...AFAIK node.js does not have a write buffer for output to the console, and even though its non-blocking constantly writing each piece of data received to the stdout could still significantly slow down the process. I wasn't brave enough to try this myself though, yet, I just want my owl to work again. Well, while console output could possibly be a concern indeed. I don't think it is a major concern comparatively to how slow the serial bus is. Feel free to remove the console output. I kept it in there mainly so I could follow the process and see if anything bad happens. The script does evaluate the "echo back" from the uboot shell to make sure it received what was sent, so it should be reasonably safe even with that removed. Link to comment Share on other sites More sharing options...
Lain__D Posted December 2, 2020 Share Posted December 2, 2020 @Doridian Interesting!! Shows how little I know about rs-232....if you have a second would you mind teaching me something? With the baud rate of the owl being 115200bits per second, and the signal owl having a total flash size of 16MB, and then multiplied by 8 because of the TTL information, so 1024000000 bits total, my math says that should take about 2 and a half hours? I'm assuming I'm missing some sort of other information that's included in each transaction that's taking up a lot of the bits, but what is that overhead? do you know? Link to comment Share on other sites More sharing options...
Lain__D Posted December 2, 2020 Share Posted December 2, 2020 Nevermind I answered my own question by learning how the mm command works and why it has so much overhead and why you were requesting the loadb feature for U-Boot...as that would be able to send the binary out at the actual baud rate Link to comment Share on other sites More sharing options...
Lain__D Posted December 2, 2020 Share Posted December 2, 2020 it WORKED!! Thank you @Doridian Link to comment Share on other sites More sharing options...
CyberTecky Posted November 14, 2022 Share Posted November 14, 2022 On 10/24/2019 at 11:17 AM, Darren Kitchen said: @monsieurmarc you'll find serial pads on the bottom of the board along the side opposite the USB ports. I believe they're labeled and you need only connect RX, TX and Ground. Baud Rate: 115200 Parity: 8N1 Hardware Flow Control: No Software Flow Control: No On boot you'll be prompted "Hit any key to stop autobooting". Pressing any key will drop you to a uboot> prompt. The help command shows all that's available. It supports tftpboot, but I can't say I've ever flashed it directly via serial. Hit any key to stop autobooting: 0 uboot> help ? - alias for 'help' bootm - bootm - boot application image from memory cp - memory copy dhcp - invoke DHCP client to obtain IP/boot params echo - echo args to console erase - erase FLASH memory exit - exit script go - start application at address 'addr' help - print embedded help httpd - start www server for firmware recovery iminfo - iminfo - print header information for application image itest - return true/false on integer compare md - memory display mm - memory modify (auto-incrementing) mtest - RAM test mw - memory write (fill) nm - memory modify (constant address) ping - send ICMP ECHO_REQUEST to network host printenv - print environment variables printmac - print MAC addresses stored in FLASH reset - perform RESET of the CPU run - run commands in an environment variable saveenv - save environment variables to FLASH setenv - set environment variables setmac - save new MAC address in FLASH startnc - start net console startsc - start serial console test - minimal test like /bin/sh tftpboot - boot image via network using TFTP protocol version - print U-Boot version uboot> There's also a failsafe section later on in the boot process that'll drop you into a busybox shell if you press f then enter. Press the [f] key and hit [enter] to enter failsafe mode Press the [1], [2], [3] or [4] key and hit [enter] to select the debug level f - failsafe - /etc/preinit: line 6: dropbearkey: not found /etc/preinit: line 7: dropbear: not found BusyBox v1.30.1 () built-in shell (ash) ash: can't access tty; job control turned off .___. {o,o} /)__) Hak5 Signal Owl " " Version XVERSIONX ======================================= Built on OpenWRT 19.07 ======================================= .___. {o,o} /)__) Hak5 Signal Owl " " Version XVERSIONX (Failsafe) ======================================= Built on OpenWRT 19.07 ======================================= root@(none):/# From here you have all the usual suspects - iwconfig, scp, sysupgrade - which in concert should get you going. Obviously the warranty is void when you crack the case, but seeing as it's bricked anyway you've really got nothing to lose. My condolences on your loss - and best of luck should you take on the adventure. There's also an express replacement service that covers accidental damage and other out-of-warranty claims for a small one-time incident fee. More info at the bottom of https://shop.hak5.org/pages/support Folks, FYI - Even though Darren labeled the GND, TX, RX correctly, be sure to connect your RX to TX AND your TX to RX on your UART device.Example: __________________ | O W L | | | [ GND TX RX ] | | | GND RX TX |________________________| ( UART DONGLE ) ADDITIONAL REF'S: https://microcontrollerslab.com/uart-communication-working-applications/ Enjoy! ~ CyberTecky Link to comment Share on other sites More sharing options...
CH4RG3MENT Posted April 2, 2023 Share Posted April 2, 2023 Hello everyone, I have a problem when I want to run the script Quote "node ./flashme.js" I have the following error message Quote "TypeError: SerialPort is not a constructor at Object.<anonymous> (D:\slow-uboot-flasher-main\flashme.js:6:14) at Module._compile (node:internal/modules/cjs/loader:1254:14) at Module._extensions..js (node:internal/modules/cjs/loader:1308:10) at Module.load (node:internal/modules/cjs/loader:1117:32) at Module._load (node:internal/modules/cjs/loader:958:12) at Function.executeUserEntryPoint [as runMain] (node:internal/modules/run_main:81:12) at node:internal/main/run_main_module:23:47" I managed to connect to my Signal OWL via putty. Thank you all Link to comment Share on other sites More sharing options...
dark_pyrro Posted April 2, 2023 Share Posted April 2, 2023 Might be related to the Node SerialPort version that is being used Link to comment Share on other sites More sharing options...
CH4RG3MENT Posted April 2, 2023 Share Posted April 2, 2023 Thank you very much you put the chip in my ear I checked what was the version of SerialPort and I was in version 10 so I went back one version to finish in version 9 then I executed my script and it worked right away! Command for downgrade : Quote npm install serialport@9.0.0 Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.