PetaLinux 2016.4 zedboard-zynq7 /dev/ttyPS0 zedboard-zynq7 login:We aren't going to get anywhere guessing passwords, but there is a trick. We can interrupt U-boot and then fiddle with the way it boots up linux, telling it to run a shell in lieu of the "init" process. Then we use the passwd command to change the root password.
Hit reset (or apply power) and type 'd' to get to a uboot console prompt which will look like this:
Model: Zynq Zed Development Board Net: Gem.e000b000 Hit 'd' to stop autoboot(eric): 0 zynq-uboot>Then type these commands to U-boot:
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}The Ebaz veteran will note that these commands are somewhat shorter than what follows. They work. They depend on the settings of some variables that are already present in the U-boot environment saved on the board.
setenv 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}" run nandboot 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 passwdWe will analyze the details here at some point, but this works great. Amazingly setting the password is persistent, as are any changes you make to the root filesystem. We will look at this more later also, but suffice it to say now that the root filesystem is running directly from NAND flash and can write as well as read.
I just type an empty password, though you can certainly set one of your own.
Tom's Computer Info / [email protected]