diff options
author | Peter Korsgaard <peter@korsgaard.com> | 2016-12-01 22:22:06 +0100 |
---|---|---|
committer | Peter Korsgaard <peter@korsgaard.com> | 2016-12-01 22:29:56 +0100 |
commit | 8852f08eeda3c9ff4c5f9cc90a169338bda1bff9 (patch) | |
tree | 8b22aaa4e3c283a73fe2af2eccdfa3926a5430ef /board | |
parent | 42dd856ca930f79a831361e337d25fb8dd6e0dd1 (diff) | |
parent | 4f29cc436b24a8007b065253babe27b9346a479e (diff) |
Merge branch 'next'
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
Diffstat (limited to 'board')
18 files changed, 175 insertions, 326 deletions
diff --git a/board/freescale/common/genimage.cfg.template b/board/freescale/common/imx/genimage.cfg.template index acce058b2..acce058b2 100644 --- a/board/freescale/common/genimage.cfg.template +++ b/board/freescale/common/imx/genimage.cfg.template diff --git a/board/freescale/common/post-image.sh b/board/freescale/common/imx/post-image.sh index 7d48550a5..9e4da82dc 100755 --- a/board/freescale/common/post-image.sh +++ b/board/freescale/common/imx/post-image.sh @@ -35,7 +35,7 @@ main() local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" sed -e "s/%FILES%/${FILES}/" \ - board/freescale/common/genimage.cfg.template > ${GENIMAGE_CFG} + board/freescale/common/imx/genimage.cfg.template > ${GENIMAGE_CFG} rm -rf "${GENIMAGE_TMP}" diff --git a/board/freescale/common/mxs/genimage.cfg.template b/board/freescale/common/mxs/genimage.cfg.template new file mode 100644 index 000000000..e094fb7f2 --- /dev/null +++ b/board/freescale/common/mxs/genimage.cfg.template @@ -0,0 +1,39 @@ +# Minimal SD card image for the Freescale MX23/MX28 Template +# +# We mimic the .sdcard Freescale's MX23/MX28 image format: +# * u-boot.sb is placed at offset 1M, +# * a FAT partition at offset 16 MB is containing zImage/uImage and DTB files +# * a single root filesystem partition is required (ext2, ext3 or ext4) +# + +image boot.vfat { + vfat { + files = { + %FILES% + } + } + size = 16M +} + +image sdcard.img { + hdimage { + } + + partition u-boot { + partition-type = 0x53 + image = "u-boot.sd" + offset = 1M + size = 16M + } + + partition kernel { + partition-type = 0xC + bootable = "true" + image = "boot.vfat" + } + + partition rootfs { + partition-type = 0x83 + image = "rootfs.ext2" + } +} diff --git a/board/freescale/common/mxs/post-image.sh b/board/freescale/common/mxs/post-image.sh new file mode 100755 index 000000000..0bfb835c6 --- /dev/null +++ b/board/freescale/common/mxs/post-image.sh @@ -0,0 +1,54 @@ +#!/usr/bin/env bash + +# +# dtb_list extracts the list of DTB files from BR2_LINUX_KERNEL_INTREE_DTS_NAME +# in ${BR_CONFIG}, then prints the corresponding list of file names for the +# genimage configuration file +# +dtb_list() +{ + local DTB_LIST="$(sed -n 's/^BR2_LINUX_KERNEL_INTREE_DTS_NAME="\([a-z0-9 \-]*\)"$/\1/p' ${BR2_CONFIG})" + + for dt in $DTB_LIST; do + echo -n "\"$dt.dtb\", " + done +} + +# +# linux_image extracts the Linux image format from BR2_LINUX_KERNEL_UIMAGE in +# ${BR_CONFIG}, then prints the corresponding file name for the genimage +# configuration file +# +linux_image() +{ + if grep -Eq "^BR2_LINUX_KERNEL_UIMAGE=y$" ${BR2_CONFIG}; then + echo "\"uImage\"" + else + echo "\"zImage\"" + fi +} + +main() +{ + local FILES="$(dtb_list) $(linux_image)" + local GENIMAGE_CFG="$(mktemp --suffix genimage.cfg)" + local GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" + + sed -e "s/%FILES%/${FILES}/" \ + board/freescale/common/mxs/genimage.cfg.template > ${GENIMAGE_CFG} + + rm -rf "${GENIMAGE_TMP}" + + genimage \ + --rootpath "${TARGET_DIR}" \ + --tmppath "${GENIMAGE_TMP}" \ + --inputpath "${BINARIES_DIR}" \ + --outputpath "${BINARIES_DIR}" \ + --config "${GENIMAGE_CFG}" + + rm -f ${GENIMAGE_CFG} + + exit $? +} + +main $@ diff --git a/board/freescale/imx23evk/readme.txt b/board/freescale/imx23evk/readme.txt new file mode 100644 index 000000000..6574577dc --- /dev/null +++ b/board/freescale/imx23evk/readme.txt @@ -0,0 +1,48 @@ +************************** +Freescale i.MX23 EVK board +************************** + +This file documents the Buildroot support for the Freescale i.MX23 EVK board. + +Build +===== + +First, configure Buildroot for your i.MX23 EVK board: + + make imx23evk_defconfig + +Build all components: + + make + +You will find in output/images/ directory the following files: + - imx23-evk.dtb + - rootfs.tar + - u-boot.sd + - zImage + +Create a bootable SD card +========================= + +To determine the device associated to the SD card have a look in the +/proc/partitions file: + + cat /proc/partitions + +Then, run the following command: + +*** WARNING! The command will destroy all the card content. Use with care! *** + + sudo dd if=output/images/sdcard.img of=/dev/<your-microsd-device> + +Boot the i.MX23 EVK board +========================= + +- Put the Boot Mode Select jumper as 1 0 0 1 so that it can boot + from the SD card +- Insert the SD card in the SD Card slot of the board; +- Connect an RS232 UART cable to the Debug UART Port and connect using a + terminal emulator at 115200 bps, 8n1; +- power on the board. + +Enjoy! diff --git a/board/freescale/imx25pdk/readme.txt b/board/freescale/imx25pdk/readme.txt index df7c61726..1aece6c9b 100644 --- a/board/freescale/imx25pdk/readme.txt +++ b/board/freescale/imx25pdk/readme.txt @@ -40,7 +40,7 @@ command as root: *** WARNING! This will destroy all the card content. Use with care! *** For details about the medium image layout, see the definition in -board/freescale/common/genimage.cfg.template. +board/freescale/common/imx/genimage.cfg.template. Boot the i.MX25 PDK board ========================= diff --git a/board/freescale/imx28evk/genimage.cfg b/board/freescale/imx28evk/genimage.cfg deleted file mode 100644 index 4df432f99..000000000 --- a/board/freescale/imx28evk/genimage.cfg +++ /dev/null @@ -1,29 +0,0 @@ -image kernel.vfat { - vfat { - files = { - "zImage", "imx28-evk.dtb" - } - } - size = 16M -} - -image sdcard.img { - hdimage { - } - partition boot { - partition-type = 0x53 - image = "u-boot.sd" - offset = 1M - size = 16M - } - - partition kernel { - partition-type = 0xC - image = "kernel.vfat" - } - - partition rootfs { - partition-type = 0x83 - image = "rootfs.ext2" - } -} diff --git a/board/freescale/imx28evk/post-image.sh b/board/freescale/imx28evk/post-image.sh deleted file mode 100755 index b4ac4608f..000000000 --- a/board/freescale/imx28evk/post-image.sh +++ /dev/null @@ -1,14 +0,0 @@ -#!/usr/bin/env bash - -BOARD_DIR="$(dirname $0)" -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}" diff --git a/board/freescale/imx51evk/readme.txt b/board/freescale/imx51evk/readme.txt index bf739fd65..d67a3fd72 100644 --- a/board/freescale/imx51evk/readme.txt +++ b/board/freescale/imx51evk/readme.txt @@ -40,7 +40,7 @@ command as root: *** WARNING! This will destroy all the card content. Use with care! *** For details about the medium image layout, see the definition in -board/freescale/common/genimage.cfg.template. +board/freescale/common/imx/genimage.cfg.template. Boot the i.MX51 EVK board ========================= diff --git a/board/freescale/imx6sabre/readme.txt b/board/freescale/imx6sabre/readme.txt index e409d8f19..a1bd82fdc 100644 --- a/board/freescale/imx6sabre/readme.txt +++ b/board/freescale/imx6sabre/readme.txt @@ -71,7 +71,7 @@ command as root: *** WARNING! The script will destroy all the card content. Use with care! *** For details about the medium image layout, see the definition in -board/freescale/common/genimage.cfg.template. +board/freescale/common/imx/genimage.cfg.template. Boot the SABRE board ==================== diff --git a/board/freescale/imx6ulevk/readme.txt b/board/freescale/imx6ulevk/readme.txt index 98de2775d..25b95fec5 100644 --- a/board/freescale/imx6ulevk/readme.txt +++ b/board/freescale/imx6ulevk/readme.txt @@ -43,7 +43,7 @@ command as root: *** WARNING! This will destroy all the card content. Use with care! *** For details about the medium image layout, see the definition in -board/freescale/common/genimage.cfg.template. +board/freescale/common/imx/genimage.cfg.template. Boot the i.MX6UL EVK board ========================= diff --git a/board/freescale/imx7dsdb/readme.txt b/board/freescale/imx7dsdb/readme.txt index 9aeeb166d..c6030f696 100644 --- a/board/freescale/imx7dsdb/readme.txt +++ b/board/freescale/imx7dsdb/readme.txt @@ -40,7 +40,7 @@ command as root: *** WARNING! This will destroy all the card content. Use with care! *** For details about the medium image layout, see the definition in -board/freescale/common/genimage.cfg.template. +board/freescale/common/imx/genimage.cfg.template. Boot the i.MX7D SDB board ========================= diff --git a/board/olimex/imx233_olinuxino/genimage-imx233_olinuxino.cfg b/board/olimex/imx233_olinuxino/genimage-imx233_olinuxino.cfg deleted file mode 100644 index 78979dcc9..000000000 --- a/board/olimex/imx233_olinuxino/genimage-imx233_olinuxino.cfg +++ /dev/null @@ -1,28 +0,0 @@ -image kernel.vfat { - vfat { - files = { - "uImage" - } - } - size = 5M -} - -image sdcard.img { - hdimage { - } - partition boot { - partition-type = 0x53 - image = "u-boot.sd" - size = 16M - } - - partition kernel { - partition-type = 0xC - image = "kernel.vfat" - } - - partition rootfs { - partition-type = 0x83 - image = "rootfs.ext2" - } -} diff --git a/board/olimex/imx233_olinuxino/linux-3.18.config b/board/olimex/imx233_olinuxino/linux-3.18.config deleted file mode 100644 index d46d4d5cb..000000000 --- a/board/olimex/imx233_olinuxino/linux-3.18.config +++ /dev/null @@ -1,152 +0,0 @@ -CONFIG_SYSVIPC=y -CONFIG_NO_HZ=y -CONFIG_HIGH_RES_TIMERS=y -CONFIG_PERF_EVENTS=y -# CONFIG_COMPAT_BRK is not set -CONFIG_MODULES=y -CONFIG_MODULE_FORCE_LOAD=y -CONFIG_MODULE_UNLOAD=y -CONFIG_MODULE_FORCE_UNLOAD=y -CONFIG_MODVERSIONS=y -CONFIG_BLK_DEV_INTEGRITY=y -# CONFIG_ARCH_MULTI_V7 is not set -CONFIG_ARCH_MXS=y -# CONFIG_ARM_THUMB is not set -CONFIG_PREEMPT_VOLUNTARY=y -CONFIG_AEABI=y -CONFIG_ARM_APPENDED_DTB=y -CONFIG_ARM_ATAG_DTB_COMPAT=y -CONFIG_CMDLINE="console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait" -CONFIG_NET=y -CONFIG_PACKET=y -CONFIG_UNIX=y -CONFIG_INET=y -CONFIG_IP_PNP=y -CONFIG_IP_PNP_DHCP=y -CONFIG_SYN_COOKIES=y -CONFIG_CFG80211=y -CONFIG_CFG80211_WEXT=y -CONFIG_MAC80211=y -CONFIG_DEVTMPFS=y -CONFIG_DEVTMPFS_MOUNT=y -# CONFIG_FIRMWARE_IN_KERNEL is not set -CONFIG_MTD=y -CONFIG_MTD_CMDLINE_PARTS=y -CONFIG_MTD_BLOCK=y -CONFIG_MTD_DATAFLASH=y -CONFIG_MTD_SST25L=y -CONFIG_MTD_NAND=y -CONFIG_MTD_NAND_GPMI_NAND=y -CONFIG_MTD_UBI=y -# CONFIG_BLK_DEV is not set -CONFIG_EEPROM_AT24=y -CONFIG_EEPROM_93CX6=y -CONFIG_SCSI=y -CONFIG_BLK_DEV_SD=y -CONFIG_NETDEVICES=y -# CONFIG_ETHERNET is not set -CONFIG_USB_USBNET=y -CONFIG_USB_NET_SMSC95XX=y -CONFIG_RTL8187=m -CONFIG_ATH_CARDS=m -CONFIG_ATH9K_HTC=m -CONFIG_RT2X00=m -CONFIG_RT73USB=m -CONFIG_RT2800USB=m -CONFIG_RT2800USB_RT53XX=y -CONFIG_RT2800USB_RT55XX=y -CONFIG_RT2800USB_UNKNOWN=y -CONFIG_RTL_CARDS=m -CONFIG_RTL8192CU=m -# CONFIG_RTLWIFI_DEBUG is not set -CONFIG_ZD1211RW=m -# CONFIG_INPUT_MOUSEDEV_PSAUX is not set -CONFIG_INPUT_EVDEV=y -# CONFIG_INPUT_KEYBOARD is not set -# CONFIG_INPUT_MOUSE is not set -# CONFIG_SERIO is not set -CONFIG_DEVPTS_MULTIPLE_INSTANCES=y -# CONFIG_LEGACY_PTYS is not set -# CONFIG_DEVKMEM is not set -CONFIG_SERIAL_AMBA_PL011=y -CONFIG_SERIAL_AMBA_PL011_CONSOLE=y -CONFIG_SERIAL_MXS_AUART=y -# CONFIG_HW_RANDOM is not set -CONFIG_I2C=y -# CONFIG_I2C_COMPAT is not set -CONFIG_I2C_CHARDEV=y -CONFIG_I2C_MXS=y -CONFIG_SPI=y -CONFIG_SPI_GPIO=m -CONFIG_SPI_MXS=y -CONFIG_PTP_1588_CLOCK=y -CONFIG_GPIO_SYSFS=y -# CONFIG_HWMON is not set -CONFIG_WATCHDOG=y -CONFIG_STMP3XXX_RTC_WATCHDOG=y -CONFIG_REGULATOR=y -CONFIG_REGULATOR_FIXED_VOLTAGE=y -CONFIG_FB=y -CONFIG_FB_MXS=y -CONFIG_BACKLIGHT_LCD_SUPPORT=y -CONFIG_LCD_CLASS_DEVICE=y -CONFIG_BACKLIGHT_CLASS_DEVICE=y -CONFIG_BACKLIGHT_PWM=y -CONFIG_FRAMEBUFFER_CONSOLE=y -CONFIG_LOGO=y -CONFIG_SOUND=y -CONFIG_SND=y -CONFIG_SND_HRTIMER=y -# CONFIG_SND_SUPPORT_OLD_API is not set -# CONFIG_SND_VERBOSE_PROCFS is not set -# CONFIG_SND_DRIVERS is not set -# CONFIG_SND_ARM is not set -# CONFIG_SND_SPI is not set -# CONFIG_SND_USB is not set -CONFIG_SND_SOC=y -CONFIG_USB=y -CONFIG_USB_EHCI_HCD=y -CONFIG_USB_STORAGE=y -CONFIG_USB_CHIPIDEA=y -CONFIG_USB_CHIPIDEA_HOST=y -CONFIG_USB_MXS_PHY=y -CONFIG_MMC=y -CONFIG_MMC_MXS=y -CONFIG_LEDS_CLASS=y -CONFIG_LEDS_GPIO=y -CONFIG_LEDS_TRIGGER_TIMER=y -CONFIG_LEDS_TRIGGER_ONESHOT=y -CONFIG_LEDS_TRIGGER_HEARTBEAT=y -CONFIG_LEDS_TRIGGER_BACKLIGHT=y -CONFIG_LEDS_TRIGGER_GPIO=y -CONFIG_LEDS_TRIGGER_DEFAULT_ON=y -CONFIG_RTC_CLASS=y -CONFIG_RTC_DRV_STMP=y -CONFIG_DMADEVICES=y -CONFIG_MXS_DMA=y -CONFIG_STAGING=y -CONFIG_MXS_LRADC=y -CONFIG_IIO=y -CONFIG_IIO_SYSFS_TRIGGER=y -CONFIG_PWM=y -CONFIG_PWM_MXS=y -CONFIG_EXT4_FS=y -CONFIG_TMPFS=y -CONFIG_TMPFS_POSIX_ACL=y -# CONFIG_MISC_FILESYSTEMS is not set -# CONFIG_NETWORK_FILESYSTEMS is not set -CONFIG_PRINTK_TIME=y -CONFIG_FRAME_WARN=2048 -CONFIG_UNUSED_SYMBOLS=y -CONFIG_DEBUG_FS=y -CONFIG_STRICT_DEVMEM=y -CONFIG_DEBUG_USER=y -CONFIG_KEYS=y -CONFIG_CRYPTO_DEFLATE=y -CONFIG_CRYPTO_LZO=y -# CONFIG_CRYPTO_ANSI_CPRNG is not set -CONFIG_CRYPTO_DEV_MXS_DCP=y -CONFIG_CRC_CCITT=y -CONFIG_CRC_ITU_T=y -CONFIG_CRC7=m -CONFIG_FONTS=y diff --git a/board/olimex/imx233_olinuxino/linux-wifi.fragment b/board/olimex/imx233_olinuxino/linux-wifi.fragment new file mode 100644 index 000000000..b70dea2c6 --- /dev/null +++ b/board/olimex/imx233_olinuxino/linux-wifi.fragment @@ -0,0 +1,18 @@ +# Network testing +CONFIG_WIRELESS=y +CONFIG_CFG80211=y +CONFIG_CFG80211_WEXT=y +CONFIG_MAC80211=y +# MII PHY device drivers +CONFIG_WLAN=y +CONFIG_RTL8187=m +CONFIG_ATH9K_HTC=m +CONFIG_RT2X00=m +CONFIG_RT73USB=m +CONFIG_RT2800USB=m +CONFIG_RT2800USB_RT53XX=y +CONFIG_RT2800USB_RT55XX=y +CONFIG_RT2800USB_UNKNOWN=y +CONFIG_RTL_CARDS=m +CONFIG_RTL8192CU=m +CONFIG_ZD1211RW=m diff --git a/board/olimex/imx233_olinuxino/post-image.sh b/board/olimex/imx233_olinuxino/post-image.sh deleted file mode 100755 index 703cbe7ee..000000000 --- a/board/olimex/imx233_olinuxino/post-image.sh +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -BOARD_DIR="$(dirname $0)" -BOARD_NAME="$(basename ${BOARD_DIR})" -GENIMAGE_CFG="${BOARD_DIR}/genimage-${BOARD_NAME}.cfg" -GENIMAGE_TMP="${BUILD_DIR}/genimage.tmp" - -# Create symlink to "rename" kernel image -ln -sf uImage.imx23-olinuxino ${BINARIES_DIR}/uImage - -rm -rf "${GENIMAGE_TMP}" - -genimage \ - --rootpath "${TARGET_DIR}" \ - --tmppath "${GENIMAGE_TMP}" \ - --inputpath "${BINARIES_DIR}" \ - --outputpath "${BINARIES_DIR}" \ - --config "${GENIMAGE_CFG}" - -exit $? diff --git a/board/olimex/imx233_olinuxino/readme.txt b/board/olimex/imx233_olinuxino/readme.txt index 4b24ac2c1..1e676c45d 100644 --- a/board/olimex/imx233_olinuxino/readme.txt +++ b/board/olimex/imx233_olinuxino/readme.txt @@ -8,89 +8,22 @@ It also pulls up the console on the serial port, not on TV output. === Output files after building ============================================== output/images -+-- kernel.vfat (VFAT kernel partition image generated by genimage) ++-- boot.vfat (VFAT kernel partition image generated by genimage) ++-- imx23-olinuxino.dtb (device tree blob) +-- rootfs.ext2 (Root file system) +-- sdcard.img (Complete SD card image generated by genimage) +-- u-boot.sd (U-Boot image) -+-- uImage -> uImage.imx23-olinuxino (To copy kernel as "uImage" to kernel.vfat) -+-- uImage.imx23-olinuxino (Kernel uImage) ++-- uImage (Kernel binary) === Use of generated SD card image =========================================== -Just write sdcard.img directly to the SD card +To determine the device associated to the SD card have a look in the +/proc/partitions file: -***** WARNING: Double check that /dev/sdc is your MicroSD card ***** -***** It might be /dev/sdb or some other device name ***** -***** Failure to do so may result in you wiping your hard disk ***** + cat /proc/partitions - # dd if=output/images/sdcard.img of=/dev/sdc bs=512 +Then, run the following command as root: -=== Manual creation of SD card image ========================================= +*** WARNING! The command will destroy all the card content. Use with care! *** -You'll need a spare MicroSD card with Freescale's special partition layout. -This is basically three partitions: - -1) Type 53, the U-Boot partition, should be 16MB. -2) VFAT, place the kernel 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: -(remember to replace /dev/sdc* with the appropiate device name!) - -***** WARNING: Double check that /dev/sdc is your MicroSD card ***** -***** It might be /dev/sdb or some other device name ***** -***** Failure to do so may result in you wiping your hard disk ***** - -1. Unmount the filesystem(s) if they're already mounted, usually... - - # for fs in `grep /dev/sdc /proc/mounts|cut -d ' ' -f 1`;do umount $fs;done - - ...should work - -2. Blank the partition table out - - # dd if=/dev/zero of=/dev/sdc bs=1024 count=1024 - -3. Set up the partitions - - # fdisk /dev/sdc - n - p - 1 - <ENTER> - +16MB - t - 53 - n - p - 2 - <ENTER> - +5M - t - 2 - 4 - n - p - 3 - <ENTER> - <ENTER> - w - -4. Fill up the first (U-Boot) partition - # 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/uImages/uImage.imx23-olinuxino /mnt/uImage - # umount /mnt - -7. Fill up the third (filesystem) partition - # dd if=output/images/rootfs.ext2 of=/dev/sdc3 bs=512 - -8. Remove the MicroSD card from your linux PC and put it into your olinuxino. - -9. Boot! You're done! + sudo dd if=output/images/sdcard.img of=/dev/<your-microsd-device> diff --git a/board/technexion/imx6ulpico/readme.txt b/board/technexion/imx6ulpico/readme.txt index a7c3a445d..7eab3f6b8 100644 --- a/board/technexion/imx6ulpico/readme.txt +++ b/board/technexion/imx6ulpico/readme.txt @@ -46,7 +46,7 @@ command as root: *** WARNING! This will destroy all the card content. Use with care! *** For details about the medium image layout, see the definition in -board/freescale/common/genimage.cfg.template. +board/freescale/common/imx/genimage.cfg.template. Boot the i.MX6UL Pico board ========================= |