* [Buildroot] [PATCH 0/2] Odroid XU4 support
@ 2016-06-26 14:07 Andi Shyti
2016-06-26 14:07 ` [Buildroot] [PATCH 1/2] package: add Odroid BL bootloader binaries Andi Shyti
` (2 more replies)
0 siblings, 3 replies; 11+ messages in thread
From: Andi Shyti @ 2016-06-26 14:07 UTC (permalink / raw)
To: buildroot
Hi,
this patchset adds support for the Odroid XU4 board.
The first patch adds the first two stages of boot firmare and the
trust zone, necessary to boot the device.
While the second patch adds the actual support of the board.
Andi
Andi Shyti (2):
package: add Odroid BL bootloader binaries
board: add support for the Odroid XU4 board
board/odroid-xu4/boot.cmd | 10 +++
board/odroid-xu4/readme.txt | 165 +++++++++++++++++++++++++++++++++++
configs/odroid-xu4_defconfig | 10 +++
package/Config.in | 1 +
package/odroid-xu-bl/Config.in | 6 ++
package/odroid-xu-bl/odroid-xu-bl.mk | 18 ++++
6 files changed, 210 insertions(+)
create mode 100644 board/odroid-xu4/boot.cmd
create mode 100644 board/odroid-xu4/readme.txt
create mode 100644 configs/odroid-xu4_defconfig
create mode 100644 package/odroid-xu-bl/Config.in
create mode 100644 package/odroid-xu-bl/odroid-xu-bl.mk
--
2.8.1
^ permalink raw reply [flat|nested] 11+ messages in thread* [Buildroot] [PATCH 1/2] package: add Odroid BL bootloader binaries 2016-06-26 14:07 [Buildroot] [PATCH 0/2] Odroid XU4 support Andi Shyti @ 2016-06-26 14:07 ` Andi Shyti 2016-06-26 20:10 ` Thomas Petazzoni 2016-06-26 14:07 ` [Buildroot] [PATCH 2/2] board: add support for the Odroid XU4 board Andi Shyti 2016-06-26 19:51 ` [Buildroot] [PATCH 0/2] Odroid XU4 support Thomas Petazzoni 2 siblings, 1 reply; 11+ messages in thread From: Andi Shyti @ 2016-06-26 14:07 UTC (permalink / raw) To: buildroot The odroid boot process requires three stages of boot plus trust zone: boot level 1 | V boot level 2 | V u-boot and they need to be raw copied to the SD card in the following order: +----------------+----------------+ | boot level 1 | 1 block | +----------------+----------------+ | boot level 2 | 31 block | +----------------+----------------+ | u-boot | 63 block | +----------------+----------------+ | trust zone | 2111 block | +----------------+----------------+ | boot partition | 4096 block | +----------------+----------------+ | rootfs | | +----------------+----------------+ The above files are provided by the hardkernel u-boot from https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07 At the end of the compilation the files will be moved to the output/image directory. Signed-off-by: Andi Shyti <andi@etezian.org> --- package/Config.in | 1 + package/odroid-xu-bl/Config.in | 6 ++++++ package/odroid-xu-bl/odroid-xu-bl.mk | 18 ++++++++++++++++++ 3 files changed, 25 insertions(+) create mode 100644 package/odroid-xu-bl/Config.in create mode 100644 package/odroid-xu-bl/odroid-xu-bl.mk diff --git a/package/Config.in b/package/Config.in index a2a02a8..a596b7e 100644 --- a/package/Config.in +++ b/package/Config.in @@ -337,6 +337,7 @@ menu "Firmware" source "package/am33x-cm3/Config.in" source "package/b43-firmware/Config.in" source "package/linux-firmware/Config.in" + source "package/odroid-xu-bl/Config.in" source "package/rpi-firmware/Config.in" source "package/sunxi-boards/Config.in" source "package/ux500-firmware/Config.in" diff --git a/package/odroid-xu-bl/Config.in b/package/odroid-xu-bl/Config.in new file mode 100644 index 0000000..74d5fe2 --- /dev/null +++ b/package/odroid-xu-bl/Config.in @@ -0,0 +1,6 @@ +config BR2_PACKAGE_ODROID_XU_BL + bool "odroid-xu-bl" + help + Odroid XU3/4 bootloader binaries + + https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07 diff --git a/package/odroid-xu-bl/odroid-xu-bl.mk b/package/odroid-xu-bl/odroid-xu-bl.mk new file mode 100644 index 0000000..68645e9 --- /dev/null +++ b/package/odroid-xu-bl/odroid-xu-bl.mk @@ -0,0 +1,18 @@ +################################################################################ +# +# odroid-xu-bl +# +################################################################################ + +ODROID_XU_BL_VERSION = odroidxu3-v2012.07 +ODROID_XU_BL_SITE = $(call github,hardkernel,u-boot,$(ODROID_XU_BL_VERSION)) +ODROID_XU_BL_INSTALL_IMAGES = YES +ODROID_XU_BL_INSTALL_TARGET = NO + +define ODROID_XU_BL_INSTALL_IMAGES_CMDS + $(INSTALL) -D -m 0644 $(@D)/sd_fuse/hardkernel_1mb_uboot/bl1.bin.hardkernel $(BINARIES_DIR)/bl1.bin.hardkernel + $(INSTALL) -D -m 0644 $(@D)/sd_fuse/hardkernel_1mb_uboot/bl2.bin.hardkernel.1mb_uboot $(BINARIES_DIR)/bl2.bin.hardkernel.1mb_uboot + $(INSTALL) -D -m 0644 $(@D)/sd_fuse/hardkernel_1mb_uboot/tzsw.bin.hardkernel $(BINARIES_DIR)/tzsw.bin.hardkernel +endef + +$(eval $(generic-package)) -- 2.8.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/2] package: add Odroid BL bootloader binaries 2016-06-26 14:07 ` [Buildroot] [PATCH 1/2] package: add Odroid BL bootloader binaries Andi Shyti @ 2016-06-26 20:10 ` Thomas Petazzoni 2016-06-27 18:03 ` Andi Shyti [not found] ` <20160627155236.GI424@jack.zhora.eu> 0 siblings, 2 replies; 11+ messages in thread From: Thomas Petazzoni @ 2016-06-26 20:10 UTC (permalink / raw) To: buildroot Hello, On Sun, 26 Jun 2016 17:07:41 +0300, Andi Shyti wrote: > The above files are provided by the hardkernel u-boot from > > https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07 So the source code for those binary files is not available at all? > +config BR2_PACKAGE_ODROID_XU_BL > + bool "odroid-xu-bl" depends on BR2_arm would be good to have here Also, I think this package should be included in the Bootloaders menu rather than the firmware menu. Maybe we should name it odroid-xu-bootloader or odroid-xu-boot so that it is clear what it does. > +++ b/package/odroid-xu-bl/odroid-xu-bl.mk > @@ -0,0 +1,18 @@ > +################################################################################ > +# > +# odroid-xu-bl > +# > +################################################################################ > + > +ODROID_XU_BL_VERSION = odroidxu3-v2012.07 > +ODROID_XU_BL_SITE = $(call github,hardkernel,u-boot,$(ODROID_XU_BL_VERSION)) It's a bit annoying that we end up downloading an entire U-Boot source tree, and in fact not use it except for those 3 files. In fact, why don't you simply build this U-Boot version with the U-Boot package that already exists in Buildroot, and then use: BR2_TARGET_UBOOT_SPL=y BR2_TARGET_UBOOT_SPL_NAME="sd_fuse/hardkernel_1mb_uboot/bl1.bin.hardkernel sd_fuse/hardkernel_1mb_uboot/bl2.bin.hardkernel.1mb_uboot sd_fuse/hardkernel_1mb_uboot/tzsw.bin.hardkernel" To ask Buildroot to install the pre-built binaries as if they were SPL images. The only issue is that BR2_TARGET_UBOOT_SPL_NAME currently only installs a single image, but it can easily be changed. And it was actually already proposed in https://patchwork.ozlabs.org/patch/595980/. Can you investigate such a solution? Thanks, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 1/2] package: add Odroid BL bootloader binaries 2016-06-26 20:10 ` Thomas Petazzoni @ 2016-06-27 18:03 ` Andi Shyti [not found] ` <20160627155236.GI424@jack.zhora.eu> 1 sibling, 0 replies; 11+ messages in thread From: Andi Shyti @ 2016-06-27 18:03 UTC (permalink / raw) To: buildroot Hi Thomas, > > The above files are provided by the hardkernel u-boot from > > > > https://github.com/hardkernel/u-boot/tree/odroidxu3-v2012.07 > > So the source code for those binary files is not available at all? Unfortunately not, it is not even available to me :( > > +config BR2_PACKAGE_ODROID_XU_BL > > + bool "odroid-xu-bl" > > depends on BR2_arm > > would be good to have here OK. > Also, I think this package should be included in the Bootloaders menu > rather than the firmware menu. Maybe we should name it > odroid-xu-bootloader or odroid-xu-boot so that it is clear what it does. OK. > > +ODROID_XU_BL_VERSION = odroidxu3-v2012.07 > > +ODROID_XU_BL_SITE = $(call github,hardkernel,u-boot,$(ODROID_XU_BL_VERSION)) > > It's a bit annoying that we end up downloading an entire U-Boot source > tree, and in fact not use it except for those 3 files. > > In fact, why don't you simply build this U-Boot version with the U-Boot > package that already exists in Buildroot, and then use: It is indeed annoying: I don't like the idea of 1. downloading two u-boot 2. download u-boot for just two files. But, on the other hand, I don't like the hardkernel u-boot either. I think it's old, ugly and too hacky; as a buildroot user, I would like as much as I can to use mainline software. Besides, the cool thing of this board is that it is well supported both from the Linux Kernel and u-boot. How about creating a new repository with just these three files? If it sounds good, I will check with the licensing, even though I don't thing it will be a problem. Thanks a lot, Andi ^ permalink raw reply [flat|nested] 11+ messages in thread
[parent not found: <20160627155236.GI424@jack.zhora.eu>]
* [Buildroot] [PATCH 1/2] package: add Odroid BL bootloader binaries [not found] ` <20160627155236.GI424@jack.zhora.eu> @ 2016-06-30 7:58 ` Thomas Petazzoni 0 siblings, 0 replies; 11+ messages in thread From: Thomas Petazzoni @ 2016-06-30 7:58 UTC (permalink / raw) To: buildroot Hello, On Tue, 28 Jun 2016 00:52:36 +0900, Andi Shyti wrote: > It is indeed annoying: I don't like the idea of > > 1. downloading two u-boot > 2. download u-boot for just two files. > > But, on the other hand, I don't like the hardkernel u-boot > either. I think it's old, ugly and too hacky; as a buildroot > user, I would like as much as I can to use mainline software. > Besides, the cool thing of this board is that it is well > supported both from the Linux Kernel and u-boot. OK. Indeed, I can understand the value of using a mainline U-Boot, even if you have to use the binary blobs for the first stage bootloader. > How about creating a new repository with just these three files? > If it sounds good, I will check with the licensing, even though I > don't thing it will be a problem. No, we generally don't like to create repositories just for Buildroot. So please keep your new package, possibly with an explanation in the Config.in help text as to why it exists (kind of summarizing the discussion we had). Thanks a lot! Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] board: add support for the Odroid XU4 board 2016-06-26 14:07 [Buildroot] [PATCH 0/2] Odroid XU4 support Andi Shyti 2016-06-26 14:07 ` [Buildroot] [PATCH 1/2] package: add Odroid BL bootloader binaries Andi Shyti @ 2016-06-26 14:07 ` Andi Shyti 2016-06-26 14:14 ` Baruch Siach 2016-06-26 20:22 ` Thomas Petazzoni 2016-06-26 19:51 ` [Buildroot] [PATCH 0/2] Odroid XU4 support Thomas Petazzoni 2 siblings, 2 replies; 11+ messages in thread From: Andi Shyti @ 2016-06-26 14:07 UTC (permalink / raw) To: buildroot The Odroid XU4 board is released by hardkernel and has a Samsunx 5422 SoC. The board is supported both by mainline Linux Kernel and mainline u-boot. For the latter a boot.cmd script is provided which needs to be converted to boot.scr It requires the odroid boot firmware that contains the previous stages of boot earlier than u-boot Signed-off-by: Andi Shyti <andi@etezian.org> --- board/odroid-xu4/boot.cmd | 10 +++ board/odroid-xu4/readme.txt | 165 +++++++++++++++++++++++++++++++++++++++++++ configs/odroid-xu4_defconfig | 10 +++ 3 files changed, 185 insertions(+) create mode 100644 board/odroid-xu4/boot.cmd create mode 100644 board/odroid-xu4/readme.txt create mode 100644 configs/odroid-xu4_defconfig diff --git a/board/odroid-xu4/boot.cmd b/board/odroid-xu4/boot.cmd new file mode 100644 index 0000000..2fb4c16 --- /dev/null +++ b/board/odroid-xu4/boot.cmd @@ -0,0 +1,10 @@ +setenv kernelname zImage; +setenv boot_kernel "setenv bootargs \"${console} root=/dev/mmcblk${mmcrootdev}p${mmcrootpart} rootfstype=${rootfstype} rootwait ${opts}\"; +load mmc ${mmcbootdev}:${mmcbootpart} 0x40007FC0 '${kernelname}'; +if load mmc ${mmcbootdev}:${mmcbootpart} 40800000 ${fdtfile}; then + bootz 0x40007FC0 - 40800000; +else + echo Warning! Booting without DTB: '${fdtfile}'!; + bootz 0x40007FC0 -; +fi;" +run boot_kernel; \ No newline at end of file diff --git a/board/odroid-xu4/readme.txt b/board/odroid-xu4/readme.txt new file mode 100644 index 0000000..be8113b --- /dev/null +++ b/board/odroid-xu4/readme.txt @@ -0,0 +1,165 @@ +Odroid XU-4 board with Samsung Exynos 5422 SoC + +Introduction +------------ + +The Odroid XU 4 board is developed and shipped by Hrdkernel (hardkernel.com). It +uses the Samsung Exynos 5422 Soc. + +Odroid boot process +------------------- + +The odroid boot process requires three stages of boot plus trust zone: + + boot level 1 + + | + V + + boot level 2 + + | + V + + u-boot + +and they need to be raw copied to the SD card in the following order: + + +----------------+----------------+ + | boot level 1 | 1 block | + +----------------+----------------+ + | boot level 2 | 31 block | + +----------------+----------------+ + | u-boot | 63 block | + +----------------+----------------+ + | trust zone | 2111 block | + +----------------+----------------+ + | boot partition | 4096 block | + +----------------+----------------+ + | rootfs | | + +----------------+----------------+ + +How to build buildroot +---------------------- + +Forst of all configure the buildroot environment: + + $ make odroid-xu4_defconfig + +If needed personalize the build + + $ make menuconfig + +then hit + + $ make + +At the end of the build you should get in the output/images directory the +following files: + + - bl1.bin.hardkernel + Level 1 boot loader + + - bl2.bin.hardkernel.1mb_uboot + Level 2 boot loader + + - exynos5422-odroidxu4.dtb + Linux Kernel Device Tree blop + + - rootfs.tar + Compressed root file system image + + - tzsw.bin.hardkernel + ARM Truzt Zone + + - u-boot.bin + u-boot image + + - zImage + Linux Kernel Image + +Set up the bootloader +--------------------- + +I will assume you will use an sd card which will have as mount point /dev/sdb. +The above images need to be flashed to the SD card to specific addresses, as +follows: + + # dd if=bl1.bin.hardkernel of=/dev/sdb seek=1 bs=512 + # dd if=bl2.bin.hardkernel.1mb_uboot of=/dev/sdb seek=31 bs=512 + # dd if=u-boot.bin of=/dev/sdb seek=63 bs=512 + # dd if=tzsw.bin.hardkernel of=/dev/sdb seek=2111 bs=512 + +With the above we should be able to boot up to the u-boot bootloader. + +Set up the SD card +------------------ + +The SD card will need to partitions, which you can make with your favourite +partitioner. At the end it should look like this: + +Device Boot Start End Sectors Size Id Type +/dev/sdb1 4096 135167 131072 64M b W95 FAT32 +/dev/sdb2 135168 15523839 15388672 7.3G 83 Linux + +IMPORTANT: Please note that the first partition starts at the block 4096 instead +of the default 2048. This is due to the sizes of the binaries we flased earlier, +which go over the 2048 block, therefore, you need to start the first partition +at a further location, e.g. 4096. + +Now format the two partitions, the first as vfat FS type, the second as EXT3 or +EXT4: + + # mkfs.vfat /dev/sdb1 + # mkfs.ext4 /dev/sdb2 + +Finalize the SD card +-------------------- + +Now it's time to move Kernel and File System to the SD card. We will start from +the Kernel partition. + +First mount it: + + # mount /dev/sdb1/ /mnt/ + +and copy kernel and dtb + + # cp <buildroot>/output/images/zImage /mnt/ + # cp <buildroot>/output/images/exynos5422-odroidxu4.dtb /mnt/ + +umount the partition + + # sync + # umount /dev/sdb1 + +Mount the rootfs partition: + + # mount /dev/sdb2 /mnt/ + # tar + # cp <buildroot>/output/images/rootfs.tar -C /mnt/ + +Umount the partition + + # sync + # umount /dev/sdb2 + +The SD card is ready, you can boot now your Odroid XU-4. + +Automate u-boot commands +------------------------ + +In order to avoid customizing u-boot from the u-boot system at boot time, you +can use the boot.cmd file in board/odroid-xu4. + +Jut run + + $ mkimage -A arm -T script -C none -d boot.cmd boot.scr + +the output is an u-boot readable binary which needs to be copied in the first +partition of the SD card: + + # mount /dev/sdb1 /mnt/ + # cp boot.scr /mnt/sdb1 + # sync + # umount /dev/sdb1 diff --git a/configs/odroid-xu4_defconfig b/configs/odroid-xu4_defconfig new file mode 100644 index 0000000..5eca993 --- /dev/null +++ b/configs/odroid-xu4_defconfig @@ -0,0 +1,10 @@ +BR2_arm=y +BR2_cortex_a7=y +BR2_KERNEL_HEADERS_4_6=y +BR2_LINUX_KERNEL=y +BR2_LINUX_KERNEL_DEFCONFIG="exynos" +BR2_LINUX_KERNEL_DTS_SUPPORT=y +BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos5422-odroidxu4" +BR2_PACKAGE_ODROID_XU_BL=y +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BOARDNAME="odroid-xu3" -- 2.8.1 ^ permalink raw reply related [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] board: add support for the Odroid XU4 board 2016-06-26 14:07 ` [Buildroot] [PATCH 2/2] board: add support for the Odroid XU4 board Andi Shyti @ 2016-06-26 14:14 ` Baruch Siach 2016-06-27 17:02 ` Andi Shyti 2016-06-26 20:22 ` Thomas Petazzoni 1 sibling, 1 reply; 11+ messages in thread From: Baruch Siach @ 2016-06-26 14:14 UTC (permalink / raw) To: buildroot Hi Andi, On Sun, Jun 26, 2016 at 05:07:42PM +0300, Andi Shyti wrote: > The Odroid XU4 board is released by hardkernel and has a Samsunx Samsung. > 5422 SoC. [snip] > +At the end of the build you should get in the output/images directory the > +following files: > + > + - bl1.bin.hardkernel > + Level 1 boot loader > + > + - bl2.bin.hardkernel.1mb_uboot > + Level 2 boot loader > + > + - exynos5422-odroidxu4.dtb > + Linux Kernel Device Tree blop > + > + - rootfs.tar > + Compressed root file system image Not compressed. baruch -- http://baruch.siach.name/blog/ ~. .~ Tk Open Systems =}------------------------------------------------ooO--U--Ooo------------{= - baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il - ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] board: add support for the Odroid XU4 board 2016-06-26 14:14 ` Baruch Siach @ 2016-06-27 17:02 ` Andi Shyti 0 siblings, 0 replies; 11+ messages in thread From: Andi Shyti @ 2016-06-27 17:02 UTC (permalink / raw) To: buildroot > On Sun, Jun 26, 2016 at 05:07:42PM +0300, Andi Shyti wrote: > > The Odroid XU4 board is released by hardkernel and has a > > Samsunx > > Samsung. > > > 5422 SoC. > > [snip] > > > +At the end of the build you should get in the output/images > > directory the > > +following files: > > + > > + - bl1.bin.hardkernel > > + Level 1 boot loader > > + > > + - bl2.bin.hardkernel.1mb_uboot > > + Level 2 boot loader > > + > > + - exynos5422-odroidxu4.dtb > > + Linux Kernel Device Tree blop > > + > > + - rootfs.tar > > + Compressed root file system image > > Not compressed. Thanks Baruch, I will fix them. Andi ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] board: add support for the Odroid XU4 board 2016-06-26 14:07 ` [Buildroot] [PATCH 2/2] board: add support for the Odroid XU4 board Andi Shyti 2016-06-26 14:14 ` Baruch Siach @ 2016-06-26 20:22 ` Thomas Petazzoni 2016-06-27 18:04 ` Andi Shyti 1 sibling, 1 reply; 11+ messages in thread From: Thomas Petazzoni @ 2016-06-26 20:22 UTC (permalink / raw) To: buildroot Hello, On Sun, 26 Jun 2016 17:07:42 +0300, Andi Shyti wrote: > +Set up the bootloader > +--------------------- > + > +I will assume you will use an sd card which will have as mount point /dev/sdb. > +The above images need to be flashed to the SD card to specific addresses, as > +follows: > + > + # dd if=bl1.bin.hardkernel of=/dev/sdb seek=1 bs=512 > + # dd if=bl2.bin.hardkernel.1mb_uboot of=/dev/sdb seek=31 bs=512 > + # dd if=u-boot.bin of=/dev/sdb seek=63 bs=512 > + # dd if=tzsw.bin.hardkernel of=/dev/sdb seek=2111 bs=512 > + > +With the above we should be able to boot up to the u-boot bootloader. > + > +Set up the SD card > +------------------ > + > +The SD card will need to partitions, which you can make with your favourite > +partitioner. At the end it should look like this: > + > +Device Boot Start End Sectors Size Id Type > +/dev/sdb1 4096 135167 131072 64M b W95 FAT32 > +/dev/sdb2 135168 15523839 15388672 7.3G 83 Linux > + > +IMPORTANT: Please note that the first partition starts at the block 4096 instead > +of the default 2048. This is due to the sizes of the binaries we flased earlier, > +which go over the 2048 block, therefore, you need to start the first partition > +at a further location, e.g. 4096. > + > +Now format the two partitions, the first as vfat FS type, the second as EXT3 or > +EXT4: > + > + # mkfs.vfat /dev/sdb1 > + # mkfs.ext4 /dev/sdb2 > + > +Finalize the SD card > +-------------------- > + > +Now it's time to move Kernel and File System to the SD card. We will start from > +the Kernel partition. > + > +First mount it: > + > + # mount /dev/sdb1/ /mnt/ > + > +and copy kernel and dtb > + > + # cp <buildroot>/output/images/zImage /mnt/ > + # cp <buildroot>/output/images/exynos5422-odroidxu4.dtb /mnt/ > + > +umount the partition > + > + # sync > + # umount /dev/sdb1 > + > +Mount the rootfs partition: > + > + # mount /dev/sdb2 /mnt/ > + # tar > + # cp <buildroot>/output/images/rootfs.tar -C /mnt/ > + > +Umount the partition > + > + # sync > + # umount /dev/sdb2 > + > +The SD card is ready, you can boot now your Odroid XU-4. Please replace all this with a genimage script. It allows you to easily describe a FAT and an ext4 partition, and also allows you to place your bootloader images at arbitrary offsets. See board/freescale/imx6ulevk/genimage.cfg for an example. > +Automate u-boot commands > +------------------------ > + > +In order to avoid customizing u-boot from the u-boot system at boot time, you > +can use the boot.cmd file in board/odroid-xu4. > + > +Jut run > + > + $ mkimage -A arm -T script -C none -d boot.cmd boot.scr Please do this in a post-image script, do that boot.scr is directly produced in output/images, and added to the FAT partition by the genimage script. See board/orangepi/orangepipc/post-build.sh for an example. > diff --git a/configs/odroid-xu4_defconfig b/configs/odroid-xu4_defconfig > new file mode 100644 > index 0000000..5eca993 > --- /dev/null > +++ b/configs/odroid-xu4_defconfig > @@ -0,0 +1,10 @@ > +BR2_arm=y > +BR2_cortex_a7=y > +BR2_KERNEL_HEADERS_4_6=y Please use: BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_6=y which tells Buildroot to use the sources of the kernel being built for the kernel headers. > +BR2_LINUX_KERNEL=y You need to specify the exact kernel version that you want to build. > +BR2_LINUX_KERNEL_DEFCONFIG="exynos" > +BR2_LINUX_KERNEL_DTS_SUPPORT=y > +BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos5422-odroidxu4" > +BR2_PACKAGE_ODROID_XU_BL=y > +BR2_TARGET_UBOOT=y You need to specify the exact U-Boot version that you want to build. So, as per my reply on PATCH 1/2, it should probably point to the vendor-specific U-Boot version, so that you can use the pre-built binaries for the first stage bootloaders. > +BR2_TARGET_UBOOT_BOARDNAME="odroid-xu3" Thanks, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 2/2] board: add support for the Odroid XU4 board 2016-06-26 20:22 ` Thomas Petazzoni @ 2016-06-27 18:04 ` Andi Shyti 0 siblings, 0 replies; 11+ messages in thread From: Andi Shyti @ 2016-06-27 18:04 UTC (permalink / raw) To: buildroot Hi Thomas, > > +Finalize the SD card > > +-------------------- > > + > > +Now it's time to move Kernel and File System to the SD card. We will start from > > +the Kernel partition. > > + > > +First mount it: > > + > > + # mount /dev/sdb1/ /mnt/ > > + > > +and copy kernel and dtb > > + > > + # cp <buildroot>/output/images/zImage /mnt/ > > + # cp <buildroot>/output/images/exynos5422-odroidxu4.dtb /mnt/ > > + > > +umount the partition > > + > > + # sync > > + # umount /dev/sdb1 > > + > > +Mount the rootfs partition: > > + > > + # mount /dev/sdb2 /mnt/ > > + # tar > > + # cp <buildroot>/output/images/rootfs.tar -C /mnt/ > > + > > +Umount the partition > > + > > + # sync > > + # umount /dev/sdb2 > > + > > +The SD card is ready, you can boot now your Odroid XU-4. > > Please replace all this with a genimage script. It allows you to easily > describe a FAT and an ext4 partition, and also allows you to place your > bootloader images at arbitrary offsets. > > See board/freescale/imx6ulevk/genimage.cfg for an example. sure! It's indeed better! > > +Automate u-boot commands > > +------------------------ > > + > > +In order to avoid customizing u-boot from the u-boot system at boot time, you > > +can use the boot.cmd file in board/odroid-xu4. > > + > > +Jut run > > + > > + $ mkimage -A arm -T script -C none -d boot.cmd boot.scr > > Please do this in a post-image script, do that boot.scr is directly > produced in output/images, and added to the FAT partition by the > genimage script. > > See board/orangepi/orangepipc/post-build.sh for an example. I will, thanks! > > +BR2_arm=y > > +BR2_cortex_a7=y > > +BR2_KERNEL_HEADERS_4_6=y > > Please use: > > BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_4_6=y > > which tells Buildroot to use the sources of the kernel being built for > the kernel headers. OK. > > +BR2_LINUX_KERNEL=y > > You need to specify the exact kernel version that you want to build. OK. > > +BR2_LINUX_KERNEL_DEFCONFIG="exynos" > > +BR2_LINUX_KERNEL_DTS_SUPPORT=y > > +BR2_LINUX_KERNEL_INTREE_DTS_NAME="exynos5422-odroidxu4" > > +BR2_PACKAGE_ODROID_XU_BL=y > > +BR2_TARGET_UBOOT=y > > You need to specify the exact U-Boot version that you want to build. > So, as per my reply on PATCH 1/2, it should probably point to the > vendor-specific U-Boot version, so that you can use the pre-built > binaries for the first stage bootloaders. OK. > > +BR2_TARGET_UBOOT_BOARDNAME="odroid-xu3" > > Thanks, Thank you, I will fix the above in the second version of the patchset. Andi ^ permalink raw reply [flat|nested] 11+ messages in thread
* [Buildroot] [PATCH 0/2] Odroid XU4 support 2016-06-26 14:07 [Buildroot] [PATCH 0/2] Odroid XU4 support Andi Shyti 2016-06-26 14:07 ` [Buildroot] [PATCH 1/2] package: add Odroid BL bootloader binaries Andi Shyti 2016-06-26 14:07 ` [Buildroot] [PATCH 2/2] board: add support for the Odroid XU4 board Andi Shyti @ 2016-06-26 19:51 ` Thomas Petazzoni 2 siblings, 0 replies; 11+ messages in thread From: Thomas Petazzoni @ 2016-06-26 19:51 UTC (permalink / raw) To: buildroot Hello Andi! On Sun, 26 Jun 2016 17:07:40 +0300, Andi Shyti wrote: > this patchset adds support for the Odroid XU4 board. > > The first patch adds the first two stages of boot firmare and the > trust zone, necessary to boot the device. > > While the second patch adds the actual support of the board. Thanks for this contribution, it's very useful to have support for such platforms. I have some comments though, so I'll reply to the individual patches. Thanks, Thomas -- Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com ^ permalink raw reply [flat|nested] 11+ messages in thread
end of thread, other threads:[~2016-06-30 7:58 UTC | newest]
Thread overview: 11+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-06-26 14:07 [Buildroot] [PATCH 0/2] Odroid XU4 support Andi Shyti
2016-06-26 14:07 ` [Buildroot] [PATCH 1/2] package: add Odroid BL bootloader binaries Andi Shyti
2016-06-26 20:10 ` Thomas Petazzoni
2016-06-27 18:03 ` Andi Shyti
[not found] ` <20160627155236.GI424@jack.zhora.eu>
2016-06-30 7:58 ` Thomas Petazzoni
2016-06-26 14:07 ` [Buildroot] [PATCH 2/2] board: add support for the Odroid XU4 board Andi Shyti
2016-06-26 14:14 ` Baruch Siach
2016-06-27 17:02 ` Andi Shyti
2016-06-26 20:22 ` Thomas Petazzoni
2016-06-27 18:04 ` Andi Shyti
2016-06-26 19:51 ` [Buildroot] [PATCH 0/2] Odroid XU4 support Thomas Petazzoni
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox