Skip to content

Instantly share code, notes, and snippets.

@hberntsen
Created July 22, 2022 10:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save hberntsen/9bfd7e9c25948c796656fc0ab802d6c9 to your computer and use it in GitHub Desktop.
Save hberntsen/9bfd7e9c25948c796656fc0ab802d6c9 to your computer and use it in GitHub Desktop.
ckermit script to tftpboot the Arcadyan WE420223-99 with an kernel + initramfs
#!/usr/bin/ckermit
# Serial port setup. These settings will likely need to be
# changed to match the configuration of your workstation
# and the ARM board you're working with.
set line /dev/ttyUSB0
set serial 8n1
set speed 57600
# General C-Kermit settings. These probably don't need to change.
set flow-control none
set file type bin
set carrier-watch off
set prefixing all
set modem none
echo "Prepared to boot new kernel. Reset the board now."
# This is the string that my board outputs to allow the user to
# gain access to the U-Boot console. Change this to suit your
# setup.
input 60 "Please choose the operation:"
input 9 "default: 3"
IF FAIL EXIT 1
output "4"
input 10 "MT7621 \#"
IF FAIL EXIT 1
# patch code so it will skip the TRX checking
lineout "mm.l 87fa7600"
input 2 "87fa7600: 3c1c0001"
IF FAIL EXIT 1
lineout "24020000"
input 2 "87fa7604: 279ce370"
IF FAIL EXIT 1
lineout "03e00008"
input 2 "87fa7608: 0399e021"
IF FAIL EXIT 1
lineout "0"
input 2 "87fa760c: 27bdf7a0"
IF FAIL EXIT 1
output \3
input 10 "MT7621 \#"
lineout "tftpboot 85001000 initramfs-kernel.bin"
input 60 "MT7621 \#"
lineout bootm 85001000
connect
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment