Where to put blX and u-boot in a SDcard? SOLVED

Post Reply
rmelo
Posts: 11
Joined: Fri Mar 01, 2013 12:51 am
languages_spoken: english, spanish
ODROIDs: ODROID-PC
Has thanked: 0
Been thanked: 0
Contact:

Where to put blX and u-boot in a SDcard? SOLVED

Post by rmelo »

I haven't yet solved my 2 previous problems:
* Start without a bootloader to test a bremetal program (http://forum.odroid.com/viewtopic.php?f=38&t=203)
* How to boot from USB (http://forum.odroid.com/viewtopic.php?f=38&t=229)

I decided to start by the begining, so I want to put by myself u-boot, bl1 and bl2 in the SDcard.

I downloaded Exynos4210_Android_4.0.4_BSP.tar and I obtained the u-boot sources. I compiled u-boot for the target smdkv310 (I understood that it is Exynos4210).
I obtained u-boot.bin and bl2.bin. Where is bl1.bin? How I must obtain it?

Where I must put each bin in the SD card? I found:

Code: Select all

$ sudo dd iflag=dsync oflag=dsync if=./u-boot-bl1.bin of=/dev/sdc seek=1
$ sudo dd iflag=dsync oflag=dsync if=./u-boot.bin of=/dev/sdc seek=33
Where is bl2? Moreover, do I need an env file?

Thanks in advance for any clear information than somebody could give me. I read through internet, in several wikis and I didn't found good information.
Last edited by rmelo on Thu Mar 14, 2013 11:57 pm, edited 1 time in total.

User avatar
odroid
Site Admin
Posts: 37816
Joined: Fri Feb 22, 2013 11:14 pm
languages_spoken: English, Korean
ODROIDs: ODROID
Has thanked: 1930 times
Been thanked: 1188 times
Contact:

Re: Where to put blX and u-boot in a SDcard?

Post by odroid »

Refer "c210-fusing.sh" file in sd_fuse directory to make a bootable SD.

Another useful document is
http://com.odroid.com/sigong/nf_file_bo ... php?bid=98

rmelo
Posts: 11
Joined: Fri Mar 01, 2013 12:51 am
languages_spoken: english, spanish
ODROIDs: ODROID-PC
Has thanked: 0
Been thanked: 0
Contact:

Re: Where to put blX and u-boot in a SDcard?

Post by rmelo »

I used c210-fusing.sh and it didn't work, but I think that maybe I did something wrong, so I will try again.
I didn't see before the document that you bring me. I'm downloading it.

Thanks odroid. When I get it working I will write a resume here.

Success

rmelo
Posts: 11
Joined: Fri Mar 01, 2013 12:51 am
languages_spoken: english, spanish
ODROIDs: ODROID-PC
Has thanked: 0
Been thanked: 0
Contact:

Re: Where to put blX and u-boot in a SDcard? [SOLVED]

Post by rmelo »

It was usefull. Here the sum up:

I downloaded Exynos4210_Android_4.0.4_BSP.tar
Inside it has uboot_4210.tar.gz.
When descompress:

Note: as example, my prefix cross compile was arm-none-eabi- (Linaro tool).

$ cd uboot_4210
$ make CROSS_COMPILE=arm-none-eabi- distclean
$ make CROSS_COMPILE=arm-none-eabi- smdkv310_config
$ make CROSS_COMPILE=arm-none-eabi- -j10

Note: if you are using a 32 bits OS, the compilation fails when try to generate bl2.bin.
$ make -C sd_fuse; cp sd_fuse/mkbl2
And compile again.

Code: Select all

Partition |  Start  | Partition     | Partition
Type      |  Sector | Name          | Size
----------+---------+---------------+----------
          |         | Media (VFAT)  |
          |         | CACHE (EXT4)  | 128MB
 Normal   |         | DATA (EXT4)   | 1GB
          | 131072  | SYSTEM (EXT4) | 512MB
----------+---------+---------------+----------
          |  50561  | Reserved      |
          |  17793  | RAMDISK       | 16MB
 Low      |  1409   | KERNEL        | 8MB
 Level    |  1507   | U-BOOT Env    | 16KB
          |  33     | U-BOOT        | 512KB
          |  1      | U-BOOT BL1    | 16KB
          |  0      | MBR           | 512B
To generate bl1 and transfer to SD:
$ make -C sd_fuse
$ ./sd_fuse/c210-mkbl1 u-boot.bin u-boot_bl1.bin 16384
Identify the SD device (using dmesg or fdisk -l). If it has partitions, must be umounted. As example, I used /dev/sdb.
$ sudo dd if=./u-boot_bl1.bin of=/dev/sdb seek=1
$ sudo dd if=./u-boot.bin of=/dev/sdb seek=33
$ sudo sync
* Extract SD and connect to Odroid-PC.

To test:
$ minicom -b 115200 -D /dev/ttyUSB0
(put your serial port)
Hold the power button some seconds and see the minicom output:

Code: Select all

U-Boot 2010.12-00000-g095d793-dirty (Mar 08 2013 - 10:58:57) for EXYNOS4210


CPU: S5PC210 [Samsung SOC on SMP Platform Base on ARM CortexA9]
APLL = 1000MHz, MPLL = 800MHz
EVT1 POP_B
DRAM:  1 GiB


Checking Boot Mode ... SDMMC
MMC Device 0: 7580 MB
MMC Device 1 not found
*** Warning - using default environment                                         
                                                                                
Net:   No ethernet found.                                                       
Hit any key to stop autoboot:  0                                                
reading kernel..device 0 Start 1409, Count 16384                                
MMC read: dev # 0, block # 1409, count 16384 ... 16384 blocks read: OK          
completed                                                                       
reading RFS..device 0 Count 17793, Start 2048                                   
MMC read: dev # 0, block # 17793, count 2048 ... 2048 blocks read: OK           
completed                                                                       
Wrong Image Format for bootm command                                            
ERROR: can't get kernel image!                                                  
EXYNOS4 # 
Thanks again odroid.

Enjoy

Post Reply

Return to “ODROID-PC”

Who is online

Users browsing this forum: No registered users and 2 guests