I tried these instruction, but these do not make too much sense to me:
> Note: when you want to Update Nand device, Firstly Change boot switch to boot from SD device and insert one SD with SD boot Image, then after boot up,you need flash one nand image into nand device. Finally you change bootstrap to boot from Nand device.
How can I boot from an SD image and then flash a NAND image from it?
I did copy this onto the SD card, and try to boot from it ( I set the dip switches to SD boot ):
dd if=mtk-bpi-r4-NAND-20240620.img of=/dev/disk2 bs=1M
However, I got no response when I tried to connect to 192.168.1.1, and tcpdump gave nothing of interest:
# ifconfig -a|grep 192
inet 192.168.1.5 netmask 0xffffff00 broadcast 192.168.1.255
# ping 192.168.1.1
PING 192.168.1.1 (192.168.1.1): 56 data bytes
Request timeout for icmp_seq 0
Request timeout for icmp_seq 1
Request timeout for icmp_seq 2
^C
# tcpdump -n
tcpdump: data link type PKTAP
tcpdump: verbose output suppressed, use -v or -vv for full protocol decode
listening on pktap, link-type PKTAP (Apple DLT_PKTAP), capture size 262144 bytes
02:27:49.501276 ARP, Request who-has 192.168.1.1 tell 192.168.1.5, length 28
02:27:50.481209 ARP, Request who-has 192.168.1.1 tell 192.168.1.5, length 28
02:27:51.481584 ARP, Request who-has 192.168.1.1 tell 192.168.1.5, length 28
02:27:52.486450 ARP, Request who-has 192.168.1.1 tell 192.168.1.5, length 28
02:27:53.494631 ARP, Request who-has 192.168.1.1 tell 192.168.1.5, length 28
^C
5 packets captured
5 packets received by filter
0 packets dropped by kernel
^C
#
After this, I burnt the banani pi OpenWrt SD image to the SD card:
# dd if=mtk-bpi-r4-SD-20240620.img of=/dev/disk2 bs=1M
102+1 records in
102+1 records out
107114041 bytes transferred in 70.960671 secs (1509485 bytes/sec)
And then booted from it, which let me login ( screenshot enclosed ).
# ssh 192.168.1.1
The authenticity of host '192.168.1.1 (192.168.1.1)' can't be established.
RSA key fingerprint is SHA256:kG+biTOv38NKesFgl2lobiH96r1rn+7fW2gPn9Tno0E.
This key is not known by any other names
Are you sure you want to continue connecting (yes/no/[fingerprint])? yes
Warning: Permanently added '192.168.1.1' (RSA) to the list of known hosts.
BusyBox v1.33.2 (2024-06-05 06:11:29 UTC) built-in shell (ash)
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
-----------------------------------------------------
OpenWrt 21.02-SNAPSHOT, unknown
-----------------------------------------------------
=== WARNING! =====================================
There is no root password defined on this device!
Use the "passwd" command to set up a new password
in order to prevent unauthorized SSH logins.
--------------------------------------------------
root@OpenWrt:~#
mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
tmpfs on /tmp/root type tmpfs (rw,noatime,mode=755)
overlayfs:/tmp/root on / type overlay (rw,noatime,lowerdir=/,upperdir=/tmp/root/upper,workdir=/tmp/root/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600,ptmxmode=000)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
none on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,noatime,mode=700)
pstore on /sys/fs/pstore type pstore (rw,noatime)
mountd(pid6114) on /tmp/run/blockd type autofs (rw,relatime,fd=7,pgrp=1,timeout=21474836510,minproto=5,maxproto=5,indirect)
But I cannot see an option in the BananaPi4 image you linked to that lets me copy an image onto the NAND.
How should I proceed?