mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Sascha Hauer <s.hauer@pengutronix.de>
To: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/2] ARM: pxa: add lubbock board support
Date: Wed, 28 Jan 2015 10:00:28 +0100	[thread overview]
Message-ID: <20150128090028.GB12209@pengutronix.de> (raw)
In-Reply-To: <1422308027-13836-2-git-send-email-robert.jarzmik@free.fr>

On Mon, Jan 26, 2015 at 10:33:47PM +0100, Robert Jarzmik wrote:
> +
> +static int lubbock_mem_init(void)
> +{
> +	arm_add_mem_device("ram0", 0xa0000000, SZ_64M);
> +	arm_add_mem_device("sram0", 0x0a000000, SZ_1M);

When doing this you'll end up with the SRAM being in ATAGS which is
probably not what you want. Use add_mem_device() instead.

> +	return 0;
> +}
> +mem_initcall(lubbock_mem_init);
> diff --git a/arch/arm/boards/lubbock/env/bin/init b/arch/arm/boards/lubbock/env/bin/init
> new file mode 100644
> index 0000000..6cd0acb
> --- /dev/null
> +++ b/arch/arm/boards/lubbock/env/bin/init
> @@ -0,0 +1,24 @@
> +#!/bin/sh
> +
> +PATH=/env/bin
> +export PATH
> +
> +. /env/config
> +addpart /dev/nor0 $mtdparts
> +
> +# Phase1: check for MTD override
> +mtd_env_override
> +if [ $? = 0 ]; then
> +    echo "Switching to custom environment"
> +    /env/init
> +    exit
> +fi
> +
> +# Phase2: initiate network
> +eth0.ethaddr="08:00:3e:26:0a:5b"

No hardcoded MAC addresses please. barebox generates a random MAC
address for you if your board is unable to provide a real one.

> +dhcp -H lubbock

dhcp during init time? This unnecessarily delays the boot process when
booting from flash.

This environment looks very specific to your usecase. Can't you just use
the generic defenv-2 template?

Sascha

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

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

  reply	other threads:[~2015-01-28  9:00 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-01-26 21:33 [PATCH 1/2] ARM: pxa: add pxa25x support Robert Jarzmik
2015-01-26 21:33 ` [PATCH 2/2] ARM: pxa: add lubbock board support Robert Jarzmik
2015-01-28  9:00   ` Sascha Hauer [this message]
2015-01-28 22:53     ` Robert Jarzmik
2015-01-29  7:36       ` Sascha Hauer
2015-02-03  8:33 ` [PATCH 1/2] ARM: pxa: add pxa25x support Sascha Hauer
2015-02-03 19:27   ` Robert Jarzmik

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=20150128090028.GB12209@pengutronix.de \
    --to=s.hauer@pengutronix.de \
    --cc=barebox@lists.infradead.org \
    --cc=robert.jarzmik@free.fr \
    /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