LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 07-06-2018, 09:14 PM   #1
lcruz007
LQ Newbie
 
Registered: Aug 2008
Posts: 13

Rep: Reputation: 0
How to allocate a larger u-boot image


I am compiling my own kernel and bootloader (U-boot). I added a bunch of new environmental variables, but U-boot doesn't load anymore (it just doesn't load anything from the memory). I am using pocketbeagle and booting from an SD card. Thus I am editing the file "am335x_evm.h" found in /include/configs/.

I am trying to allocate U-boot in a way that it has more space for the environmental variables and that it can load succesfully from the memory, but I have been unable to do so. As far as I understand, by default it allocates 128kb of memory to U-boot env variables. Since I added a bunch of them, I am trying to increase its size from 128kb to 512kb.

I have changed the following line (from 128kb to 512kb):

Code:
    #define CONFIG_ENV_SIZE (512 << 10)
I have also changed CONFIG_ENV_OFFSET and CONFIG_ENV_OFFSET_REDUND to:

Code:
    #define CONFIG_ENV_OFFSET (1152 << 10) /* Originally 768 KiB in */

    #define CONFIG_ENV_OFFSET_REDUND (1664 << 10) /* Originally 896 KiB in */
Then after compiling the new U-boot, I format the SD card and insert the new kernel and U-boot.

I start by erasing partitions:

Code:
    export DISK=/dev/mmcblk0

    sudo dd if=/dev/zero of=${DISK} bs=1M count=10
Then I transfer U-boot by doing:

Code:
    sudo dd if=./u-boot/MLO of=${DISK} count=1 seek=1 bs=512k

    sudo dd if=./u-boot/u-boot.img of=${DISK} count=2 seek=1 bs=576k

I then create the partition layout by doing:


Code:
    sudo sfdisk ${DISK} <<-__EOF__

    4M,,L,*

    __EOF__
Then I add the kernel, binary trees, kernel modules, etc... When trying to boot and reading the serial port, I get nothing at all. U-boot is not able to load anything from the SD card. What am I doing wrong?

I'd appreciate if you could point me what my problem is and exactly what I should be doing to increase the size and allocate everything correctly.
 
  


Reply

Tags
embedded, kernel, uboot



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Unable to boot after using dd to restore an image to a larger drive zaldoor Linux - Software 24 03-28-2014 07:21 PM
Need help with restoring a Clonezilla image to larger partition EdgesofTwilight Linux - Newbie 7 01-03-2010 08:59 AM
Copy Image of System to larger drive villumanati Fedora 3 03-16-2009 09:57 PM
Compose two smaller images into one larger image diN0bot Linux - Software 4 03-14-2009 11:45 PM
Help Making Topologilinux 5 Image File Larger Garibaldi3489 Slackware 1 10-31-2004 11:06 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 11:32 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration