Allocating a larger u-boot image

1 post / 0 new
Author
Message
#1
  • 1
  • 2
  • 3
  • 4
  • 5
Total votes: 0

Anyone has experience modifying the bootloader for ARM procesors (specifically, modifying U-BOOT for microprocessors running Linux)?

 

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):

 

    #define CONFIG_ENV_SIZE (512 << 10)

 

I have also changed CONFIG_ENV_OFFSET and CONFIG_ENV_OFFSET_REDUND to:

 

    #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:

 

    export DISK=/dev/mmcblk0

    sudo dd if=/dev/zero of=${DISK} bs=1M count=10

 

Then I transfer U-boot by doing:

 

    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:

 

    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.

Last Edited: Sat. Jul 7, 2018 - 11:03 AM