Some doubts regarding U-Boot Config in Raspberry Pi.
Pavel Pisa
pisa at cmp.felk.cvut.cz
Sun Jul 17 15:07:50 UTC 2016
Hello Deval Shah,
there are more ways how U-boot can be configured.
You can experiment from serial console the first.
When you see "Hit any key to stop autoboot:", send
enter for example to U-boot. Then you can start
USB and scan for ethernet
usb start
You should see
U-Boot> usb start
starting USB...
USB0: Core Release: 2.80a
scanning bus 0 for devices... 3 USB Device(s) found
scanning usb for storage devices... 0 Storage Device(s) found
scanning usb for ethernet devices... 1 Ethernet Device(s) found
U-Boot>
You can enter
setenv autoload n
dhcp
The autoload=n ensures that there is not run directly attempt
to load config file through PXE or value provided by DHCP server.
Typical whole sequence can look as
setenv autoload n
setenv imgsrvip 192.168.1.10
usb start
dhcp
tftp ${kernel_addr_r} ${imgsrvip}:/rpi/rtems/app.img
bootm ${kernel_addr_r}
The application is packed as U-boot image.
See the description for packing RTEMS application into U-boot image
in my previous e-mail
http://article.gmane.org/gmane.os.rtems.devel/9551
You should push commands line by line, the previous one has to finish
before you enter new one. The U-boot serial driver (same as rest
of U-boot) does not use interrupts so the input is mostly lost
if previous command is busy.
If you have tested command sequence which fits your needs,
then you should automete setting. There are many options but
I start with minimal one. U-boot executes content of "bootcmd"
environment variable after startup. You can put all commands
used manually to one line separated by semicolon and set
environment variable for example by command
setenv bootcmd 'mw.l 0x3f200000 0x04a020; mw.l 0x3f200008 0x65b6c0; usb start ; dhcp ; tftp ${kernel_addr_r} ${imgsrvip}:/rpi/rtems/app.img ; bootm
${kernel_addr_r}'
Single quotes ensure that whole sequence is stored in variable.
You can test the boot by "boot" command or even "run ${bootcmd}" commands.
The environment has to be stored to SD card to ensure that it survives
to next boot (power up). Use "saveenv" command. It reports some warning
problem on my SD card, but works
U-Boot> saveenv
Saving Environment to FAT...
writing uboot.env
FAT: Misaligned buffer address (36b3dd70)
done
U-Boot>
Other option is that you can prepare environment file content
"uboot.env" on your host computer. See hints about included in previous
post.
mkenvimage -s 16384 -o uboot.env uboot-env.txt
The assignment lines are by single equal sign in source file
format. There is another "uEnv.txt" override mechanism
available which allows to use plain text file for initial
environment variable setup. But I am not sure if all U-boot
builds parse that file.
It is possible to boot directly binary and ELF files by U-boot
as well. But for RTEMS .exe there is problem that executable
entry point seems to not be set or correctly interpreted by U-boot
and tries start application from address 0. Read elf reports
correct address
readelf --all app.exe
Entry point address: 0x8080
But U-boot image has advantage that it is shorter (binary data only),
compressed and provides consistency checking. So there is no reason
to not use that.
There is that complete system of extlinux available and PXE
naming scheme support included in U-boot. So this is another
option. But for more information, read Denx manuals, please.
http://www.denx.de/wiki/view/DULG/UBoot
I would need to do the same, I have not all in memory.
Best wishes,
Pavel
On Sunday 17 of July 2016 15:31:39 Deval Shah wrote:
> Hello,
> I wanted to boot my test-suit keeping Ethernet on. And what I learned from
> the files which you provided for the raspberry pi, is that it looks for
> tftp files after the boot menu appears. So is there a way to turn ethernet
> in the Uboot itself ? or how to change the config to look for the test-suit
> which I will have on my laptop for the tftp mode ? (currently it is looking
> for
> /extlinux/pxelinux.cfg how can I change that ?)
> Thank you in advance.
> Deval Shah
More information about the devel
mailing list