mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Doug Brainard <dbrainard@brainardinsight.com>
To: Bo Shen <voice.shen@atmel.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method.
Date: Tue, 10 Feb 2015 21:00:06 -0700	[thread overview]
Message-ID: <CA+nEJi=tcGXZs14eFYkuaDphZ5cGmAPWCV+G8r4tYpYLUU9gwQ@mail.gmail.com> (raw)
In-Reply-To: <54DABFB8.7030107@atmel.com>

Bo,

What error are you seeing?  It was booting into Linux for me with what
I submitted.

However, I was unable to get things working without the "nand0." piece
for each partition due to what you are seeing.  I based that change on
what I saw in mtdparts-nand file in the telit-evk-pro3 board
directory.  Any idea what would be causing that not to add the
"nand0." automatically?  I'd prefer to remove it.

"bootargs.base" seems to be setting the console for barebox only.  I
had to add "linux.bootargs.console" to have the kernel command include
the console and output the boot information.  If I've misunderstood
something, let me know, and I'll modify it.

Thanks,

Doug


On Tue, Feb 10, 2015 at 7:34 PM, Bo Shen <voice.shen@atmel.com> wrote:
> Hi Doug Brainard,
>
>
> On 02/10/2015 10:28 PM, Doug Brainard wrote:
>>
>> ---
>>   arch/arm/boards/sama5d4ek/env/bin/init_board       | 15 --------
>>   arch/arm/boards/sama5d4ek/env/boot/nand-ubi        |  8 +++++
>>   arch/arm/boards/sama5d4ek/env/config               | 42
>> ----------------------
>>   arch/arm/boards/sama5d4ek/env/init/mtdparts-nand   |  6 ++++
>>   arch/arm/boards/sama5d4ek/env/init/ps1             |  7 ++++
>>   arch/arm/boards/sama5d4ek/env/init/splash          | 10 ++++++
>>   arch/arm/boards/sama5d4ek/env/nv/boot.default      |  1 +
>>   arch/arm/boards/sama5d4ek/env/nv/bootargs.base     |  1 +
>>   arch/arm/boards/sama5d4ek/env/nv/hostname          |  1 +
>>   .../boards/sama5d4ek/env/nv/linux.bootargs.console |  1 +
>>   arch/arm/configs/sama5d4ek_defconfig               |  5 +--
>>   arch/arm/mach-at91/Kconfig                         |  1 +
>>   12 files changed, 39 insertions(+), 59 deletions(-)
>>   delete mode 100644 arch/arm/boards/sama5d4ek/env/bin/init_board
>>   create mode 100644 arch/arm/boards/sama5d4ek/env/boot/nand-ubi
>>   delete mode 100644 arch/arm/boards/sama5d4ek/env/config
>>   create mode 100644 arch/arm/boards/sama5d4ek/env/init/mtdparts-nand
>>   create mode 100644 arch/arm/boards/sama5d4ek/env/init/ps1
>>   create mode 100644 arch/arm/boards/sama5d4ek/env/init/splash
>>   create mode 100644 arch/arm/boards/sama5d4ek/env/nv/boot.default
>>   create mode 100644 arch/arm/boards/sama5d4ek/env/nv/bootargs.base
>>   create mode 100644 arch/arm/boards/sama5d4ek/env/nv/hostname
>>   create mode 100644
>> arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console
>>
>> diff --git a/arch/arm/boards/sama5d4ek/env/bin/init_board
>> b/arch/arm/boards/sama5d4ek/env/bin/init_board
>> deleted file mode 100644
>> index f3d417e..0000000
>> --- a/arch/arm/boards/sama5d4ek/env/bin/init_board
>> +++ /dev/null
>> @@ -1,15 +0,0 @@
>> -#!/bin/sh
>> -
>> -PATH=/env/bin
>> -export PATH
>> -
>> -. /env/config
>> -
>> -splash=/env/splash.png
>> -
>> -if [ -f ${splash} -a -e /dev/fb0 ]; then
>> -       splash -o ${splash}
>> -       fb0.enable=1
>> -fi
>> -
>> -exit 1
>> diff --git a/arch/arm/boards/sama5d4ek/env/boot/nand-ubi
>> b/arch/arm/boards/sama5d4ek/env/boot/nand-ubi
>> new file mode 100644
>> index 0000000..e8d6bde
>> --- /dev/null
>> +++ b/arch/arm/boards/sama5d4ek/env/boot/nand-ubi
>> @@ -0,0 +1,8 @@
>> +#!/bin/sh
>> +
>> +global.bootm.image="/dev/nand0.kernel.bb"
>> +global.bootm.oftree="/dev/nand0.oftree.bb"
>> +
>> +bootargs-ip
>> +
>> +global.linux.bootargs.dyn.root="root=ubi0:nand0.rootfs
>> ubi.mtd=nand0.rootfs rootfstype=ubifs noinitrd"
>> diff --git a/arch/arm/boards/sama5d4ek/env/config
>> b/arch/arm/boards/sama5d4ek/env/config
>> deleted file mode 100644
>> index ee86c07..0000000
>> --- a/arch/arm/boards/sama5d4ek/env/config
>> +++ /dev/null
>> @@ -1,42 +0,0 @@
>> -#!/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),8M(recovery),176M(system),304M(userdata),-(cache)"
>> -rootfs_mtdblock_nand=10
>> -
>>
>> -m25p80_parts="64k(bootstrap),384k(barebox),256k(bareboxenv),256k(bareboxenv2),128k(oftree),-(updater)"
>> -
>> -autoboot_timeout=3
>> -
>> -bootargs="console=ttyS0,115200 ubi.mtd=8 ubi.mtd=9 init=/init
>> androidboot.hardware=sama5-pda androidboot.lcd=wvga"
>> -
>> -# set a fancy prompt (if support is compiled in)
>> -PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "
>> diff --git a/arch/arm/boards/sama5d4ek/env/init/mtdparts-nand
>> b/arch/arm/boards/sama5d4ek/env/init/mtdparts-nand
>> new file mode 100644
>> index 0000000..f20a135
>> --- /dev/null
>> +++ b/arch/arm/boards/sama5d4ek/env/init/mtdparts-nand
>> @@ -0,0 +1,6 @@
>> +#!/bin/sh
>> +
>>
>> +mtdparts="256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)"
>> +kernelname="atmel_nand"
>> +
>> +mtdparts-add -b -d nand0 -k ${kernelname} -p ${mtdparts}
>
>
> Using this type of partition table make the file system can not mount
> successfully.
>
> I remove the "nand0." for partition name, then it is OK. After this change,
> it won't keep consistent with the partition table name.
>
> Now boot up the barebox, the partition for nand is: "/dev/barebox",
> "/dev/barebox.bb" while not "/dev/nand0.barebox", /dev/nand0.barebox.bb". I
> am thinking would it be possible to keep the consistent?
>
>
>> diff --git a/arch/arm/boards/sama5d4ek/env/init/ps1
>> b/arch/arm/boards/sama5d4ek/env/init/ps1
>> new file mode 100644
>> index 0000000..c0ec1a5
>> --- /dev/null
>> +++ b/arch/arm/boards/sama5d4ek/env/init/ps1
>> @@ -0,0 +1,7 @@
>> +#!/bin/sh
>> +
>> +if [ ${global.allow_color} = "true" ]; then
>> +       export PS1="\e[1;32mbarebox@\e[1;31m\h:\w\e[0m\n# "
>> +else
>> +        export PS1="barebox@\h:\w "
>> +fi
>> diff --git a/arch/arm/boards/sama5d4ek/env/init/splash
>> b/arch/arm/boards/sama5d4ek/env/init/splash
>> new file mode 100644
>> index 0000000..190ef31
>> --- /dev/null
>> +++ b/arch/arm/boards/sama5d4ek/env/init/splash
>> @@ -0,0 +1,10 @@
>> +#!/bin/sh
>> +
>> +splash=/env/splash.png
>> +
>> +if [ -f ${splash} -a -e /dev/fb0 ]; then
>> +       splash -o ${splash}
>> +       fb0.enable=1
>> +fi
>> +
>> +exit 1
>> diff --git a/arch/arm/boards/sama5d4ek/env/nv/boot.default
>> b/arch/arm/boards/sama5d4ek/env/nv/boot.default
>> new file mode 100644
>> index 0000000..d9dfbbc
>> --- /dev/null
>> +++ b/arch/arm/boards/sama5d4ek/env/nv/boot.default
>> @@ -0,0 +1 @@
>> +nand-ubi
>> diff --git a/arch/arm/boards/sama5d4ek/env/nv/bootargs.base
>> b/arch/arm/boards/sama5d4ek/env/nv/bootargs.base
>> new file mode 100644
>> index 0000000..476b1fb
>> --- /dev/null
>> +++ b/arch/arm/boards/sama5d4ek/env/nv/bootargs.base
>> @@ -0,0 +1 @@
>> +console=ttyS0,115200
>
>
> Till now, I don't know the difference between "bootargs.base" (here maybe
> linux.bootargs.base (?)) and "linux.bootargs.console"
>
>
>> diff --git a/arch/arm/boards/sama5d4ek/env/nv/hostname
>> b/arch/arm/boards/sama5d4ek/env/nv/hostname
>> new file mode 100644
>> index 0000000..b74056d
>> --- /dev/null
>> +++ b/arch/arm/boards/sama5d4ek/env/nv/hostname
>> @@ -0,0 +1 @@
>> +sama5d4ek
>> diff --git a/arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console
>> b/arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console
>> new file mode 100644
>> index 0000000..476b1fb
>> --- /dev/null
>> +++ b/arch/arm/boards/sama5d4ek/env/nv/linux.bootargs.console
>> @@ -0,0 +1 @@
>> +console=ttyS0,115200
>> diff --git a/arch/arm/configs/sama5d4ek_defconfig
>> b/arch/arm/configs/sama5d4ek_defconfig
>> index bbf254a..f050fe4 100644
>> --- a/arch/arm/configs/sama5d4ek_defconfig
>> +++ b/arch/arm/configs/sama5d4ek_defconfig
>> @@ -9,13 +9,12 @@ CONFIG_MALLOC_SIZE=0xA00000
>>   CONFIG_EXPERIMENTAL=y
>>   CONFIG_MALLOC_TLSF=y
>>   CONFIG_PROMPT="A5D4EK:"
>> -CONFIG_GLOB=y
>>   CONFIG_PROMPT_HUSH_PS2="y"
>>   CONFIG_HUSH_FANCY_PROMPT=y
>>   CONFIG_CMDLINE_EDITING=y
>>   CONFIG_AUTO_COMPLETE=y
>>   CONFIG_CONSOLE_ACTIVATE_ALL=y
>> -CONFIG_DEFAULT_ENVIRONMENT_GENERIC=y
>> +CONFIG_DEFAULT_ENVIRONMENT_GENERIC_NEW=y
>>   CONFIG_DEFAULT_ENVIRONMENT_PATH="arch/arm/boards/sama5d4ek/env"
>>   CONFIG_DEBUG_INFO=y
>>   # CONFIG_CMD_ARM_CPUINFO is not set
>> @@ -35,6 +34,8 @@ CONFIG_CMD_PARTITION=y
>>   CONFIG_CMD_EXPORT=y
>>   CONFIG_CMD_LOADENV=y
>>   CONFIG_CMD_PRINTENV=y
>> +CONFIG_CMD_MAGICVAR=y
>> +CONFIG_CMD_MAGICVAR_HELP=y
>>   CONFIG_CMD_SAVEENV=y
>>   CONFIG_CMD_FILETYPE=y
>>   CONFIG_CMD_SLEEP=y
>> diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
>> index 9ee4f30..7207232 100644
>> --- a/arch/arm/mach-at91/Kconfig
>> +++ b/arch/arm/mach-at91/Kconfig
>> @@ -489,6 +489,7 @@ choice
>>
>>   config MACH_SAMA5D4EK
>>         bool "Atmel SAMA5D4 Evaluation Kit"
>> +       select HAVE_DEFAULT_ENVIRONMENT_NEW
>>         help
>>           Select this if you are using Atmel's SAMA5D4-EK Evaluation Kit.
>>
>>
>
> Best Regards,
> Bo Shen

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

  reply	other threads:[~2015-02-11  4:00 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-10 14:28 [PATCH 1/2] SAMA5D4EK - Now mostly supports booting Android from NAND Doug Brainard
2015-02-10 14:28 ` [PATCH 2/2] Switched SAMA5D4EK development board to the newer environment method Doug Brainard
2015-02-11  2:34   ` Bo Shen
2015-02-11  4:00     ` Doug Brainard [this message]
2015-02-11  5:06       ` Jean-Christophe PLAGNIOL-VILLARD
2015-02-11  7:26         ` Bo Shen
2015-02-11  8:35           ` Sascha Hauer
2015-02-11  8:54             ` Jean-Christophe PLAGNIOL-VILLARD
2015-02-11  9:12               ` Eric Bénard
2015-02-11  9:19               ` Sascha Hauer
2015-02-11 12:03                 ` Jean-Christophe PLAGNIOL-VILLARD
2015-02-11 14:33                   ` Sascha Hauer
2015-02-11  8:43     ` Sascha Hauer
2015-02-11 16:53       ` Doug Brainard
2015-02-11 16:38     ` Doug Brainard
2015-02-11 17:39       ` Doug Brainard
2015-02-12  9:13         ` Sascha Hauer
2015-02-13  2:57           ` Doug Brainard
2015-02-13  5:32           ` Doug Brainard
2015-02-11  1:30 ` [PATCH 1/2] SAMA5D4EK - Now mostly supports booting Android from NAND Bo Shen
2015-02-11  4:02   ` Doug Brainard
2015-02-11  7:23     ` Bo Shen
2015-02-11  5:04 ` Jean-Christophe PLAGNIOL-VILLARD
2015-02-11  7:42   ` 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+nEJi=tcGXZs14eFYkuaDphZ5cGmAPWCV+G8r4tYpYLUU9gwQ@mail.gmail.com' \
    --to=dbrainard@brainardinsight.com \
    --cc=barebox@lists.infradead.org \
    --cc=voice.shen@atmel.com \
    /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