mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* Passing kernel arguments - SAMA5D4EK
@ 2015-02-02 16:58 Doug Brainard
  2015-02-03  8:59 ` Sascha Hauer
  0 siblings, 1 reply; 13+ messages in thread
From: Doug Brainard @ 2015-02-02 16:58 UTC (permalink / raw)
  To: barebox

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-02 16:58 Passing kernel arguments - SAMA5D4EK Doug Brainard
@ 2015-02-03  8:59 ` Sascha Hauer
  2015-02-03  9:16   ` Bo Shen
  0 siblings, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2015-02-03  8:59 UTC (permalink / raw)
  To: Doug Brainard; +Cc: barebox

On Mon, Feb 02, 2015 at 09:58:33AM -0700, Doug Brainard wrote:
> 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.

So if I understand you correctly you tried adding "ubi.mtd=9 ubi.mtd=10"
and have rootfs_mtdblock_nand=8. You then end up with:

ubi.mtd=9 ubi.mtd=10 .. ubi.mtd=8

which gives you the wrong order of ubi devices.

Couldn't you add "ubi.mtd=8 ubi.mtd=9" and rootfs_mtdblock_nand=10
instead?

Note that we started with trying to build a generic default environment
which at some point grew into a monster. We now have the 2nd version of
the generic default environment which is much better. Unfortunately
usage of this new default environment is board specific and your board
isn't converted yet. If you are interested I can show you the steps to
convert it.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-03  8:59 ` Sascha Hauer
@ 2015-02-03  9:16   ` Bo Shen
  2015-02-03 17:21     ` Doug Brainard
  2015-02-06  7:33     ` Sascha Hauer
  0 siblings, 2 replies; 13+ messages in thread
From: Bo Shen @ 2015-02-03  9:16 UTC (permalink / raw)
  To: Sascha Hauer, Doug Brainard; +Cc: barebox

Hi Sascha,

On 02/03/2015 04:59 PM, Sascha Hauer wrote:
> Note that we started with trying to build a generic default environment
> which at some point grew into a monster. We now have the 2nd version of
> the generic default environment which is much better. Unfortunately
> usage of this new default environment is board specific and your board
> isn't converted yet. If you are interested I can show you the steps to
> convert it.

I am interested in this, could you show me the steps to convert it?
Thanks.

> Sascha

Best Regards,
Bo Shen

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-03  9:16   ` Bo Shen
@ 2015-02-03 17:21     ` Doug Brainard
  2015-02-03 19:33       ` Sascha Hauer
  2015-02-06  7:33     ` Sascha Hauer
  1 sibling, 1 reply; 13+ messages in thread
From: Doug Brainard @ 2015-02-03 17:21 UTC (permalink / raw)
  To: Bo Shen; +Cc: barebox

> Couldn't you add "ubi.mtd=8 ubi.mtd=9" and rootfs_mtdblock_nand=10
> instead?

I had thought that barebox had a need to know where the rootfs was
located, which is why I hadn't tried that.  Turns out that it worked
perfectly for the ubi.mtd settings.  Thank you!  Any idea how
"noinitrd" is getting added to the bootargs?  I need to replace that
with a "rw".

> Note that we started with trying to build a generic default environment
> which at some point grew into a monster. We now have the 2nd version of
> the generic default environment which is much better. Unfortunately
> usage of this new default environment is board specific and your board
> isn't converted yet. If you are interested I can show you the steps to
> convert it.

I would be interested in helping with this conversion.

Thanks,

Doug

On Tue, Feb 3, 2015 at 2:16 AM, Bo Shen <voice.shen@atmel.com> wrote:
> Hi Sascha,
>
> On 02/03/2015 04:59 PM, Sascha Hauer wrote:
>>
>> Note that we started with trying to build a generic default environment
>> which at some point grew into a monster. We now have the 2nd version of
>> the generic default environment which is much better. Unfortunately
>> usage of this new default environment is board specific and your board
>> isn't converted yet. If you are interested I can show you the steps to
>> convert it.
>
>
> I am interested in this, could you show me the steps to convert it?
> Thanks.
>
>> Sascha
>
>
> Best Regards,
> Bo Shen

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-03 17:21     ` Doug Brainard
@ 2015-02-03 19:33       ` Sascha Hauer
  2015-02-03 21:07         ` Doug Brainard
  0 siblings, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2015-02-03 19:33 UTC (permalink / raw)
  To: Doug Brainard; +Cc: barebox

On Tue, Feb 03, 2015 at 10:21:45AM -0700, Doug Brainard wrote:
> > Couldn't you add "ubi.mtd=8 ubi.mtd=9" and rootfs_mtdblock_nand=10
> > instead?
> 
> I had thought that barebox had a need to know where the rootfs was
> located, which is why I hadn't tried that.  Turns out that it worked
> perfectly for the ubi.mtd settings.  Thank you!  Any idea how
> "noinitrd" is getting added to the bootargs?  I need to replace that
> with a "rw".

It comes from /env/bin/boot. You can checkout the sourcecode and grep
for it since we do not have any search function in barebox.

> 
> > Note that we started with trying to build a generic default environment
> > which at some point grew into a monster. We now have the 2nd version of
> > the generic default environment which is much better. Unfortunately
> > usage of this new default environment is board specific and your board
> > isn't converted yet. If you are interested I can show you the steps to
> > convert it.
> 
> I would be interested in helping with this conversion.

Thanks. I'll prepare a mail tomorrow.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-03 19:33       ` Sascha Hauer
@ 2015-02-03 21:07         ` Doug Brainard
  2015-02-05 22:19           ` Doug Brainard
  0 siblings, 1 reply; 13+ messages in thread
From: Doug Brainard @ 2015-02-03 21:07 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

> It comes from /env/bin/boot. You can checkout the sourcecode and grep
> for it since we do not have any search function in barebox.

Ah, that's the piece I was missing to understand how the bootargs were
being created and what keywords did what.

> Thanks. I'll prepare a mail tomorrow.

I'll press pause on what I'm doing with this then, and I'll wait on
receiving that.

Thanks again for your help,

Doug


