nandboot=echo Copying Linux from NAND flash to RAM... && nand info && run nandroot;nand read 0x100000 0x2220000 0x300000 && fpga loadb 0 0x100000 0x300000 && nand read ${kernel_load_address} 0x300000 ${kernel_size} && nand read ${devicetree_load_address} 0x800000 ${devicetree_size}
setenv bootargs 'console=ttyPS0,115200 root=/dev/mtdblock6 rootfstype=jffs2 noinitrd rw rootwait reboot=cold,hard emergency init=/bin/sh'
bootm ${kernel_load_address} - ${devicetree_load_address} init=/bin/sh
passwd
This seems quick and easy. And best of all, it works! After doing this I cycle power
and am able to log in using the password I set. Amazing.
I was fully expecting this to be good only for the current boot until I figured out
how to get things permanently saved in NAND flash, but that all happened automagically.
While I am at it, I'll disable (as recommended) the bitcoin miner program:
cd /etc/rcS.d mv S95cgminer.sh K95cgminer.sh rebootAfter doing this, the boot up is much quicker, as follows:
Here is the tail end of a "ps" command before shutting down the miner:
794 root 0:00 /usr/sbin/inetd
823 root 0:00 /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22 -B
830 root 0:00 /sbin/syslogd -n -O /var/log/messages
832 root 0:00 /sbin/klogd -n
840 root 0:00 {start_getty} /bin/sh /bin/start_getty 115200 ttyPS0
841 root 0:00 /sbin/getty 38400 tty1
842 root 0:00 -sh
888 root 0:28 /tmp/dwang_btc_miner
907 root 0:00 /tmp/snmpd -c /tmp/snmpd.conf -f
945 root 0:00 /tmp/zebra
947 root 0:00 {reset_button} /bin/bash /tmp/reset_button
953 root 0:00 {proc_monitor} /bin/sh /tmp/proc_monitor
1013 root 0:00 appweb --config appweb.conf
1088 root 0:00 sleep 30
1140 root 0:00 sleep 1s
1141 root 0:00 ps
Here is the tail end of a "ps" command after shutting down the miner:
795 root 0:00 /usr/sbin/inetd
810 root 0:00 /usr/sbin/dropbear -r /etc/dropbear/dropbear_rsa_host_key -p 22 -B
816 root 0:00 /sbin/syslogd -n -O /var/log/messages
819 root 0:00 /sbin/klogd -n
827 root 0:00 {start_getty} /bin/sh /bin/start_getty 115200 ttyPS0
828 root 0:00 /sbin/getty 38400 tty1
829 root 0:00 -sh
834 root 0:00 ps -al
Here is output from a few commands:
cat /proc/cpuinfo processor : 0 model name : ARMv7 Processor rev 0 (v7l) BogoMIPS : 666.66 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x3 CPU part : 0xc09 CPU revision : 0 processor : 1 model name : ARMv7 Processor rev 0 (v7l) BogoMIPS : 666.66 Features : half thumb fastmult vfp edsp neon vfpv3 tls vfpd32 CPU implementer : 0x41 CPU architecture: 7 CPU variant : 0x3 CPU part : 0xc09 CPU revision : 0 root@zedboard-zynq7:~# cat /proc/meminfo MemTotal: 252032 kB MemFree: 186096 kB MemAvailable: 199232 kB df Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 65536 33200 32336 51% / devtmpfs 64 4 60 6% /dev tmpfs 126016 32 125984 0% /run tmpfs 126016 32256 93760 26% /var/volatile tmpfs 64 4 60 6% /dev mount /dev/root on / type jffs2 (rw,relatime)
The "vi" command is a link to /bin/busybox.nosuid
It is running an ssh server (dropbear).
It is a little surprising that it is using busybox and dropbear given that it has a 65M root filesystem that is only half full. What happened to the rest of the 128M nand flash?
Tom's Computer Info / tom@mmto.org