mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Doug Brainard <dbrainard@brainardinsight.com>
To: barebox@lists.infradead.org
Subject: Passing kernel arguments - SAMA5D4EK
Date: Mon, 2 Feb 2015 09:58:33 -0700	[thread overview]
Message-ID: <CA+nEJin3xNxtwkhEzPgcfNvP2wiuGxqhdB8cLn71LWC1Y5k-FQ@mail.gmail.com> (raw)

Hello all,

I've been following barebox for a few months and working with the
SAMA5D4EK and barebox for about a week now.  I'm trying to
successfully boot into Android with it.  I am able to do so with
u-boot, and so I'm trying to figure out how to match the bootargs, so
that I can transfer over to barebox.

u-boot sends the following:
Kernel command line: console=ttyS0,115200
mtdparts=atmel_nand:8M(Bootstrap),176M(system),304M(userdata),-(cache)
ubi.mtd=2 ubi.mtd=3 ubi.mtd=4 rw root=ubi0:system systemtype=ubifs
init=/init androidboot.hardware=sama5-pda androidboot.lcd=wvga
androidboot.console=ttyS0

barebox sends the following:
Kernel command line: console=ttyS0,115200 init=/init
androidboot.hardware=sama5-pda androidboot.lcd=wvga
androidboot.console=ttyS0 ip=dhcp root=ubi0:system ubi.mtd=8
rootfstype=ubifs noinitrd
mtdparts=atmel_nand:256k(at91bootstrap),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),8M(recovery),176M(system),304M(userdata),-(cache)

The problem has to do with "ubi.mtd=2 ubi.mtd=3 ubi.mtd=4".  Without 3
sections mounted, Android is missing pieces.  I've figured out that
rootfs_mtdblock_nand sets the ubi.mtd, and I changed it to 8, because
I broke up the first 8M that u-boot didn't.  If I just add "ubi.mtd=9
ubi.mtd=10" to the bootargs, they are out order, and that also messes
things up.  Commenting out rootfs_mtdblock_nand leaves a "ubi.mtd=" in
the command line.  Frankly, I'm confused where rootfs_mtdblock_nand is
defined.  I'd love to just define userdata_mtdblock_nand, etc. and
have the information filled in, but I'm not seeing where that is done,
and the documentation (that I've found) doesn't mention anything like
that.

Also, where is "noinitrd" coming from?  If I were to match u-boot, it
should be "rw".

Finally, is there a list of keywords (like rootfs_mtdblock_nand,
ubiroot, etc.) you can use in the config file?  I appreciate you
helping a newbie out.  Below is my current config file:

#!/bin/sh

# use 'dhcp' to do dhcp in barebox and in kernel
# use 'none' if you want to skip kernel ip autoconfiguration
ip=dhcp

# or set your networking parameters here
#eth0.ipaddr=a.b.c.d
#eth0.netmask=a.b.c.d
#eth0.gateway=a.b.c.d
#eth0.serverip=a.b.c.d

# can be either 'nfs', 'tftp', 'nor' or 'nand'
kernel_loc=nand
# can be either 'net', 'nor', 'nand' or 'initrd'
rootfs_loc=nand
# can be either 'nfs', 'tftp', 'nand' or empty
oftree_loc=nand

# can be either 'jffs2' or 'ubifs'
rootfs_type=ubifs
rootfsimage=root.$rootfs_type
ubiroot=system

# The image type of the kernel. Can be uimage, zimage, raw, or raw_lzo
kernelimage=zImage
#kernelimage=uImage
#kernelimage=Image
#kernelimage=Image.lzo

nand_device=atmel_nand
nand_parts="256k(at91bootstrap),512k(barebox)ro,256k(bareboxenv),256k(bareboxenv2),256k(spare),512k(oftree),6M(kernel),176M(system),304M(userdata),-(cache)"
rootfs_mtdblock_nand=7

#m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)"

autoboot_timeout=3

bootargs="console=ttyS0,115200 init=/init
androidboot.hardware=sama5-pda androidboot.lcd=wvga
androidboot.console=ttyS0"

# set a fancy prompt (if support is compiled in)
PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "

_______________________________________________
barebox mailing list
barebox@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/barebox

             reply	other threads:[~2015-02-02 16:58 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-02 16:58 Doug Brainard [this message]
2015-02-03  8:59 ` Sascha Hauer
2015-02-03  9:16   ` Bo Shen
2015-02-03 17:21     ` Doug Brainard
2015-02-03 19:33       ` Sascha Hauer
2015-02-03 21:07         ` Doug Brainard
2015-02-05 22:19           ` Doug Brainard
2015-02-06  7:35             ` Sascha Hauer
2015-02-06  7:33     ` Sascha Hauer
2015-02-07 18:55       ` Doug Brainard
2015-02-09  7:36         ` Sascha Hauer
2015-02-10  5:05           ` Doug Brainard
2015-02-10  9:48             ` Sascha Hauer

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=CA+nEJin3xNxtwkhEzPgcfNvP2wiuGxqhdB8cLn71LWC1Y5k-FQ@mail.gmail.com \
    --to=dbrainard@brainardinsight.com \
    --cc=barebox@lists.infradead.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox