confused about "EMMC_BOOT" related content in u-boot

asked about this on u-boot list but figured some folks here might
also be curious -- note the output from grepping for "EMMC_BOOT" in
current u-boot source code:

$ grep -r EMMC_BOOT *
arch/arm/cpu/armv7/exynos/spl_boot.c:#ifdef CONFIG_SUPPORT_EMMC_BOOT
arch/arm/cpu/armv7/exynos/spl_boot.c:#ifdef CONFIG_SUPPORT_EMMC_BOOT
boards.cfg:am335x_boneblack arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,EMMC_BOOT
common/cmd_mmc.c:#ifdef CONFIG_SUPPORT_EMMC_BOOT
common/cmd_mmc.c:#ifdef CONFIG_SUPPORT_EMMC_BOOT
common/cmd_mmc.c:#endif /* CONFIG_SUPPORT_EMMC_BOOT */
common/cmd_mmc.c:#ifdef CONFIG_SUPPORT_EMMC_BOOT
drivers/mmc/mmc.c:#ifdef CONFIG_SUPPORT_EMMC_BOOT
include/configs/am335x_evm.h:#elif defined(CONFIG_EMMC_BOOT) <---- ???
include/configs/exynos5250-dt.h:#define CONFIG_SUPPORT_EMMC_BOOT

  note how am335x_evm.h checks CONFIG_EMMC_BOOT rather than the more
common CONFIG_SUPPORT_EMMC_BOOT. is that correct? is there an
important distinction between CONFIG_EMMC_BOOT and


include/configs/am335x_evm.h:#elif defined(CONFIG_EMMC_BOOT) <---- ???

Looks like a conditional define. But what is your question ?

[please don't top post.]

there's more. i ran across this only because i just noticed that in
the current u-boot git pull, there's a configuration for a BBB:

am335x_boneblack arm armv7 am335x ti am33xx am335x_evm:SERIAL1,CONS_INDEX=1,EMMC_BOOT

which defines the CONFIG variable in question, CONFIG_EMMC_BOOT, and
it was only because i wanted to follow the logic of what that changed
that i ran across the two confusingly similar CONFIG variables above.
but wait, there's more.

  if you look in am335x_evm.h, you see:

#elif defined(CONFIG_EMMC_BOOT)

and yet, after a build, here's what i see in include/

CONFIG_SYS_MMC_ENV_DEV=y <-- ??? "y"?

that first variable is supposed to be the *number* of the device, yet
it's being translated to "y". gack.

  i have no idea what's going on here. thoughts?



No idea what you mean by top posting . . . I respond to these posts via email. I have little to no control on how I post. Anyhow let me take a minute to review the code( as I think I have that header file bookmarked in my browser ).

Also I “misspoke”. That is a conditional check on #define. Meaning if that #define is set in code, the next block of code will be used. Anyhow give me a few minutes ill check it out

333#elif defined(CONFIG_EMMC_BOOT)
335 #define CONFIG_ENV_IS_IN_MMC
336 #define CONFIG_SYS_MMC_ENV_DEV 1
338 #endif

Ok so with this code everything between lines 334 and 338 is defined if CONFIG_EMMC_BOOT is defined. line 334 is undefined( I think ) This is actually the first time I have seen the #undef directive used. A quick google search should clear that up though.

it means don't add your replies at the *top* of what you're replying
to -- add them at the bottom. i also respond to posts via email, that
doesn't stop you from replying using what is considered the proper
technique -- at the bottom.


p.s. i truly don't want to start a top-vs-bottom posting flame war.
it is long established that bottom posting is the *correct* technique.
don't even *think* of starting an argument over that.
i top post and it works fine
just because you think its right does not make it right for everybody else

I use Gmail, so Google makes the rules.

I just hit reply and start typing at the flashing cursor.


Yeah, the last Gmail update broke this by default for everyone... Just
takes an 'extra' annoying step for bottom posting...


Some of those emails are very very long as well.


any time someone wants to actually address the EMMC_BOOT issue i
asked about, rather than admitting they are incapable of using a mail
client, you know where to find me.


I will need to defer to the SW folks on this one.


No problem. I will just “top post” on some other post where someone actually cares about an answer. The idea is if someone is trying to help you with something, pull up your big girl panties, and deal with it. Otherwise have fun finding the answer by yourself.

As I left for work early this morning, it looked like a full moon. I knew
there would be trouble!


its called the Blue Moon
but at least my BBB is still working

All my moons are blue! Or maybe they just look blue....


heh ok i cant resist. Maybe it’s just all the blue smoke :wink:

Blue Smoke. Is that similar to the other definition of BS?


its whats let out of an IC when you plug the power in backwards
otherwise known as magic smoke that allows the IC to function
lord knows i have released enough of that stuff in my lifetime