On Tue, Feb 3, 2015 at 12:33 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Tue, Feb 03, 2015 at 10:21:45AM -0700, Doug Brainard wrote:
>> > Couldn't you add "ubi.mtd=8 ubi.mtd=9" and rootfs_mtdblock_nand=10
>> > instead?
>>
>> I had thought that barebox had a need to know where the rootfs was
>> located, which is why I hadn't tried that.  Turns out that it worked
>> perfectly for the ubi.mtd settings.  Thank you!  Any idea how
>> "noinitrd" is getting added to the bootargs?  I need to replace that
>> with a "rw".
>
> It comes from /env/bin/boot. You can checkout the sourcecode and grep
> for it since we do not have any search function in barebox.
>
>>
>> > Note that we started with trying to build a generic default environment
>> > which at some point grew into a monster. We now have the 2nd version of
>> > the generic default environment which is much better. Unfortunately
>> > usage of this new default environment is board specific and your board
>> > isn't converted yet. If you are interested I can show you the steps to
>> > convert it.
>>
>> I would be interested in helping with this conversion.
>
> Thanks. I'll prepare a mail tomorrow.
>
> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-03 21:07         ` Doug Brainard
@ 2015-02-05 22:19           ` Doug Brainard
  2015-02-06  7:35             ` Sascha Hauer
  0 siblings, 1 reply; 13+ messages in thread
From: Doug Brainard @ 2015-02-05 22:19 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Sascha,

Have you had a chance to look into what I need to do to convert to the
new environment?

Also, would it be beneficial to add the ability to load more than one
partition to the bootargs for the old environment setup?  I've almost
finished the boot script modifications to allow for it while still
being backwards compatible.  I can push it back up to the repository
when finished if interested.

Doug

On Tue, Feb 3, 2015 at 2:07 PM, Doug Brainard
<dbrainard@brainardinsight.com> wrote:
>> It comes from /env/bin/boot. You can checkout the sourcecode and grep
>> for it since we do not have any search function in barebox.
>
> Ah, that's the piece I was missing to understand how the bootargs were
> being created and what keywords did what.
>
>> Thanks. I'll prepare a mail tomorrow.
>
> I'll press pause on what I'm doing with this then, and I'll wait on
> receiving that.
>
> Thanks again for your help,
>
> Doug
>
>
> On Tue, Feb 3, 2015 at 12:33 PM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
>> On Tue, Feb 03, 2015 at 10:21:45AM -0700, Doug Brainard wrote:
>>> > Couldn't you add "ubi.mtd=8 ubi.mtd=9" and rootfs_mtdblock_nand=10
>>> > instead?
>>>
>>> I had thought that barebox had a need to know where the rootfs was
>>> located, which is why I hadn't tried that.  Turns out that it worked
>>> perfectly for the ubi.mtd settings.  Thank you!  Any idea how
>>> "noinitrd" is getting added to the bootargs?  I need to replace that
>>> with a "rw".
>>
>> It comes from /env/bin/boot. You can checkout the sourcecode and grep
>> for it since we do not have any search function in barebox.
>>
>>>
>>> > Note that we started with trying to build a generic default environment
>>> > which at some point grew into a monster. We now have the 2nd version of
>>> > the generic default environment which is much better. Unfortunately
>>> > usage of this new default environment is board specific and your board
>>> > isn't converted yet. If you are interested I can show you the steps to
>>> > convert it.
>>>
>>> I would be interested in helping with this conversion.
>>
>> Thanks. I'll prepare a mail tomorrow.
>>
>> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-03  9:16   ` Bo Shen
  2015-02-03 17:21     ` Doug Brainard
@ 2015-02-06  7:33     ` Sascha Hauer
  2015-02-07 18:55       ` Doug Brainard
  1 sibling, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2015-02-06  7:33 UTC (permalink / raw)
  To: Bo Shen; +Cc: barebox

Hi,

On Tue, Feb 03, 2015 at 05:16:53PM +0800, Bo Shen wrote:
> Hi Sascha,
> 
> On 02/03/2015 04:59 PM, Sascha Hauer wrote:
> >Note that we started with trying to build a generic default environment
> >which at some point grew into a monster. We now have the 2nd version of
> >the generic default environment which is much better. Unfortunately
> >usage of this new default environment is board specific and your board
> >isn't converted yet. If you are interested I can show you the steps to
> >convert it.
> 
> I am interested in this, could you show me the steps to convert it?
> Thanks.

Here we go:

- Add "select HAVE_DEFAULT_ENVIRONMENT_NEW" to your board config
- Enable CONFIG_DEFAULT_ENVIRONMENT in the default config
- move everything that should be run during startup to one or multiple
  scripts in /env/init/. For example the at91sam9260ek has some stuff
  depending on $armlinux_architecture, that should be done in an init
  script.
- create /env/boot/* scripts several examples can be found in the tree
- Create /env/nv/* variables for the corresponding global variables that
  you wish to have. do a "find -name nv" to see what I mean.
- /env/config should normally be empty in the board code, then the
  generic one from defaultenv/defaultenv-2-base/config is used
- MTD partitions should for now be defined in /env/init/mtdparts-* or later
  in the device tree.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-05 22:19           ` Doug Brainard
@ 2015-02-06  7:35             ` Sascha Hauer
  0 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2015-02-06  7:35 UTC (permalink / raw)
  To: Doug Brainard; +Cc: barebox

On Thu, Feb 05, 2015 at 03:19:08PM -0700, Doug Brainard wrote:
> Sascha,
> 
> Have you had a chance to look into what I need to do to convert to the
> new environment?

Just did that.

> 
> Also, would it be beneficial to add the ability to load more than one
> partition to the bootargs for the old environment setup?  I've almost
> finished the boot script modifications to allow for it while still
> being backwards compatible.  I can push it back up to the repository
> when finished if interested.

I'm definitely more interested in decreasing the number of users of the
old environment to 0. 

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-06  7:33     ` Sascha Hauer
@ 2015-02-07 18:55       ` Doug Brainard
  2015-02-09  7:36         ` Sascha Hauer
  0 siblings, 1 reply; 13+ messages in thread
From: Doug Brainard @ 2015-02-07 18:55 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

