Update buidlroot to version 2016.08.1
This commit is contained in:
17
bsp/buildroot/board/olimex/a20_olinuxino/genimage.cfg
Normal file
17
bsp/buildroot/board/olimex/a20_olinuxino/genimage.cfg
Normal file
@@ -0,0 +1,17 @@
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition u-boot {
|
||||
in-partition-table = "no"
|
||||
image = "u-boot-sunxi-with-spl.bin"
|
||||
offset = 8192
|
||||
size = 1040384 # 1MB - 8192
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
||||
16
bsp/buildroot/board/olimex/a20_olinuxino/post-image.sh
Executable file
16
bsp/buildroot/board/olimex/a20_olinuxino/post-image.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/sh
|
||||
|
||||
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}"
|
||||
|
||||
exit $?
|
||||
@@ -3,12 +3,13 @@ A20-OLinuXino-LIME and A20-OLinuXino-MICRO
|
||||
Intro
|
||||
=====
|
||||
|
||||
These are open hardware boards, both based an the AllWinners A20 SoC.
|
||||
These are open hardware boards, all based on the Allwinner A20 SoC.
|
||||
|
||||
for more details about the boards see the following pages:
|
||||
- https://www.olimex.com/Products/OLinuXino/open-source-hardware
|
||||
- https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-MICRO/
|
||||
- https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME/
|
||||
- https://www.olimex.com/Products/OLinuXino/A20/A20-OLinuXino-LIME2/
|
||||
|
||||
The following defconfigs are available:
|
||||
- olimex_a20_olinuxino_micro_defconfig
|
||||
@@ -51,6 +52,7 @@ After building, you should get a tree like this:
|
||||
+-- rootfs.ext2
|
||||
+-- rootfs.ext4 -> rootfs.ext2
|
||||
+-- script.bin (lime_mali)
|
||||
+-- sdcard.img
|
||||
+-- sun7i-a20-olinuxino-lime.dtb (lime, mainline)
|
||||
+-- sun7i-a20-olinuxino-lime2.dtb (lime2, mainline)
|
||||
+-- sun7i-a20-olinuxino-micro.dtb (micro, mainline)
|
||||
@@ -62,55 +64,13 @@ After building, you should get a tree like this:
|
||||
How to write the SD card
|
||||
========================
|
||||
|
||||
The sdcard.img file is a complete bootable image ready to be written
|
||||
on the boot medium. To install it, simply copy the image to a uSD
|
||||
card:
|
||||
|
||||
Prepare the SD card
|
||||
-------------------
|
||||
# dd if=output/images/sdcard.img of=/dev/sdX
|
||||
|
||||
Erase existing stuff, and create an unique Linux partition with `fdisk`.
|
||||
|
||||
# fdisk /dev/sdX
|
||||
Command (m for help): o
|
||||
Building a new DOS disklabel with disk identifier 0xf9e1616a.
|
||||
Changes will remain in memory only, until you decide to write them.
|
||||
After that, of course, the previous content won't be recoverable.
|
||||
|
||||
Command (m for help): n
|
||||
Partition type:
|
||||
p primary (0 primary, 0 extended, 4 free)
|
||||
e extended
|
||||
Select (default p): p
|
||||
Partition number (1-4, default 1): 1
|
||||
First sector (2048-7626751, default 2048): 2048
|
||||
Last sector, +sectors or +size{K,M,G} (2048-7626751, default 7626751):
|
||||
Using default value 7626751
|
||||
|
||||
Command (m for help): p
|
||||
|
||||
Disk /dev/sdX: 3904 MB, 3904897024 bytes
|
||||
4 heads, 16 sectors/track, 119168 cylinders, total 7626752 sectors
|
||||
Units = sectors of 1 * 512 = 512 bytes
|
||||
Sector size (logical/physical): 512 bytes / 512 bytes
|
||||
I/O size (minimum/optimal): 512 bytes / 512 bytes
|
||||
Disk identifier: 0xf9e1616a
|
||||
|
||||
Device Boot Start End Blocks Id System
|
||||
/dev/sdX1 2048 7626751 3812352 83 Linux
|
||||
|
||||
Command (m for help): w
|
||||
The partition table has been altered!
|
||||
|
||||
Calling ioctl() to re-read partition table.
|
||||
Syncing disks.
|
||||
|
||||
Copy images on the SD card
|
||||
--------------------------
|
||||
|
||||
# dd if=output/images/rootfs.ext2 of=/dev/sdX1
|
||||
# dd if=output/images/u-boot-sunxi-with-spl.bin of=/dev/sdX bs=1024 seek=8
|
||||
|
||||
|
||||
Finish
|
||||
======
|
||||
Where 'sdX' is the device node of the uSD.
|
||||
|
||||
Eject the SD card, insert it in the A20-OLinuXino board, and power it up.
|
||||
|
||||
|
||||
@@ -0,0 +1,28 @@
|
||||
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"
|
||||
}
|
||||
}
|
||||
@@ -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 <gustavo@zacarias.com.ar>
|
||||
|
||||
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 <fadil.r.berisha@gmail.com>
|
||||
+ *
|
||||
+ * 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
|
||||
|
||||
20
bsp/buildroot/board/olimex/imx233_olinuxino/post-image.sh
Executable file
20
bsp/buildroot/board/olimex/imx233_olinuxino/post-image.sh
Executable file
@@ -0,0 +1,20 @@
|
||||
#!/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 $?
|
||||
@@ -5,11 +5,34 @@ 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:
|
||||
=== Output files after building ==============================================
|
||||
|
||||
1) Type 53, the bootstrap + bootloader/kernel partition, should be 16MB.
|
||||
2) Anything you like, for this example an ext2 partition, type 83 (linux).
|
||||
output/images
|
||||
+-- kernel.vfat (VFAT kernel partition image generated by genimage)
|
||||
+-- 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)
|
||||
|
||||
=== Use of generated SD card image ===========================================
|
||||
|
||||
Just write sdcard.img directly to the SD card
|
||||
|
||||
***** 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 *****
|
||||
|
||||
# dd if=output/images/sdcard.img of=/dev/sdc bs=512
|
||||
|
||||
=== Manual creation of SD card image =========================================
|
||||
|
||||
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:
|
||||
@@ -43,15 +66,31 @@ 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
|
||||
4. Fill up the first (U-Boot) partition
|
||||
# dd if=output/images/u-boot.sd bs=512 of=/dev/sdc1
|
||||
|
||||
5. Fill up the second (filesystem) partition
|
||||
# dd if=output/images/rootfs.ext2 of=/dev/sdc2 bs=512
|
||||
5. Create VFAT Filesystem
|
||||
# mkfs.vfat /dev/sdc2
|
||||
|
||||
6. Remove the MicroSD card from your linux PC and put it into your olinuxino.
|
||||
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. Boot! You're done!
|
||||
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!
|
||||
|
||||
Reference in New Issue
Block a user