Skip to content
This repository has been archived by the owner on May 28, 2023. It is now read-only.

LaMetric

Jude Pereira edited this page Apr 14, 2019 · 1 revision

Original uBoot environment:

autoboot=run loadkernel && run setargs && true && bootm 0x48000000
backup_boot=run loadkernel_recovery && run restore_soft_setargs && true && bootm 0x45000000
backup_boot_fel=run loadkernel_recovery && run resotre_hard_setargs && true && bootm 0x45000000
backup_setargs= root="root=/dev/ram0 rw initrd=0x41000000,8M rootfstype=squashfs ramdisk=8192 rootwait"; loglevel=1 setenv bootargs console=${console} root=${root} loglevel=1
battery_info_boot=run loadkernel_recovery && run battery_info_setargs && true && bootm 0x45000000
battery_info_setargs= root="root=/dev/ram0 rw initrd=0x41000000,8M battery rootfstype=squashfs ramdisk=8192 rootwait"; loglevel=1 setenv bootargs console=${console} root=${root} loglevel=1
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 get_battery; then echo Start battery chargin info;run battery_info_boot;fi;if get_source_fel; then echo Start fel backup mode;run backup_boot_fel;fel;fi;if get_source; then echo Start backup mode;run backup_boot;fel;fi;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
bootloader=uboot
bootloader_version=1.1.0
bootm_size=0x10000000
bootscr=boot.scr
buckup_loglevel=1
console=ttyS0,115200
device=mmc
ethaddr=02:0e:0d:82:88:70
filesize=7e20
kernel=uImage
kernel_recovery=uImage
loadbootenv=ext2load $device $partition_rootfs $scriptaddr boot/${bootenv} || fatload $device $partition $scriptaddr ${bootenv}
loadbootenv_backup=ext2load $device $partition_backup $scriptaddr ${bootenv}
loadbootscr=ext2load $device $partition_rootfs $scriptaddr boot/${bootscr} ||fatload $device $partition $scriptaddr ${bootscr}
loadbootscr_backup=ext2load $device $partition_backup $scriptaddr ${bootscr}
loadkernel=if bootpath=/boot/ && ext2load $device $partition_rootfs 0x43000000 ${bootpath}${script} && ext2load $device $partition_rootfs 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
loadkernel_recovery=if bootpath=/ && ext2load $device $partition_backup 0x43000000 ${bootpath}${script_recovery} && ext2load $device $partition_backup 0x45000000 ${bootpath}${kernel_recovery} && ext2load $device $partition_backup 0x41000000 ${bootpath}${rootfs_recovery};then true; else false;fi
loglevel=8
panicarg=panic=10
partition=0:2
partition_backup=0:8
partition_rootfs=0:6
resotre_hard_setargs= root="root=/dev/ram0 rw initrd=0x41000000,8M restore_hard rootfstype=squashfs ramdisk=8192 rootwait"; loglevel=1 setenv bootargs console=${console} root=${root} loglevel=1
restore_soft_setargs= root="root=/dev/ram0 rw initrd=0x41000000,8M restore_soft rootfstype=squashfs ramdisk=8192 rootwait"; loglevel=1 setenv bootargs console=${console} root=${root} loglevel=1
rootfs_recovery=rootfs.squash
script=script.bin
script_recovery=script.bin
scriptaddr=0x44000000
setargs=if test -z \\"$root\\"; then if test \\"$bootpath\\" = "/boot/"; then root="/dev/mmcblk0p6 rootwait"; else root="/dev/mmcblk0p6 rootwait"; fi; fi; setenv bootargs console=${console} root=${root} loglevel=${loglevel} ${panicarg} bootloader_version=${bootloader_version} bootloader=${bootloader} ${extraargs}
stderr=serial
stdin=serial
stdout=serial
Clone this wiki locally