Skip to content

Instantly share code, notes, and snippets.

@enukane
Created July 3, 2014 00:39
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 enukane/d8bbe0c7ca1fc3dee161 to your computer and use it in GitHub Desktop.
Save enukane/d8bbe0c7ca1fc3dee161 to your computer and use it in GitHub Desktop.
cubieboard2 printen on u-boot
autoboot=run loadkernel && run setargs && true && bootm 0x48000000
baudrate=115200
boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x41000000; then true; setenv stdout $saved_stdout; source 0x41000000;else setenv stdout $saved_stdout;fi
bootcmd=if run loadbootenv; then echo Loaded environment from ${bootenv};env import -t ${scriptaddr} ${filesize};fi;if test -n "${uenvcmd}"; then echo Running uenvcmd ...;run uenvcmd;fi;if run loadbootscr; then echo Jumping to ${bootscr};source ${scriptaddr};fi;run autoboot;
bootdelay=3
bootenv=uEnv.txt
bootscr=boot.scr
console=ttyS0,115200
device=mmc
ethact=emac
kernel=uImage
loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition $scriptaddr ${bootenv}
loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition $scriptaddr ${bootscr}
loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x43000000 ${bootpath}script.bin && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 script.bin && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}script.bin && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi
loglevel=8
panicarg=panic=10
partition=0:1
scriptaddr=0x44000000
setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = "/boot/"; then root="/dev/mmcblk0p1 rootwait"; else root="/dev/mmcblk0p2 rootwait"; fi; fi; setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} ${extraargs}
stderr=serial
stdin=serial
stdout=serial
Environment size: 1841/131068 bytes
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment