| 24 Jun 2022 |
matthewcroughan - nix.how | will nixify that, if you haven't already | 16:36:01 |
matthewcroughan - nix.how | jh7100-recover = pkgs.runCommandCC "jh7100-recover" {} ''
mkdir -p $out/bin
gcc -o $out/bin/jh7100-recover ${jh71xx-tools}/jh7100-recover.c
'';
jh7100-recover = pkgs.writeCBin "jh7100-recover" (builtins.readFile "${jh71xx-tools}/jh7100-recover.c");
| 16:48:29 |
matthewcroughan - nix.how | which one do you guys like more? | 16:48:32 |
matthewcroughan - nix.how | I like the writeCBin one | 16:48:41 |
| 26 Jun 2022 |
matthewcroughan - nix.how | luizribeiro: I ended up making what I suggested, here https://github.com/MatthewCroughan/visionfive-nix/blob/master/flake.nix#L33 | 01:13:59 |
matthewcroughan - nix.how | I've not made a README yet, but it will be:
- Attach the board via serial
nix run .#flashBootloader /dev/ttyUSB0
| 01:14:38 |
matthewcroughan - nix.how | it really is that simple, now that I've made this. | 01:14:43 |
matthewcroughan - nix.how | * it really is that simple, now that I've made this using expect | 01:14:53 |
matthewcroughan - nix.how | useful for and justinrestivo Astro tomberek fufexan | 01:15:23 |
matthewcroughan - nix.how | * useful for justinrestivo Astro tomberek fufexan | 01:15:28 |
matthewcroughan - nix.how | this will flash the distro-boot compatible opensbi + uboot which means any nixos image you want to make will work on it | 01:15:56 |
matthewcroughan - nix.how | you can also nix build .#images.visionfive-cross-x86 if you want to cross compile the nixos image from this flake | 01:16:24 |
matthewcroughan - nix.how | * you can also nix build .#images.visionfive-cross-x86 if you want to cross compile the nixos image from this flake, resulting in an sd image you can flash and boot on the board | 01:16:39 |
| 28 Jun 2022 |
| ma27 changed their profile picture. | 11:38:56 |
matthewcroughan - nix.how | j-k: managed to do anything cool with the board yet? The above comments from me might be helpful for you! :D | 14:39:16 |
j-k | I've been sorting house stuff so not much. I tried flashing uboot but didn't manage to so looking forward to trying the flash script | 14:42:02 |
| 30 Jun 2022 |
| dramforever joined the room. | 07:21:29 |
dramforever | In reply to @matthewcroughan:defenestrate.it Zhaofeng Li: Is it possible to flash the file with screen instead of xmodem on Windows? You can send the file with anything that does 'send xmodem', like sx from lrzsz | 07:58:36 |
dramforever | advantages of xmodem over just cat:
- it knows when transfer starts and ends
- there's a crc checksum for each packet and if it doesn't work the board can request a resend
- that's about it
| 08:00:37 |
dramforever | note: the load command in the bootrom doesn't work with lrzsz. it just doesn't. | 08:01:17 |
dramforever | * note: the load command in the bootrom doesn't work with lrzsz. it just doesn't. use JH7100-tools | 08:01:37 |
dramforever | You can also use something like picocom which does the sending inside the terminal
picocom --send-cmd "sx -X -vv" -b {9600 or 115200} /dev/tty{...}
| 08:04:00 |
matthewcroughan - nix.how | dramforever: Yes I wrote an expect script here that allows flashing to the board with picocom+sx like this https://github.com/MatthewCroughan/visionfive-nix/blob/master/flake.nix | 08:13:58 |
matthewcroughan - nix.how |
- Do not apply power to the board
- Attach the board via serial to your system, ensuring power is still not applied
- Ensure the serial shows up in
/dev/ttyUSB*
nix run github:matthewcroughan/visionfive-nix#flashBootloader /dev/ttyUSB0
- Apply power to the board
| 08:14:29 |
matthewcroughan - nix.how | fufexan: used it successfully like that to flash the board yesterday | 08:15:20 |
dramforever | You just pushed that right? Pretty sure it wasn't there a few minutes ago | 08:15:23 |
matthewcroughan - nix.how | I accidentally force pushed a thing over it yesterday, silly me. | 08:15:39 |
matthewcroughan - nix.how | so I force pushed the correct code just now, realizing I had accidentally force pushed the wrong thing last night. | 08:16:01 |
dramforever | oh okay, glad you figured it out | 08:16:13 |
matthewcroughan - nix.how | There's also nix run .#flashOriginal which uses jh7100-tools to do the same thing, but I was very unsuccessful in doing anything useful with that, since it appears that jh7100-tools just nukes the original u-boot that's on the board | 08:17:27 |