• Home
  • Help
  • Search
  • Login
  • Register
Pages: [1]
Author Topic: My version of uboot env.  (Read 2924 times)
Sr. Member

Karma: 15
Posts: 318

View Profile
« on: December 25, 2009, 02:12:22 PM »


Merry Christmas!

In the spirit of Christmas and today is my birthday Cheesy I present my uboot-env setup. see the code box below. I also attach a version that should work with sheeval-installaer.

Please Note a few things you might consider changes, from beginning to the "r4" line mostly are variable to later "run macro" so you can change it fit your need. I am not saying don't change anything below "r4" line just be careful.

To use these macro try,Tip: use key TAB to complete typing
Marvell>> run bootk_xxx_yyy #<- replace xxx with (usb|mmc) and yyy with (ext2|fat)

I hope it is very clear on how to use it but just in case, a quick summary for a few important variables,

kMemory loading address for linux kernel.
iMemory loading address for initrd/initramfs
storagepartdevice number for use with load command, it should always start with "0",  can append with ":[0-9]".
bootk_netUse dhcp and tftp to boot. you will need to setup your dhcp to at lease handout "next_server", "subnet-mask", "routers" and your plug IP address.
bootk_xxx_yyyBoot from device type xxx(usb|mmc) use file system type yyy(fat|ext2) take kernel name from ${k}
bootki_xxx_yyysame as above except it will also load/boot with initrd/initramfs from ${i}

setenv real_bootcmd run bootki_nand_ubi
setenv bootcmd echo run r1 to recover
setenv bootdelay 10
setenv bootargs_end some_interest_thing

setenv k 0x02000000
setenv i 0x01100000

setenv kname uImage
setenv iname uInitramfs

setenv nand_kernel_offset 0x00100000
setenv nand_initrd_offset 0x00221000
setenv nand_kernel_size 0x121000
setenv nand_initrd_size 0x2DF000
setenv nand_kernel+nand_initrd 0x400000

setenv storagepart 0

setenv tftpkernelfile /kernels/sheeva-uImage
setenv tftpinitrdfile /initramfs/sheeva-initramfs.img

setenv bootargs_console console=ttyS0,115200
setenv bootargs_root root=union-root

setenv setbootargs 'setenv bootargs ${bootargs} ${bootargs_console} ${bootargs_root} ${bootargs_end}'

setenv bootmki 'bootm ${k} ${i}'
setenv nand_save_nand 'run nand_erase nand_save_kernel nand_save_initrd'
setenv mainL 'setenv mainlineLinux yes; setenv arcNumber 2097'
setenv 'save_real_bootcmd setenv bootcmd ${real_bootcmd}; saveenv'

setenv r1 'run mainL; setenv bootcmd run r2; saveenv; reset'
setenv r2 'run r3 install_boot_nand_ki'
setenv r3 'run r4 nand_save_nand save_real_bootcmd'
setenv r4 'dhcp; run tftp_load_ki; imi ${k} ${i}'

setenv bootk_net 'setenv bootargs net; run setbootargs tftp_load_kernel; bootm ${k}'
setenv bootk_mmc_fat 'setenv bootargs mmc; run setbootargs mmc_loadfat_kernel; bootm ${k}'
setenv bootk_mmc_ext2 'setenv bootargs mmc; run setbootargs mmc_loadext2_kernel; bootm ${k}'
setenv bootk_usb_fat 'setenv bootargs usb; run setbootargs usb_loadfat_kernel bootm ${k}'
setenv bootk_usb_ext2 'setenv bootargs usb; run setbootargs usb_loadext2_kernel bootm ${k}'
setenv bootk_nand_ubi 'setenv bootargs nand; run setbootargs nand_load_kernel bootm ${k}'

setenv bootki_net 'setenv bootargs net; run setbootargs tftp_load_ki bootmki'
setenv bootki_mmc_fat 'setenv bootargs mmc; run setbootargs mmc_loadfat_ki bootmki'
setenv bootki_mmc_ext2 'setenv bootargs mmc; run setbootargs mmc_loadext2_ki bootmki'
setenv bootki_usb_fat 'setenv bootargs usb; run setbootargs usb_loadfat_ki bootmki'
setenv bootki_usb_ext2 'setenv bootargs usb; run setbootargs usb_loadext2_ki bootmki'
setenv bootki_nand_ubi 'setenv bootargs nand; run setbootargs nand_load_ki bootmki'

