configs/olimex_imx233_olinuxino: switch to u-boot
PATCH 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
mxs-bootlets broke somewhere in between toolchain version bumps.
Directly boot u-boot, as this is supported now, but it requires updated partitioning (see readme.txt) Drop mxs-bootlets patches, they aren't needed anymore.
--- .../mxs-bootlets/mxs-bootlets-01-olinuxino.patch | 122 --------------------- board/olimex/imx233_olinuxino/readme.txt | 30 +++-- configs/olimex_imx233_olinuxino_defconfig | 38 ++----- 3 files changed, 32 insertions(+), 158 deletions(-) delete mode 100644 board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch
board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch deleted +0 -122
@@ -1,122 +0,0 @@ -Forward-ported patch from https://github.com/koliqi/imx23-olinuxino -for mxs-bootlets-10.12.01 - -Signed-off-by: Gustavo Zacarias <[email protected]> - -diff -Nura imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c ---- imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c 1969-12-31 21:00:00.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c 2013-05-17 15:07:33.282961551 -0300 -@@ -0,0 +1,54 @@ -+/* -+ * Platform specific data for the IMX23_OLINUXINO development board -+ * -+ * Fadil Berisha <[email protected]> -+ * -+ * Copyright 2008 SigmaTel, Inc -+ * Copyright 2008 Embedded Alley Solutions, Inc -+ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. -+ * -+ * This file is licensed under the terms of the GNU General Public License -+ * version 2. This program is licensed "as is" without any warranty of any -+ * kind, whether express or implied. -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+#include <setup.h> -+#include <keys.h> -+#include <lradc_buttons.h> -+ -+/************************************************ -+ * LRADC keyboard data * -+ ************************************************/ -+int lradc_keypad_ch = LRADC_CH0; -+int lradc_vddio_ch = LRADC_CH6; -+ -+struct lradc_keycode lradc_keycodes[] = { -+ { 100, KEY4 }, -+ { 306, KEY5 }, -+ { 601, KEY6 }, -+ { 932, KEY7 }, -+ { 1260, KEY8 }, -+ { 1424, KEY9 }, -+ { 1707, KEY10 }, -+ { 2207, KEY11 }, -+ { 2525, KEY12 }, -+ { 2831, KEY13 }, -+ { 3134, KEY14 }, -+ { -1, 0 }, -+}; -+ -+/************************************************ -+ * Magic key combinations for Armadillo * -+ ************************************************/ -+u32 magic_keys[MAGIC_KEY_NR] = { -+ [MAGIC_KEY1] = KEY4, -+ [MAGIC_KEY2] = KEY6, -+ [MAGIC_KEY3] = KEY10, -+}; -+ -+/************************************************ -+ * Default command line * -+ ************************************************/ -+char cmdline_def[] = "console=ttyAMA0,115200"; -diff -Nura imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt ---- imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt 1969-12-31 21:00:00.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt 2013-05-17 15:07:49.663496106 -0300 -@@ -0,0 +1,3 @@ -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -diff -Nura imx-bootlets-src-10.12.01/linux_prep/core/setup.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c ---- imx-bootlets-src-10.12.01/linux_prep/core/setup.c 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c 2013-05-17 15:08:39.246114205 -0300 -@@ -84,6 +84,8 @@ - #include "../../mach-mx28/includes/registers/regsrtc.h" - #elif defined(STMP378X) - #include "../../mach-mx23/includes/registers/regsrtc.h" -+#elif defined(IMX23_OLINUXINO) -+#include "../../mach-mx23/includes/registers/regsrtc.h" - #endif - - #define NAND_SECONDARY_BOOT 0x00000002 -diff -Nura imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h ---- imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h 2013-05-17 15:09:21.006476997 -0300 -@@ -19,6 +19,8 @@ - - #if defined (BOARD_STMP378X_DEV) - #define MACHINE_ID 0xa45 -+#elif defined (BOARD_IMX23_OLINUXINO_DEV) -+#define MACHINE_ID 0x1009 - #else - #error "Allocate a machine ID for your board" - #endif -diff -Nura imx-bootlets-src-10.12.01/linux_prep/Makefile imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile ---- imx-bootlets-src-10.12.01/linux_prep/Makefile 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile 2013-05-17 15:09:53.554539143 -0300 -@@ -69,6 +69,11 @@ - HW_OBJS = $(LRADC_OBJS) - CFLAGS += -DMX28 -DBOARD_MX28_EVK - endif -+ifeq ($(BOARD), imx23_olinuxino_dev) -+ARCH = mx23 -+HW_OBJS = $(LRADC_OBJS) -+CFLAGS += -DIMX23_OLINUXINO -DBOARD_IMX23_OLINUXINO_DEV -+endif - - # Generic code - CORE_OBJS = entry.o resume.o cmdlines.o setup.o keys.o -diff -Nura imx-bootlets-src-10.12.01/Makefile imx-bootlets-src-10.12.01-olinuxino/Makefile ---- imx-bootlets-src-10.12.01/Makefile 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/Makefile 2013-05-17 15:23:53.709956619 -0300 -@@ -16,6 +16,9 @@ - ifeq ($(BOARD), iMX28_EVK) - ARCH = mx28 - endif -+ifeq ($(BOARD), imx23_olinuxino_dev) -+ARCH = mx23 -+endif - - all: build_prep gen_bootstream -
board/olimex/imx233_olinuxino/readme.txt +22 -8
@@ -6,10 +6,11 @@ one or more of: hostapd, iw, wireless_tools and/or wpa_supplicant. It also pulls up the console on the serial port, not on TV output. You'll need a spare MicroSD card with Freescale's special partition layout. -This is basically two partitions: +This is basically three partitions: -1) Type 53, the bootstrap + bootloader/kernel partition, should be 16MB. -2) Anything you like, for this example an ext2 partition, type 83 (linux). +1) Type 53, the u-boot partition, should be 16MB. +2) VFAT, place Kernel as uImage there +3) Anything you like, for this example an ext2 partition, type 83 (linux). Assuming you see your MicroSD card as /dev/sdc you'd need to do, as root and from the buildroot project top level directory:
@@ -43,15 +44,28 @@ and from the buildroot project top level directory: p 2 <ENTER> + +5M + t + 2 + 4 + n + p + 3 + <ENTER> <ENTER> w 4. Fill up the first (bootstrap + kernel) partition - # dd if=output/images/imx23_olinuxino_dev_linux.sb bs=512 of=/dev/sdc1 seek=4 + # dd if=output/images/u-boot.sd bs=512 of=/dev/sdc1 + +5. Create VFAT Filesystem + # mkfs.vfat /dev/sdc2 + +6. Mount and copy output/images/uImage.imx23-olinuxino to the VFAT partition, rename to uImage -5. Fill up the second (filesystem) partition - # dd if=output/images/rootfs.ext2 of=/dev/sdc2 bs=512 +7. Fill up the third (filesystem) partition + # dd if=output/images/rootfs.ext2 of=/dev/sdc3 bs=512 -6. Remove the MicroSD card from your linux PC and put it into your olinuxino. +8. Remove the MicroSD card from your linux PC and put it into your olinuxino. -7. Boot! You're done! +9. Boot! You're done!
configs/olimex_imx233_olinuxino_defconfig +10 -28
@@ -1,40 +1,16 @@ -# Architecture BR2_arm=y -BR2_arm926t=y - -# Patches (mxs-bootlets) BR2_GLOBAL_PATCH_DIR="board/olimex/imx233_olinuxino" - -# System -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" - -# Filesystem -BR2_TARGET_ROOTFS_EXT2=y -# BR2_TARGET_ROOTFS_TAR is not set - -# Linux headers same as kernel, a 3.18 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y - -# Bootloader -BR2_TARGET_MXS_BOOTLETS=y -BR2_TARGET_MXS_BOOTLETS_CUSTOM_PATCH_DIR="board/olimex/imx233_olinuxino" -BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD=y -BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME="imx23_olinuxino_dev" - -# Kernel +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.2" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olimex/imx233_olinuxino/linux-3.18.config" -BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_APPENDED_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x42000000" BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx23-olinuxino" - -# For automatic firmware loading -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y - -# Firmware for WiFi BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y
@@ -42,3 +18,9 @@ BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y BR2_PACKAGE_ZD1211_FIRMWARE=y +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mx23_olinuxino" +BR2_TARGET_UBOOT_FORMAT_SD=y
Signature · 1 line
2.1.4
PATCH 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
Hi Phil,
configs/olimex_imx233_olinuxino_defconfig line 2
Quoted 12 lines · Phil Eichinger
configs/olimex_imx233_olinuxino_defconfig +0
-4@@ -1,40 +1,16 @@ -# Architecture BR2_arm=y -BR2_arm926t=y - -# Patches (mxs-bootlets) BR2_GLOBAL_PATCH_DIR="board/olimex/imx233_olinuxino"
With no patches left I think you can get rid of that as well.
baruch
Signature · 3 lines
http://baruch.siach.name/blog/ ~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -PATCH v2 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
In reply to Phil Eichingermxs-bootlets broke somewhere in between toolchain version bumps.
Directly boot u-boot, as this is supported now, but it requires updated partitioning (see readme.txt) Drop mxs-bootlets patches, they aren't needed anymore.
---
Changes v1 -> v2:
- Drop BR2_GLOBAL_PATCH_DIR (suggested by Baruch Siach)
.../mxs-bootlets/mxs-bootlets-01-olinuxino.patch | 122 --------------------- board/olimex/imx233_olinuxino/readme.txt | 30 +++-- configs/olimex_imx233_olinuxino_defconfig | 39 ++----- 3 files changed, 32 insertions(+), 159 deletions(-) delete mode 100644 board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch
board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch deleted +0 -122
@@ -1,122 +0,0 @@ -Forward-ported patch from https://github.com/koliqi/imx23-olinuxino -for mxs-bootlets-10.12.01 - -Signed-off-by: Gustavo Zacarias <[email protected]> - -diff -Nura imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c ---- imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c 1969-12-31 21:00:00.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c 2013-05-17 15:07:33.282961551 -0300 -@@ -0,0 +1,54 @@ -+/* -+ * Platform specific data for the IMX23_OLINUXINO development board -+ * -+ * Fadil Berisha <[email protected]> -+ * -+ * Copyright 2008 SigmaTel, Inc -+ * Copyright 2008 Embedded Alley Solutions, Inc -+ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. -+ * -+ * This file is licensed under the terms of the GNU General Public License -+ * version 2. This program is licensed "as is" without any warranty of any -+ * kind, whether express or implied. -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+#include <setup.h> -+#include <keys.h> -+#include <lradc_buttons.h> -+ -+/************************************************ -+ * LRADC keyboard data * -+ ************************************************/ -+int lradc_keypad_ch = LRADC_CH0; -+int lradc_vddio_ch = LRADC_CH6; -+ -+struct lradc_keycode lradc_keycodes[] = { -+ { 100, KEY4 }, -+ { 306, KEY5 }, -+ { 601, KEY6 }, -+ { 932, KEY7 }, -+ { 1260, KEY8 }, -+ { 1424, KEY9 }, -+ { 1707, KEY10 }, -+ { 2207, KEY11 }, -+ { 2525, KEY12 }, -+ { 2831, KEY13 }, -+ { 3134, KEY14 }, -+ { -1, 0 }, -+}; -+ -+/************************************************ -+ * Magic key combinations for Armadillo * -+ ************************************************/ -+u32 magic_keys[MAGIC_KEY_NR] = { -+ [MAGIC_KEY1] = KEY4, -+ [MAGIC_KEY2] = KEY6, -+ [MAGIC_KEY3] = KEY10, -+}; -+ -+/************************************************ -+ * Default command line * -+ ************************************************/ -+char cmdline_def[] = "console=ttyAMA0,115200"; -diff -Nura imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt ---- imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt 1969-12-31 21:00:00.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt 2013-05-17 15:07:49.663496106 -0300 -@@ -0,0 +1,3 @@ -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -diff -Nura imx-bootlets-src-10.12.01/linux_prep/core/setup.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c ---- imx-bootlets-src-10.12.01/linux_prep/core/setup.c 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c 2013-05-17 15:08:39.246114205 -0300 -@@ -84,6 +84,8 @@ - #include "../../mach-mx28/includes/registers/regsrtc.h" - #elif defined(STMP378X) - #include "../../mach-mx23/includes/registers/regsrtc.h" -+#elif defined(IMX23_OLINUXINO) -+#include "../../mach-mx23/includes/registers/regsrtc.h" - #endif - - #define NAND_SECONDARY_BOOT 0x00000002 -diff -Nura imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h ---- imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h 2013-05-17 15:09:21.006476997 -0300 -@@ -19,6 +19,8 @@ - - #if defined (BOARD_STMP378X_DEV) - #define MACHINE_ID 0xa45 -+#elif defined (BOARD_IMX23_OLINUXINO_DEV) -+#define MACHINE_ID 0x1009 - #else - #error "Allocate a machine ID for your board" - #endif -diff -Nura imx-bootlets-src-10.12.01/linux_prep/Makefile imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile ---- imx-bootlets-src-10.12.01/linux_prep/Makefile 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile 2013-05-17 15:09:53.554539143 -0300 -@@ -69,6 +69,11 @@ - HW_OBJS = $(LRADC_OBJS) - CFLAGS += -DMX28 -DBOARD_MX28_EVK - endif -+ifeq ($(BOARD), imx23_olinuxino_dev) -+ARCH = mx23 -+HW_OBJS = $(LRADC_OBJS) -+CFLAGS += -DIMX23_OLINUXINO -DBOARD_IMX23_OLINUXINO_DEV -+endif - - # Generic code - CORE_OBJS = entry.o resume.o cmdlines.o setup.o keys.o -diff -Nura imx-bootlets-src-10.12.01/Makefile imx-bootlets-src-10.12.01-olinuxino/Makefile ---- imx-bootlets-src-10.12.01/Makefile 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/Makefile 2013-05-17 15:23:53.709956619 -0300 -@@ -16,6 +16,9 @@ - ifeq ($(BOARD), iMX28_EVK) - ARCH = mx28 - endif -+ifeq ($(BOARD), imx23_olinuxino_dev) -+ARCH = mx23 -+endif - - all: build_prep gen_bootstream -
board/olimex/imx233_olinuxino/readme.txt +22 -8
@@ -6,10 +6,11 @@ one or more of: hostapd, iw, wireless_tools and/or wpa_supplicant. It also pulls up the console on the serial port, not on TV output. You'll need a spare MicroSD card with Freescale's special partition layout. -This is basically two partitions: +This is basically three partitions: -1) Type 53, the bootstrap + bootloader/kernel partition, should be 16MB. -2) Anything you like, for this example an ext2 partition, type 83 (linux). +1) Type 53, the u-boot partition, should be 16MB. +2) VFAT, place Kernel as uImage there +3) Anything you like, for this example an ext2 partition, type 83 (linux). Assuming you see your MicroSD card as /dev/sdc you'd need to do, as root and from the buildroot project top level directory:
@@ -43,15 +44,28 @@ and from the buildroot project top level directory: p 2 <ENTER> + +5M + t + 2 + 4 + n + p + 3 + <ENTER> <ENTER> w 4. Fill up the first (bootstrap + kernel) partition - # dd if=output/images/imx23_olinuxino_dev_linux.sb bs=512 of=/dev/sdc1 seek=4 + # dd if=output/images/u-boot.sd bs=512 of=/dev/sdc1 + +5. Create VFAT Filesystem + # mkfs.vfat /dev/sdc2 + +6. Mount and copy output/images/uImage.imx23-olinuxino to the VFAT partition, rename to uImage -5. Fill up the second (filesystem) partition - # dd if=output/images/rootfs.ext2 of=/dev/sdc2 bs=512 +7. Fill up the third (filesystem) partition + # dd if=output/images/rootfs.ext2 of=/dev/sdc3 bs=512 -6. Remove the MicroSD card from your linux PC and put it into your olinuxino. +8. Remove the MicroSD card from your linux PC and put it into your olinuxino. -7. Boot! You're done! +9. Boot! You're done!
configs/olimex_imx233_olinuxino_defconfig +10 -29
@@ -1,40 +1,15 @@ -# Architecture BR2_arm=y -BR2_arm926t=y - -# Patches (mxs-bootlets) -BR2_GLOBAL_PATCH_DIR="board/olimex/imx233_olinuxino" - -# System -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" - -# Filesystem -BR2_TARGET_ROOTFS_EXT2=y -# BR2_TARGET_ROOTFS_TAR is not set - -# Linux headers same as kernel, a 3.18 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y - -# Bootloader -BR2_TARGET_MXS_BOOTLETS=y -BR2_TARGET_MXS_BOOTLETS_CUSTOM_PATCH_DIR="board/olimex/imx233_olinuxino" -BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD=y -BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME="imx23_olinuxino_dev" - -# Kernel +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.2" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olimex/imx233_olinuxino/linux-3.18.config" -BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_APPENDED_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x42000000" BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx23-olinuxino" - -# For automatic firmware loading -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y - -# Firmware for WiFi BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y
@@ -42,3 +17,9 @@ BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y BR2_PACKAGE_ZD1211_FIRMWARE=y +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mx23_olinuxino" +BR2_TARGET_UBOOT_FORMAT_SD=y
Signature · 1 line
2.1.4
PATCH v2 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
Dear Phil Eichinger,
Quoted 2 lines · Phil Eichinger
Signed-off-by Phil Eichinger <[email protected]>Tested-by Phil Eichinger <[email protected]>
Tested-by tags are meant to be given by other people, not the patch author, since we assume you have tested the patches you are submitting :-)
configs/olimex_imx233_olinuxino_defconfig line 11
Quoted 3 lines
configs/olimex_imx233_olinuxino_defconfig +2
-1-BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_APPENDED_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x42000000"
Any reason to use an appended uImage? If you're using a recent version of U-Boot, you should use bootz to boot a zImage, and boot with a DTB separate from the kernel.
Also:
configs/olimex_imx233_olinuxino_defconfig BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y · line 25
Quoted 4 lines
configs/olimex_imx233_olinuxino_defconfig +4
-0+BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mx23_olinuxino" +BR2_TARGET_UBOOT_FORMAT_SD=y
Please used a fixed U-Boot version, otherwise your defconfig might break in the future when we bump the default U-Boot version. See other defconfig.
Another thing is that you removed some comments from the defconfig, while some of them were really useful, such as the one that explains why BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y is enabled. We normally don't enable mdev support in our default defconfig, but this defconfig has a specific reason for doing so, so this comment should be kept.
Finally, but this is a possible improvement for the future, you could probably replace the complicated sequence of commands to build the SD card by a nice post-image script that relies on genimage. But this is for another patch.
Could you send an updated version that takes into account the above suggestions?
Thanks a lot!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v2 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
Quoted 10 lines · Thomas Petazzoni
Dear Phil Eichinger,
Quoted 2 lines · Phil Eichinger
Signed-off-by Phil Eichinger <[email protected]>Tested-by Phil Eichinger <[email protected]>Tested-by tags are meant to be given by other people, not the patch author, since we assume you have tested the patches you are submitting :-)
This should read Tested-on-actual-hardware-by ;-)
Quoted 7 lines
configs/olimex_imx233_olinuxino_defconfig line 11
Quoted 3 lines
configs/olimex_imx233_olinuxino_defconfig +2
-1-BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_APPENDED_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x42000000"Any reason to use an appended uImage? If you're using a recent version of U-Boot, you should use bootz to boot a zImage, and boot with a DTB separate from the kernel.
The reason behind this is the u-boot defconfig boots an uImage by default. So I thought this defconfig should provide the easiest starting point for anyone trying to get an image up and running.
Quoted 10 lines
Also:
configs/olimex_imx233_olinuxino_defconfig BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y · line 25
Quoted 4 lines
configs/olimex_imx233_olinuxino_defconfig +4
-0+BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mx23_olinuxino" +BR2_TARGET_UBOOT_FORMAT_SD=yPlease used a fixed U-Boot version, otherwise your defconfig might break in the future when we bump the default U-Boot version. See other defconfig.
Ah, didn't think of that.
Quoted 5 lines
Another thing is that you removed some comments from the defconfig, while some of them were really useful, such as the one that explains why BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y is enabled. We normally don't enable mdev support in our default defconfig, but this defconfig has a specific reason for doing so, so this comment should be kept.
Good point, I'll add them again.
Quoted 4 lines
Finally, but this is a possible improvement for the future, you could probably replace the complicated sequence of commands to build the SD card by a nice post-image script that relies on genimage. But this is for another patch.
I was thinking of something like an post-image script but doesn't that mean to settle on
something like the smallest SD card possible?
Or were you thinking more of an interactive post-image script? Meanwhile I've tried a 4.4.1 kernel and it works, but I think I will put the kernel
version bump into another patch.
Quoted 2 lines
Could you send an updated version that takes into account the above suggestions?
Sure, tomorrow!
Thanks for your thorough review, again I've learned a lot!
Cheers, Phil
PATCH v2 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
Hello,
Quoted 5 lines · Phil Eichinger
Quoted 3 lines
Tested-by tags are meant to be given by other people, not the patch author, since we assume you have tested the patches you are submitting :-)
This should read Tested-on-actual-hardware-by ;-)
Then this should be mentioned explicitly in the commit log, as it's useful information.
Quoted 11 lines
Quoted 7 lines
configs/olimex_imx233_olinuxino_defconfig line 11
Quoted 3 lines
configs/olimex_imx233_olinuxino_defconfig +2
-1-BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_APPENDED_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x42000000"Any reason to use an appended uImage? If you're using a recent version of U-Boot, you should use bootz to boot a zImage, and boot with a DTB separate from the kernel.
The reason behind this is the u-boot defconfig boots an uImage by default. So I thought this defconfig should provide the easiest starting point for anyone trying to get an image up and running.
Makes sense. Then keep it this way, but please mention that in the commit log as well. zImage + separate DTB is normally the "modern" way of booting on ARM, so it's the situation we normally expect to see when a defconfig is modernized. If it isn't this way, then it's good to have the explanation that you gave.
Quoted 9 lines
Quoted 4 lines
Finally, but this is a possible improvement for the future, you could probably replace the complicated sequence of commands to build the SD card by a nice post-image script that relies on genimage. But this is for another patch.
I was thinking of something like an post-image script but doesn't that mean to settle on
something like the smallest SD card possible?
Or were you thinking more of an interactive post-image script?
Look at the other boards that use genimage, simply do:
git grep genimage board/
And you will see multiple examples of genimage usage.
Quoted 5 lines
Quoted 2 lines
Could you send an updated version that takes into account the above suggestions?
Sure, tomorrow!
Thanks for your thorough review, again I've learned a lot!
You're welcome. Thanks to you for contributing in the first place!
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH v3 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
In reply to Phil Eichingermxs-bootlets broke somewhere in between toolchain version bumps. Directly boot u-boot, as this is supported now, but it requires updated partitioning (see readme.txt)
Drop mxs-bootlets patches, they aren't needed anymore.
Kernel is built as an uImage because the u-boot defconfig expects an uImage on the second partition.
Tested on iMX233-OLinuXino-MINI hardware.
---
Changes v3 -> v2:
- Explain why an uImage is used
- Add tested on which hardware
- Set u-boot version to 2006.01
(suggested by Thomas Petazzoni)
Changes v1 -> v2:
- Drop BR2_GLOBAL_PATCH_DIR (suggested by Baruch Siach)
.../mxs-bootlets/mxs-bootlets-01-olinuxino.patch | 122 --------------------- board/olimex/imx233_olinuxino/readme.txt | 30 +++-- configs/olimex_imx233_olinuxino_defconfig | 39 ++----- 3 files changed, 32 insertions(+), 159 deletions(-) delete mode 100644 board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch
board/olimex/imx233_olinuxino/mxs-bootlets/mxs-bootlets-01-olinuxino.patch deleted +0 -122
@@ -1,122 +0,0 @@ -Forward-ported patch from https://github.com/koliqi/imx23-olinuxino -for mxs-bootlets-10.12.01 - -Signed-off-by: Gustavo Zacarias <[email protected]> - -diff -Nura imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c ---- imx-bootlets-src-10.12.01/linux_prep/board/imx23_olinuxino_dev.c 1969-12-31 21:00:00.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/board/imx23_olinuxino_dev.c 2013-05-17 15:07:33.282961551 -0300 -@@ -0,0 +1,54 @@ -+/* -+ * Platform specific data for the IMX23_OLINUXINO development board -+ * -+ * Fadil Berisha <[email protected]> -+ * -+ * Copyright 2008 SigmaTel, Inc -+ * Copyright 2008 Embedded Alley Solutions, Inc -+ * Copyright 2009-2010 Freescale Semiconductor, Inc. All Rights Reserved. -+ * -+ * This file is licensed under the terms of the GNU General Public License -+ * version 2. This program is licensed "as is" without any warranty of any -+ * kind, whether express or implied. -+ * -+ * http://www.opensource.org/licenses/gpl-license.html -+ * http://www.gnu.org/copyleft/gpl.html -+ */ -+#include <setup.h> -+#include <keys.h> -+#include <lradc_buttons.h> -+ -+/************************************************ -+ * LRADC keyboard data * -+ ************************************************/ -+int lradc_keypad_ch = LRADC_CH0; -+int lradc_vddio_ch = LRADC_CH6; -+ -+struct lradc_keycode lradc_keycodes[] = { -+ { 100, KEY4 }, -+ { 306, KEY5 }, -+ { 601, KEY6 }, -+ { 932, KEY7 }, -+ { 1260, KEY8 }, -+ { 1424, KEY9 }, -+ { 1707, KEY10 }, -+ { 2207, KEY11 }, -+ { 2525, KEY12 }, -+ { 2831, KEY13 }, -+ { 3134, KEY14 }, -+ { -1, 0 }, -+}; -+ -+/************************************************ -+ * Magic key combinations for Armadillo * -+ ************************************************/ -+u32 magic_keys[MAGIC_KEY_NR] = { -+ [MAGIC_KEY1] = KEY4, -+ [MAGIC_KEY2] = KEY6, -+ [MAGIC_KEY3] = KEY10, -+}; -+ -+/************************************************ -+ * Default command line * -+ ************************************************/ -+char cmdline_def[] = "console=ttyAMA0,115200"; -diff -Nura imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt ---- imx-bootlets-src-10.12.01/linux_prep/cmdlines/imx23_olinuxino_dev.txt 1969-12-31 21:00:00.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/cmdlines/imx23_olinuxino_dev.txt 2013-05-17 15:07:49.663496106 -0300 -@@ -0,0 +1,3 @@ -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -+console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait -diff -Nura imx-bootlets-src-10.12.01/linux_prep/core/setup.c imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c ---- imx-bootlets-src-10.12.01/linux_prep/core/setup.c 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/core/setup.c 2013-05-17 15:08:39.246114205 -0300 -@@ -84,6 +84,8 @@ - #include "../../mach-mx28/includes/registers/regsrtc.h" - #elif defined(STMP378X) - #include "../../mach-mx23/includes/registers/regsrtc.h" -+#elif defined(IMX23_OLINUXINO) -+#include "../../mach-mx23/includes/registers/regsrtc.h" - #endif - - #define NAND_SECONDARY_BOOT 0x00000002 -diff -Nura imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h ---- imx-bootlets-src-10.12.01/linux_prep/include/mx23/platform.h 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/include/mx23/platform.h 2013-05-17 15:09:21.006476997 -0300 -@@ -19,6 +19,8 @@ - - #if defined (BOARD_STMP378X_DEV) - #define MACHINE_ID 0xa45 -+#elif defined (BOARD_IMX23_OLINUXINO_DEV) -+#define MACHINE_ID 0x1009 - #else - #error "Allocate a machine ID for your board" - #endif -diff -Nura imx-bootlets-src-10.12.01/linux_prep/Makefile imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile ---- imx-bootlets-src-10.12.01/linux_prep/Makefile 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/linux_prep/Makefile 2013-05-17 15:09:53.554539143 -0300 -@@ -69,6 +69,11 @@ - HW_OBJS = $(LRADC_OBJS) - CFLAGS += -DMX28 -DBOARD_MX28_EVK - endif -+ifeq ($(BOARD), imx23_olinuxino_dev) -+ARCH = mx23 -+HW_OBJS = $(LRADC_OBJS) -+CFLAGS += -DIMX23_OLINUXINO -DBOARD_IMX23_OLINUXINO_DEV -+endif - - # Generic code - CORE_OBJS = entry.o resume.o cmdlines.o setup.o keys.o -diff -Nura imx-bootlets-src-10.12.01/Makefile imx-bootlets-src-10.12.01-olinuxino/Makefile ---- imx-bootlets-src-10.12.01/Makefile 2010-11-04 04:35:38.000000000 -0300 -+++ imx-bootlets-src-10.12.01-olinuxino/Makefile 2013-05-17 15:23:53.709956619 -0300 -@@ -16,6 +16,9 @@ - ifeq ($(BOARD), iMX28_EVK) - ARCH = mx28 - endif -+ifeq ($(BOARD), imx23_olinuxino_dev) -+ARCH = mx23 -+endif - - all: build_prep gen_bootstream -
board/olimex/imx233_olinuxino/readme.txt +22 -8
@@ -6,10 +6,11 @@ one or more of: hostapd, iw, wireless_tools and/or wpa_supplicant. It also pulls up the console on the serial port, not on TV output. You'll need a spare MicroSD card with Freescale's special partition layout. -This is basically two partitions: +This is basically three partitions: -1) Type 53, the bootstrap + bootloader/kernel partition, should be 16MB. -2) Anything you like, for this example an ext2 partition, type 83 (linux). +1) Type 53, the u-boot partition, should be 16MB. +2) VFAT, place Kernel as uImage there +3) Anything you like, for this example an ext2 partition, type 83 (linux). Assuming you see your MicroSD card as /dev/sdc you'd need to do, as root and from the buildroot project top level directory:
@@ -43,15 +44,28 @@ and from the buildroot project top level directory: p 2 <ENTER> + +5M + t + 2 + 4 + n + p + 3 + <ENTER> <ENTER> w 4. Fill up the first (bootstrap + kernel) partition - # dd if=output/images/imx23_olinuxino_dev_linux.sb bs=512 of=/dev/sdc1 seek=4 + # dd if=output/images/u-boot.sd bs=512 of=/dev/sdc1 + +5. Create VFAT Filesystem + # mkfs.vfat /dev/sdc2 + +6. Mount and copy output/images/uImage.imx23-olinuxino to the VFAT partition, rename to uImage -5. Fill up the second (filesystem) partition - # dd if=output/images/rootfs.ext2 of=/dev/sdc2 bs=512 +7. Fill up the third (filesystem) partition + # dd if=output/images/rootfs.ext2 of=/dev/sdc3 bs=512 -6. Remove the MicroSD card from your linux PC and put it into your olinuxino. +8. Remove the MicroSD card from your linux PC and put it into your olinuxino. -7. Boot! You're done! +9. Boot! You're done!
configs/olimex_imx233_olinuxino_defconfig +10 -29
@@ -1,40 +1,15 @@ -# Architecture BR2_arm=y -BR2_arm926t=y - -# Patches (mxs-bootlets) -BR2_GLOBAL_PATCH_DIR="board/olimex/imx233_olinuxino" - -# System -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" - -# Filesystem -BR2_TARGET_ROOTFS_EXT2=y -# BR2_TARGET_ROOTFS_TAR is not set - -# Linux headers same as kernel, a 3.18 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y - -# Bootloader -BR2_TARGET_MXS_BOOTLETS=y -BR2_TARGET_MXS_BOOTLETS_CUSTOM_PATCH_DIR="board/olimex/imx233_olinuxino" -BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD=y -BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME="imx23_olinuxino_dev" - -# Kernel +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.2" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olimex/imx233_olinuxino/linux-3.18.config" -BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_APPENDED_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x42000000" BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx23-olinuxino" - -# For automatic firmware loading -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y - -# Firmware for WiFi BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y
@@ -42,3 +17,9 @@ BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y BR2_PACKAGE_ZD1211_FIRMWARE=y +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y +BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mx23_olinuxino" +BR2_TARGET_UBOOT_FORMAT_SD=y
Signature · 1 line
2.1.4
PATCH v3 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
Quoted 1 line · Phil Eichinger
mxs-bootlets broke somewhere in between toolchain version bumps.
Specify explicitly that it fails to boot - perhaps even include the serial output.
Quoted 20 lines
Directly boot u-boot, as this is supported now, but it requires updated partitioning (see readme.txt)
Drop mxs-bootlets patches, they aren't needed anymore.
Kernel is built as an uImage because the u-boot defconfig expects an uImage on the second partition.
Tested on iMX233-OLinuXino-MINI hardware.
Signed-off-by Phil Eichinger <[email protected]>---
Changes v3 -> v2:
- Explain why an uImage is used
- Add tested on which hardware
- Set u-boot version to 2006.01
(suggested by Thomas Petazzoni)
Changes v1 -> v2:
- DropBR2_GLOBAL_PATCH_DIR(suggested by Baruch Siach)
[snip]
Quoted 5 lines
board/olimex/imx233_olinuxino/readme.txt +0
-0
board/olimex/imx233_olinuxino/readme.txt one or more of: hostapd, iw, wireless_tools and/or wpa_supplicant. · line 11
Quoted 9 lines
board/olimex/imx233_olinuxino/readme.txt +2
-3@@ -6,10 +6,11 @@ one or more of: hostapd, iw, wireless_tools and/or wpa_supplicant. It also pulls up the console on the serial port, not on TV output. You'll need a spare MicroSD card with Freescale's special partition layout. -This is basically two partitions: +This is basically three partitions: -1) Type 53, the bootstrap + bootloader/kernel partition, should be 16MB. -2) Anything you like, for this example an ext2 partition, type 83 (linux). +1) Type 53, the u-boot partition, should be 16MB.
U-Boot
board/olimex/imx233_olinuxino/readme.txt one or more of: hostapd, iw, wireless_tools and/or wpa_supplicant. · line 12
Quoted 1 line
board/olimex/imx233_olinuxino/readme.txt +1
-0+2) VFAT, place Kernel as uImage there
2) VFAT, put the kernel uImage there
Quoted 10 lines
board/olimex/imx233_olinuxino/readme.txt +3
-0+3) Anything you like, for this example an ext2 partition, type 83 (linux). Assuming you see your MicroSD card as /dev/sdc you'd need to do, as root and from the buildroot project top level directory:@@ -43,15 +44,28 @@ and from the buildroot project top level directory: p 2 <ENTER> + +5M + t
board/olimex/imx233_olinuxino/readme.txt and from the buildroot project top level directory: · line 58
Quoted 10 lines
board/olimex/imx233_olinuxino/readme.txt +6
-0+ 2 + 4 + n + p + 3 + <ENTER> <ENTER> w 4. Fill up the first (bootstrap + kernel) partition
Fill up the first (U-Boot) partition
board/olimex/imx233_olinuxino/readme.txt and from the buildroot project top level directory: · line 64
Quoted 7 lines
board/olimex/imx233_olinuxino/readme.txt +6
-1- # dd if=output/images/imx23_olinuxino_dev_linux.sb bs=512 of=/dev/sdc1 seek=4 + # dd if=output/images/u-boot.sd bs=512 of=/dev/sdc1 + +5. Create VFAT Filesystem + # mkfs.vfat /dev/sdc2 + +6. Mount and copy output/images/uImage.imx23-olinuxino to the VFAT partition, rename to uImage
# mount /dev/sdc2 /mnt # cp output/images/uImage.imx23-olinuxino /mnt/uImage # umount /mnt
Quoted 16 lines
board/olimex/imx233_olinuxino/readme.txt +4
-4-5. Fill up the second (filesystem) partition - # dd if=output/images/rootfs.ext2 of=/dev/sdc2 bs=512 +7. Fill up the third (filesystem) partition + # dd if=output/images/rootfs.ext2 of=/dev/sdc3 bs=512 -6. Remove the MicroSD card from your linux PC and put it into your olinuxino. +8. Remove the MicroSD card from your linux PC and put it into your olinuxino. -7. Boot! You're done! +9. Boot! You're done!configs/olimex_imx233_olinuxino_defconfig +0
-0
configs/olimex_imx233_olinuxino_defconfig line 4
Quoted 4 lines
configs/olimex_imx233_olinuxino_defconfig +0
-3@@ -1,40 +1,15 @@ -# Architecture BR2_arm=y -BR2_arm926t=y -
Please keep the comments (as far as they're still appropriate).
Also keep the explicit specification of the subarchitecture.
Quoted 41 lines
configs/olimex_imx233_olinuxino_defconfig +4
-26-# Patches (mxs-bootlets) -BR2_GLOBAL_PATCH_DIR="board/olimex/imx233_olinuxino" - -# System -BR2_TARGET_GENERIC_GETTY=y -BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" - -# Filesystem -BR2_TARGET_ROOTFS_EXT2=y -# BR2_TARGET_ROOTFS_TAR is not set - -# Linux headers same as kernel, a 3.18 series BR2_PACKAGE_HOST_LINUX_HEADERS_CUSTOM_3_18=y - -# Bootloader -BR2_TARGET_MXS_BOOTLETS=y -BR2_TARGET_MXS_BOOTLETS_CUSTOM_PATCH_DIR="board/olimex/imx233_olinuxino" -BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD=y -BR2_TARGET_MXS_BOOTLETS_CUSTOM_BOARD_NAME="imx23_olinuxino_dev" - -# Kernel +BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y +BR2_TARGET_GENERIC_GETTY_PORT="ttyAMA0" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_CUSTOM_VERSION=y BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="3.18.2" BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/olimex/imx233_olinuxino/linux-3.18.config" -BR2_LINUX_KERNEL_APPENDED_ZIMAGE=y +BR2_LINUX_KERNEL_APPENDED_UIMAGE=y +BR2_LINUX_KERNEL_UIMAGE_LOADADDR="0x42000000" BR2_LINUX_KERNEL_INTREE_DTS_NAME="imx23-olinuxino" - -# For automatic firmware loading -BR2_ROOTFS_DEVICE_CREATION_DYNAMIC_MDEV=y - -# Firmware for WiFi BR2_PACKAGE_LINUX_FIRMWARE=y BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_7010=y BR2_PACKAGE_LINUX_FIRMWARE_ATHEROS_9271=y
configs/olimex_imx233_olinuxino_defconfig BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y · line 22
Quoted 6 lines
configs/olimex_imx233_olinuxino_defconfig +3
-0@@ -42,3 +17,9 @@ BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT73=y BR2_PACKAGE_LINUX_FIRMWARE_RALINK_RT2XX=y BR2_PACKAGE_LINUX_FIRMWARE_RTL_81XX=y BR2_PACKAGE_ZD1211_FIRMWARE=y +BR2_TARGET_ROOTFS_EXT2=y +# BR2_TARGET_ROOTFS_TAR is not set +BR2_TARGET_UBOOT=y
Give an explicit version, not just the latest one (which will change all the
time, possibly in incompatible ways or breaking the build).
Regards,
Arnout
Quoted 4 lines
configs/olimex_imx233_olinuxino_defconfig +3
-0+BR2_TARGET_UBOOT_BUILD_SYSTEM_KCONFIG=y +BR2_TARGET_UBOOT_BOARD_DEFCONFIG="mx23_olinuxino" +BR2_TARGET_UBOOT_FORMAT_SD=y
Signature · 6 lines
Arnout Vandecappelle arnout at mind be Senior Embedded Software Architect +32-16-286500 Essensium/Mind http://www.mind.be G.Geenslaan 9, 3001 Leuven, Belgium BE 872 984 063 RPR Leuven LinkedIn profile: http://www.linkedin.com/in/arnoutvandecappelle GPG fingerprint: 7493 020B C7E3 8618 8DEC 222C 82EB F404 F9AC 0DDF
PATCH v3 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
In reply to Phil EichingerQuoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Phil" == Phil Eichinger <[email protected]> writes:
mxs-bootlets broke somewhere in between toolchain version bumps. Directly boot u-boot, as this is supported now, but it requires updated partitioning (see readme.txt)
Drop mxs-bootlets patches, they aren't needed anymore.
Kernel is built as an uImage because the u-boot defconfig expects an uImage on the second partition.
Tested on iMX233-OLinuXino-MINI hardware.
Quoted 7 lines
Signed-off-by Phil Eichinger <[email protected]>---
Changes v3 -> v2:
- Explain why an uImage is used
- Add tested on which hardware
- Set u-boot version to 2006.01
(suggested by Thomas Petazzoni)
Committed with the changes suggested by Arnout, thanks.
board/olimex/imx233_olinuxino/readme.txt one or more of: hostapd, iw, wireless_tools and/or wpa_supplicant. · line 16
Quoted 12 lines
You'll need a spare MicroSD card with Freescale's special partition layout.
board/olimex/imx233_olinuxino/readme.txt +4
-3-This is basically two partitions: +This is basically three partitions: -1) Type 53, the bootstrap + bootloader/kernel partition, should be 16MB. -2) Anything you like, for this example an ext2 partition, type 83 (linux). +1) Type 53, the u-boot partition, should be 16MB. +2) VFAT, place Kernel as uImage there +3) Anything you like, for this example an ext2 partition, type 83 (linux). Assuming you see your MicroSD card as /dev/sdc you'd need to do, as root and from the buildroot project top level directory:
This seems like a good fit for genimage. Can you verify that you are able to boot from a complete sdcard image generated with genimage and then send a patch to create it in a post-image script?
See E.G. board/orangepi/orangepipc for an example, thanks!
Signature · 1 line
Bye, Peter Korsgaard
PATCH v3 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
Quoted 21 lines · Peter Korsgaard
Quoted 13 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Phil" == Phil Eichinger <[email protected]> writes:
mxs-bootlets broke somewhere in between toolchain version bumps. Directly boot u-boot, as this is supported now, but it requires updated partitioning (see readme.txt)
Drop mxs-bootlets patches, they aren't needed anymore.
Kernel is built as an uImage because the u-boot defconfig expects an uImage on the second partition.
Tested on iMX233-OLinuXino-MINI hardware.
Quoted 7 lines
Signed-off-by Phil Eichinger <[email protected]>---
Changes v3 -> v2:
- Explain why an uImage is used
- Add tested on which hardware
- Set u-boot version to 2006.01
(suggested by Thomas Petazzoni)
Quoted 1 line
Committed with the changes suggested by Arnout, thanks.
Thank you! Haven't had time to come up with a v4 yet.
Quoted 10 lines
Quoted 9 lines
You'll need a spare MicroSD card with Freescale's special partition layout.
board/olimex/imx233_olinuxino/readme.txt +4
-3-This is basically two partitions: +This is basically three partitions: -1) Type 53, the bootstrap + bootloader/kernel partition, should be 16MB. -2) Anything you like, for this example an ext2 partition, type 83 (linux). +1) Type 53, the u-boot partition, should be 16MB. +2) VFAT, place Kernel as uImage there +3) Anything you like, for this example an ext2 partition, type 83 (linux).
Quoted 8 lines
Quoted 2 lines
Assuming you see your MicroSD card as
/dev/sdcyou'd need to do, as root and from the buildroot project top level directory:This seems like a good fit for genimage. Can you verify that you are able to boot from a complete sdcard image generated with genimage and then send a patch to create it in a post-image script?
See E.G. board/orangepi/orangepipc for an example, thanks!
I had a look. Some genimage.cfg use a fixed size of 512MB for the rootfs, some just use the size of the rootfs.
I do prefer the later, as I'm able to fit a as small as possible SD card. Especially since 512MB + some MB for the Kernel and bootloader would at least require a 1GB card. What's the intent behind using a 512MB rootfs partition in that case?
Regards, Phil
PATCH v3 1/1 configs/olimex_imx233_olinuxino: switch to u-boot
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Phil" == Phil Eichinger <[email protected]> writes:
Hi,
Quoted 8 lines
Quoted 1 line
See E.G. board/orangepi/orangepipc for an example, thanks!
I had a look. Some genimage.cfg use a fixed size of 512MB for the rootfs, some just use the size of the rootfs.
I do prefer the later, as I'm able to fit a as small as possible SD card. Especially since 512MB + some MB for the Kernel and bootloader would at least require a 1GB card. What's the intent behind using a 512MB rootfs partition in that case?
I didn't write those genimage configurations, but my understanding is that the size you specify only sets the size of the PARTITION (E.G. the data in the MBR), and not the size of the image file (atleast for the last partition, data in between partitions is probably padded with zeros / a sparse file is generated).
The last partition is typically a read/write rootfs, so having some extra space is often handy. To use it you do need to tell the filesystem that there's extra space available, E.G. by running resize2fs on the partition after writing it to a SD card.
The choice of 512MB is afaik pretty arbitrary. I would think that all our defconfigs create rootfs images < 50MB, so less could certainly also be used - But do you really have a microsd card smaller than 1G?
Signature · 2 lines
Venlig hilsen, Peter Korsgaard