public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Rossco <rjohnston@optos.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] Setting Uboot environment variables from within Linux
Date: Thu, 31 Jul 2014 07:05:18 -0700 (PDT)	[thread overview]
Message-ID: <1406815518225-185482.post@n7.nabble.com> (raw)

Hi,

I have an issue when attempting to access my uboot variables from within my
linux distribution.

My set-up is as follows...

Cyclone V SoC with ARM Cortex A9 processor running 3.11 kernel (git revision
a946a64), uboot version 2013.01.01 - only modification being to configure
for QSPI boot and to add some extra environment variables.

I am running a QSPI boot configuration, my QSPI has three partitions...
1. Raw partition containing Pre-loader, device-tree and uboot
2. Kernel1 - containing initial kernel
3. Kernel2 - for future updated kernel

I have a NAND device offering UBI filesystem.

I created the fw_printenv and exported to my development board, created sym
link to create fw_setenv.  Also copied across the fw_env.config which looks
like this (I have not modified this)...

# NOR example
# MTD device name       Device offset   Env. size       Flash sector size
/dev/mtd1               0x0000          0x4000          0x4000
/dev/mtd2               0x0000          0x4000          0x4000

# MTD SPI-dataflash example
# MTD device name       Device offset   Env. size       Flash sector size
#/dev/mtd5              0x4200          0x4200
#/dev/mtd6              0x4200          0x4200

# NAND example
#/dev/mtd0              0x4000          0x4000          0x20000

cat /proc/mtd look like...
dev:    size   erasesize  name
mtd0: 40000000 00040000 "denali-nand"
mtd1: 00800000 00010000 "Flash 0 Raw Data"
mtd2: 01900000 00010000 "Kernel Partition 1"
mtd3: 01900000 00010000 "Kernel Partition 2"

When I attempt to run fw_printenv I get the following error message..
Warning: Bad CRC, using default environment

I'm assuming that my config file is wrong but I'm not sure how to change it. 
Do I need to manually workout where the environment variables are being
stored? Should I have a separate environment variables image? If so how do I
get that image?

Any guidance greatly appreciated :-)

Thanks

Rossco




--
View this message in context: http://u-boot.10912.n7.nabble.com/Setting-Uboot-environment-variables-from-within-Linux-tp185482.html
Sent from the U-Boot mailing list archive at Nabble.com.

                 reply	other threads:[~2014-07-31 14:05 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=1406815518225-185482.post@n7.nabble.com \
    --to=rjohnston@optos.com \
    --cc=u-boot@lists.denx.de \
    /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