Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot flash bootloader image. #6

Open
MaciejMalczyk opened this issue Nov 27, 2021 · 9 comments
Open

Cannot flash bootloader image. #6

MaciejMalczyk opened this issue Nov 27, 2021 · 9 comments

Comments

@MaciejMalczyk
Copy link

I have problem with step 7 - nvflash downloads bootloader image to Nexus tablet but after reboot it does not boot into bootloader even with pwr + vol down. Instead it goes to APX mode. Device have broken system image and it will not boot automatically into system after bootloader flash. Is there any way overcome this? Or maybe i'm doing something wrong?

The only difference that i have in comparison to debrick instructions is flag: "sdram config strap: 1" from 6th step.

@tofurky
Copy link
Owner

tofurky commented Nov 28, 2021

have you tried appending --sync to the command in step 7?

@MaciejMalczyk
Copy link
Author

Yes. Unfortunatelly it didn't help. Nvflash hangs at "bootloader/bootloader-grouper-4.23.img sent successfully" and after force reboot to bootloader mode device falls to APX.

@tofurky
Copy link
Owner

tofurky commented Nov 28, 2021

it shouldn't hang like that. uart would be useful to see what is going on there.

is this by any chance the 3g version (tilapia / nakasig) ? or is it the wifi (grouper / nakasi)?

@MaciejMalczyk
Copy link
Author

MaciejMalczyk commented Nov 28, 2021

This is for sure grouper. When the bootloader was working normally the codename grouper was on the screen. Tablet went to APX state after my trials to unlock bootlooder. Device had btoken system partition (but for 99% logicaly, not physicaly because i can tried emmc read test from other issue here but for morze than 2GB of disk space).
Maybe i should format partition where system is written and than try to flash bootlooder? Is it even possible to do with nvflash?

I will try to find out where is and how to connect to uart on this device (propably with PostmarketOS wiki). What i should expect on uart tty?

@tofurky
Copy link
Owner

tofurky commented Nov 28, 2021

i don't think that flashing system will prevent APX mode, system should only come into play after the kernel boots.

after step 6, you could try uploading zeroes to the LNX partition like shown in step 9 of the ouya debrick. maybe it's possible that it's hanging trying to boot the existing kernel on there, UART would show this definitively though.

truncate -s 8M LNX_all_zeroes.bin
sudo ./utils/nvflash_v1.13.87205_miniloader_patched --resume --download LNX LNX_all_zeroes.bin --go

in the ouya's case, it automatically falls back to standard fastboot mode at that point. i'm unsure how the n7 will behave there.

if you wind up in fastboot mode (dmesg -Tw will show this), you could then try running:

sudo fastboot flash bootloader bootloader/bootloader-grouper-4.23.img

if it didn't go to fastboot mode automatically, try step 7 again with --sync. note you should only need to overwrite the LNX (kernel) partition with zeroes once in order to see if step 7 stops hanging.

n7 uart isn't documented anywhere afaik, i found a schematic floating around the net for the ME370T (http://www.s-manuals.com/pdf/motherboard/asus/asus_me370t_r1.0_schematics.pdf) see:

https://github.com/tofurky/tegra30_debrick/blob/master/image/n7_uart.jpg
https://github.com/tofurky/tegra30_debrick/blob/master/image/n7_uart_schematic.jpg
https://github.com/tofurky/tegra30_debrick/blob/master/image/n7_uart_context.jpg

if you do try this, be careful though, the pads on the pcb are quite fragile and any amount of tugging on the soldered wires may just rip them clear off the board.

by default there is no uart output, using this patched bootloader will give output:
https://github.com/tofurky/tegra30_debrick/blob/master/bootloader/bootloader-grouper-4.23_uart.img

you shouldn't actually write bootloader-grouper-4.23_uart.img to the EBT partition, just use it for step 6 i.e.:

sudo ./utils/nvflash_v1.13.87205_miniloader_patched --setbct --bct ./bct/nexus_7_grouper_bct.bin --configfile ./utils/flash.cfg --bl ./bootloader/bootloader-grouper-4.23_uart.img --go

on the main README.md page there is UART output shown for the various steps.

it should give a hint as to why step 7 is hanging.

oh, and fastboot oem uart-on has basically the same effect as using the uart patched bootloader, but it is hard to run that if you don't have fastboot access :)

@MaciejMalczyk
Copy link
Author

Thank you for your response. I tried flashing LNX and i was able to use fastboot. Unfortunately i cannot flash bootloader and system image - device hangs while tries to flash image on device. With my knowledge this looks like bad blocks in emmc.

@tofurky
Copy link
Owner

tofurky commented Dec 6, 2021

the original n7 i debricked apparently had bad blocks, too, but it seems they were maybe eventually remapped by the controller in the emmc flash chip. they did not prevent reflashing entirely, though.

@MaciejMalczyk
Copy link
Author

Is there any point of writing with zeros bootloader partition and then trying to flash bootloader? I'm thinking of something simmilar to LNX flash with zeros.

@tofurky
Copy link
Owner

tofurky commented Dec 6, 2021

wouldn't hurt if it's already bricked, maybe it could trigger a bad block remap if you try enough times :) writing the LNX partition with zeroes is to trick the bootloader into entering 'fastboot' mode from its current 'Nv3p Server' (nvflash) mode.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants