Skip to contentSkip to conversation

beaglebone: Use default U-Boot version

PATCH New Ezequiel Garcia 3 participants 8 messages Jun 4, 2016 – Jun 6, 2016

lore
Share & tools
lore
#0 lore raw

PATCH 1/2 beaglebone: Use default U-Boot version

There's no reason to use a specific U-Boot version, given we are using upstream. Leave the default version get selected.

---
 configs/beaglebone_defconfig | 2 --
 1 file changed, 2 deletions(-)
configs/beaglebone_defconfig +0 -2
index be803b9cce30..b9d78a9fb25b 100644
@@ -20,8 +20,6 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y
 # bootloader
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="am335x_evm"
-BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2013.10"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="MLO"
Signature · 1 line
2.7.0
#1 lore raw

PATCH 2/2 beaglebone: Use genimage to produce the SD card image

---
 board/beaglebone/post-image.sh | 14 ++++++++++++++
 board/beaglebone/readme.txt    | 30 +-----------------------------
 configs/beaglebone_defconfig   |  5 +++++
 3 files changed, 20 insertions(+), 29 deletions(-)
board/beaglebone/post-image.sh +14 -0
index 7441d07a005c..ceeec6852092 100755
@@ -2,5 +2,19 @@
 # post-image.sh for BeagleBone
 # 2014, Marcin Jabrzyk <[email protected]>
 
+BOARD_DIR="$(dirname $0)"
+
 # copy the uEnv.txt to the output/images directory
 cp board/beaglebone/uEnv.txt $BINARIES_DIR/uEnv.txt
+
+GENIMAGE_CFG="${BOARD_DIR}/genimage.cfg"
+GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp"
+
+rm -rf "${GENIMAGE_TMP}"
+
+genimage \
+    --rootpath "${TARGET_DIR}" \
+    --tmppath "${GENIMAGE_TMP}" \
+    --inputpath "${BINARIES_DIR}" \
+    --outputpath "${BINARIES_DIR}" \
+    --config "${GENIMAGE_CFG}"
board/beaglebone/readme.txt +1 -29
index 089c49a8ef89..43ebe53aee14 100644
@@ -28,35 +28,7 @@ After building, you should get a tree like this:
   ??? am335x-bone.dtb
   ??? MLO
   ??? rootfs.ext2
+  ??? sdcard.img
   ??? u-boot.img
   ??? uEnv.txt
   ??? zImage
-
-
-Prepare your SDCard
-===================
-
-You need to prepare first partition in fat32 and marked as bootable,
-and second where you will write rootfs.
-
-Copy the files to boot partition
-
-  $ cp MLO u-boot.img zImage uEnv.txt *.dtb /media/zzzzz
-
-where /media/zzzzz is the mount point.
-Then you need to write the rootfs image onto SDCard:
-
-  # dd if=rootfs.ext2 of=/dev/xxxxx
-
-where /dev/xxxxx is the second partition. Use:
-
-  # fdisk -l
-
-to check for correct one.
-
-Finish
-======
-
-Unmount all mounted SDCard partitions and insert the card to BeagleBone.
-Hold the "BOOT" button and apply power. Then release the "BOOT" button.
-The output is available on the serial console.
configs/beaglebone_defconfig +5 -0
index b9d78a9fb25b..f68ee9106af4 100644
@@ -12,6 +12,7 @@ BR2_ROOTFS_POST_IMAGE_SCRIPT="board/beaglebone/post-image.sh"
 # filesystem
 BR2_PACKAGE_AM33X_CM3=y
 BR2_TARGET_ROOTFS_EXT2=y
+BR2_TARGET_ROOTFS_EXT2_4=y
 # BR2_TARGET_ROOTFS_TAR is not set
 
 # Linux headers same as kernel, a 3.12 series
@@ -24,6 +25,10 @@ BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="MLO"
 
+# host packages
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y
+
 # kernel
 BR2_LINUX_KERNEL=y
 BR2_LINUX_KERNEL_CUSTOM_GIT=y
Signature · 1 line
2.7.0
#2 lore raw

PATCH 2/2 beaglebone: Use genimage to produce the SD card image

Hello,

Quoted 1 line · Ezequiel Garcia

I've tweaked the title prefix to configs/beaglebone

configs/beaglebone_defconfig BR2_TARGET_UBOOT_FORMAT_IMG=y · line 30

Quoted 3 lines
configs/beaglebone_defconfig +3 -0
+# host packages
+BR2_PACKAGE_HOST_MTOOLS=y
+BR2_PACKAGE_HOST_GENIMAGE=y

You also need host dosfstools for genimage to work when a FAT filesystem needs to be generated. I've added it to the defconfig and applied. Thanks!

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#3 lore raw

PATCH 1/2 beaglebone: Use default U-Boot version

In reply to Ezequiel Garcia

Hello,

Quoted 4 lines · Ezequiel Garcia

There's no reason to use a specific U-Boot version, given we are using upstream. Leave the default version get selected.

No, that's not our policy. Our policy is to use a fixed version (even if an upstream one) to make sure that people using the defconfig in the future will have a known-working version.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/2 beaglebone: Use default U-Boot version

Thomas, Ezequiel, All,

On 2016-06-05 09:52 +0200, Thomas Petazzoni spake thusly:

Quoted 9 lines · Ezequiel Garcia
Quoted 4 lines

There's no reason to use a specific U-Boot version, given we are using upstream. Leave the default version get selected.

No, that's not our policy. Our policy is to use a fixed version (even if an upstream one) to make sure that people using the defconfig in the future will have a known-working version.

That may be my fault: we've discussed this with Ezequiel on IRC, and from what I understood, it looked he was askign why we were not using an upstream version.

So, I replied that we can use upstream, of course, if upstream has the necessary support.

Maybe I was not clear enough: we can use upstream, but a fixed version, of course.

If 2013.10 is too old, you can bump (e.g. to 2015.10 or whatever, even a sha1 from the git tree if necessary). But that should be a fixed version, indeed.

Sorry for the confusion... :-/

Regards,
Yann E. MORIN.

Signature · 6 lines
.-----------------.--------------------.------------------.--------------------.
|  Yann E. MORIN  | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: |
| +33 662 376 056 | Software  Designer | \ / CAMPAIGN     |  ___               |
| +33 223 225 172 `------------.-------:  X  AGAINST      |  \e/  There is no  |
| http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL    |   v   conspiracy.  |
'------------------------------^-------^------------------^--------------------'
#5 lore raw

PATCH 1/2 beaglebone: Use default U-Boot version

Quoted 20 lines · Yann E. MORIN

Thomas, Ezequiel, All,

On 2016-06-05 09:52 +0200, Thomas Petazzoni spake thusly:

Quoted 9 lines · Ezequiel Garcia
Quoted 4 lines

There's no reason to use a specific U-Boot version, given we are using upstream. Leave the default version get selected.

No, that's not our policy. Our policy is to use a fixed version (even if an upstream one) to make sure that people using the defconfig in the future will have a known-working version.

That may be my fault: we've discussed this with Ezequiel on IRC, and from what I understood, it looked he was askign why we were not using an upstream version.

So, I replied that we can use upstream, of course, if upstream has the necessary support.

Quoted 9 lines

Maybe I was not clear enough: we can use upstream, but a fixed version, of course.

If 2013.10 is too old, you can bump (e.g. to 2015.10 or whatever, even a sha1 from the git tree if necessary). But that should be a fixed version, indeed.

Sorry for the confusion... :-/

No problem, no need for apologies :-)

I'll cook a new patch in no time.

Signature · 2 lines
Ezequiel Garc?a, VanguardiaSur
www.vanguardiasur.com.ar
#6 lore raw

PATCH v2 1/1 beaglebone: Bump U-Boot version

In reply to Ezequiel Garcia

Currently selected version of U-Boot fails to compile. Dying words are:

gcc -g -O2 -I/home/zeta/buildroot/buildroot/output/host/usr/include -c -o env_embedded.o /home/zeta/buildroot/buildroot/output/build/uboot-2013.10/common/env_embedded.c /home/zeta/buildroot/buildroot/output/build/uboot-2013.10/lib/crc32.c:14:20: fatal error: common.h: No such file or directory
compilation terminated.
Makefile:258: recipe for target 'crc32.o' failed

Since it's quite old, instead of trying to fix it, let's just upgrade.

---
Changes from v1:

* Bump to a specific version instead of using the default.

 configs/beaglebone_defconfig | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
configs/beaglebone_defconfig +1 -1
index d44636173264..206417dc1cce 100644
@@ -22,7 +22,7 @@ BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_12=y
 BR2_TARGET_UBOOT=y
 BR2_TARGET_UBOOT_BOARDNAME="am335x_evm"
 BR2_TARGET_UBOOT_CUSTOM_VERSION=y
-BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2013.10"
+BR2_TARGET_UBOOT_CUSTOM_VERSION_VALUE="2016.05"
 BR2_TARGET_UBOOT_FORMAT_IMG=y
 BR2_TARGET_UBOOT_SPL=y
 BR2_TARGET_UBOOT_SPL_NAME="MLO"
Signature · 1 line
2.7.0
#7 lore raw

PATCH v2 1/1 beaglebone: Bump U-Boot version

Hello,

Quoted 8 lines · Ezequiel Garcia

Currently selected version of U-Boot fails to compile. Dying words are:

gcc -g -O2 -I/home/zeta/buildroot/buildroot/output/host/usr/include -c -o env_embedded.o /home/zeta/buildroot/buildroot/output/build/uboot-2013.10/common/env_embedded.c /home/zeta/buildroot/buildroot/output/build/uboot-2013.10/lib/crc32.c:14:20: fatal error: common.h: No such file or directory
compilation terminated.
Makefile:258: recipe for target 'crc32.o' failed

Quoted 6 lines

Since it's quite old, instead of trying to fix it, let's just upgrade.

---
Changes from v1:

Applied to master, thanks.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com