BeagleBoard C5 Building u-boot - embedded-linux

I am trying to successfully build u-boot for my BeagleBoard C5 board. I am using Ubuntu 10.04 and the Crosstool-NG toolchain. I have working images for Xloader (MLO), u-boot.bin, and uImage that I found prebuilt from the AngstromBB project for which the boards boots Angstrom successfully.
I can successfully build the u-boot.bin file by doing the following:
git clone git://git.denx.de/u-boot.git u-boot/
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi- omap3_beagle_config
make ARCH=arm CROSS_COMPILE=arm-none-linux-gnueabi-
I then copy my just built u-boot.bin to replace the working version of u-boot.bin on the SD card and attempt to boot the board but it fails by hanging at:
Reading boot sector
Loading u-boot.bin from mmc
It will just sit there forever! I cannot seem to find any clear instructions on building u-boot for the C5 BeagleBoard other than that it is different then previous versions or requiring something called 'SPL' built with u-boot. Does anybody know how I might succeed in building my own u-boot.bin image for the BeagleBoard C5?

Your first step should be researching the boot sequence of the board. Some processors do not boot directly to u-boot. They launch an application that is stored in Flash or maybe an EEPROM on the board. In the case of your C5, this application is X-Loader (https://gitorious.org/x-loader). You are going to need to understand what this level 1 boot loader does and how exactly it launches u-boot. Generally they will do some basic PSC, DRAM, ... configuration before launching the full boot loader. But where does it look for u-boot? Does X-Loader copy u-boot to RAM and begin execution from there? Or does it it start execution from your MMC? Sometimes there are jumpers that can be set which will control the boot sequence. So X-Loader could boot from NAND, NOR or SD/MMC depending on the setting.
Where did you get your u-boot source code from? Did you download it directly from the denx website or was it provided with your Beagle board?
In general, it is very difficult to debug bringing up a board (even if it's a reference board) without tools. Was a debugger provided with the board or d you have a JTAG debugger of your own that you could use to set hardware breakpoints and step through the code?

Related

Barebox booting u-boot using bootm

I have got a Board with NXP LS1021A which regularly boot Barebox from a QSPI rom partition.
Unfortunately this bootloader has several compatibility problems with my board, so I would like to use Barebox for booting a u-boot image from another partition on the same QSPI rom. I regularly modified and compiled u-boot for the board, changing the starting address to be compatible with the new partition. This is ok.
Problem is related to u-boot execution as my Barebox has problem with direct “go” command (seems not to be able to se direct addresses of partitioned flash) but I am able to use bootm in the partition.
So I try the command
bootm /dev/flash.uboot-partition
Unfortunately says “no handle for uImage format“. uImage is correctly checked and is fine.
Is there a way to do this?
Thanks in advance
I tried bootm command, I expected u-Boot to be booted.

How to boot Android Things 0.6.1 DevPreview in CM3L (Computer Module 3 Lite)

Actually I can boot Android Things "0.6.1 Developer Preview" in Raspberry Pi 3 (RPI3), I'm develop a project with Computer Module 3 Lite (CM3L) this have the same processor of the Raspberry Pi 3 (RPI3) but I only see the rainbow screen, never continue, I suppose the problem is relatad with DTB (Device Tree).
I try some options
1. Add DTB file for CM3 "bcm2710-rpi-cm3.dtb" on boot partition, when I do that the rainbow screen appear an the disappear but not do anything more
2. Replace the original DTB file "BCM271~1.DTB" for "bcm2710-rpi-cm3.dtb", when I do that the rainbow screen never disappear (equal to the original boot partition)
Finally i do it
The main reason by the CM3L don't start with the Android Things RPI3 is the hardware configuration, although the RPI3 and the CM3L have the same processor but the additional hardware of RPI3 (Ethernet, Wifi and Bluethoot) has a configuration on DTB file, and this configuration avoid the start, for change it, you need decompile DTB file, remove this hardware and recompile the file
Requiremets:
Linux (I use ubuntu VM on Windows)
Install Device Tree Compiler Link on this you find the DTC tool (convert tool from DTB to DTS or from DTS to DTB) to use see this answer
Procedure
Get DTB file form the microSD with Android Things (bcm2710-rpi-cm3.dtb)
Copy it on linux and decompile using DTC tool
DTC -I dtb -O dts -o bcm2710-rpi-3-b.dts bcm2710-rpi-3-b.dtb
Modify the file (search and comment some lines)
In section SOC search and comment blocks sdio_pins, bt_pins, uart0_pins and uart1_pins
In the final section sysmbols comment some definitions, sdio_pins, bt_pins, uart0_pins and uart1_pins
NOTE: You can comment like C with // or /**/
Compile the file with DTC tool
DTC -I dts -O dtb -o bcm2710-rpi-cm3.dtb bcm2710-rpi-3-b.dts
Copy bcm2710-rpi-cm3.dtb file on microSD and run CM3L
The CM3 does have GPIO. The major difference between CM3 and RP3 is the unit must boot from the onboard eMMC memory. The CM3 is an industrial SOM unit available until at least 2023 so it is ideal for industrial applications. I'd be interested in anyone who can get this to work on the CM3 as well as referrals to our customers using our Artista IoT from Apollo Displays.

Buiding kernel for an ARM processor

I working on Odroid XU3 with the ubuntu platform. For the DS5 software to crosscompile for profiling , I need to build Linux kernel with specific configuration. I am new to this stuff, but I have created the UImage of the kernel on the host machine for the Arm processor. I need to ask how one can get that kernel copy in the target platform i.e. Odroid.
Because for the profiling I need to have gatord and kernel with specific configuration installed on the target machine. I am done with gatord and build the kernel on host. Just need to copy it on target. But it is not happening using the sdcard of the odroid. Please let me know.
So if you have created uImage that seems like you have U-Boot as a bootloader on your target board. U-Boot in its turns can download kernel uImages via TFTP. I haven't worked with such devices as yours, but if it has Ethernet port, you could use it.
Also you have to know the U-Boot commands (fortunatelly there are a lot of information can be found over Internet, just ask google.)

What is different between u-boot.bin and u-boot.img

I just compiled the U-Boot bootloader and I see a few file names in the u-boot program directory which are:
u-boot.bin
u-boot.img
u-boot.lds
u-boot.srec
Basically, I'm interested in the files with extensions .img and .bin. What is different between them?
Is u-boot.img for SD card and u-boot.bin for flashing to NAND ?
u-boot.bin is the binary compiled U-Boot bootloader.
u-boot.img contains u-boot.bin along with an additional header to be used by the boot ROM to determine how and where to load and execute U-Boot.
The way in which these files are deployed can depend upon the nature of your device, its boot ROM and where the files are loaded from.
Boot ROMs are generally provided by the SoC/CPU vendor. These days, many boot ROMs are capable of loading u-boot.img, reading the file's header, loading u-boot.bin into memory and finally executing it. Some boot ROMs are complex enough to load u-boot.bin directly or even the OS kernel. While others may load an intermediate bootloader (MLO/X-Loader) first which then takes responsibility for loading U-Boot as the secondary bootloader once external memory is initialized.
This image depicts the latter case as implemented by some TI OMAP processors:
This boot process is reduced by some devices by moving many of the X-Loader tasks into U-Boot and placing boot parameters (such as memory addresses) into the header of u-boot.img avoiding the need for an intermediate bootloader.
You will need to investigate the properties of your device to determine how you should go about deploying U-Boot.

ARM S3C6410 kernel boot

I am working on ARM S3C6410 device now.
The problem is first 256KB of NAND was broken.
I am trying to boot with SD card, uboot works.
What I want to know is as following.
Can I boot kernel from SD card without NAND?
Can I run uboot from SD card, and then boot kernel from non-broken area of NAND?
I am a newbie. I hope guru's help.
yes, many boards use sd-card instead of nand, just modify the bootargs in u-boot. You probably don't even need to change the kernel, just make sure that uboot supports the SD-card for your platform as a boot device
yes. Again, it's only a problem of configuring bootargs correctly. Probably even simpler than point 1

Resources