|
Post by jj0 on Nov 19, 2020 15:13:47 GMT
Update v12: Switched to fes1 initialisation and u-boot.fex (2011.09) to fix issues with FEL-mode via hardware button - apparently modern u-boot spl initialisation is missing something. Tested on my Maxi and on Orange Pi PC both with 'hardware button' FEL-mode and 'Press 2 on UART at boot' FEL-mode and it works (for me anyway) in both modes. Update v11: Changed from a 'recent' u-boot (2017) to (almost) the same one as the Maxi uses for it's normal boot. This is version 2011.09 which I've compiled from a nanopi m1 SDK. This 2011.09 u-boot allows the kernel to boot without any af the previous crashes and also enables the normal USB ports. So you are now able to mount USB drives and copy stuff to/from it. Note, this changes some of the output of the boot.sh / boot.cmd compared to what is shown below, but not significantly so. I will update the post when some more people have tested this. Also, there is no longer output on the HDMI TV screen. Update v10: Changed the u-boot for one that also displays on the TV screen. So now you can at least see whether u-boot loads OK and whether it boots the kernel. Once it starts the kernel you'll see lot's of colourful changing garbage on the screen - if you don't then something is wrong. I've also removed the earlyprintk console as it looks like the kernel hangs at the early console phase. Update v9: I tested this in a Windows 10 virtual machine now as well. Just like in Linux it works (for me) though it occasionally hangs while booting. So you might have to try a couple of times. Also combining this with an USB2Serial converter connecte to the UART is still my advice as you can see what's happening from boot time. Update: @spannernick tested this on Windows 10 and it doesn't work on Windows. So for now this is restricted to Linux. If you don't have Linux you can try to boot from e.g. an Ubuntu Live USB image. In the meantime I will look into the Windows issue. Following on from the C64 Maxi and VIC-20 OTG access the attached file makes this possible via FEL booting as well. When you use this you will be able to access the command line of the Maxi/VIC-20 (henceforth both referred to as Maxi) via a virtual serial port (and also still via the UART) and nanda and nandb will be shared via USB as Mass Storage devices. The required files can be found in this C64Maxi-VIC-20-FEL-rescue-boot-v12.7z file. If you extract the contents of the file to a directory on your PC you will have the following folders: - boot: This contains the required kernel, script.bin etc files
- linux: sunxi-fel tool for linux (x86_64) and boot.sh to upload the kernel etc to the Maxi. If the tools don't work you might need to install them yourself (apt-get sunxi-tools) or compile them from source.
- windows: sunxi-fel tool + dll's for Windows (64-bit) and boot.sh to upload the kernel etc to the Maxi. If the tools don't work then googling is your best friend, I don't know too much about compiling this on Windows.
The main reason for publishing this is so you can: - Make backups of nanda and nandb and restore them from your PC with your favourite disk imaging tool. For example 'dd' from the command line or the Disks utility from the GUI on Linux, or W32 Disk Imager on Windows.
- Execute Linux commands on the Maxi, explore stuff, change things etc.
- Explore the nandb root filesystem from your PC if your OS supports the ext4 filesystem.
This is easy in Linux, for Windows you need to search for an ext4 driver, Ext2Fsd has been reported to work or maybe use the 'Windows Subsystem for Linux' v1 or v2.
USE THIS AT YOUR OWN RISK: - I've tested in on my Maxi and my VIC-20 without issues but your results might vary.
- Take care to ensure your Maxi has enough power, don't just run it from your PC's USB port as then it might have enough power to boot and present the nanda/nadb Mass Storage devices and the virtual serial port but it might not have enough power for actual consistend and dependable reading and writing to nanda/nandb. I've had different results imaging the nanda/nandb with different power deliveries to the Maxi, the only consistent one was when I ensured I had enough power by using a powered USB hub in addition to the power from my laptops USB3 port. But instead of a powered HUB powering the Maxi via the included USB power supply might be enough as well. When in doubt use a USB power supply with more rated Watts
- Ensure that the first thing you do is to make a backup of your nanda and nandb. With a disk imaging tool you can do this directly from the Mass Storage devices on your PC. But you can also do this from the command line (on the virtual serial port) to a USB drive (that you know works on the Maxi, so MBR + FAT32 formatted) inserted in the Maxi:
mount /dev/sda1 /mnt cd /mnt dd of=nandb if=/dev/nandb sync md5sum /dev/nandb nandb The last command (md5sum) should output the same number for both /dev/nandb and nandb - Writing back nanda (this should almost never be needed) or nandb can be done with a disk imaging tool as well, or:
mount /dev/sda1 /mnt cd /mnt dd if=nandb of=/dev/nandb sync md5sum /dev/nandb nandb The last command (md5sum) should again output the same number for both /dev/nandb and nandb
To run the FEL-mode resuce boot: - Extract the zipfile to a directory on your PC
- Connect the Maxi from it's back USB A port (normal size, not the micro USB port you usually power it from) to a USB (also A) port on your PC
- Switch on the Maxi and verify that it works and receives enough power from your PC and other PSU's
- Power it off again and make it boot in FEL mode, either by:
- From an UART connection keep 2 pressed and then powering it on
- Opening up your Maxi, keeping the FEL-mode button pressed and the powering the Maxi on. The FEL-mode button is the tiny button in the picture below:
If the PCB is still in the breadbin case, the button will be facing the bottom of the case.
The easiest way to do this is with a powered hub with individual on/off switched per port, as then you can keep the FEL button pressed and then switch on power to the USB port on the HUB that it is connected to. You can of course also keep the FEL button pressed, then add power to the Maxi either from USB first and then add the PSU or from the PSU first and then add the USB. You can even start with powering on the Maxi normally, then shut it down with its power button, then press the FEL button and the power button again and then connect the USB to your PC. Once you've done one of these your PC should have a new USB device (1f3a:efe8, on my Ubuntu PC it's called an 'Onda (unverified) V972 tablet in flashing mode'). Next - If you're using Linux, cd to the linux folder and run ./boot.sh
- If you're using Windows 7 or 10 (64 bit) cd to the windows folder and run boot.cmd. You might need to install a USB driver. But if you have hackchi2 installed the USB driver might already be installed. It might call your Maxi differently though, e.g. SNES.
If all works well you will see that the kernel etc files are being uploaded: USB device 001:062 Allwinner H3 02c00081:25c04620:78a28014:542c0793 100% [================================================] 13 kB, 184.4 kB/s 100% [================================================] 934 kB, 259.6 kB/s 100% [================================================] 15626 kB, 260.1 kB/s
- After quite a bit of time (~30-60 seconds) your PC should announce two new Mass Storage devices. One will be 17MB which is nanda and one will be ~197MB which is nandb. For example, this is what I see using the Disks utility in Linux (ignore the 2.0TB disk and the 64GB Drive):
nanda, this is not a filesystem but an Android bootimage so it's shown as 'Unknown':
nandb, this contains an ext4 filesystem. Note that nandb is 197MB but in fact the actual size of the ext4 partition is only 69MB. The rest is probably left empty in case of errors on the nand.
- Your PC should also have a new (virtual) serial port. On Linux this will be /dev/ttyACM0, on Windows a COMx port. On the Maxi itself it is /dev/ttyGS0. Note you might need to install the USB CDC driver if you're not on Windows 10. You can connect to this serial port with e.g. screen or tio in Linux, or Putty in Windows with parameters 115200,N,8,1. Once you connect you will see some information on your nand etc and you can start using the shell straight away without having to log in.
Note that the actual size of the rootfs is 68.9MB whereas the size of nandb is 197MB
To quit the OTG mode you have to (safely) eject each Mass Storage device and then switch the Maxi off.Some notes on filesystem integrity/safety and other stuff: - FEL-mode is running from a ramdisk, neither nanda nor nandb are used or mounted. So you can safely copy them or modify them as you see fit AS LONG AS YOU SAFELY UNMOUNT THEM!
- The FEL-mode uses the C64 Maxis kernel - this might be different from the VIC-20's kernel but the VIC-20's (1.4.2) nand driver loads OK and most likely the Maxi's nand driver recognises the VIC-20's nand anyway as basically they are the same machines.
- If RGL updates the Maxi/VIC-20 a new nand driver might be needed for the nand of that machine. In that case there will only be a command shell with a message that no nand driver could be loaded and the ID of the nand. Please post that in this thread for further investigation..
- The kernel loads without errors and the other USB ports are supported for e.g. USB sticks. They will not mount automatically though.
To run this from an Ubuntu Live USB disk (to prevent possible Windows issues) do something like:
- Boot from the Ubuntu Live USB Disk, and set up networking
- Insert an USB stick that contains the C64/VIC-20 fel mode stuff.
- Start a terminal with CTRL-AT-T
In the terminal type:
sudo su snap install tio --classic tio /dev/ttyUSB0 # This only if you have a serial2usb adapter connected to the Maxi's UART
Start another terminal with CTRL-ALT-T, and type:
sudo su tio /dev/ttyACM0
- Start another terminal with CTRL-ALT-T, and type:
sudo su cd <wherever the 64/VIC-20 FEL mode stuff is> cd linux # Manual check whether FEL-mode is activated: sunxi-fel -l # If you get something like: USB device 002:047 Allwinner H3 02c00181:14004620:7895c11c:241b0ad3 or similar your Maxi is in FEL mode ./boot.sh
Now it should load the FEL-mod uboot and kernel into the Maxi Switch to the terminal window where you started 'tio /dev/ttyACM0' and you should get a command line terminal there. You should also get the 2 new Mass Storage devices as explained above. Enjoy and please let me know how it works for you. Attachments:MAxi FELjpg (683.95 KB)
|
|
ender
Creatures
Posts: 39
|
Post by ender on Nov 19, 2020 16:21:43 GMT
Nice work! The first link just links back to the thread, though.
|
|
|
Post by jj0 on Nov 19, 2020 16:28:49 GMT
Nice work! The first link just links back to the thread, though. Thanks, fixed now.
|
|
|
Post by antjols1973 on Nov 20, 2020 1:25:04 GMT
Brilliant work, thanks JJ, will certainly give this a go on the weekend....
|
|
|
Post by grasshopper on Nov 20, 2020 17:49:40 GMT
Hi jj0,
I've just had a quick go at this. Unfortunately, I can't get it to work.
When I run boot.sh I get the same output that you do but my PC doesn't announce two new USB storage devices and the /dev/ttyACM0 virtual serial port is also missing.
Any ideas?
Thanks
|
|
|
Post by jj0 on Nov 20, 2020 20:01:03 GMT
Hi jj0, I've just had a quick go at this. Unfortunately, I can't get it to work. When I run boot.sh I get the same output that you do but my PC doesn't announce two new USB storage devices and the /dev/ttyACM0 virtual serial port is also missing. Any ideas? Thanks It's hard to say, probably it hangs just like what happens occasionally to me. How many times did you try? Also, are you powering just from USB, or also from a powered USB hub or from the micro-USB port? If you have any means to connect to the UART (USB2Serial convertor, Raspberry Pi or similar device, psychic powers) you can check if the system actually starts booting, you should see something like this: First U-Boot starting: U-Boot 2020.04-rc2-jj_0+ (Nov 19 2020 - 17:45:14 +0100)TheC64Maxi u-boot
CPU: Allwinner H3 (SUN8I 1680) Model: Xunlong Orange Pi PC DRAM: 256 MiB NAND: #of NAND chips: 1 Calling sunxi_nand_chip_init: 1 reg property (node: 18220, nsels: 4 ): 17 retrieve reg property array cs OK: 0 ECC value: Pre-check: ecc->size: 1024, ecc->strength: 16 Post-check: ecc->size: 1024, ecc->strength: 16 256 MiB MMC: mmc@1c0f000: 0 In: serial Out: serial Err: serial Model: Xunlong Orange Pi PC Net: No ethernet found. Autoboot in 2 seconds - hold 'j' to interrupt. machid=1029 bootm_boot_mode=sec bootargs=ramfs console=ttyS0,115200 earlyprintk=ttyS0,115200 init=/init loglevel=9 boot_type=0 fb_base=0x0 config_size=49152 boot_mode=0x0 chipid=81 mem=256M ## Booting Android Image at 0x40007800 ... Android's image name: FEL Rescue Kernel load addr 0x40008000 size 6340 KiB RAM disk load addr 0x5d000000 size 8915 KiB XIP Kernel Image Loading Ramdisk to 49691000, end 49f459e6 ... OK Using machid 0x1029 from environment
Starting kernel ... Then the kernel starting
[sun8i_fixup]: From boot, get meminfo: Start: 0x40000000 Size: 256MB ion_carveout reserve: 160m@0 256m@0 130m@1 200m@1 ion_reserve_select: ion chipid [0x2c00181! ion_reserve_common: ion reserve: [0x46000000, 0x50000000]! [ 0.000000] Booting Linux on physical CPU 0 [ 0.000000] Initializing cgroup subsys cpu [ 0.000000] Linux version 3.4.39 (chris@puck) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #1 SMP PREEMPT Wed Sep 11 17:59:09 BST 2019 [ 0.000000] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=10c5387d [ 0.000000] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache [ 0.000000] Machine: sun8i [ 0.000000] bootconsole [earlycon0] enabled [ 0.000000] cma: CMA: failed to reserve 160 MiB [ 0.000000] Memory policy: ECC disabled, Data cache writealloc [ 0.000000] On node 0 totalpages: 65536 [ 0.000000] free_area_init_node: node 0, pgdat c0637880, node_mem_map c0684000 [ 0.000000] Normal zone: 640 pages used for memmap [ 0.000000] Normal zone: 0 pages reserved [ 0.000000] Normal zone: 64896 pages, LIFO batch:15 [ 0.000000] script_init enter! [ 0.000000] script_init exit! [ 0.000000] PERCPU: Embedded 7 pages/cpu @c0915000 s6976 r8192 d13504 u32768 [ 0.000000] pcpu-alloc: s6976 r8192 d13504 u32768 alloc=8*4096 [ 0.000000] pcpu-alloc: [0] 0 [0] 1 [0] 2 [0] 3 [ 0.000000] Built 1 zonelists in Zone order, mobility grouping on. Total pages: 64896 [ 0.000000] Kernel command line: ramfs console=ttyS0,115200 earlyprintk=ttyS0,115200 init=/init loglevel=9 boot_type=0 fb_base=0x0 config_size=49152 boot_mode=0x0 chipid=81 mem=256M [ 0.000000] PID hash table entries: 1024 (order: 0, 4096 bytes) [ 0.000000] Dentry cache hash table entries: 32768 (order: 5, 131072 bytes) [ 0.000000] Inode-cache hash table entries: 16384 (order: 4, 65536 bytes) [ 0.000000] Memory: 256MB = 256MB total [ 0.000000] Memory: 243420k/243420k available, 18724k reserved, 0K highmem [ 0.000000] Virtual kernel memory layout: [ 0.000000] vector : 0xffff0000 - 0xffff1000 ( 4 kB) [ 0.000000] fixmap : 0xfff00000 - 0xfffe0000 ( 896 kB) [ 0.000000] vmalloc : 0xd0800000 - 0xff000000 ( 744 MB) [ 0.000000] lowmem : 0xc0000000 - 0xd0000000 ( 256 MB) [ 0.000000] pkmap : 0xbfe00000 - 0xc0000000 ( 2 MB) [ 0.000000] modules : 0xbf000000 - 0xbfe00000 ( 14 MB) [ 0.000000] .text : 0xc0008000 - 0xc05b2244 (5801 kB) [ 0.000000] .init : 0xc05b3000 - 0xc05ddb40 ( 171 kB) [ 0.000000] .data : 0xc05de000 - 0xc0638600 ( 362 kB) [ 0.000000] .bss : 0xc0638d34 - 0xc0683bc8 ( 300 kB) [ 0.000000] Preemptible hierarchical RCU implementation. [ 0.000000] Additional per-CPU info printed with stalls. [ 0.000000] NR_IRQS:544 [ 0.000000] Architected local timer running at 24.00MHz. [ 0.000000] Switching to timer-based delay loop [ 0.000000] sched_clock: 32 bits at 24MHz, resolution 41ns, wraps every 178956ms [ 0.000000] Console: colour dummy device 80x30 [ 0.014561] Calibrating delay loop (skipped), value calculated using timer frequency.. 4800.00 BogoMIPS (lpj=24000000) [ 0.022936] pid_max: default: 32768 minimum: 301 [ 0.028142] Mount-cache hash table entries: 512 [ 0.032100] Initializing cgroup subsys debug [ 0.034323] Initializing cgroup subsys cpuacct [ 0.038827] Initializing cgroup subsys freezer [ 0.040073] CPU: Testing write buffer coherency: ok [ 0.045363] CPU0: thread -1, cpu 0, socket 0, mpidr 80000000 [ 0.050026] [sunxi_smp_prepare_cpus] enter [ 0.054229] Setting up static identity map for 0x40411260 - 0x404112b8 [ 0.061948] CPU1: Booted secondary processor [ 0.061948] CPU1: thread -1, cpu 1, socket 0, mpidr 80000001 [ 0.062101] CPU2: Booted secondary processor [ 0.062101] CPU2: thread -1, cpu 2, socket 0, mpidr 80000002 [ 0.071063] CPU3: Booted secondary processor [ 0.071063] CPU3: thread -1, cpu 3, socket 0, mpidr 80000003 [ 0.071202] Brought up 4 CPUs [ 0.080035] SMP: Total of 4 processors activated (19200.00 BogoMIPS). [ 0.087883] devtmpfs: initialized [ 0.098138] wakeup src cnt is : 1. [ 0.098176] [exstandby]leave extended_standby_enable_wakeup_src : event 0x800000 [ 0.100028] [exstandby]leave extended_standby_enable_wakeup_src : wakeup_gpio_map 0x40 [ 0.107959] [exstandby]leave extended_standby_enable_wakeup_src : wakeup_gpio_group 0x0 [ 0.110018] sunxi pm init [ 0.113480] pinctrl core: initialized pinctrl subsystem [ 0.118591] NET: Registered protocol family 16 [ 0.120533] DMA: failed to allocate 2048 KiB pool for atomic coherent allocation [ 0.127483] script_sysfs_init success [ 0.130066] sunxi_dump_init success [ 0.135315] gpiochip_add: registered GPIOs 0 to 383 on device: sunxi-pinctrl [ 0.142747] sunxi-pinctrl sunxi-pinctrl: initialized sunXi PIO driver [ 0.147852] hw-breakpoint: found 5 (+1 reserved) breakpoint and 4 watchpoint registers. [ 0.150030] hw-breakpoint: maximum watchpoint size is 8 bytes. [ 0.156446] [sunxi-module]: [sunxi-module.0] probe success [ 0.160082] script config pll_video to 297 Mhz [ 0.164510] script config pll_de to 864 Mhz [ 0.168785] script config pll_ve to 402 Mhz [ 0.170034] sunxi_default_clk_init [ 0.173457] try to set pll6ahb1 to 200000000 [ 0.177814] try to set ahb clk source to pll6ahb1 [ 0.180017] set ahb clk source to pll6ahb1 [ 0.184156] try to set ahb1 to 200000000 [ 0.188146] try to set apb1 to 100000000 [ 0.200823] bio: create slab <bio-0> at 0 [ 0.201455] [ARISC] :sunxi-arisc driver v1.04 [ 0.222031] [ARISC] :arisc version: [v0.1.58.3] [ 0.298710] [ARISC] :sunxi-arisc driver v1.04 startup succeeded [ 0.302421] SCSI subsystem initialized [ 0.302421] usbcore: registered new interface driver usbfs [ 0.306072] usbcore: registered new interface driver hub [ 0.310272] usbcore: registered new device driver usb [ 0.315357] twi_chan_cfg()340 - [twi0] has no twi_regulator. [ 0.320030] twi_chan_cfg()340 - [twi1] has no twi_regulator. [ 0.325713] twi_chan_cfg()340 - [twi2] has no twi_regulator. [ 0.331080] Advanced Linux Sound Architecture Driver Version 1.0.25. [ 0.338114] cfg80211: Calling CRDA to update world regulatory domain [ 0.340753] Switching to clocksource arch_sys_counter [ 0.345685] FS-Cache: Loaded [ 0.348192] CacheFiles: Loaded [ 0.370829] NET: Registered protocol family 2 [ 0.371470] IP route cache hash table entries: 2048 (order: 1, 8192 bytes) [ 0.377931] TCP established hash table entries: 8192 (order: 4, 65536 bytes) [ 0.384499] TCP bind hash table entries: 8192 (order: 4, 98304 bytes) [ 0.390528] TCP: Hash tables configured (established 8192 bind 8192) [ 0.396606] TCP: reno registered [ 0.399921] UDP hash table entries: 128 (order: 0, 4096 bytes) [ 0.405913] UDP-Lite hash table entries: 128 (order: 0, 4096 bytes) [ 0.412909] NET: Registered protocol family 1 [ 0.417025] Unpacking initramfs... [ 2.139245] Freeing initrd memory: 8912K [ 2.139918] hw perfevents: enabled with ARMv7 Cortex_A7 PMU driver, 5 counters available [ 2.146121] sunxi_reg_init enter [ 2.150858] audit: initializing netlink socket (disabled) [ 2.154655] type=2000 audit(2.150:1): initialized [ 2.163097] msgmni has been set to 492 [ 2.166332] io scheduler noop registered [ 2.167109] io scheduler deadline registered [ 2.171840] io scheduler cfq registered (default) [ 2.176338] gpio_pin_1(362) gpio_request [ 2.180509] gpio_pin_2(15) gpio_request [ 2.184289] gpio_pin_3(19) gpio_request [ 2.188204] gpio_pin_4(20) gpio_request [ 2.192160] gpio_pin_5(21) gpio_request [ 2.196092] gpio name is PL10, ret = 0 [ 2.199934] gpio name is PA15, ret = 0 [ 2.203766] gpio name is PA19, ret = 0 [ 2.207492] gpio name is PA20, ret = 0 [ 2.211354] gpio name is PA21, ret = 0 [ 2.215176] gpio_init finish with uesd 1! [ 2.219022] [DISP]disp_module_init [ 2.223237] cmdline,init_disp= [ 2.225649] cmdline,disp= [ 2.229362] sunxi_buf_alloc(134) err: alloc size 0x708000 failed! [ 2.234505] [DISP] disp_malloc,line:576:disp_malloc fail, size=0x708000 [ 2.241152] [DISP] Fb_map_video_memory,line:163:disp_malloc fail! [ 2.247278] [DISP] Fb_map_kernel_logo,line:1052:Fb_map_kernel_logo failed! [ 2.258126] [DISP]disp_module_init finish [ 2.258717] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator. [ 2.265324] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI [ 2.270806] sw_uart_pm()890 - uart0 clk is already enable [ 2.276236] sw_console_s�[ 2.284256] console [ttyS0] enabled, bootconsole disabled [ 2.284256] console [ttyS0] enabled, bootconsole disabled [ 2.291528] sunxi_cmatest_init enter [ 2.299830] sunxi_cmatest_init success [ 2.313966] loop: module loaded [ 2.317531] Boot type 0 [ 2.321151] ehci_hcd: USB 2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.348590] sunxi-ehci sunxi-ehci.1: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.357627] sunxi-ehci sunxi-ehci.1: new USB bus registered, assigned bus number 1 [ 2.366191] sunxi-ehci sunxi-ehci.1: can't setup [ 2.371450] sunxi-ehci sunxi-ehci.1: USB bus 1 deregistered [ 2.377687] hci: ERR: usb_add_hcd failed [ 2.392139] sunxi-ehci: probe of sunxi-ehci.1 failed with error -12 [ 2.419227] sunxi-ehci sunxi-ehci.2: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.428261] sunxi-ehci sunxi-ehci.2: new USB bus registered, assigned bus number 1 [ 2.436829] sunxi-ehci sunxi-ehci.2: can't setup [ 2.442089] sunxi-ehci sunxi-ehci.2: USB bus 1 deregistered [ 2.448321] hci: ERR: usb_add_hcd failed [ 2.462762] sunxi-ehci: probe of sunxi-ehci.2 failed with error -12 [ 2.489845] sunxi-ehci sunxi-ehci.3: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.498864] sunxi-ehci sunxi-ehci.3: new USB bus registered, assigned bus number 1 [ 2.507407] sunxi-ehci sunxi-ehci.3: can't setup [ 2.512664] sunxi-ehci sunxi-ehci.3: USB bus 1 deregistered [ 2.518894] hci: ERR: usb_add_hcd failed [ 2.533335] sunxi-ehci: probe of sunxi-ehci.3 failed with error -12 [ 2.560449] sunxi-ehci sunxi-ehci.4: SW USB2.0 'Enhanced' Host Controller (EHCI) Driver [ 2.569435] sunxi-ehci sunxi-ehci.4: new USB bus registered, assigned bus number 1 [ 2.578045] sunxi-ehci sunxi-ehci.4: can't setup [ 2.583303] sunxi-ehci sunxi-ehci.4: USB bus 1 deregistered [ 2.589533] hci: ERR: usb_add_hcd failed [ 2.603973] sunxi-ehci: probe of sunxi-ehci.4 failed with error -12 [ 2.611095] ohci_hcd: USB 1.1 'Open' Host Controller (OHCI) Driver [ 2.638102] sunxi-ohci sunxi-ohci.1: SW USB2.0 'Open' Host Controller (OHCI) Driver [ 2.646750] sunxi-ohci sunxi-ohci.1: new USB bus registered, assigned bus number 1 [ 2.655311] sunxi-ohci sunxi-ohci.1: irq 105, io mem 0xf1c1a400 [ 2.661986] ------------[ cut here ]------------ [ 2.667227] WARNING: at arch/arm/mm/dma-mapping.c:474 arm_dma_alloc+0x13c/0x284() [ 2.675712] coherent pool not initialised! [ 2.680368] Modules linked in: [ 2.683845] [<c001485c>] (unwind_backtrace+0x0/0xe0) from [<c0023824>] (warn_slowpath_common+0x4c/0x64) [ 2.694540] [<c0023824>] (warn_slowpath_common+0x4c/0x64) from [<c00238bc>] (warn_slowpath_fmt+0x2c/0x3c) [ 2.705412] [<c00238bc>] (warn_slowpath_fmt+0x2c/0x3c) from [<c00183ac>] (arm_dma_alloc+0x13c/0x284) [ 2.715792] [<c00183ac>] (arm_dma_alloc+0x13c/0x284) from [<c0254298>] (ohci_init+0x188/0x214) [ 2.725578] [<c0254298>] (ohci_init+0x188/0x214) from [<c0254b60>] (sunxi_ohci_start+0x14/0x50) [ 2.735465] [<c0254b60>] (sunxi_ohci_start+0x14/0x50) from [<c0241238>] (usb_add_hcd+0x2c0/0x590) [ 2.745551] [<c0241238>] (usb_add_hcd+0x2c0/0x590) from [<c0257034>] (sunxi_ohci_hcd_probe+0xfc/0x228) [ 2.756128] [<c0257034>] (sunxi_ohci_hcd_probe+0xfc/0x228) from [<c0219fe0>] (platform_drv_probe+0x14/0x18) [ 2.767197] [<c0219fe0>] (platform_drv_probe+0x14/0x18) from [<c0218f28>] (driver_probe_device+0xc8/0x1ec) [ 2.778164] [<c0218f28>] (driver_probe_device+0xc8/0x1ec) from [<c02190ac>] (__driver_attach+0x60/0x84) [ 2.788836] [<c02190ac>] (__driver_attach+0x60/0x84) from [<c021792c>] (bus_for_each_dev+0x50/0x84) [ 2.799115] [<c021792c>] (bus_for_each_dev+0x50/0x84) from [<c0218698>] (bus_add_driver+0x98/0x210) [ 2.809394] [<c0218698>] (bus_add_driver+0x98/0x210) from [<c021957c>] (driver_register+0x9c/0x128) [ 2.819679] [<c021957c>] (driver_register+0x9c/0x128) from [<c05c9be8>] (ohci_hcd_mod_init+0x34/0x60) [ 2.830156] [<c05c9be8>] (ohci_hcd_mod_init+0x34/0x60) from [<c00085e4>] (do_one_initcall+0x90/0x160) [ 2.840631] [<c00085e4>] (do_one_initcall+0x90/0x160) from [<c05b3900>] (kernel_init+0xf8/0x1b8) [ 2.850618] [<c05b3900>] (kernel_init+0xf8/0x1b8) from [<c000e9f8>] (kernel_thread_exit+0x0/0x8) [ 2.860637] ---[ end trace 47752ff83f111591 ]--- [ 2.865814] sunxi-ohci sunxi-ohci.1: startup error -12 [ 2.871677] sunxi-ohci sunxi-ohci.1: USB bus 1 deregistered [ 2.877911] hci: ERR: usb_add_hcd failed [ 2.892358] sunxi-ohci: probe of sunxi-ohci.1 failed with error -12 [ 2.919436] sunxi-ohci sunxi-ohci.2: SW USB2.0 'Open' Host Controller (OHCI) Driver [ 2.928085] sunxi-ohci sunxi-ohci.2: new USB bus registered, assigned bus number 1 [ 2.936640] sunxi-ohci sunxi-ohci.2: irq 107, io mem 0xf1c1b400 [ 2.943315] ------------[ cut here ]------------ [ 2.948547] WARNING: at arch/arm/mm/dma-mapping.c:474 arm_dma_alloc+0x13c/0x284() [ 2.957050] coherent pool not initialised! [ 2.961708] Modules linked in: [ 2.965168] [<c001485c>] (unwind_backtrace+0x0/0xe0) from [<c0023824>] (warn_slowpath_common+0x4c/0x64) [ 2.975843] [<c0023824>] (warn_slowpath_common+0x4c/0x64) from [<c00238bc>] (warn_slowpath_fmt+0x2c/0x3c) [ 2.986793] [<c00238bc>] (warn_slowpath_fmt+0x2c/0x3c) from [<c00183ac>] (arm_dma_alloc+0x13c/0x284) [ 2.997176] [<c00183ac>] (arm_dma_alloc+0x13c/0x284) from [<c0254298>] (ohci_init+0x188/0x214) [ 3.006957] [<c0254298>] (ohci_init+0x188/0x214) from [<c0254b60>] (sunxi_ohci_start+0x14/0x50) [ 3.016842] [<c0254b60>] (sunxi_ohci_start+0x14/0x50) from [<c0241238>] (usb_add_hcd+0x2c0/0x590) [ 3.026925] [<c0241238>] (usb_add_hcd+0x2c0/0x590) from [<c0257034>] (sunxi_ohci_hcd_probe+0xfc/0x228) [ 3.037499] [<c0257034>] (sunxi_ohci_hcd_probe+0xfc/0x228) from [<c0219fe0>] (platform_drv_probe+0x14/0x18) [ 3.048566] [<c0219fe0>] (platform_drv_probe+0x14/0x18) from [<c0218f28>] (driver_probe_device+0xc8/0x1ec) [ 3.059532] [<c0218f28>] (driver_probe_device+0xc8/0x1ec) from [<c02190ac>] (__driver_attach+0x60/0x84) [ 3.070203] [<c02190ac>] (__driver_attach+0x60/0x84) from [<c021792c>] (bus_for_each_dev+0x50/0x84) [ 3.080481] [<c021792c>] (bus_for_each_dev+0x50/0x84) from [<c0218698>] (bus_add_driver+0x98/0x210) [ 3.090759] [<c0218698>] (bus_add_driver+0x98/0x210) from [<c021957c>] (driver_register+0x9c/0x128) [ 3.101039] [<c021957c>] (driver_register+0x9c/0x128) from [<c05c9be8>] (ohci_hcd_mod_init+0x34/0x60) [ 3.111514] [<c05c9be8>] (ohci_hcd_mod_init+0x34/0x60) from [<c00085e4>] (do_one_initcall+0x90/0x160) [ 3.121985] [<c00085e4>] (do_one_initcall+0x90/0x160) from [<c05b3900>] (kernel_init+0xf8/0x1b8) [ 3.131969] [<c05b3900>] (kernel_init+0xf8/0x1b8) from [<c000e9f8>] (kernel_thread_exit+0x0/0x8) [ 3.141931] ---[ end trace 47752ff83f111592 ]--- [ 3.147152] sunxi-ohci sunxi-ohci.2: startup error -12 [ 3.153002] sunxi-ohci sunxi-ohci.2: USB bus 1 deregistered [ 3.159234] hci: ERR: usb_add_hcd failed [ 3.173678] sunxi-ohci: probe of sunxi-ohci.2 failed with error -12 [ 3.200786] sunxi-ohci sunxi-ohci.3: SW USB2.0 'Open' Host Controller (OHCI) Driver [ 3.209403] sunxi-ohci sunxi-ohci.3: new USB bus registered, assigned bus number 1 [ 3.218051] sunxi-ohci sunxi-ohci.3: irq 109, io mem 0xf1c1c400 [ 3.224727] ------------[ cut here ]------------ [ 3.229957] WARNING: at arch/arm/mm/dma-mapping.c:474 arm_dma_alloc+0x13c/0x284() [ 3.238442] coherent pool not initialised! [ 3.243098] Modules linked in: [ 3.246556] [<c001485c>] (unwind_backtrace+0x0/0xe0) from [<c0023824>] (warn_slowpath_common+0x4c/0x64) [ 3.257229] [<c0023824>] (warn_slowpath_common+0x4c/0x64) from [<c00238bc>] (warn_slowpath_fmt+0x2c/0x3c) [ 3.268099] [<c00238bc>] (warn_slowpath_fmt+0x2c/0x3c) from [<c00183ac>] (arm_dma_alloc+0x13c/0x284) [ 3.278475] [<c00183ac>] (arm_dma_alloc+0x13c/0x284) from [<c0254298>] (ohci_init+0x188/0x214) [ 3.288258] [<c0254298>] (ohci_init+0x188/0x214) from [<c0254b60>] (sunxi_ohci_start+0x14/0x50) [ 3.298142] [<c0254b60>] (sunxi_ohci_start+0x14/0x50) from [<c0241238>] (usb_add_hcd+0x2c0/0x590) [ 3.308224] [<c0241238>] (usb_add_hcd+0x2c0/0x590) from [<c0257034>] (sunxi_ohci_hcd_probe+0xfc/0x228) [ 3.318797] [<c0257034>] (sunxi_ohci_hcd_probe+0xfc/0x228) from [<c0219fe0>] (platform_drv_probe+0x14/0x18) [ 3.329863] [<c0219fe0>] (platform_drv_probe+0x14/0x18) from [<c0218f28>] (driver_probe_device+0xc8/0x1ec) [ 3.340831] [<c0218f28>] (driver_probe_device+0xc8/0x1ec) from [<c02190ac>] (__driver_attach+0x60/0x84) [ 3.351502] [<c02190ac>] (__driver_attach+0x60/0x84) from [<c021792c>] (bus_for_each_dev+0x50/0x84) [ 3.361781] [<c021792c>] (bus_for_each_dev+0x50/0x84) from [<c0218698>] (bus_add_driver+0x98/0x210) [ 3.372059] [<c0218698>] (bus_add_driver+0x98/0x210) from [<c021957c>] (driver_register+0x9c/0x128) [ 3.382340] [<c021957c>] (driver_register+0x9c/0x128) from [<c05c9be8>] (ohci_hcd_mod_init+0x34/0x60) [ 3.392814] [<c05c9be8>] (ohci_hcd_mod_init+0x34/0x60) from [<c00085e4>] (do_one_initcall+0x90/0x160) [ 3.403285] [<c00085e4>] (do_one_initcall+0x90/0x160) from [<c05b3900>] (kernel_init+0xf8/0x1b8) [ 3.413269] [<c05b3900>] (kernel_init+0xf8/0x1b8) from [<c000e9f8>] (kernel_thread_exit+0x0/0x8) [ 3.423232] ---[ end trace 47752ff83f111593 ]--- [ 3.428454] sunxi-ohci sunxi-ohci.3: startup error -12 [ 3.434304] sunxi-ohci sunxi-ohci.3: USB bus 1 deregistered [ 3.440567] hci: ERR: usb_add_hcd failed [ 3.454978] sunxi-ohci: probe of sunxi-ohci.3 failed with error -12 [ 3.482080] sunxi-ohci sunxi-ohci.4: SW USB2.0 'Open' Host Controller (OHCI) Driver [ 3.490729] sunxi-ohci sunxi-ohci.4: new USB bus registered, assigned bus number 1 [ 3.499241] sunxi-ohci sunxi-ohci.4: irq 111, io mem 0xf1c1d400 [ 3.505967] ------------[ cut here ]------------ [ 3.511228] WARNING: at arch/arm/mm/dma-mapping.c:474 arm_dma_alloc+0x13c/0x284() [ 3.519679] coherent pool not initialised! [ 3.524333] Modules linked in: [ 3.527791] [<c001485c>] (unwind_backtrace+0x0/0xe0) from [<c0023824>] (warn_slowpath_common+0x4c/0x64) [ 3.538464] [<c0023824>] (warn_slowpath_common+0x4c/0x64) from [<c00238bc>] (warn_slowpath_fmt+0x2c/0x3c) [ 3.549333] [<c00238bc>] (warn_slowpath_fmt+0x2c/0x3c) from [<c00183ac>] (arm_dma_alloc+0x13c/0x284) [ 3.559707] [<c00183ac>] (arm_dma_alloc+0x13c/0x284) from [<c0254298>] (ohci_init+0x188/0x214) [ 3.569491] [<c0254298>] (ohci_init+0x188/0x214) from [<c0254b60>] (sunxi_ohci_start+0x14/0x50) [ 3.579376] [<c0254b60>] (sunxi_ohci_start+0x14/0x50) from [<c0241238>] (usb_add_hcd+0x2c0/0x590) [ 3.589458] [<c0241238>] (usb_add_hcd+0x2c0/0x590) from [<c0257034>] (sunxi_ohci_hcd_probe+0xfc/0x228) [ 3.600057] [<c0257034>] (sunxi_ohci_hcd_probe+0xfc/0x228) from [<c0219fe0>] (platform_drv_probe+0x14/0x18) [ 3.611123] [<c0219fe0>] (platform_drv_probe+0x14/0x18) from [<c0218f28>] (driver_probe_device+0xc8/0x1ec) [ 3.622089] [<c0218f28>] (driver_probe_device+0xc8/0x1ec) from [<c02190ac>] (__driver_attach+0x60/0x84) [ 3.632760] [<c02190ac>] (__driver_attach+0x60/0x84) from [<c021792c>] (bus_for_each_dev+0x50/0x84) [ 3.643037] [<c021792c>] (bus_for_each_dev+0x50/0x84) from [<c0218698>] (bus_add_driver+0x98/0x210) [ 3.653317] [<c0218698>] (bus_add_driver+0x98/0x210) from [<c021957c>] (driver_register+0x9c/0x128) [ 3.663597] [<c021957c>] (driver_register+0x9c/0x128) from [<c05c9be8>] (ohci_hcd_mod_init+0x34/0x60) [ 3.674071] [<c05c9be8>] (ohci_hcd_mod_init+0x34/0x60) from [<c00085e4>] (do_one_initcall+0x90/0x160) [ 3.684543] [<c00085e4>] (do_one_initcall+0x90/0x160) from [<c05b3900>] (kernel_init+0xf8/0x1b8) [ 3.694526] [<c05b3900>] (kernel_init+0xf8/0x1b8) from [<c000e9f8>] (kernel_thread_exit+0x0/0x8) [ 3.704488] ---[ end trace 47752ff83f111594 ]--- [ 3.709710] sunxi-ohci sunxi-ohci.4: startup error -12 [ 3.715561] sunxi-ohci sunxi-ohci.4: USB bus 1 deregistered [ 3.721824] hci: ERR: usb_add_hcd failed [ 3.736235] sunxi-ohci: probe of sunxi-ohci.4 failed with error -12 [ 3.743348] Initializing USB Mass Storage driver... [ 3.748946] usbcore: registered new interface driver usb-storage [ 3.755711] USB Mass Storage support registered. [ 3.761707] file system registered [ 3.769139] android_usb gadget: Mass Storage Function, version: 2009/09/11 [ 3.776877] android_usb gadget: Number of LUNs=3 [ 3.782074] lun0: LUN: removable file: (no medium) [ 3.787524] lun1: LUN: removable file: (no medium) [ 3.793006] lun2: LUN: removable file: (no medium) [ 3.799245] android_usb gadget: android_usb ready [ 3.805217] mousedev: PS/2 mouse device common for all mice [ 3.811675] rglkbd: RGL Multi Function Power Button - (c)2019 Chris Smith [ 3.820546] ls_fetch_sysconfig_para: ls_unused. [ 3.825705] ltr_init: ls_fetch_sysconfig_para err. [ 3.832106] keyname:ctp_para subname:ctp_wakeup ,get error! [ 3.832398] [RTC] WARNING: Rtc time will be wrong!! [ 3.832415] [RTC] WARNING: use *internal OSC* as clock source [ 3.833010] sunxi-rtc sunxi-rtc: rtc core: registered sunxi-rtc as rtc0 [ 3.858300] get_device_para_value:get subname:gsensor_used error! val.val:0 [ 3.866273] get sysconfig para erro! [ 3.866558] calibrat: max_cpufreq 1008Mhz Type 0! [ 3.869477] [mmc]: SD/MMC/SDIO Host Controller Driver(v1.121 2016-08-3 16:46) Compiled in Sep 11 2019 at 17:58:40 [ 3.869500] [mmc]: MMC host used card: 0x0, boot card: 0x0, io_card 0 [ 3.871516] usbcore: registered new interface driver usbhid [ 3.871524] usbhid: USB HID core driver [ 3.904708] asoc: platform pcm constructor failed [ 3.909931] asoc: can't create pcm SUNXI-HDMIAUDIO :-12 [ 3.915751] asoc: failed to instantiate card sndhdmi: -12 [ 3.922111] u32 classifier [ 3.925114] Actions configured [ 3.928886] Netfilter messages via NETLINK v0.30. [ 3.934188] nf_conntrack version 0.5.0 (3942 buckets, 15768 max) [ 3.941283] ctnetlink v0.93: registering with nfnetlink. [ 3.947602] NF_TPROXY: Transparent proxy support initialized, version 4.1.0 [ 3.955366] NF_TPROXY: Copyright (c) 2006-2007 BalaBit IT Ltd. [ 3.962221] xt_time: kernel timezone is -0000 [ 3.967244] IPv4 over IPv4 tunneling driver [ 3.972384] gre: GRE over IPv4 demultiplexor driver [ 3.977800] ip_gre: GRE over IPv4 tunneling driver [ 3.983917] ip_tables: (C) 2000-2006 Netfilter Core Team [ 3.990052] arp_tables: (C) 2002 David S. Miller [ 3.995254] TCP: cubic registered [ 3.998930] Initializing XFRM netlink socket [ 4.003907] NET: Registered protocol family 10 [ 4.009953] Mobile IPv6 [ 4.012730] ip6_tables: (C) 2000-2006 Netfilter Core Team [ 4.018934] IPv6 over IPv4 tunneling driver [ 4.024698] NET: Registered protocol family 17 [ 4.029655] NET: Registered protocol family 15 [ 4.034641] L2TP core driver, V2.0 [ 4.038409] L2TP IP encapsulation support (L2TPv3) [ 4.043797] L2TP netlink interface [ 4.047593] L2TP ethernet pseudowire support (L2TPv3) [ 4.053427] VFP support v0.3: implementor 41 architecture 2 part 30 variant 7 rev 5 [ 4.061954] ThumbEE CPU extension supported. [ 4.066705] Registering SWP/SWPB emulation handler [ 4.072077] sunxi_bootup_extend_init: bootup extend state 1 [ 4.079132] cmdline,disp= [ 4.082444] [HDMI] power vcc-hdmi-18 [ 4.117505] sunxi-rtc sunxi-rtc: setting system clock to 1970-01-01 00:01:13 UTC (73) [ 4.128961] [rf_pm]: Did not config module_power0 in sys_config [ 4.135578] [rf_pm]: Did not config module_power1 in sys_config [ 4.142166] [rf_pm]: Did not config module_power2 in sys_config [ 4.148737] [rf_pm]: Did not config module_power3 in sys_config [ 4.155320] [rf_pm]: mod has no chip_en gpio [ 4.160079] [rf_pm]: regulator on. [ 4.163859] [rf_pm]: set losc_out 32k out [ 4.168313] [wifi_pm]: no wifi used in configuration [ 4.173837] ALSA device list: [ 4.177125] No soundcards found. [ 4.181457] Freeing init memory: 168K
With some of my status messages interspersed with the kernel log: TheC64 Maxi/VIC-20 FEL-mode rescue system running from ramdisk
[ 4.710117] [DISP] disp_hdmi_set_detect,line:405:hdmi0's mgr is NULL
Loading nand driver (if available) and enabling nand Mass Storage over USB and command shell o[ 4.918133] nand: module_layout: kernel tainted. ver virtual serial port
[ 4.925172] Disabling lock debugging due to kernel taint [ 4.937026] [NAND]nand init start, nand0_used_flag is 1 [ 4.942905] [NAND]nand init start [ 4.946588] nand:get voltage axp22_dcdc1 ok:0 [ 4.952434] physic_info_read start!! [ 4.959739] kernel: nand version: 3 6018 20190830 1826 [ 4.976646] [ND]boot start [ 4.979834] check boot start. [ 4.984899] find a bad block: 0 12 0 sdata: 00 78 69 87 [ 5.034491] find a bad block: 0 12 0 sdata: 00 78 69 87 [ 5.056813] find a bad block: 0 12 0 sdata: 00 78 69 87 [ 5.108175] find a bad block: 0 12 0 sdata: 00 78 69 87 [ 5.161533] find a bad block: 0 12 0 sdata: 00 78 69 87 [ 5.216882] find a bad block: 0 12 0 sdata: 00 78 69 87 [ 5.273610] check boot end. [ 5.661820] [NE]recover_phy_page_mapping no used page 13!! [ 5.667920] [NE]erase_block block 883! [ 5.701942] [NE] adjust free list : 883 5!! [ 5.706582] [ND]free block nums is 115 ! [ 5.710946] [NE]not power on gc 115! [ 5.714907] [ND]nftl ok! [ 5.719195] nanda: unknown partition table [ 5.724721] nandb: unknown partition table [ 5.729646] [NAND]nand init end [ 5.734435] android_usb: already disabled [ 5.739270] usb open backing file: /dev/nanda, 0xcdbaf000 [ 5.745445] usb open backing file: /dev/nandb, 0xcdbaf198 [ 5.751541] ep_matches, wrn: endpoint already claimed, ep(0xc062352c, 0xcdba46c0, ep1in-bulk) [ 5.761027] ep_matches, wrn: endpoint already claimed, ep(0xc062352c, 0xcdba46c0, ep1in-bulk) [ 5.770508] ep_matches, wrn: endpoint already claimed, ep(0xc0623578, 0xcdba46c0, ep1out-bulk) [ 5.780082] gadget_is_softwinner_otg is not -int [ 5.785204] gadget_is_softwinner_otg is not -int [ 5.790349] ep_matches, wrn: endpoint already claimed, ep(0xc062352c, 0xcdba46c0, ep1in-bulk) [ 5.799817] ep_matches, wrn: endpoint already claimed, ep(0xc0623578, 0xcdba46c0, ep1out-bulk) [ 5.809392] ep_matches, wrn: endpoint already claimed, ep(0xc062352c, 0xcdba46c0, ep1in-bulk) [ 5.818890] ep_matches, wrn: endpoint already claimed, ep(0xc0623578, 0xcdba46c0, ep1out-bulk) [ 5.828462] ep_matches, wrn: endpoint already claimed, ep(0xc06235c4, 0xcdb301c0, ep2in-bulk) [ 5.838124] hci: ERR: sunxi_ehci is null [ 5.842493] hci: ERR: sunxi_ohci is null [ 6.448633] android_usb gadget: high-speed config #1: android
And finally some NAND info and the Command Shell NAND ID: 0xAD 0xDA 0x90 0x95 0x46 - using /lib/modules/3.4.39/nand-Maxi-1.4.2.ko
Mass Storage over USB enabled for: /dev/nanda (Type: Android Boot Image) and /dev/nandb (Type: Linux ext4 filesystem)
Command Shell over virtual serial port enabled.
Use your favourite disk image program to backup and/or restore nanda and/or nandb. Once finished ensure you safely eject both Mass Storage devices from your PC before powering off TheC64 Maxi/THE VIC 20
Command Shell on /dev/ttyS0
/ #
But my hunch (and hope) is that it's power-related.
|
|
|
Post by grasshopper on Nov 20, 2020 20:15:10 GMT
I've tried a couple of times. I'm using the micro USB port to provide power. Unfortunately I don't have any means to connect through UART.
FWIW, when I type lsusb I get the following:
Bus 003 Device 005: ID 1f3a:efe8 Onda (unverified) V972 tablet in flashing mode
|
|
|
Post by jj0 on Nov 20, 2020 21:28:19 GMT
I've tried a couple of times. I'm using the micro USB port to provide power. Unfortunately I don't have any means to connect through UART. FWIW, when I type lsusb I get the following: Bus 003 Device 005: ID 1f3a:efe8 Onda (unverified) V972 tablet in flashing mode Ok. I'll have to think about this. I'll try it the same way as you with the micro USB port. Have you also tried with only the USB FEL (Type A-Type A) cable without also powering the micro USB port as well? Just in case you're up to it, this USB2Serial converter would work, though there's cheaper options via aliexpress of course.
|
|
|
Post by grasshopper on Nov 20, 2020 22:29:18 GMT
I've just had a go at using only the USB A to USB A cable.
Unfortunately, the behaviour was the same, i.e. the boot.sh script appeared to work, and the Onda USB device was recognised. But the PC didn't announce two new USB storage devices, and the /dev/ttyACM0 virtual serial port was missing.
One thing I did notice is that the C64 Maxi only goes into FEL mode if I connect the cable to a USB 3.0 port. It doesn't go into FEL mode if I connect the cable to a USB 2.0 port. Possibly this is because USB 2.0 ports provide less power.
Also, the USB A - USB A cable that I'm using is USB 3.0. Could that be relevant?
|
|
|
Post by jj0 on Nov 21, 2020 10:14:05 GMT
I've just had a go at using only the USB A to USB A cable. Unfortunately, the behaviour was the same, i.e. the boot.sh script appeared to work, and the Onda USB device was recognised. But the PC didn't announce two new USB storage devices, and the /dev/ttyACM0 virtual serial port was missing. One thing I did notice is that the C64 Maxi only goes into FEL mode if I connect the cable to a USB 3.0 port. It doesn't go into FEL mode if I connect the cable to a USB 2.0 port. Possibly this is because USB 2.0 ports provide less power. Also, the USB A - USB A cable that I'm using is USB 3.0. Could that be relevant? I don't think the USB cable type is relevant, but the amount of power is as you say. At this point I'm wondering if it works for anyone else but me... So if anybody else can try and report back that would be nice.
|
|
|
Post by spannernick on Nov 21, 2020 10:49:17 GMT
I've just had a go at using only the USB A to USB A cable. Unfortunately, the behaviour was the same, i.e. the boot.sh script appeared to work, and the Onda USB device was recognised. But the PC didn't announce two new USB storage devices, and the /dev/ttyACM0 virtual serial port was missing. One thing I did notice is that the C64 Maxi only goes into FEL mode if I connect the cable to a USB 3.0 port. It doesn't go into FEL mode if I connect the cable to a USB 2.0 port. Possibly this is because USB 2.0 ports provide less power. Also, the USB A - USB A cable that I'm using is USB 3.0. Could that be relevant? What is the power supply your using..? is it the one that came with it, to do this you need more amps like 5v 3A, but the USB A to A cable is giving it extra power but might not be enough. I have connected to it(even though mine is not a real max, the A TO A Cable that connected to my PC continually,(yes I made one for it, its a A TO A cable and a USB OTG Cable), a UART CP2102 and the power supply thats 5v 3A. So connecting a Uart will give it even more power.
|
|
|
Post by grasshopper on Nov 21, 2020 12:32:33 GMT
I've just had another go. The good news is that it's now working! The bad news is that I'm still not sure why it's working today, but wasn't working yesterday. Before I forget, the steps I followed to get it working were as follows:
- I connected the USB port at the back of my C64 Maxi to a USB 3.0 port on my PC. I also connected the HDMI port to my monitor. I didn't connect the micro USB power connector.
- I then powered on the C64 Maxi by briefly pressing the black button on the side. The purpose of this was to ascertain whether the PC's USB port was providing enough power for the Maxi. The carousel appeared on the monitor, so the answer is yes.
- I then powered down the Maxi by keeping the black button pressed for a few seconds.
- I then pressed the FEL mode button and kept it pressed.
- I then briefly pressed the black button to restart the Maxi.
- After a few seconds I released the FEL mode button.
I had a minor issue with tio. If you run it without root privileges, it hangs but doesn't give any error messages.
|
|
|
Post by spannernick on Nov 21, 2020 13:00:18 GMT
What you have the HDMI connected to can drain power from THEC64 Mini/Maxi. Nice one, glad its work for you now, Hopefully it will fix your THEC64 Maxi. jj the picture is upside down and was doing my head in... so I have fixed it and here it is for you to replace...
|
|
|
Post by jj0 on Nov 21, 2020 13:42:56 GMT
I've just had another go. The good news is that it's now working! The bad news is that I'm still not sure why it's working today, but wasn't working yesterday. Before I forget, the steps I followed to get it working were as follows: - I connected the USB port at the back of my C64 Maxi to a USB 3.0 port on my PC. I also connected the HDMI port to my monitor. I didn't connect the micro USB power connector.
- I then powered on the C64 Maxi by briefly pressing the black button on the side. The purpose of this was to ascertain whether the PC's USB port was providing enough power for the Maxi. The carousel appeared on the monitor, so the answer is yes.
- I then powered down the Maxi by keeping the black button pressed for a few seconds.
- I then pressed the FEL mode button and kept it pressed.
- I then briefly pressed the black button to restart the Maxi.
- After a few seconds I released the FEL mode button.
I had a minor issue with tio. If you run it without root privileges, it hangs but doesn't give any error messages. Great that it's working now though the mystery remains. Regarding tio, if you do: sudo adduser <your-login-name> dialout And then logout/login (reboot) you will have acces to the serial port(s)as user. The nice thing about tio is that you can start it without the ttyACM0 port being there yet, and it will immediately connect when the port appears.
|
|
|
Post by antjols1973 on Nov 21, 2020 15:34:02 GMT
So I have had a little bit of progress. I've managed to boot into FEL mode (I think) using windows however my PC is recognising the MAXI as the NES mini (presumably because of a previous install of HACKchi). It does not recognise the seperate USB drives after numerous retries
CMD reads as follows: USB device 001:006 Allwinner H3 02c00081:15e04620:78970024:184506d3 Stack pointers: sp_irq=0x00002000, sp=0x00005E08 MMU is not enabled by BROM Generating the new MMU translation table at 0x00008000 => Executing the SPL... done. Setting write-combine mapping for DRAM. Setting cached mapping for BROM. Writing back the MMU translation table. Enabling I-cache, MMU and branch prediction... done. Writing image "U-Boot 2020.04-rc2-jj_0+ for sun", 474888 bytes @ 0x5A000000. 100% [================================================] 563580 kB, 553.2 kB/s Starting U-boot (0x5A000000)
Looks like my PC is reading either Nanda or Nandb but not both...
I've attempted implementing FEL Mode using the 'Live' version of Linux mint 19.3 unfortunately no matter what i do i'm not able to put the MAXI in FEL mode...
I think i'm going to call the Waaaahmbulance! Haha
|
|
|
Post by spannernick on Nov 21, 2020 16:19:28 GMT
It recognizing it as a Snes Mini cause it uses the same Fel driver as the Snes Mini for FEL Mode, the Capcom Home Arcade uses the same driver too, I think the PS Classic does as well plus the Sega Mega Drive Mini.
Can you look in Disk Management(Right Click on Start and click on Disk Management) to see if they are there or do they need initialized or maybe need a drive letter..? sometimes Windows adds a drive but do, don't give it a drive letter so looks like it never came up.
|
|
|
Post by antjols1973 on Nov 21, 2020 16:37:38 GMT
no such luck Nick...
|
|
|
Post by antjols1973 on Nov 21, 2020 17:06:04 GMT
Any reason why its not recognized using the "live" version of linuxmint 20? its not been my lucky night!
|
|
|
Post by spannernick on Nov 21, 2020 17:41:35 GMT
|
|
|
Post by jj0 on Nov 21, 2020 18:11:22 GMT
So I have had a little bit of progress. I've managed to boot into FEL mode (I think) using windows however my PC is recognising the MAXI as the NES mini (presumably because of a previous install of HACKchi). It does not recognise the seperate USB drives after numerous retries CMD reads as follows: USB device 001:006 Allwinner H3 02c00081:15e04620:78970024:184506d3 Stack pointers: sp_irq=0x00002000, sp=0x00005E08 MMU is not enabled by BROM Generating the new MMU translation table at 0x00008000 => Executing the SPL... done. Setting write-combine mapping for DRAM. Setting cached mapping for BROM. Writing back the MMU translation table. Enabling I-cache, MMU and branch prediction... done. Writing image "U-Boot 2020.04-rc2-jj_0+ for sun", 474888 bytes @ 0x5A000000. 100% [================================================] 563580 kB, 553.2 kB/s Starting U-boot (0x5A000000) Looks like my PC is reading either Nanda or Nandb but not both... I've attempted implementing FEL Mode using the 'Live' version of Linux mint 19.3 unfortunately no matter what i do i'm not able to put the MAXI in FEL mode... I think i'm going to call the Waaaahmbulance! Haha Are you getting a virtual serial port, perhaps after installing the driver in my 1st post? Also, what's the size of the Mass Storage device Windows sees? Your nanda is probably OK, so if it's nandb (197MB) you can restore it.
|
|
|
Post by antjols1973 on Nov 22, 2020 1:45:41 GMT
Unfortunately my PC doesn't recognize a a Mass usb device, just the device itself...
|
|
|
Post by jj0 on Nov 22, 2020 14:08:36 GMT
Unfortunately my PC doesn't recognize a a Mass usb device, just the device itself... So if I understand correctly if you go to the windows' directory and run 'boot.cmd'' you get: Z:\C64\THEC64_Mini\SDK\Release\C64Maxi-VIC-20-FEL-rescue-boot-v9\windows>boot.cmd
Z:\C64\THEC64_Mini\SDK\Release\C64Maxi-VIC-20-FEL-rescue-boot-v9\windows>sunxi-fel -l USB device 001:003 Allwinner H3 02c00181:14004620:7895c11c:241b0ad3
Z:\C64\THEC64_Mini\SDK\Release\C64Maxi-VIC-20-FEL-rescue-boot-v9\windows>sunxi-fel -v -p uboot ..\boot\u-boot-sunxi-with-spl.bin write 0x40007800 ..\boot\nanda-C64Maxi-Rescue-v8 Stack pointers: sp_irq=0x00002000, sp=0x00005E08 MMU is not enabled by BROM Generating the new MMU translation table at 0x00008000 => Executing the SPL... done. Setting write-combine mapping for DRAM. Setting cached mapping for BROM. Writing back the MMU translation table. Enabling I-cache, MMU and branch prediction... done. Writing image "U-Boot 2020.04-rc2-jj_0+ for sun", 563580 bytes @ 0x5A000000. 100% [================================================] 15624 kB, 682.9 kB/s Starting U-Boot (0x5A000000). And after that nothing happens, even after several tries? How are you powering it, just from USB or also via the microUSB connector? If the latter, you should first plug in the USB-USB cable while pressing the FEL button and only once it is in FEL mode connect the microUSB for additonal power. Does the red power light up at all? I've run this from a fresh Windows 10 install in a Virtual Machine, the only thing I had to do to make it work was to i nstall the zadig drivers. Maybe you can uninstall Hakchi and install the zadig driver instead? With me I get a new USB serial port and 3 disks with drive letters assigned automatically and Windows telling me I should format the disks - which of course you shouldn't do, it's juts Windows' way of telling it doesn't recognise the filesystem. If I look in the control panel I see them: <EDIT> See updated first post where I explain how to run the OTG stuff from an Ubuntu Live USB disk. Maybe that helps.
|
|
|
Post by grasshopper on Nov 22, 2020 14:44:19 GMT
Hi jj0, I want to try running the nand_rw tool that you mentioned in the "How to Backup and Restore your Firmware" thread. However, I'm not sure how to transfer the executable to the ramdisk running on the C64 Maxi. I was going to put it on a USB flash drive, and then mount the flash drive. But I can't even work out how to do that as I'm not seeing the usual sda, sdb etc. devices in the dev folder. Can you point me in the right direction? Also, instead of separate nanda and nandb partitions, would it be possible to have the whole of the nand chip presented to the PC as a single USB storage device? It would then be possible to backup the whole nand chip by using dd or equivalent. Thanks
|
|
|
Post by jj0 on Nov 22, 2020 15:57:12 GMT
Hi jj0, I want to try running the nand_rw tool that you mentioned in the "How to Backup and Restore your Firmware" thread. However, I'm not sure how to transfer the executable to the ramdisk running on the C64 Maxi. I was going to put it on a USB flash drive, and then mount the flash drive. But I can't even work out how to do that as I'm not seeing the usual sda, sdb etc. devices in the dev folder. Can you point me in the right direction? Also, instead of separate nanda and nandb partitions, would it be possible to have the whole of the nand chip presented to the PC as a single USB storage device? It would then be possible to backup the whole nand chip by using dd or equivalent. Thanks
nand_rw is already present on the ramdisk. However as (per the 1st post ;-)) normal USB is not working you can't mount USB drives so the easiest way to backup nanda and nandb is to make an image of the Mass Storage devices, e.g. using dd in Linux or a disk image program in Windows. Also you should only use nand_rw if the nand kernel module is not loaded otherwise it conflicts with the normal nand access. And as the init script automatically loads the nand driver this is a bit difficult to achieve. What you can do (in Linux or maybe WSL/WSL2 is install 'abootimg' which allows you to extract the individual components of the image, then uncompress the initrd ramdisk and then change the init file to only provide the serial port (ACM) service and not load the nand driver. Then pack it all up again and use that instead of my image. You still won't have USB disk access but you could try: On the Maxi (via ttyACM0): nand_rw 50 <PAGESIZE incl OOB> 0 <#Pages> | uuencode Stop tio and start it again with a logfile (tio -l nand_rw_uuencode.txt) and press enter. When it's finished stop tio again and uudecode the logfile. So not trivial. On creating a /dev/nand this should be the job of the nand driver but it only creates devices for the actual nand partitions. I know that e.g. Armbian nand driver does reate a /dev/nand device but that nand driver is not compatible with the Maxi's kernel and nand. But even then if I remember correctly the /dev/nand only started at the MBR of the nand and didn't include the bootloader and uboot parts.
|
|
|
Post by grasshopper on Nov 22, 2020 20:04:16 GMT
nand_rw is already present on the ramdisk. However as (per the 1st post ;-)) normal USB is not working you can't mount USB drives so the easiest way to backup nanda and nandb is to make an image of the Mass Storage devices, e.g. using dd in Linux or a disk image program in Windows. Also you should only use nand_rw if the nand kernel module is not loaded otherwise it conflicts with the normal nand access. And as the init script automatically loads the nand driver this is a bit difficult to achieve. What you can do (in Linux or maybe WSL/WSL2 is install 'abootimg' which allows you to extract the individual components of the image, then uncompress the initrd ramdisk and then change the init file to only provide the serial port (ACM) service and not load the nand driver. Then pack it all up again and use that instead of my image. You still won't have USB disk access but you could try: On the Maxi (via ttyACM0): nand_rw 50 <PAGESIZE incl OOB> 0 <#Pages> | uuencode Stop tio and start it again with a logfile (tio -l nand_rw_uuencode.txt) and press enter. When it's finished stop tio again and uudecode the logfile. So not trivial. On creating a /dev/nanda this should be the job of the nand driver but it only creates devices for the actual nand partitions. I know that e.g. Armbian nand driver does reate a /dev/nand device but that nand driver is not compatible with the Maxi's kernel and nand. But even then if I remember correctly the /dev/nand only started at the MBR of the nand and didn't include the bootloader and uboot parts.
Thanks. Unfortunately, it's moot at the moment because whatever I did yesterday to get a command line through ttyACM0 is no longer working...
|
|
|
Post by grasshopper on Nov 22, 2020 20:24:50 GMT
I've been playing around with abootimg. One thing that's interesting is that when I look at the init file for the stock firmware, it initially sets ROOT_DEVICE to a default value of /dev/mmcblk0p7. However, if a 'root=' kernel parameter is present, it sets ROOT_DEVICE to that instead. I presume the kernel parameter is nandb but I'm not sure where it's set.
The reason I mention this is because, from memory, I don't recall seeing the mmcblk0p7 device in the dev directory. If mmcblk0 was present then presumably that would represent all of the flash memory, and could be used to back it up.
|
|
|
Post by jj0 on Nov 22, 2020 20:44:25 GMT
I've been playing around with abootimg. One thing that's interesting is that when I look at the init file for the stock firmware, it initially sets ROOT_DEVICE to a default value of /dev/mmcblk0p7. However, if a 'root=' kernel parameter is present, it sets ROOT_DEVICE to that instead. I presume the kernel parameter is nandb but I'm not sure where it's set. The reason I mention this is because, from memory, I don't recall seeing the mmcblk0p7 device in the dev directory. If mmcblk0 was present then presumably that would represent all of the flash memory, and could be used to back it up. RGL use the default init from the Allwinner SDK that they use. The mmcblk0p7 stems from the fact (probably) that it's actually for Android, where the storage is usually divided in many partitions.
|
|
|
Post by jj0 on Nov 22, 2020 20:47:43 GMT
Thanks. Unfortunately, it's moot at the moment because whatever I did yesterday to get a command line through ttyACM0 is no longer working...
This is so weird. I'll see whether I can get something shown on the HDMI screen when booting.
|
|
|
Post by antjols1973 on Nov 23, 2020 2:08:19 GMT
Hi JJ, thank you once again for all your endeavours. That is right the CMD read out that you've quoted above is correct, the last line reads "Starting U-Boot (0x5A000000)." It doesn't hang but just reopens to a directory line of the "rescue" folder, the USB devices are left unannounced. I've tried several PCs (I do have a few) but they all do the same thing. I'm not using the PC with Hakchi now, I have another laptop and have installed The WinUSB ZADIG driver only and renamed the device to Allwinner H3, is this correct? I've been using a USB (3.0) a to a cable to connect the MAXI, the LED light comes on when you just power on the MAXI but does not light when in FEL mode. I have tried to use the micro USB cable to give the MAXI more power (I have noticed others have had power issues) however FEL mode can't be activated when I do this, having said that, I've not connected the cables in the order that you have suggested above so I will try that. I have a (Non-switch) power hub to power the MAXI via micro usb so I'm guessing that will be enough power being it is plugged into the wall. Fingers crossed something will give, i had to take timeout yesterday as my results for everything that I have tried were the same. What Ubuntu version are you using, I'm thinking if I can mimic the software set up you have as closely as I can then maybe things will start to work...haha...If I do manage to get my PC to recognize the MAXI which disc imaging (Free) software would be best?
|
|
|
Post by grasshopper on Nov 23, 2020 12:42:12 GMT
Maybe I'm clutching at straws, but I'm wondering whether this might simply be a timing issue that could be fixed with a few pauses in the script.
I can reliably get my PC to recognise my C64 Maxi as an Onda Tablet, and I can reliably run the boot.sh script without (apparently) producing any errors. It's just the next stage that doesn't work.
On the one occasion that I was able to gain command line access, it was rock solid for several hours. So I doubt whether it's a power issue, at least for me.
|
|