Commit 3646303e authored by Federico Vaga's avatar Federico Vaga

barebox: boot from DDR during flashing procedure

The flasher script will write on the DDR memory the value
content in magicstr. When barebox start, it checks for this
string in the memory. If the string is there, barebox
automatically boot the kernel from the DDR memory.
Signed-off-by: 's avatarFederico Vaga <federico.vaga@gmail.com>
parent 0b69e1cd
#!/bin/sh
# If we are in the flashing procedure, start with the kernel and file system
# loaded into the DDR memory
memcmp -s /dev/mem -d /env/magicstr 0x71FFFFF8 0x0 8
if [ $? -eq 0 ]; then
echo "Booting kernel for NAND flashing procedure"
bootargs="console=ttyS0,115200 panic=10 mem=64M"
bootargs="$bootargs initrd=0x72000000,20M"
bootargs="$bootargs root=/dev/ram0"
addpart /dev/ram0 0x1000000@0x1000000(kernel)
addpart /dev/ram0 0x1000000@0x2000000(initrd)
bootm /dev/ram0.kernel
fi
autoboot_timeout="10";
### Override default value using /env/config
......
paperino
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment