This is a hack and is not intended to go upstream, but will be useful for Linaro's short term goals.
Linaro's development boards use SD cards, currently we have a problem where each unique SD card has a different UUID when created with linaro-media-create / linaro-android-media create.
This means that no one Boot Device configuration can boot Linaro images without some manual intervention from the user.
This hack will zero the signature (UUID) read from the card meaning that all SD cards will appear to be the same card.
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Ryan Harkin <ryan.harkin(a)linaro.org>
---
MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c | 9 +++++++++
1 file changed, 9 insertions(+)
diff --git a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c
index 4c64663..ef16396 100644
--- a/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c
+++ b/MdeModulePkg/Universal/Disk/PartitionDxe/Mbr.c
@@ -155,6 +155,15 @@ PartitionInstallMbrChildHandles (
BlockSize,
Mbr
);
+
+ // RMH - hack - Linaro's development boards use SD cards, currently we have
+ // a problem where each unique SD card has a different UUID when created
+ // with linaro-media-create / linaro-android-media create.
+ // This means that no one Boot Device configuration can boot Linaro images
+ // without some manual intervention from the user.
+ // This hack will zero the signature (UUID) read from the card.
+ ZeroMem(&(Mbr->UniqueMbrSignature[0]), sizeof (Mbr->UniqueMbrSignature));
+
if (EFI_ERROR (Status)) {
Found = Status;
goto Done;
--
1.7.9.5
The attached patch will change the default config for the Arndale
board so that it boots into a Linaro SD card image.
Problem is that a bug [1] prevents the Arndale board booting from a
linaro-media-create'd image, so this patch can only sensibly applied
after that bug is fixed.
[1] https://bugs.launchpad.net/arndale/+bug/1124178
On 02/13/2013 10:44 AM, Olivier Martin wrote:
> Instead of using:
> #if !defined(MDEPKG_NDEBUG)
> (...)
> #endif
>
> It would be better to use:
> DEBUG_CODE_BEGIN();
> (...)
> DEBUG_CODE_END();
>
> The reason is you can be in debug build and disable debug code (and/or
> disable other things such as ASSERT). See definition of PcdDebugPropertyMask
> for the full list of debug properties.
These macros insert code which would place the variable definition
inside an "if" statement. This usage violates the Coding Standard on
page 30:
"The data declarations must be the first code in a module."
"Data declarations appearing anywhere but at the beginning of the
module are illegal."
> The EDK2 coding convention
> (http://sourceforge.net/projects/edk2/files/General%20Documentation/EDK%20II
> %20C%20Coding%20Standards%20Specification.pdf/download) says we should not
> write this kind of variable declaration:
> EFI_STATUS Status = EFI_INVALID_PARAMETER;
>
> See page 30: "Initializing a variable as part of its declaration is
> illegal."
This restriction is violated in almost every case in the files I
patched. I merely coded my changes to blend in with the surrounding
code, as any good maintenance programmer would do.
The coding standard's requirement is, in this case, contrary to commonly
accepted coding practice in the industry for the last decade. It really
should be removed from the DRAFT standard.
The mandatory space between the function name and the opening paren of
its argument list needs to go away too: the vast majority of the
programmers I've spoken with read that as missing a binary operator
between a variable and a parenthized expression. They have to re-read
the code several times before it becomes apparent that this is a
function call and not a coding error. The existence of documented
exceptions (macro definitions, etc.) support the argument that it's a
bad practice.
Feel free to change the patch as you see fit. I never expected to
publish these changes; they were intended only to help me figure out why
I couldn't build a standard target in my development environment. Ryan
asked for copies so I provided them.
-Reece
The attached patch changes the PandaBoardPkg/build.sh script RELEASE
or DEBUG parameter handling.
Before this patch, build.sh can be called thus:
./build.sh
./build.sh -b DEBUG
./build.sh RELEASE
This patch simplifies the way you pass the debug/release parameter
into build.sh so that build scripts can simply pass DEBUG or RELEASE,
without having to create a special case to add the "-b".
Eg.
./build.sh
./build.sh DEBUG
./build.sh RELEASE
Hello all,
This month's Linaro UEFI release is special: it's the first release
from the new tree, using the new process.
The whole thing is documented here; including submission guidelines,
release dates, tree locations, build instructions, ...:
https://wiki.linaro.org/LEG/Engineering/Kernel/UEFI/
The tree can be found here:
http://git.linaro.org/gitweb?p=arm/uefi/uefi-next.git;a=summary
The main points about the new tree:
- The "master" branch is "long lived", it never gets rebased.
- it contains the latest edk2 code from Tianocore
- this is taken directly from the Tianocore GIT, so the SHAs match
- it contains the latest FatDriver2 from Tianocore
- Tianocore does not run a GIT repo for this project
- this is taken from the Linaro GIT mirror of the Tianocore SVN
- it contains the latest BaseTools from Tianocore
- ie. not the version in the edk2 repo but the latest devel code
- this is taken directly from the Tianocore GIT, so the SHAs match
- branches exist for each sub-tree:
- "tianocore-edk2"
- "tianocore-edk2-fatdriver2"
- "tianocore-edk2-basetools"
- The "linaro-tracking" branch is "long lived", it never gets rebased.
- it contains the all latest development work from Linaro
- currently linaro-uefi-2013.01
- The "linaro-release" branch is "long lived", it never gets rebased.
- it contains the latest release from Linaro
- currently linaro-uefi-2013.01
- Monthly tracking branches are created
- At the start of each month, I will update the master branch from
the Tianocore upstreams
- It gets tagged as "linaro-base-YYYY.MM"
- I will then take a branch from this: the monthly tracking branch
- The monthly tracking branch is "long lived", it never gets rebased.
- "linaro-tracking-2013.01" is the most recent branch
- it is now frozen and the release has been cut
- I am about to create the "linaro-tracking-2013.02" branch
- Topic branches are rebased each month
- All branches for specific topics, e.g., Arndale BSP, get rebased to
the monthly tracking branch
- Any upstreamed patches are dropped
- The patch set is tidied up; any "fix" patches are squashed, etc.
- The branch is then merged to the monthly tracking branch
- Release Candidates
- Once all the topic branches are merged to the monthly tracking
branch, tracking gets tagged as a release candidate
- "linaro-tracking" is updated to each RC
- Patches are accepted via the Boot Architecture mailing list
- During the cycle, patches are merged into the relevant topics
- When a complete series of patches is merged, a new RC is created.
- This is currently ad-hoc and not on a time-table
- Each time the tree is updated, a snapshot build is triggered in
Linaro's Continuous Integration system, Jenkins.
- Builds can be found on snapshots.linaro.org [1]
- Release
- At the end of the cycle, the monthly tracking branch is frozen
- Dated follow linux-linaro
- Freeze is the 2nd last Thursday of the month, eg. 21st Feb 2013
- Only urgent fixes can be accepted
- Release Candidate builds are made on the following Monday,
eg. 25th Feb 2013
- The release happens the last Thursday of the month,
eg, 28th Feb 2013
- Release binaries are copied to releases.linaro.org [2]
- The released code is copied to the uefi.git tree [3]
- some users may find a problem using a tree where some branches
are rebased
- uefi.git has only 1 branch and is never rebased
- the SHA ids do not match uefi-next.git
I see this process as "in progress" and open to suggestions and change.
Regards,
Ryan.
[1] https://snapshots.linaro.org/components/kernel/uefi-next
[2] http://releases.linaro.org/13.01/components/kernel/uefi-linaro
[3] http://git.linaro.org/gitweb?p=arm/uefi/uefi.git;a=summary
I am porting the UEFI ARM SctPkg into the core UEFI and I am running into a
problem; Linux Host. The BuildSct.sh is trying to copy a utility called
GenBin_lin{64, 32}, in my case GenBin_lin_64, that should be populated
within ~/SctPkg/Tools/Bin/. My compilation executes fine, but I am unable
to generate a binary because of the lacking GenBin for Linux; there is a
GenBin.exe populated for a Windows Host. Anyone have any advise.
Much appreciated,
Steve
The original message was received at Mon, 28 Jan 2013 19:13:53 +0530 from 140.49.106.138
----- The following addresses had permanent fatal errors -----
boot-architecture(a)lists.linaro.org
The original message was received at Wed, 23 Jan 2013 10:41:34 +0700
from 177.7.60.200
----- The following addresses had permanent fatal errors -----
<boot-architecture(a)lists.linaro.org>
Hello Dear,
Though this medium internet has been greatly abused, but I chose to reach you through it because it still remains the fastest medium of communication .However, this correspondent is unofficial and private.
Please give me this little chance to explain myself to you, I would have like to meet you face to face before departing from this mother earth but my illness continue to deprive the chance, but I know I am strong even if I die on the process of this operation I will still praise ALMIGHTY.
My name is Mrs. Maria M.Victor I am a dying woman and i decided to donate what I have to you which is to be used to assist poor people and charity homes. I am 49 years old and I was diagnosed for cancer for about 2 years ago, immediately after the death of my husband, who has left me everything he worked for and because the doctors told me I will not live longer than some weeks because of my health, I decided to WILL/donate the sum of $10,500,000(Ten million five hundred thousand dollars) to you for the good work of the lord, and also to help the motherless and less privilege and also for the assistance of the widows in general.
Before my husbad dead,he inform me that he had some deposit with Switzerland bank but i was unable to complete the bank required formalities as a result of my health that is why decided to donate the money to assist poor people and charity homes. If you believe that you can handle money as REQUESTED,then you have to arrange for claim to a Swiss bank, there is a fairly simple procedure to follow, depending on the date the account was opened and my lawyer will guide you on the required procedures.Below is the website for your kind reference.
website: www.crt-ii.org/2001_list/publication_list1_A.phtm
I wish you all the best and may the good Lord bless you abundantly, and please use the funds well and always extend the good work to others should encase I did not survive this major operation I am about to go through now, but all I need now is prayers.
I will like you to Contact my lawyer for all the assistance you need to get this money transferred to you. (Bar William Johnson) with his specified contact and let him knows all I just said about this money, ($10,500,000.00) although he is aware of my intention. Please send him all the below information for easy communication.
Your full name...........
Your mobile number............
Your age.......................
Your sex...........................
Your identification proof ....................
Your occupation...............................
Your country and city.......................
NB: I will appreciate your utmost confidentiality and trust in t his matter to accomplish my heart desire, as I don't want anything that will jeopardize my last wish. Always write me with below email address:
mariamark14(a)56788.com
Thanks.
>From Mrs. Maria M.Victor
Hi,
I am trying to port linaro u-boot on custom omap4 board. I can see
it's booting and hanging after sdram_init. We are using different ram
from panda. Panda uses Elpida we are using Samsung.
Following is the error I get
SDRAM : identified size is not same as expected size identified : 0
expected : 40000000
I checked in code and I could see that it is carrying quick memory test.
Previously I was using omapzoom u-boot and it was having following
memory configuration
.sdram_config_init = 0x80000eb2,
.sdram_config = 0x80001ab2,
.ref_ctrl = 0x00000618,
.sdram_tim1 = 0x10eb0662,
.sdram_tim2 = 0x20370dd2,
.sdram_tim3 = 0x00b1c33f,
.read_idle_ctrl = 0x000501ff,
.zq_config = 0xd00b3215,
.temp_alert_config = 0xd8016893,
.emif_ddr_phy_ctlr_1_init = 0x049ffff5,
.emif_ddr_phy_ctlr_1 = 0x049ff408
This configuration is for Samsung 4G_S4 memory which is 1GB with only
1 chip select on each emif.
Please suggest inputs to debug.
Regards,
~/aurum
Dear user boot-architecture(a)lists.linaro.org, mail system administrator of lists.linaro.org would like to inform you that,
Your account has been used to send a large amount of junk email during the recent week.
Probably, your computer was compromised and now contains a hidden proxy server.
We recommend you to follow the instructions in the attachment in order to keep your computer safe.
Virtually yours,
lists.linaro.org technical support team.
Your message was not delivered due to the following reason:
Your message was not delivered because the destination computer was
not reachable within the allowed queue period. The amount of time
a message is queued before it is returned depends on local configura-
tion parameters.
Most likely there is a network problem that prevented delivery, but
it is also possible that the computer is turned off, or does not
have a mail system running right now.
Your message could not be delivered within 5 days:
Host 196.136.62.211 is not responding.
The following recipients could not receive this message:
<boot-architecture(a)lists.linaro.org>
Please reply to postmaster(a)lists.linaro.org
if you feel this message to be in error.
This is to follow up from the discussion yesterday during the UEFI
hacking sprint at the Linaro offices.
I've been playing around with git and repo to figure out how best to
manage Linaro's UEFI tree. First, a summary of the methods I've looked
at:
1) git sub-modules
2) git sub-trees
3) repo
1) git sub-modules
A submodule is and external reference from one git repo to another so
that the submodule appears as a sub directory in the working
directory. The link is by reference using the SHA1 id from the
submodule's git tree and none of the submodules files are tracked in
the master tree.
Git keeps track of both the submodule's git url and SHA1 id as files
in revision control so that the specific version of the submodule gets
tracked. Changes to the submodule upstream are pulled in by committing
a change to the SHA1 id (the tool takes care of doing this
correctly)..
Changes to a submodule must be pushed out to the submodule git URL
before the master tree will be able to see them. Care must be taken to
not push out submodule references that aren't already in the
submodule's master repository.
Work flow requires end users to do extra steps to fetch submodules
after cloning a tree:
References appear to be only by SHA1 id, not by tag or branch. It's
difficult to see at a glance what branch a sub module comes from.
However, going into the subtree and doing a "git pull" does appear to
work for tracking the submodule's git repo.
Sub module must be entirely contained in a single subdirectory path.
No complex fan out across the repo allowed
2) git subtrees
Git subtrees pull a copy of another git tree directly into the git
repository. May optionally include the history of the subtree.
Files become part of the master repo and so one repo contains
everything needed by users. If history is include, then all of the
subtrees commits become part of the git history of the whole tree.
Same as with submodules, a subtree is attached to a specific point in
git-history time. The commit text could state which branch was merged
from the subtree repo, but just looking at a subtree merge commit
doesn't say what branch it came from, or which branch should be
tracked for updates
Subtree can either be constrained to a single subdirectory, or make
changes across the tree. If the subtree directory layout exactly
matches the master repo (at the same directory level, not in a
subdirectory) then the git history becomes transparent. When in a
subdirectory, git log won't follow the file history across the subtree
merge point.
For end users git subtrees are transparent. Clone the tree and go.
3) Repo
External tool on top of git
Fetches and extracts multiple git repos into a single complex of
working directories
https://gerrit.googlesource.com/git-repo
- Integrated with 'Gerrit" review tool, but does not require using gerrit
- Each repo gets a seperate directory. It doesn't look like one can be
a subdirectory of another, but it should be possible to create
symlinks between them
- The repo can be configured to follow a branch on each tree, or be
locked to a specific tag. All is stored in a git repo so is kept under
revision control.
- Figuring out how to write a repo default.xml manifest file wasn't
obvious, but it is a one-time setup thing. Once working it won't need
to be manipulated frequently.
- A canned repo file could make it easy to pull in the various sub
projects needed to build a working UEFI image.
- Possible downside; repo *really* likes to update itself from the
upstream repo .git tree. That is potentially a risk if the upstream
repo moves or otherwise stops working. No data would be lost, but it
could be a denial-of-service kind of error.
Okay, that ended up being a long email. I've got some examples below,
but I'll save a discussion of how best to maintain the linaro uefi
rollup tree to a separate email.
g.
Sub-module Examples:
Creating a submodule:
$ git submodule add git://path/to/submodule/git SecretSubModule
$ git status
# On branch master
# Your branch is ahead of 'origin/master' by 39 commits.
#
# Changes to be committed:
# (use "git reset HEAD <file>..." to unstage)
#
# new file: .gitmodules
# new file: SecretSubmodulePkg
#
$ git diff --staged
diff --git a/.gitmodules b/.gitmodules
new file mode 100644
index 0000000..95e9d58
--- /dev/null
+++ b/.gitmodules
@@ -0,0 +1,3 @@
+[submodule "SecretSubmodulePkg"]
+ path = SecretSubmodulePkg
+ url = git:///path/to/submodule/git
diff --git a/SecretSubmodulePkg b/SecretSubmodulePkg
new file mode 160000
index 0000000..b4e3b57
--- /dev/null
+++ b/SecretSubmodulePkg
@@ -0,0 +1 @@
+Subproject commit b4e3b579a47bc67011738fa938bbbc3758826f4c
$ git comiit
Updating submodule:
$ cd SecretSubmodulePkg/
$ git pull
remote: Counting objects: 5, done.
remote: Compressing objects: 100% (3/3), done.
remote: Total 3 (delta 0), reused 0 (delta 0)
Unpacking objects: 100% (3/3), done.
>From file:///home/grant/hacking/uefi-working/SecretPkg
b4e3b57..a9859ea master -> origin/master
Updating b4e3b57..a9859ea
Fast-forward
README | 2 ++
1 file changed, 2 insertions(+)
$ cd ..
$ git diff
diff --git a/SecretSubmodulePkg b/SecretSubmodulePkg
index b4e3b57..a9859ea 160000
--- a/SecretSubmodulePkg
+++ b/SecretSubmodulePkg
@@ -1 +1 @@
-Subproject commit b4e3b579a47bc67011738fa938bbbc3758826f4c
+Subproject commit a9859ea6ebbf196a5398676d342c3257fb00dd3f
$ git commit -a
[master bb730a6] Pull in latest SecretSubmodulePkg submodule
1 file changed, 1 insertion(+), 1 deletion(-)
Retrieving a git tree with submodules (both master and submodule trees
need to be accessable to user):
$ git clone git://path/to/master/git master
$ cd master
$ git submodule init
$ git submodule update
Repo example:
First create a new git repo to contain the manifest file:
$ mkdir uefi-manifest
$ cd uefi-manifest
$ git init-db
$ cat > default.xml << EOF
<?xml version="1.0" encoding="UTF-8"?>
<manifest>
<remote name="origin" fetch="git://path/to/git/repos/"/>
<default remote="origin" revision="master"/>
<project name="edk2-sourceforge" path="EDK2"/>
<project name="Origen-EDK-II-Package" path="Origen"/>
<project name="SecretPkg" path="SecretPkg"/>
</manifest>
EOF
$ git add default.xml
$ git commit
$ cd ..
Download repo
$ curl https://dl-ssl.google.com/dl/googlesource/git-repo/repo > ~/bin/repo
$ chmod a+x ~/bin/repo
Then initialize the repo:
$ mkdir working-tree
$ cd working-tree
$ repo init -u git://path/to/manifest/git/repo.git
$ repo sync
Now all the git trees will be fetched and copied into the working directory.
--
Grant Likely, B.Sc., P.Eng.
Secret Lab Technologies Ltd.
Hi,
This must be set when cpu comes out of reset, and only cleared if the
cpu is being powered down.
at other times SMP bit must be enabled, even if the cpu is AMP system.
Boot code take care of this , but Kernel don't care this config.
steve.zhan
2012/12/19 <boot-architecture-request(a)lists.linaro.org>
> if the SMP bit of ACTLR ACTLR[6] is not set to one. This
> seems to be different for A15
>
--
Steve Zhan