imx51 hwpack: bootloader installed incorrectly and configured incorrectly

Bug #656962 reported by Dave Martin
10
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Linaro
Invalid
Undecided
Unassigned
Linaro Image Tools
Fix Released
Medium
Loïc Minier
Linaro U-Boot
Invalid
Undecided
Unassigned

Bug Description

Affects: http://jameswestby.net:8080/job/linaro-imx51 hwpack/51/artifact/hwpack_linaro-imx51_20101007-51_armel_unsupported.tar.gz
Board: imx51 babbage3

When running linaro-media-create, the hwpack goes through the motions of installing a bootloader, but in fact nothing seems to get installed.

Also, /etc/flash-kernel.conf is configured incorrectly in the created fs: it identifies the node for the target /boot partition, as seen from the host machine running the install:

# cat /mnt/etc/flash-kernel.conf
UBOOT_PART=/dev/sde2

The only correct place to install U-Boot is the "whole disk" device. In my case, this should be /dev/sde (i.e., the argument to the --mmc or --image_file option given to linaro-media-create) on the host system doing the install, and the final configuration in the target system should be /dev/mmcblk0 (so that initramfs and bootloader updates work correctly).

If after linaro-media-create finishes I manually do:

# mount -text4 /dev/sde3 /mnt
# dd if=/mnt/usr/lib/u-boot/mx51evk/u-boot.imx bs=1k seek=1 of=/dev/sde
# umount /mnt
# sync

This gives me a bootable card, but the U-Boot environment isn't configured properly in this case and I must enter U-Boot commands manually to get the board going.

Tags: imx51
description: updated
Revision history for this message
Shawn Guo (shawnguo) wrote :

I'm using the following command line on native mx51evk board, and can install u-boot successfully.

linaro-media-create --dev mx51evk --mmc=/dev/mmcblk0 --hwpack hwpack_linaro-imx51_20101007-51_armel_unsupported.tar.gz --binary linaro-m-headless-tar-20101007-0.tar.gz

And I'm seeing following line in /etc/flash-kernel.conf

UBOOT_PART=/dev/mmcblk0p2

So can someone confirm that l-m-c supports running on arch beside ARM, saying x86?

It's true that Linaro mx51evk u-boot does not enable env saving on mmc. Not sure if it's author the intention to use boot.scr created by boot.scr to address all env things.

Revision history for this message
Shawn Guo (shawnguo) wrote :

This really discovers a bug in linaro-media-create, dd destination should not be hard coded as /dev/mmcblk0. Instead, ${MMC} should be used.

=== modified file 'linaro-media-create'
--- linaro-media-create 2010-10-12 15:31:29 +0000
+++ linaro-media-create 2010-10-14 06:27:53 +0000
@@ -503,7 +503,7 @@
       ;;

     mx51evk)
- sudo dd if=binary/usr/lib/u-boot/mx51evk/u-boot.imx of=/dev/mmcblk0 \
+ sudo dd if=binary/usr/lib/u-boot/mx51evk/u-boot.imx of=${MMC} \
            bs=1024 seek=1
       sudo mkimage -A arm -O linux -T kernel -C none -a 0x90008000 \
            -e 0x90008000 -n Linux \

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

Linked lp:~dave-martin-arm/linaro-image-tools/mx51evk-fixes, which incorporates Shawn's suggeted fixes.

This still doesn't seem to be sufficient to work correctly, and doesn't work with --image_file (additional patches on my branch to fix this)

Also, the default environment used by U-Boot appears wrong after installation: it tries to boot via TFTP, doesn't load an initrd and doesn't specify the proper command-line arguments.

Revision history for this message
Dave Martin (dave-martin-arm) wrote :

Linking the bug to u-boot-linaro in case it's relevant (feel free to mark as invalid if not)

Revision history for this message
Jason Liu (r64343) wrote : Re: [Bug 656962] Re: imx51 hwpack: bootloader installed incorrectly and configured incorrectly

On Thu, Oct 14, 2010 at 9:06 PM, Dave Martin <email address hidden> wrote:
> Linking the bug to u-boot-linaro in case it's relevant (feel free to
> mark as invalid if not)
>
> --
> imx51 hwpack: bootloader installed incorrectly and configured incorrectly
> https://bugs.launchpad.net/bugs/656962
> You received this bug notification because you are a member of Linaro
> Kernel Working Group, which is the registrant for Linaro U-Boot.
>
> Status in Linaro: New
> Status in Linaro Linux: New
> Status in Linaro U-Boot: New
>
> Bug description:
> Affects: http://jameswestby.net:8080/job/linaro-imx51 hwpack/51/artifact/hwpack_linaro-imx51_20101007-51_armel_unsupported.tar.gz
> Board: imx51 babbage3
>
> When running linaro-media-create, the hwpack goes through the motions of installing a bootloader, but in fact nothing seems to get installed.
>
> Also, /etc/flash-kernel.conf is configured incorrectly in the created fs: it identifies the node for the target /boot partition, as seen from the host machine running the install:
>
> # cat /mnt/etc/flash-kernel.conf
> UBOOT_PART=/dev/sde2
>
> The only correct place to install U-Boot is the "whole disk" device.  In my case, this should be /dev/sde (i.e., the argument to the --mmc or --image_file option given to linaro-media-create) on the host system doing the install, and the final configuration in the target system should be /dev/mmcblk0 (so that initramfs and bootloader updates work correctly).
>
> If after linaro-media-create finishes I manually do:
>
> # mount -text4 /dev/sde3 /mnt
> # dd if=/mnt/usr/lib/u-boot/mx51evk/u-boot.imx bs=1k seek=1 of=/dev/sde
> # umount /mnt
> # sync
>
> This gives me a bootable card, but the U-Boot environment isn't configured properly in this case and I must enter U-Boot commands manually to get the board going.

The default env configuration is for NFS boot not from MMC boot.
Can we create the env for MMC boot on the fly and write to MMC card
when use l-m-c?
or we change the uboot default env for linaro-uboot.git to MMC boot?

>
>
>
>
>

Revision history for this message
Loïc Minier (lool) wrote :

Dave, I merged your branch; thanks! Would you mind sending further code changes as bzr merge requests (bzr lp-propose-merge)? thanks!

affects: linux-linaro → linaro-image-tools
Changed in linaro-image-tools:
importance: Undecided → Medium
status: New → Fix Released
Changed in u-boot-linaro:
status: New → Invalid
Changed in linaro:
status: New → Invalid
Changed in linaro-image-tools:
assignee: nobody → Loïc Minier (lool)
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.