mail archive of the barebox mailing list
 help / color / mirror / Atom feed
From: Yegor Yefremov <yegorslists@googlemail.com>
To: Jonathan Stackhouse <jon@beiwy.com>
Cc: barebox <barebox@lists.infradead.org>, Ian Abbott <abbotti@mev.co.uk>
Subject: Re: AM335x Porting Questions
Date: Fri, 9 Dec 2016 11:27:29 +0100	[thread overview]
Message-ID: <CAGm1_kuyUOhwQjs38ASOTs0WnusjNkh=6G10oEpA3tStNJOnKQ@mail.gmail.com> (raw)
In-Reply-To: <003a01d2519f$0caa4120$25fec360$@beiwy.com>

Hi Jon,

please use bottom posting [1]

I've added our am335x based board (Baltos iR5221 etc.) recently [2].


On Thu, Dec 8, 2016 at 11:04 PM, Jonathan Stackhouse <jon@beiwy.com> wrote:
> Hello Ian,
>
> Thank you for your kind reply.
>
> I've modified all of the files that you've listed.
>
> My next couple of questions are aimed at anyone in the community who may
> know their answers.
> Does the MLO/PBL depend on the device tree in order to do the low-level
> initialization? I'm assuming that it does since the lowlevel.c for the
> beaglebone contains the line "fdt = __dtb_z_am335x_bone_common_start;", but
> I don't know. If it does, to what extent does it depend upon the device
> tree?

The hardware part will be configured soleily via DTS. See my minimal
DTS file [3]. Just take your DTS file that you use in kernel and throw
everything you don't really need at boot time.

> Do I need to have a "working" device tree before I can use barebox? My hope
> was that I could get barebox up and running first, then build and test the
> device tree (although I have already been working on one).

No idea. But using DTS is very convenient. Especially if you already
have a working Linux version of it.

> Are there any other pointers that anyone can offer me?

[1] https://en.wikipedia.org/wiki/Posting_style#Bottom-posting
[2] https://git.pengutronix.de/cgit/barebox/commit/?id=aadf261cd6932918dede79add72953fd56df2996
[3] https://git.pengutronix.de/cgit/barebox/tree/arch/arm/dts/am335x-baltos-minimal.dts?id=aadf261cd6932918dede79add72953fd56df2996

Yegor

> -----Original Message-----
> From: Ian Abbott [mailto:abbotti@mev.co.uk]
> Sent: Thursday, December 08, 2016 5:11 AM
> To: Jonathan Stackhouse <jon@beiwy.com>; barebox@lists.infradead.org
> Subject: Re: AM335x Porting Questions
>
> On 07/12/16 23:01, Jonathan Stackhouse wrote:
>> Hello Barebox Community!
>>
>> I'm attempting to port the Beaglebone board files
>> (arch/arm/boards/beaglebone) to another similar board, but am having a
>> bit of a hard time understanding what all I need to do.
>>
>> Is there a specific procedure that I should follow when porting
>> barebox or is it merely making changes/additions to the files in
>> arch/{ARCH}/boards/some-similar-board? I've read though the README in
>> the barebox root directory as well as several of the docs in the
>> Documentation folder and the online user manual but have not found the
>> information I am looking for.
>
> Having done something similar recently (but on socfpga, not am335x), the
> directories/files in question are:
>
>   arch/${ARCH}/boards/Makefile
>   arch/${ARCH}/boards/YOUR-BOARD/* (most of your source code here)
>   arch/${ARCH}/mach-SOMETHING/Kconfig (or arch/${ARCH}/Kconfig for some
> ${ARCH}s)
>   arch/${ARCH}/configs/YOUR-BOARD_defconfig (optional)
>   arch/${ARCH}/configs/YOUR-BOARD-xload_defconfig (optional)
>   arch/${ARCH}/dts/Makefile (if ${ARCH} uses device-tree)
>   arch/${ARCH}/dts/DTS-FOR-YOUR-BOARD.dts (if $(ARCH} uses device-tree)
>   arch/${ARCH}/dts/OTHER-COMMON-DTS-STUFF.dtsi (optional, as required)
>   images/Makefile.PICK-OR-CREATE-ONE
>   images/Makefile (if you created a new images/Makefile.*)
>
> You don't need the defconfig files if you only manage the configuration
> outside of barebox, unless the board is to be merged back into barebox
> upstream.
>
>> Do the SPL/MLO and barebox.bin write any data to log files for
>> debugging purposes? If so, how do I configure the builds for these
>> logs and how do I access them? I'm asking because I noticed under
>> Debugging in menuconfig that I can set the "default loglevel" but I
>> don't know where the log gets stored, and I wanted to view it to see
> whether my MLO is working or not.
>
> Logs go to the console, which is usually a serial port or a frame buffer.
>
>> Additionally, I've attempted to get the MLO to initialize UART0 and
>> UART2 for debugging purposes, but can't seem to get the "MLO>" prompt
>> to appear in PuTTY (settings are 115200, 8N1, no flow control). I have
>> console support set to "full", Console activation strategy set to
>> "activate first console on startup", low level debug messages enabled,
>> and the OMAP Debug UART Port Selection set to 2. I also used the same
>> UART initialization code that is in the beaglebone lowlevel.c file,
>> with the exception that I set it up for
>> UART2 instead of UART0. What else I need to do?
>
> You might need to set the default baudrate to 115200 under "General Settings
> --> Default baudrate" in the barebox configurations for MLO and final-stage
> bootloader.
>
> You may also need to do some work on your .dts files to mark &uart2 status
> as "okay" and set up the pin muxing for uart2.
>
>> I apologize for this rather broad and long email, but I've been
>> battling this for quite some time and have finally decided to reach out
> for help.
>
> Good luck!  I've never actually used barebox on any AM335x based boards
> (though I tinkered with u-boot a couple of years ago), and am a bit of a
> noob with barebox myself.
>
> --
> -=( Ian Abbott @ MEV Ltd.    E-mail: <abbotti@mev.co.uk> )=-
> -=(                          Web: http://www.mev.co.uk/  )=-
>
>
> _______________________________________________
> barebox mailing list
> barebox@lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/barebox

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

      reply	other threads:[~2016-12-09 10:28 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-12-07 23:01 Jonathan Stackhouse
2016-12-08 12:11 ` Ian Abbott
2016-12-08 22:04   ` Jonathan Stackhouse
2016-12-09 10:27     ` Yegor Yefremov [this message]

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='CAGm1_kuyUOhwQjs38ASOTs0WnusjNkh=6G10oEpA3tStNJOnKQ@mail.gmail.com' \
    --to=yegorslists@googlemail.com \
    --cc=abbotti@mev.co.uk \
    --cc=barebox@lists.infradead.org \
    --cc=jon@beiwy.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