Beaglebone Bootloader
Angelo Fraietta
newsgroups at smartcontroller.com.au
Wed Jun 24 22:46:58 UTC 2015
Thanks for that. I tried these but they did not work. However, Cláudio
Silva sent me one this morning that did work.
When it booted, it loaded, diplayed hello workd, and then stopped - which
is what I expected.
***************************************************************************
U-Boot SPL 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img
U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
I2C: ready
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
gpio: pin 53 (gpio 53) value is 1
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
426 bytes read in 5 ms (83 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from uEnv.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
cpsw Waiting for PHY auto negotiation to complete. done
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.0.25; our IP address is 192.168.0.53
Filename '/hello'.
Load address: 0x81000000
Loading: ######
4.5 MiB/s
done
Bytes transferred = 84336 (14970 hex)
## Booting kernel from Legacy Image at 81000000 ...
Image Name: XKY
Image Type: ARM RTEMS Kernel Image (gzip compressed)
Data Size: 84272 Bytes = 82.3 KiB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Transferring control to RTEMS (at address 80000000) ...
-------------------------------------------------------------------------------
** XKY OS v1.0
-------------------------------------------------------------------------------
:: Initialization complete!
*** HELLO WORLD TEST ***
Hello World
*** END OF HELLO WORLD TEST ***
*************************************************************
When I copied hello world using his sample script
https://gist.github.com/cdcs/0c789e9aae9e79200da5
The exe loaded, however, it kept rebooting
*******************************************************************************
TFTP from server 192.168.0.25; our IP address is 192.168.0.53
Filename '/hello'.
Load address: 0x81000000
Loading: #####
4.4 MiB/s
done
Bytes transferred = 59980 (ea4c hex)
## Booting kernel from Legacy Image at 81000000 ...
Image Name: RTEMS
Image Type: ARM RTEMS Kernel Image (gzip compressed)
Data Size: 59916 Bytes = 58.5 KiB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Transferring control to RTEMS (at address 80000000) ...
RTEMS Beagleboard: am335x-based
*** BEGIN OF TEST HELLO WORLD ***
Hello World
▒** END OF TEST HELLO WORLD ***
U-Boot SPL 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img
U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
I2C: ready
DRAM: 512 MiB
NAND: 0 MiB
MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
*** Warning - readenv() failed, using default environment
Net: <ethaddr> not set. Validating first E-fuse MAC
cpsw, usb_ether
Hit any key to stop autoboot: 0
gpio: pin 53 (gpio 53) value is 1
mmc0 is current device
gpio: pin 54 (gpio 54) value is 1
SD/MMC found on device 0
reading uEnv.txt
426 bytes read in 4 ms (103.5 KiB/s)
gpio: pin 55 (gpio 55) value is 1
Loaded environment from uEnv.txt
Importing environment from mmc ...
Checking if uenvcmd is set ...
gpio: pin 56 (gpio 56) value is 1
Running uenvcmd ...
cpsw Waiting for PHY auto negotiation to complete.. done
link up on port 0, speed 100, full duplex
Using cpsw device
TFTP from server 192.168.0.25; our IP address is 192.168.0.53
Filename '/hello'.
Load address: 0x81000000
Loading: #####
4.8 MiB/s
done
Bytes transferred = 59980 (ea4c hex)
## Booting kernel from Legacy Image at 81000000 ...
Image Name: RTEMS
Image Type: ARM RTEMS Kernel Image (gzip compressed)
Data Size: 59916 Bytes = 58.5 KiB
Load Address: 80000000
Entry Point: 80000000
Verifying Checksum ... OK
Uncompressing Kernel Image ... OK
## Transferring control to RTEMS (at address 80000000) ...
RTEMS Beagleboard: am335x-based
*** BEGIN OF TEST HELLO WORLD ***
Hello World
▒** END OF TEST HELLO WORLD ***
U-Boot SPL 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
reading args
spl_load_image_fat_os: error reading image args, err - -1
reading u-boot.img
reading u-boot.img
etc....
***************************************************************************
So although I have a successful boot, there is something different about
the two.
Cláudio, could you please send me the EXE before you have turned it into
the beagle image. I want to see if the issue is with the generated code or
the converted image.
Thanks
On Wed, Jun 24, 2015 at 4:32 PM, Ketul Shah <ketulshah1993 at gmail.com> wrote:
> Hi Angelo,
>
> I am attaching link for hello word .img [1]. That you can try. I have
> tested it on my BBB working fine. but I used sdcard not the tftp.
>
> Anyways you can check it with your BBB.
>
> Also you can try one more that is for gpio [2] that you can test it
> without having requirement of any output on screen. It has user led
> blinking program.
>
> [1] https://github.com/ketul93/RTEMS-on-BBB/tree/master/Gettin-Started
> [2] https://github.com/ketul93/RTEMS-on-BBB/tree/master/GPIO-Test
>
> Thanks.
>
> Best Regards,
> Ketul
>
> On 24 June 2015 at 08:57, Angelo Fraietta <
> newsgroups at smartcontroller.com.au> wrote:
>
>> I got back to my defaule beagle by reflashing. However, can someone
>> please email me a known working image (say hello) that can be loaded (and
>> preferably tested) by tftp. I need to eliminate whether it is the
>> executable generated by me or something else.
>>
>> Thanks
>>
>> On Wed, Jun 24, 2015 at 8:40 AM, Angelo Fraietta <
>> newsgroups at smartcontroller.com.au> wrote:
>>
>>> My image is not loading.
>>>
>>> U-Boot SPL 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
>>> reading args
>>> spl_load_image_fat_os: error reading image args, err - -1
>>> reading u-boot.img
>>> reading u-boot.img
>>>
>>>
>>> U-Boot 2014.04-00014-g47880f5 (Apr 22 2014 - 13:23:54)
>>>
>>> I2C: ready
>>> DRAM: 512 MiB
>>> NAND: 0 MiB
>>> MMC: OMAP SD/MMC: 0, OMAP SD/MMC: 1
>>> *** Warning - readenv() failed, using default environment
>>>
>>> Net: <ethaddr> not set. Validating first E-fuse MAC
>>> cpsw, usb_ether
>>> Hit any key to stop autoboot: 0
>>> gpio: pin 53 (gpio 53) value is 1
>>> Card did not respond to voltage select!
>>> mmc0(part 0) is current device
>>> Card did not respond to voltage select!
>>> gpio: pin 56 (gpio 56) value is 0
>>> gpio: pin 55 (gpio 55) value is 0
>>> gpio: pin 54 (gpio 54) value is 0
>>> mmc1(part 0) is current device
>>> gpio: pin 54 (gpio 54) value is 1
>>> SD/MMC found on device 1
>>> reading uEnv.txt
>>> 426 bytes read in 4 ms (103.5 KiB/s)
>>> gpio: pin 55 (gpio 55) value is 1
>>> Loaded environment from uEnv.txt
>>> Importing environment from mmc ...
>>> Checking if uenvcmd is set ...
>>> gpio: pin 56 (gpio 56) value is 1
>>> Running uenvcmd ...
>>> cpsw Waiting for PHY auto negotiation to complete. done
>>> link up on port 0, speed 100, full duplex
>>> Using cpsw device
>>> TFTP from server 192.168.0.25; our IP address is 192.168.0.53
>>> Filename '/hello'.
>>> Load address: 0x81000000
>>> Loading:
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>>
>>> #################################################################
>>> ###########
>>> 4.9 MiB/s
>>> done
>>> Bytes transferred = 33554432 (2000000 hex)
>>> Wrong Image Format for bootm command
>>> ERROR: can't get kernel image!
>>>
>>>
>>> uenvcmd was not defined in uEnv.txt ...
>>> Booting from nand ...
>>>
>>> no devices available
>>>
>>> no devices available
>>> Bad Linux ARM zImage magic!
>>> U-Boot#
>>>
>>>
>>> It would not load the image. So I think my image is bad. Can someone
>>> email me the image for the hello example for beagle already
>>>
>>> I modified the uEnv.txt on the device. Now, however, I have a beagle
>>> that is in the uBoot menu and I can't change the eUenv,txt because it will
>>> not how up as a drive because it is not booted into linux.
>>>
>>> How do I get back to beagle linux from u-boot prompt?
>>>
>>> Thanks
>>>
>>> On Tue, Jun 23, 2015 at 6:44 PM, Cláudio Silva <claudiodcsilva at gmail.com
>>> > wrote:
>>>
>>>> Hello Angelo,
>>>>
>>>> I am using the following script snippet to generate a u-boot bootable
>>>> image from an RTEMS .exe:
>>>> https://gist.github.com/cdcs/0c789e9aae9e79200da5
>>>> It essentially follows the steps described in Ben's README.
>>>>
>>>> If you are using application=/TICKER in the script, it will try to load
>>>> something called TICKER from the tftp root (without any extension).
>>>>
>>>> Did you try with the u-boot that comes preloaded in the BBB?
>>>> You can just try boot the linux version provided in the BBB's emmc and
>>>> then change the uEnv.txt ("/boot/uboot/uEnv.txt") to your tftp version of
>>>> uEnv. You shouldn't need the sdcard.
>>>>
>>>>
>>>> Best Regards,
>>>> Cláudio
>>>>
>>>> On Tue, Jun 23, 2015 at 5:59 AM Angelo Fraietta <
>>>> newsgroups at smartcontroller.com.au> wrote:
>>>>
>>>>> If it is any help. this is the configuration on my SDCard that loads
>>>>> debian linux from SDCard.
>>>>>
>>>>> ##Video: Uncomment to override:
>>>>> ##see:
>>>>> https://git.kernel.org/cgit/linux/kernel/git/torvalds/linux.git/tree/Documentation/fb/modedb.txt
>>>>> #kms_force_mode=video=HDMI-A-1:1024x768 at 60e
>>>>>
>>>>> ##Enable systemd
>>>>> systemd=quiet init=/lib/systemd/systemd
>>>>>
>>>>> ##BeagleBone Cape Overrides
>>>>>
>>>>> ##BeagleBone Black:
>>>>> ##Disable HDMI/eMMC
>>>>>
>>>>> #optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN,BB-BONE-EMMC-2G
>>>>>
>>>>> ##Disable HDMI
>>>>> #optargs=capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
>>>>>
>>>>> ##WIP: v3.13+ capes..
>>>>> #cape=lcd4-01
>>>>> #cape=
>>>>>
>>>>> ##note: the eMMC flasher script relies on the next line
>>>>> mmcroot=UUID=8f529ad7-82d1-4d8e-91dc-31e9e2080813 ro
>>>>> mmcrootfstype=ext4 rootwait fixrtc
>>>>>
>>>>> ##These are needed to be compliant with Angstrom's 2013.06.20 u-boot.
>>>>> console=ttyO0,115200n8
>>>>>
>>>>> kernel_file=zImage
>>>>> initrd_file=initrd.img
>>>>>
>>>>> loadaddr=0x82000000
>>>>> initrd_addr=0x88080000
>>>>> fdtaddr=0x88000000
>>>>>
>>>>> initrd_high=0xffffffff
>>>>> fdt_high=0xffffffff
>>>>>
>>>>> loadkernel=load mmc ${mmcdev}:${mmcpart} ${loadaddr} ${kernel_file}
>>>>> loadinitrd=load mmc ${mmcdev}:${mmcpart} ${initrd_addr}
>>>>> ${initrd_file}; setenv initrd_size ${filesize}
>>>>> loadfdt=load mmc ${mmcdev}:${mmcpart} ${fdtaddr} /dtbs/${fdtfile}
>>>>>
>>>>> loadfiles=run loadkernel; run loadinitrd; run loadfdt
>>>>> mmcargs=setenv bootargs console=tty0 console=${console} ${optargs}
>>>>> ${kms_force_mode} root=${mmcroot} rootfstype=${mmcrootfstype} ${systemd}
>>>>>
>>>>> uenvcmd=run loadfiles; run mmcargs; bootz ${loadaddr}
>>>>> ${initrd_addr}:${initrd_size} ${fdtaddr}
>>>>> #
>>>>>
>>>>>
>>>>> On Tue, Jun 23, 2015 at 12:59 PM, Angelo Fraietta <
>>>>> newsgroups at smartcontroller.com.au> wrote:
>>>>>
>>>>>> I can see I missed a step from Ben's tutorial where it creates the
>>>>>> image file.
>>>>>> I copied the image to tftp and it did not work
>>>>>>
>>>>>> I also tried doing out of Bens tutorial the
>>>>>>
>>>>>> dd if=bone_hello.exe-sdcard.img of=/dev/mmcblk0 bs=4096
>>>>>>
>>>>>> However, nothing was displayed on my monitor and the three LEDS lit,
>>>>>> followed by the light on ethernet port. It did this about three times and
>>>>>> then booted into normal BBB linux. It looked to me like it was resetting,
>>>>>> however, can't be sure.
>>>>>>
>>>>>> Is someone able to email me a working image for BBB so I can see it
>>>>>> that will boot.
>>>>>>
>>>>>> Thanks
>>>>>>
>>>>>> On Tue, Jun 23, 2015 at 8:46 AM, Angelo Fraietta <
>>>>>> newsgroups at smartcontroller.com.au> wrote:
>>>>>>
>>>>>>> Does not boot.
>>>>>>> I have u-boot on the SD card. I know it is being called because if I
>>>>>>> disconnect the ethernet, it freezes and does not boot. If I remove SDcard
>>>>>>> and remove ethernet, it boots normally
>>>>>>> I have tftp on 192.168.0.25
>>>>>>>
>>>>>>> My configuration is exactly this
>>>>>>>
>>>>>>> ### BBB : Configuration
>>>>>>> ipaddr=192.168.0.53
>>>>>>> serverip=192.168.0.25
>>>>>>> netmask=255.255.255.0
>>>>>>>
>>>>>>> ### XKY-OS : Configuration
>>>>>>> baseaddr=0x81000000
>>>>>>> application=/TICKER
>>>>>>>
>>>>>>> ### Boot BBB from network
>>>>>>> nfsargs=setenv bootargs console=${console} root=/dev/nfs
>>>>>>> nfsroot=${serverip}:${rootpath} rw
>>>>>>> ip=${ipaddr}:${serverip}:${serverip}:${netmask}::eth0:off
>>>>>>> xkyboot=run nfsargs; tftp ${baseaddr} ${application}; bootm
>>>>>>> ${baseaddr}
>>>>>>> uenvcmd=run xkyboot
>>>>>>>
>>>>>>>
>>>>>>> I have copied ticker.exe to root folder
>>>>>>> I tried
>>>>>>> application=/TICKER
>>>>>>> application=/ticker.exe
>>>>>>> application=/TICKER.EXE
>>>>>>>
>>>>>>> Just boots into normal regardless of what I do (except removing
>>>>>>> ethernet with SDCard in). Looking at U-boot in display looks the same as
>>>>>>> though three was no SDcard. How can I freeze screen to read what it all
>>>>>>> says?
>>>>>>>
>>>>>>> I tested my tftp server like this
>>>>>>>
>>>>>>> http://www.gunnalag.com/2013/08/05/how-to-test-tftp-server-from-a-client-system-in-windows/
>>>>>>>
>>>>>>> I did
>>>>>>> tftp -i 1923.168.0.25 get ticker.exe
>>>>>>>
>>>>>>> And it worked fine
>>>>>>>
>>>>>>> So if I am using ticker.exe, what should application=/TICKER be? Is
>>>>>>> it case sensitive? Does it need .exe at the end? Am I supposed to be using
>>>>>>> ticker.exe?
>>>>>>> Can someone send me an exe that does load in BBB so I can see if it
>>>>>>> is that loads.
>>>>>>>
>>>>>>>
>>>>>>> Also, I followed tutorial for installing U-boot on an SDCard which
>>>>>>> boots linux from SDCard and that works
>>>>>>>
>>>>>>> http://www.armhf.com/boards/beaglebone-black/bbb-sd-install/
>>>>>>>
>>>>>>>
>>>>>>> Any suggestions would be great
>>>>>>>
>>>>>>>
>>>>>>> Thanks
>>>>>>>
>>>>>>>
>>>>>>> On Mon, Jun 22, 2015 at 6:39 PM, Cláudio Silva <
>>>>>>> claudiodcsilva at gmail.com> wrote:
>>>>>>>
>>>>>>>> Hi Angelo,
>>>>>>>>
>>>>>>>> xkyboot is just a command name that is executed by uenvcmd; you can
>>>>>>>> name whatever you want. "XKYAPP2" is the executable name. It should placed
>>>>>>>> on the tftp server's root, or otherwise you need to provide the full path
>>>>>>>> to it.
>>>>>>>> Is your tftp server working correctly? Try to test from a tftp
>>>>>>>> client on Linux.
>>>>>>>>
>>>>>>>> Best Regards,
>>>>>>>> Cláudio
>>>>>>>>
>>>>>>>> On Mon, Jun 22, 2015 at 6:51 AM Angelo Fraietta <
>>>>>>>> newsgroups at smartcontroller.com.au> wrote:
>>>>>>>>
>>>>>>>>> I am using BBB also
>>>>>>>>>
>>>>>>>>> I have had a look at what you have provided
>>>>>>>>> are XKYAPP2 and xkyboot your app names?
>>>>>>>>>
>>>>>>>>> Lets say I wanted to boot ticker from tftp server (assume my tftp
>>>>>>>>> server has same ip address as yours)
>>>>>>>>>
>>>>>>>>> I have copied
>>>>>>>>> development/rtems/b-beagle/arm-rtems4.11/c/beagleboneblack/testsuites/samples/ticker/ticker.exe
>>>>>>>>> to the root of my tftp server
>>>>>>>>>
>>>>>>>>> I am assuming this is entire uEnv.txt What should it look like (I
>>>>>>>>> have provided whole of your file here). Thanks
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> ### BBB : Configuration
>>>>>>>>> ipaddr=192.168.0.202
>>>>>>>>> serverip=192.168.0.2
>>>>>>>>> netmask=255.255.255.0
>>>>>>>>>
>>>>>>>>> ### XKY-OS : Configuration
>>>>>>>>> baseaddr=0x81000000
>>>>>>>>> application=/XKYAPP2
>>>>>>>>>
>>>>>>>>> ### Boot BBB from network
>>>>>>>>> nfsargs=setenv bootargs console=${console} root=/dev/nfs nfsroot=${serverip}:${rootpath} rw ip=${ipaddr}:${serverip}:${serverip}:${netmask}::eth0:off
>>>>>>>>> xkyboot=run nfsargs; tftp ${baseaddr} ${application}; bootm ${baseaddr}
>>>>>>>>>
>>>>>>>>> uenvcmd=run xkyboot
>>>>>>>>>
>>>>>>>>> On Fri, Jun 19, 2015 at 6:14 PM, Cláudio Silva <
>>>>>>>>> claudiodcsilva at gmail.com> wrote:
>>>>>>>>>
>>>>>>>>>> You should be able to boot RTEMS through TFTP. At least I do it
>>>>>>>>>> in the BBB, I assume the white version should work as well. You just have
>>>>>>>>>> to change uboot configuration and setup a tftp server.
>>>>>>>>>>
>>>>>>>>>> My current uboot configuration is the following:
>>>>>>>>>> https://gist.github.com/cdcs/76c4dd49c2d574bd68cc
>>>>>>>>>>
>>>>>>>>>> Cláudio
>>>>>>>>>>
>>>>>>>>>> On Fri, Jun 19, 2015 at 5:57 AM Chris Johns <chrisj at rtems.org>
>>>>>>>>>> wrote:
>>>>>>>>>>
>>>>>>>>>>> On 19/06/2015 1:56 pm, Angelo Fraietta wrote:
>>>>>>>>>>> > Those links I posted -- do any of them work with RTEMS?
>>>>>>>>>>> >
>>>>>>>>>>>
>>>>>>>>>>> I do not know. I have no interested uboot. Maybe someone else
>>>>>>>>>>> knows.
>>>>>>>>>>>
>>>>>>>>>>> Chris
>>>>>>>>>>> _______________________________________________
>>>>>>>>>>> users mailing list
>>>>>>>>>>> users at rtems.org
>>>>>>>>>>> http://lists.rtems.org/mailman/listinfo/users
>>>>>>>>>>>
>>>>>>>>>>
>>>>>>>>>
>>>>>>>
>>>>>>
>>>>>
>>>
>>
>> _______________________________________________
>> users mailing list
>> users at rtems.org
>> http://lists.rtems.org/mailman/listinfo/users
>>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.rtems.org/pipermail/users/attachments/20150625/86696b9f/attachment-0002.html>
More information about the users
mailing list