qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: eMMC support


From: Cédric Le Goater
Subject: Re: eMMC support
Date: Mon, 1 Feb 2021 23:01:58 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:78.0) Gecko/20100101 Thunderbird/78.6.0

Hello, 

>> FYI, aspeed machines successfully boot on top of 16G emmc disk images.
>> I merged some of xilinx patches on top of the aspeed-6.0 branch to
>> improve the model completeness but only the one fixing powerup was
>> really necessary.
>
>> The initial diffstat is rather small.
>
>>  hw/sd/sd.c             |  168 
>> ++++++++++++++++++++++++++++++++++++++++++-------
>
>> We can surely find a way to merge support in mainline without
>> covering the whole specs. The Extended CSD register would be the
>> big part.
> 
> */[Sai Pavan Boddu] I’m revisiting eMMC now, made some patches on top of 
> previous series sent by “Vincent Palatin”./*
> 
> */Would you like to share your changes, which made aspeed machines to work ?/*
> 
> */Regards,
> Sai Pavan/*

The patchset is in the aspeed-6.0 branch : 

    df91d012672c Cédric Le Goater - hw/arm/aspeed: Load eMMC first boot area as 
a boot rom
    27b75a7ad322 Cédric Le Goater - hw/arm/aspeed: Add eMMC property
    2836cf5a15a1 Joel Stanley - hw/arm/aspeed: Set boot device to emmc
    42c9d57f5cd0 Joel Stanley - sd: mmc: Subtract bootarea size from blk
    218301406607 Joel Stanley - sd: mmc: Support boot area in emmc image
    df0452923b56 Cédric Le Goater - sd: mmc: Add Extended CSD register 
definitions
    416c02bbfd32 Sai Pavan Boddu - sd: mmc: Add mmc switch function support
    a228aef1a209 Sai Pavan Boddu - sd: mmc: add CMD21 tuning sequence
    9b177d7baf8e Sai Pavan Boddu - sd: mmc: Update CMD1 definition for MMC
    6677e4eb6812 Vincent Palatin - sd: add eMMC support
    
Also based on Vincent Palatin initial patches, reworked by Joel and I.

Booting an aspeed machine requires a bit of work since you need to build
an eMMc disk image with uboot in the boot partitions. 

Here is a little script from Joel to get you going.

Thanks,

C.


#!/bin/sh

URLBASE=https://jenkins.openbmc.org/view/latest/job/latest-master/label=docker-builder,target=witherspoon-tacoma/lastSuccessfulBuild/artifact/openbmc/build/tmp/deploy/images/witherspoon-tacoma/

IMAGESIZE=128
OUTFILE=mmc.img

FILES="u-boot.bin u-boot-spl.bin obmc-phosphor-image-witherspoon-tacoma.wic.xz"

for file in ${FILES}; do

        if test -f ${file}; then
                echo "${file}: Already downloaded"
        else
                echo "${file}: Downloading"
                wget -nv ${URLBASE}/${file}
        fi
done

echo

echo "Creating empty image..."
dd status=none if=/dev/zero of=${OUTFILE} bs=1M count=${IMAGESIZE}
echo "Adding SPL..."
dd status=none if=u-boot-spl.bin of=${OUTFILE} conv=notrunc
echo "Adding u-boot..."
dd status=none if=u-boot.bin of=${OUTFILE} conv=notrunc bs=1K seek=64
echo "Adding userdata..."
unxz -c obmc-phosphor-image-witherspoon-tacoma.wic.xz | dd status=progress 
of=${OUTFILE} conv=notrunc bs=1M seek=2
echo "Fixing size to keep qemu happy..."
truncate --size 16G ${OUTFILE}

echo "Done!"
echo
echo " qemu-system-arm -M tacoma-bmc -nographic -drive 
file=mmc.img,if=sd,index=2,format=raw"




reply via email to

[Prev in Thread] Current Thread [Next in Thread]