[-- Attachment #1: Type: text/plain, Size: 4763 bytes --]

Sascha,

I've begun working on upgrading to the new environment, but I've
gotten stuck as far as getting Linux to boot.  I've attached the
device list from the old environment and the new one that I'm
currently working on.  I believe they are the same.  My globals are
currently set up as:

  version: 2015.02.0-00003-ga17b7cd-dirty
  model: Atmel sama5d4ek
* hostname: sama5d4ek
  loglevel: 7
  console.input_allow: 1
  bootm.image:
  bootm.image.loadaddr:
  bootm.oftree:
  bootm.initrd:
  bootm.initrd.loadaddr:
  dhcp.rootpath:
  dhcp.tftp_server_name:
  dhcp.bootfile:
  dhcp.oftree_file:
  dhcp.vendor_id:
  dhcp.client_id:
  dhcp.user_class:
  dhcp.client_uuid:
* autoboot_timeout: 3
* allow_color: true
* user: none
* boot.default: nand-ubi
* bootargs.base: console=ttyS0,115200
  linux.bootargs.base:
  linux.bootargs.console:
  linux.bootargs.dyn.ip:
  linux.bootargs.dyn.root:
  editcmd: sedit
  linux.mtdparts.nand0:
atmel_nand:256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)

With these settings, it says that it loads the kernel and is booting,
but then just sits there indefinitely.  Any ideas?  Below is the boot
information I get:

barebox 2015.02.0-00003-ga17b7cd-dirty #24 Sat Feb 7 11:19:26 MST 2015


Board: Atmel sama5d4ek
AT91: Detected soc type: sama5d4
AT91: Detected soc subtype: sama5d44
Clocks: CPU 528 MHz, master 176 MHz, main 12.000 MHz
gpio-at91 at91sam9x5-gpio0: AT91 gpio driver registered
gpio-at91 at91sam9x5-gpio1: AT91 gpio driver registered
gpio-at91 at91sam9x5-gpio2: AT91 gpio driver registered
gpio-at91 at91sam9x5-gpio3: AT91 gpio driver registered
gpio-at91 at91sam9x5-gpio4: AT91 gpio driver registered
i2c-gpio i2c-gpio0: using pins 30 (SDA) and 31 (SCL)
atmel_nand: Use On Flash BBT
nand: ONFI param page 0 valid
nand: ONFI flash detected
nand: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron
MT29F4G08ABAEAWP), 512MiB, page size: 4096, OOB size: 224
atmel_nand atmel_nand0: Initialize PMECC params, cap: 8, sector: 512
Bad block table found at page 131008, version 0x01
Bad block table found at page 130944, version 0x01
mdio_bus: miibus0: probed
macb macb0: Cadence GEM at 0xf8020000
m25p80 m25p800: at25df321a (4096 Kbytes)
atmel_mci atmel_mci1: version: 0x600
atmel_mci atmel_mci1: registered as atmel_mci1
mci0: no card inserted
malloc space: 0x26500000 -> 0x26efffff (size 10 MiB)
envfs: wrong magic
running /env/bin/init...

Hit any key to stop autoboot:  0
booting nand-ubi

Loading ARM Linux zImage '/dev/nand0.kernel.bb'
commandline:    root=ubi0:nand0.rootfs ubi.mtd=nand0.rootfs
rootfstype=ubifs
mtdparts=atmel_nand:256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)
arch_number: 0
Uncompressing Linux... done, booting the kernel.

On Fri, Feb 6, 2015 at 12:33 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> Hi,
>
> On Tue, Feb 03, 2015 at 05:16:53PM +0800, Bo Shen wrote:
>> Hi Sascha,
>>
>> On 02/03/2015 04:59 PM, Sascha Hauer wrote:
>> >Note that we started with trying to build a generic default environment
>> >which at some point grew into a monster. We now have the 2nd version of
>> >the generic default environment which is much better. Unfortunately
>> >usage of this new default environment is board specific and your board
>> >isn't converted yet. If you are interested I can show you the steps to
>> >convert it.
>>
>> I am interested in this, could you show me the steps to convert it?
>> Thanks.
>
> Here we go:
>
> - Add "select HAVE_DEFAULT_ENVIRONMENT_NEW" to your board config
> - Enable CONFIG_DEFAULT_ENVIRONMENT in the default config
> - move everything that should be run during startup to one or multiple
>   scripts in /env/init/. For example the at91sam9260ek has some stuff
>   depending on $armlinux_architecture, that should be done in an init
>   script.
> - create /env/boot/* scripts several examples can be found in the tree
> - Create /env/nv/* variables for the corresponding global variables that
>   you wish to have. do a "find -name nv" to see what I mean.
> - /env/config should normally be empty in the board code, then the
>   generic one from defaultenv/defaultenv-2-base/config is used
> - MTD partitions should for now be defined in /env/init/mtdparts-* or later
>   in the device tree.
>
> 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 |

[-- Attachment #2: NewEnvNotWorking.txt --]
[-- Type: text/plain, Size: 2343 bytes --]

# devinfo
`-- global
`-- nv
`-- platform
   `-- at91sam9x5-gpio0
   `-- at91sam9x5-gpio1
   `-- at91sam9x5-gpio2
   `-- at91sam9x5-gpio3
   `-- at91sam9x5-gpio4
   `-- at91-pit
   `-- at91sam9-smc
   `-- atmel_usart4
      `-- cs0
   `-- mem0
      `-- 0x00000000-0x1fffffff (   512 MiB): /dev/ram0
   `-- mem1
      `-- 0x00000000-0x0001ffff (   128 KiB): /dev/sram0
   `-- soc
   `-- mem2
      `-- 0x00000000-0xfffffffe (     4 GiB): /dev/mem
   `-- i2c-gpio0
      `-- i2c0
         `-- qt10700
            `-- cs1
   `-- atmel_nand0
      `-- nand0
         `-- 0x00000000-0x1fffffff (   512 MiB): /dev/nand0
         `-- 0x00000000-0x21bfffff (   540 MiB): /dev/nand0.raw
         `-- 0x00000000-0x01bfffff (    28 MiB): /dev/nand_oob0
         `-- at91bootstrap_raw
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/at91bootstrap_raw
         `-- bootloader_raw
            `-- 0x00000000-0x0007ffff (   512 KiB): /dev/bootloader_raw
         `-- env_raw
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/env_raw
         `-- env_raw1
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/env_raw1
         `-- nand0.at91bootstrap
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/nand0.at91bootstrap
         `-- nand0.barebox
            `-- 0x00000000-0x0007ffff (   512 KiB): /dev/nand0.barebox
         `-- nand0.bareboxenv
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/nand0.bareboxenv
         `-- nand0.bareboxenv2
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/nand0.bareboxenv2
         `-- nand0.spare
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/nand0.spare
         `-- nand0.oftree
            `-- 0x00000000-0x0007ffff (   512 KiB): /dev/nand0.oftree
         `-- nand0.kernel
            `-- 0x00000000-0x005fffff (     6 MiB): /dev/nand0.kernel
         `-- nand0.rootfs
            `-- 0x00000000-0x1f7fffff (   504 MiB): /dev/nand0.rootfs
   `-- macb0
      `-- miibus0
      `-- eth0
   `-- atmel_spi0
      `-- m25p800
         `-- m25p0
            `-- 0x00000000-0x003fffff (     4 MiB): /dev/m25p0
   `-- atmel_mci1
      `-- mci0
   `-- atmel_hlcdfb
`-- mdio_bus
`-- spi
`-- i2c
`-- fs
   `-- ramfs0
   `-- devfs0
`-- net
`-- fb0
   `-- 0x00000000-0x000bb7ff (   750 KiB): /dev/fb0

[-- Attachment #3: OldEnvWorks.txt --]
[-- Type: text/plain, Size: 2343 bytes --]

# devinfo
`-- global
`-- nv
`-- platform
   `-- at91sam9x5-gpio0
   `-- at91sam9x5-gpio1
   `-- at91sam9x5-gpio2
   `-- at91sam9x5-gpio3
   `-- at91sam9x5-gpio4
   `-- at91-pit
   `-- at91sam9-smc
   `-- atmel_usart4
      `-- cs0
   `-- mem0
      `-- 0x00000000-0x1fffffff (   512 MiB): /dev/ram0
   `-- mem1
      `-- 0x00000000-0x0001ffff (   128 KiB): /dev/sram0
   `-- soc
   `-- mem2
      `-- 0x00000000-0xfffffffe (     4 GiB): /dev/mem
   `-- i2c-gpio0
      `-- i2c0
         `-- qt10700
            `-- cs1
   `-- atmel_nand0
      `-- nand0
         `-- 0x00000000-0x1fffffff (   512 MiB): /dev/nand0
         `-- 0x00000000-0x21bfffff (   540 MiB): /dev/nand0.raw
         `-- 0x00000000-0x01bfffff (    28 MiB): /dev/nand_oob0
         `-- at91bootstrap_raw
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/at91bootstrap_raw
         `-- bootloader_raw
            `-- 0x00000000-0x0007ffff (   512 KiB): /dev/bootloader_raw
         `-- env_raw
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/env_raw
         `-- env_raw1
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/env_raw1
         `-- nand0.at91bootstrap
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/nand0.at91bootstrap
         `-- nand0.barebox
            `-- 0x00000000-0x0007ffff (   512 KiB): /dev/nand0.barebox
         `-- nand0.bareboxenv
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/nand0.bareboxenv
         `-- nand0.bareboxenv2
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/nand0.bareboxenv2
         `-- nand0.spare
            `-- 0x00000000-0x0003ffff (   256 KiB): /dev/nand0.spare
         `-- nand0.oftree
            `-- 0x00000000-0x0007ffff (   512 KiB): /dev/nand0.oftree
         `-- nand0.kernel
            `-- 0x00000000-0x005fffff (     6 MiB): /dev/nand0.kernel
         `-- nand0.rootfs
            `-- 0x00000000-0x1f7fffff (   504 MiB): /dev/nand0.rootfs
   `-- macb0
      `-- miibus0
      `-- eth0
   `-- atmel_spi0
      `-- m25p800
         `-- m25p0
            `-- 0x00000000-0x003fffff (     4 MiB): /dev/m25p0
   `-- atmel_mci1
      `-- mci0
   `-- atmel_hlcdfb
`-- mdio_bus
`-- spi
`-- i2c
`-- fs
   `-- ramfs0
   `-- devfs0
`-- net
`-- fb0
   `-- 0x00000000-0x000bb7ff (   750 KiB): /dev/fb0

[-- Attachment #4: Type: text/plain, Size: 149 bytes --]

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-07 18:55       ` Doug Brainard
@ 2015-02-09  7:36         ` Sascha Hauer
  2015-02-10  5:05           ` Doug Brainard
  0 siblings, 1 reply; 13+ messages in thread
From: Sascha Hauer @ 2015-02-09  7:36 UTC (permalink / raw)
  To: Doug Brainard; +Cc: barebox

On Sat, Feb 07, 2015 at 11:55:12AM -0700, Doug Brainard wrote:
> Sascha,
> 
> I've begun working on upgrading to the new environment, but I've
> gotten stuck as far as getting Linux to boot.  I've attached the
> device list from the old environment and the new one that I'm
> currently working on.  I believe they are the same.  My globals are
> currently set up as:
> 
>   version: 2015.02.0-00003-ga17b7cd-dirty
>   model: Atmel sama5d4ek
> * hostname: sama5d4ek
>   loglevel: 7
>   console.input_allow: 1
>   bootm.image:
>   bootm.image.loadaddr:
>   bootm.oftree:
>   bootm.initrd:
>   bootm.initrd.loadaddr:
>   dhcp.rootpath:
>   dhcp.tftp_server_name:
>   dhcp.bootfile:
>   dhcp.oftree_file:
>   dhcp.vendor_id:
>   dhcp.client_id:
>   dhcp.user_class:
>   dhcp.client_uuid:
> * autoboot_timeout: 3
> * allow_color: true
> * user: none
> * boot.default: nand-ubi
> * bootargs.base: console=ttyS0,115200
>   linux.bootargs.base:
>   linux.bootargs.console:
>   linux.bootargs.dyn.ip:
>   linux.bootargs.dyn.root:
>   editcmd: sedit
>   linux.mtdparts.nand0:
> atmel_nand:256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)
> 
> With these settings, it says that it loads the kernel and is booting,
> but then just sits there indefinitely.  Any ideas?  Below is the boot
> information I get:
> 
> barebox 2015.02.0-00003-ga17b7cd-dirty #24 Sat Feb 7 11:19:26 MST 2015
> 
> 
> Board: Atmel sama5d4ek
> AT91: Detected soc type: sama5d4
> AT91: Detected soc subtype: sama5d44
> Clocks: CPU 528 MHz, master 176 MHz, main 12.000 MHz
> gpio-at91 at91sam9x5-gpio0: AT91 gpio driver registered
> gpio-at91 at91sam9x5-gpio1: AT91 gpio driver registered
> gpio-at91 at91sam9x5-gpio2: AT91 gpio driver registered
> gpio-at91 at91sam9x5-gpio3: AT91 gpio driver registered
> gpio-at91 at91sam9x5-gpio4: AT91 gpio driver registered
> i2c-gpio i2c-gpio0: using pins 30 (SDA) and 31 (SCL)
> atmel_nand: Use On Flash BBT
> nand: ONFI param page 0 valid
> nand: ONFI flash detected
> nand: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron
> MT29F4G08ABAEAWP), 512MiB, page size: 4096, OOB size: 224
> atmel_nand atmel_nand0: Initialize PMECC params, cap: 8, sector: 512
> Bad block table found at page 131008, version 0x01
> Bad block table found at page 130944, version 0x01
> mdio_bus: miibus0: probed
> macb macb0: Cadence GEM at 0xf8020000
> m25p80 m25p800: at25df321a (4096 Kbytes)
> atmel_mci atmel_mci1: version: 0x600
> atmel_mci atmel_mci1: registered as atmel_mci1
> mci0: no card inserted
> malloc space: 0x26500000 -> 0x26efffff (size 10 MiB)
> envfs: wrong magic
> running /env/bin/init...
> 
> Hit any key to stop autoboot:  0
> booting nand-ubi
> 
> Loading ARM Linux zImage '/dev/nand0.kernel.bb'
> commandline:    root=ubi0:nand0.rootfs ubi.mtd=nand0.rootfs
> rootfstype=ubifs
> mtdparts=atmel_nand:256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)
> arch_number: 0

Here is your problem. barebox tries to boot Linux with an old style
machine id which is not set for your board. You'll need a device tree
for your board. If you've built your kernel correctly you'll find it
in arch/arm/boot/dts/at91-sama5d4ek.dtb. Set global.bootm.oftree to the
path to the device tree file and it should boot. See
Documentation/user/networking.rst for a convenient way to get the
devicetree onto the board. You can store it for example under /env/oftree

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-09  7:36         ` Sascha Hauer
@ 2015-02-10  5:05           ` Doug Brainard
  2015-02-10  9:48             ` Sascha Hauer
  0 siblings, 1 reply; 13+ messages in thread
From: Doug Brainard @ 2015-02-10  5:05 UTC (permalink / raw)
  To: Sascha Hauer; +Cc: barebox

Sascha,

Okay this is probably a dumb question because I'm fairly new to git,
but I've got everything working with the new environment and checked
in locally, but now when I try to do a "git push origin master", I get
an access denied error:

fatal: remote error: access denied or repository not exported: /git/barebox.git

What do I need to do to push the changes back up?

Thanks,

Doug


On Mon, Feb 9, 2015 at 12:36 AM, Sascha Hauer <s.hauer@pengutronix.de> wrote:
> On Sat, Feb 07, 2015 at 11:55:12AM -0700, Doug Brainard wrote:
>> Sascha,
>>
>> I've begun working on upgrading to the new environment, but I've
>> gotten stuck as far as getting Linux to boot.  I've attached the
>> device list from the old environment and the new one that I'm
>> currently working on.  I believe they are the same.  My globals are
>> currently set up as:
>>
>>   version: 2015.02.0-00003-ga17b7cd-dirty
>>   model: Atmel sama5d4ek
>> * hostname: sama5d4ek
>>   loglevel: 7
>>   console.input_allow: 1
>>   bootm.image:
>>   bootm.image.loadaddr:
>>   bootm.oftree:
>>   bootm.initrd:
>>   bootm.initrd.loadaddr:
>>   dhcp.rootpath:
>>   dhcp.tftp_server_name:
>>   dhcp.bootfile:
>>   dhcp.oftree_file:
>>   dhcp.vendor_id:
>>   dhcp.client_id:
>>   dhcp.user_class:
>>   dhcp.client_uuid:
>> * autoboot_timeout: 3
>> * allow_color: true
>> * user: none
>> * boot.default: nand-ubi
>> * bootargs.base: console=ttyS0,115200
>>   linux.bootargs.base:
>>   linux.bootargs.console:
>>   linux.bootargs.dyn.ip:
>>   linux.bootargs.dyn.root:
>>   editcmd: sedit
>>   linux.mtdparts.nand0:
>> atmel_nand:256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)
>>
>> With these settings, it says that it loads the kernel and is booting,
>> but then just sits there indefinitely.  Any ideas?  Below is the boot
>> information I get:
>>
>> barebox 2015.02.0-00003-ga17b7cd-dirty #24 Sat Feb 7 11:19:26 MST 2015
>>
>>
>> Board: Atmel sama5d4ek
>> AT91: Detected soc type: sama5d4
>> AT91: Detected soc subtype: sama5d44
>> Clocks: CPU 528 MHz, master 176 MHz, main 12.000 MHz
>> gpio-at91 at91sam9x5-gpio0: AT91 gpio driver registered
>> gpio-at91 at91sam9x5-gpio1: AT91 gpio driver registered
>> gpio-at91 at91sam9x5-gpio2: AT91 gpio driver registered
>> gpio-at91 at91sam9x5-gpio3: AT91 gpio driver registered
>> gpio-at91 at91sam9x5-gpio4: AT91 gpio driver registered
>> i2c-gpio i2c-gpio0: using pins 30 (SDA) and 31 (SCL)
>> atmel_nand: Use On Flash BBT
>> nand: ONFI param page 0 valid
>> nand: ONFI flash detected
>> nand: NAND device: Manufacturer ID: 0x2c, Chip ID: 0xdc (Micron
>> MT29F4G08ABAEAWP), 512MiB, page size: 4096, OOB size: 224
>> atmel_nand atmel_nand0: Initialize PMECC params, cap: 8, sector: 512
>> Bad block table found at page 131008, version 0x01
>> Bad block table found at page 130944, version 0x01
>> mdio_bus: miibus0: probed
>> macb macb0: Cadence GEM at 0xf8020000
>> m25p80 m25p800: at25df321a (4096 Kbytes)
>> atmel_mci atmel_mci1: version: 0x600
>> atmel_mci atmel_mci1: registered as atmel_mci1
>> mci0: no card inserted
>> malloc space: 0x26500000 -> 0x26efffff (size 10 MiB)
>> envfs: wrong magic
>> running /env/bin/init...
>>
>> Hit any key to stop autoboot:  0
>> booting nand-ubi
>>
>> Loading ARM Linux zImage '/dev/nand0.kernel.bb'
>> commandline:    root=ubi0:nand0.rootfs ubi.mtd=nand0.rootfs
>> rootfstype=ubifs
>> mtdparts=atmel_nand:256k(nand0.at91bootstrap),512k(nand0.barebox)ro,256k(nand0.bareboxenv),256k(nand0.bareboxenv2),256k(nand0.spare),512k(nand0.oftree),6M(nand0.kernel),-(nand0.rootfs)
>> arch_number: 0
>
> Here is your problem. barebox tries to boot Linux with an old style
> machine id which is not set for your board. You'll need a device tree
> for your board. If you've built your kernel correctly you'll find it
> in arch/arm/boot/dts/at91-sama5d4ek.dtb. Set global.bootm.oftree to the
> path to the device tree file and it should boot. See
> Documentation/user/networking.rst for a convenient way to get the
> devicetree onto the board. You can store it for example under /env/oftree
>
> 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

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: Passing kernel arguments - SAMA5D4EK
  2015-02-10  5:05           ` Doug Brainard
@ 2015-02-10  9:48             ` Sascha Hauer
  0 siblings, 0 replies; 13+ messages in thread
From: Sascha Hauer @ 2015-02-10  9:48 UTC (permalink / raw)
  To: Doug Brainard; +Cc: barebox

On Mon, Feb 09, 2015 at 10:05:15PM -0700, Doug Brainard wrote:
> Sascha,
> 
> Okay this is probably a dumb question because I'm fairly new to git,
> but I've got everything working with the new environment and checked
> in locally, but now when I try to do a "git push origin master", I get
> an access denied error:
> 
> fatal: remote error: access denied or repository not exported: /git/barebox.git
> 
> What do I need to do to push the changes back up?

You have to send the patches to this list (Preferably using git
send-email). When they are reviewed ok I'll apply them to the master
repository. It's the normal process also used in many other opensource
project.

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

^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2015-02-10  9:49 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2015-02-02 16:58 Passing kernel arguments - SAMA5D4EK Doug Brainard
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox