LINUX.ORG.RU

История изменений

Исправление Camel, (текущая версия) :

sun4i# printenv
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=2
bootenv=uEnv.txt
bootm_size=0x10000000
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} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 ${script} && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi
loglevel=8
panicarg=panic=10
partition=0:1
script=script.bin
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: 1882/131068 bytes

То же самое нашлось в u-boot-sunxi/include/autoconf.mk:

CONFIG_EXTRA_ENV_SETTINGS="bootm_size=0x10000000\0console=ttyS0,115200\0panicarg=panic=10\0extraargs=\0loglevel=8\0scriptaddr=0x44000000\0device=mmc\0partition=0:1\0setargs=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}\0kernel=uImage\0bootenv=uEnv.txt\0bootscr=boot.scr\0script=script.bin\0loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition $scriptaddr ${bootscr}\0loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition $scriptaddr ${bootenv}\0loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 ${script} && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi\0autoboot=run loadkernel && run setargs && " RESET_WATCHDOG " && bootm 0x48000000\0boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x41000000; then " RESET_WATCHDOG "; setenv stdout $saved_stdout; source 0x41000000;else setenv stdout $saved_stdout;fi\0"

Простите за неровный почерк.

Я конечно могу прописать нужные мне опции в autoconf.mk, но как бы сделать так чтобы работало всё через boot.cmd/boot.scr?

Уважаемый, sergej, позвольте возвать вас, чтобы услышать ваше мнение.

Исходная версия Camel, :

printenv

sun4i# printenv
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=2
bootenv=uEnv.txt
bootm_size=0x10000000
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} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 ${script} && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi
loglevel=8
panicarg=panic=10
partition=0:1
script=script.bin
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: 1882/131068 bytes

То же самое нашлось в u-boot-sunxi/include/autoconf.mk:

CONFIG_EXTRA_ENV_SETTINGS="bootm_size=0x10000000\0console=ttyS0,115200\0panicarg=panic=10\0extraargs=\0loglevel=8\0scriptaddr=0x44000000\0device=mmc\0partition=0:1\0setargs=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}\0kernel=uImage\0bootenv=uEnv.txt\0bootscr=boot.scr\0script=script.bin\0loadbootscr=fatload $device $partition $scriptaddr ${bootscr} || ext2load $device $partition $scriptaddr boot/${bootscr} ||ext2load $device $partition $scriptaddr ${bootscr}\0loadbootenv=fatload $device $partition $scriptaddr ${bootenv} || ext2load $device $partition $scriptaddr boot/${bootenv} || ext2load $device $partition $scriptaddr ${bootenv}\0loadkernel=if bootpath=/boot/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; elif bootpath=/ && fatload $device $partition 0x43000000 ${script} && fatload $device $partition 0x48000000 ${kernel};then true; elif bootpath=/ && ext2load $device $partition 0x43000000 ${bootpath}${script} && ext2load $device $partition 0x48000000 ${bootpath}${kernel};then true; else false;fi\0autoboot=run loadkernel && run setargs && " RESET_WATCHDOG " && bootm 0x48000000\0boot_ram=saved_stdout=$stdout;setenv stdout nc;if iminfo 0x41000000; then " RESET_WATCHDOG "; setenv stdout $saved_stdout; source 0x41000000;else setenv stdout $saved_stdout;fi\0"

Простите за неровный почерк.

Я конечно могу прописать нужные мне опции в autoconf.mk, но как бы сделать так чтобы работало всё через boot.cmd/boot.scr?