Welcome! Log In Create A New Profile

Advanced

How to load BSD, Linux boots already

Posted by bsd 
bsd
How to load BSD, Linux boots already
June 23, 2011 06:58AM
The bootloader is installed and loads Linux just fine. Now i'd like to change it to load a bsd kernel.
I don't know how to set the parameters. Is it possible to tune the bootloader when the fw_setenv tool seems not to be installed? Do I have to install the bootloader again??

What is the TFTP needed for?

What is the serial cable needed for?

When I install this fw_setenv program somehow, will it suffice to set the parameters?
bsd
Re: How to load BSD, Linux boots already
June 23, 2011 07:05AM
Well, my question is probably more related to the basic usage of uboot itself and not only related to BSD. The commands i'd like to try are taken from the cooltrainer website but I am missing the fw_setenv, although I have the bootloader installed:

fw_setenv usb_boot 'fatload usb $usb_device 0x900000 kernel.bin; go 0x900000;'
fw_setenv usb_init 'usb start; if fatload usb 0 0x900000 kernel.bin; then setenv usb_device 0; elif fatload usb 1 0x900000 kernel.bin; then setenv usb_device 1; elif fatload usb 2 0x900000 kernel.bin; then setenv usb_device 2; elif fatload usb 3 0x900000 kernel.bin; then setenv usb_device 3; elif fatload usb 4 0x900000 kernel.bin; then setenv usb_device 4; else run pogo_bootcmd; fi;'
Re: How to load BSD, Linux boots already
June 23, 2011 03:21PM
OK don't change your environment yet! If you have Jeff's bootloader installed you should just issue your boot commands using the netconsole. I've not used the netconsole, as I have a serial console.

TFTP is for loading the kernel off the network.
I highly recommend a serial console when doing any modifications to the boot environment, but if you have a udp network console then you should be OK as well. Though, a serial console will allow you to see the real-time output of FreeBSD's kernel as well.

If you can start your netconsole and interrupt auto-boot, issue your boot command there. Which one you use only depends on where it's stored. I'd look for success here before commiting the changes to your u-boot environment.

You don't *NEED* fw_setenv if you can get a netconsole to u-boot, you can change the environment there.
flop
Re: How to load BSD, Linux boots already
January 20, 2012 08:10PM
I'd like to know how to set this:
Quote

fw_setenv usb_boot 'fatload usb $usb_device 0x900000 kernel.bin; go 0x900000;'
fw_setenv usb_init 'usb start; if fatload usb 0 0x900000 kernel.bin; then setenv usb_device 0; elif fatload usb 1 0x900000 kernel.bin; then setenv usb_device 1; elif fatload usb 2 0x900000 kernel.bin; then setenv usb_device 2; elif fatload usb 3 0x900000 kernel.bin; then setenv usb_device 3; elif fatload usb 4 0x900000 kernel.bin; then setenv usb_device 4; else run pogo_bootcmd; fi;'
which allows to dynamicly boot from a usb-device whether it doesn't matter at which port it is plugged in.
I cannot use the fw_setenv-command because I have no working linux environment on my dockstar. I can only access the uBoot-console with my serial cable.
I can boot into FreeBSD with the commands (there is still work to be done, my system doesn't mount the root filesystem...):
Quote

fatload usb 0 0x900000 kernel.bin
go 0x900000
but I don't want to type them everytime I (re-)boot my dockstar.
dpffan
Re: How to load BSD, Linux boots already
January 21, 2012 07:15PM
setenv usb_boot 'fatload usb $usb_device 0x900000 kernel.bin; go 0x900000;'
setenv usb_init 'usb start; if fatload usb 0 0x900000 kernel.bin; then setenv usb_device 0; elif fatload usb 1 0x900000 kernel.bin; then setenv usb_device 1; elif fatload usb 2 0x900000 kernel.bin; then setenv usb_device 2; elif fatload usb 3 0x900000 kernel.bin; then setenv usb_device 3; elif fatload usb 4 0x900000 kernel.bin; then setenv usb_device 4; else run pogo_bootcmd; fi;'
saveenv
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: