at91bootstrap config for linux_image_dt

This forum is for users of Microchip MPUs and who are interested in using Linux OS.

Moderator: nferre

cajjed
Posts: 37
Joined: Thu Aug 25, 2016 3:12 am

at91bootstrap config for linux_image_dt

Fri Jan 18, 2019 8:59 pm

In the at91bootstrap there is a sama5d3_xplainednf_linux_image_dt_defconfig. I am assuming it bypasses uboot but not sure where you put your dts and zImage? In seperate /dev/mtd partitions? Is there a README or something on how this functions?
dberliner
Posts: 1
Joined: Sat Jan 19, 2019 1:15 am

Re: at91bootstrap config for linux_image_dt

Sat Jan 19, 2019 2:06 am

You can jump to any address you please and there are configurations for Linux zImages and UBoot. See the CONFIG_LINUX_IMAGE or CONFIG_LOAD_UBOOT configuration options.

Alternatively, if you want to use UBoot (I've only done this), load your zImage and dtb anywhere in RAM (I use 0x22000000 and 0x21000000 respectively) and have UBoot run the command "bootz 0x22000000 - 0x21000000"

You may find this guide useful https://www.at91.com/linux4sam/bin/view ... 1Bootstrap. I'd also read through at91bootstrap/driver/load_kernel.c to see what the code is actually doing (start with load_kernel)
blue_z
Location: USA
Posts: 1971
Joined: Thu Apr 19, 2007 10:15 pm

Re: at91bootstrap config for linux_image_dt

Sun Jan 20, 2019 2:34 am

cajjed wrote: In the at91bootstrap there is a sama5d3_xplainednf_linux_image_dt_defconfig. I am assuming it bypasses uboot ...
Correct.
cajjed wrote: but not sure where you put your dts and zImage?
The NAND storage locations are the conventional Atmel defaults used for years.
Image

cajjed wrote: In seperate /dev/mtd partitions?
AT91Bootstrap (and older versions of U-Boot) have no concept of MTD partitions. It simply doesn't matter.


cajjed wrote: Is there a README or something on how this functions?
After you issue the `make sama5d3_xplainednf_linux_image_dt_defconfig` command, use the `make menuconfig` command to review/edit the configuration.
The salient top-level entry is "Kernel Image Storage Setup --->":

Code: Select all

                                      [*] Override the config kernel command-line
                                      (console=ttyS0,115200 mtdparts=atmel_nand:8M(bootstrap/kernel)ro,-(rootfs) rw rootfstype=ubifs ubi.mtd=1 root=ubi0:rootfs
                                      (0x20000000) Extern Memory Bank Base Address
                                      (0x10000000) Extern Memory Bank Size
                                      (0x00200000) Flash Offset for Linux Kernel Image 
                                      (0x22000000) The External Ram Address to Load Kernel Image
                                          Flattened Device Tree  --->
and "Flattened Device Tree --->":

Code: Select all

                                      [*] Flattened Device Tree Support
                                      (0x00180000) The Offset of Flash Device Tree Blob
                                      (0x21000000) The External Ram Address to Load Device Tree Blob
The numeric entry for "Flash Offset for Linux Kernel Image" defines CONFIG_IMG_ADDRESS for the zImage in NAND, and "The Offset of Flash Device Tree Blob" defines CONFIG_OF_OFFSET for the dtb in NAND.

Beware that the selection of the first entry, "Override the config kernel command-line", is IMO a suboptimal configuration.

Regards
cajjed
Posts: 37
Joined: Thu Aug 25, 2016 3:12 am

Re: at91bootstrap config for linux_image_dt

Mon Jan 21, 2019 6:41 pm

Thanks for the information...

Return to “LINUX”

Who is online

Users browsing this forum: Google [Bot] and 2 guests