setenv mmc_loadext2_kernel 'ext2load mmc ${storagepart} ${k} /${kname}'
setenv mmc_loadext2_initrd 'ext2load mmc ${storagepart} ${i} /${iname}'
setenv mmc_loadfat_kernel 'fatload mmc ${storagepart} ${k} /${kname}'
setenv mmc_loadfat_initrd 'fatload mmc ${storagepart} ${i} /${iname}'
setenv usb_loadext2_kernel 'ext2load usb ${storagepart} ${k} /${kname}'
setenv usb_loadext2_initrd 'ext2load usb ${storagepart} ${i} /${iname}'
setenv usb_loadfat_kernel 'fatload usb ${storagepart} ${k} ${kname}'
setenv usb_loadfat_initrd 'fatload usb ${storagepart} ${i} ${iname}'
setenv nand_load_kernel 'nand read.e ${k} ${nand_kernel_offset} ${nand_kernel_size}'
setenv nand_load_initrd 'nand read.e ${i} ${nand_initrd_offset} ${nand_initrd_size}'
setenv nand_save_kernel 'nand write.e ${k} ${nand_kernel_offset} ${nand_kernel_size}'
setenv nand_save_initrd 'nand write.e ${i} ${nand_initrd_offset} ${nand_initrd_size}'
setenv nand_erase 'nand erase clean ${nand_kernel_offset} ${nand_kernel+nand_initrd}'

setenv mmc_loadfat_ki 'mmcinit; run mmc_loadfat_kernel mmc_loadfat_initrd'
setenv mmc_loadext2_ki 'mmcinit; run mmc_loadext2_kernel mmc_loadext2_initrd'

setenv usb_loadfat_ki 'usb start; run usb_loadfat_kernel usb_loadfat_initrd'
setenv usb_loadext2_ki 'usb start; run usb_loadext2_kernel usb_loadext2_initrd'
setenv tftp_load_ki 'dhcp; run tftp_load_kernel tftp_load_initrd'
setenv nand_load_ki 'run nand_load_kernel nand_load_initrd'

setenv tftp_load_initrd 'setenv bootfile ${tftpinitrdfile};setenv loadaddr ${i};tftp'
setenv tftp_load_kernel 'setenv bootfile ${tftpkernelfile};setenv loadaddr ${k};tftp'

setenv install_src auto
setenv install_dest nand
setenv install_type rfs

setenv install 'setenv bootargs ${bootargs_console} install dest=${install_dest} type=${install_type} src=${install_src}'
setenv install_boot_nand_ki 'run install nand_load_ki bootmki'
setenv install_boot_usbfat_ki 'run install usb_loadfat_ki bootmki'
setenv install_boot_usbext2_ki 'run install usb_loadext2_ki bootmki'
setenv install_boot_mmcfat_ki 'run install mmc_loadfat_ki bootmki'
setenv install_boot_mmcext2_ki 'run install mmc_loadext2_ki bootmki'
setenv install_boot_net_ki 'run install tftp_load_ki bootmki'

setenv update_src LABEL=UPDPINTOSRC
setenv update_dest nand
setenv update_type rfs

setenv update 'setenv bootargs ${bootargs_console} update dest=${update_dest} type=${update_type} src=${update_src}'
setenv update_boot_nand_ki 'run update nand_load_ki bootmki'
setenv update_boot_usbfat_ki 'run update usb_loadfat_ki bootmki'
setenv update_boot_usbext2_ki 'run update usb_loadext2_ki bootmki'
setenv update_boot_mmcfat_ki 'run update mmc_loadfat_ki bootmki'
setenv update_boot_mmcext2_ki 'run update mmc_loadext2_ki bootmki'
setenv update_boot_net_ki 'run update tftp_load_ki bootmki'

* uboot-nand-custom.post_version (4.5 KB - downloaded 202 times.)

Good Luck Smiley

Pages: [1]
Jump to: