Add buildroot 2018-02
This commit is contained in:
3
buildroot/board/lego/ev3/busybox.fragment
Normal file
3
buildroot/board/lego/ev3/busybox.fragment
Normal file
@@ -0,0 +1,3 @@
|
||||
CONFIG_BEEP=y
|
||||
CONFIG_FEATURE_BEEP_FREQ=440
|
||||
CONFIG_FEATURE_BEEP_LENGTH_MS=250
|
||||
57
buildroot/board/lego/ev3/genimage.cfg
Normal file
57
buildroot/board/lego/ev3/genimage.cfg
Normal file
@@ -0,0 +1,57 @@
|
||||
# LEGO MINDSTORMS EV3 can boot from a 16MB flash or from a microSD card.
|
||||
# The U-Boot bootloader from the flash is always used, even when booting
|
||||
# from a microSD card.
|
||||
|
||||
# The Flash image
|
||||
|
||||
flash nor-16M-256 {
|
||||
pebsize = 4096
|
||||
numpebs = 4096
|
||||
minimum-io-unit-size = 256
|
||||
}
|
||||
|
||||
image flash.bin {
|
||||
flash {
|
||||
}
|
||||
flashtype = "nor-16M-256"
|
||||
partition uboot {
|
||||
image = "u-boot.bin"
|
||||
size = 320K
|
||||
}
|
||||
partition uimage {
|
||||
image = "uImage.da850-lego-ev3"
|
||||
size = 4M
|
||||
offset = 0x50000
|
||||
}
|
||||
partition rootfs {
|
||||
image = "rootfs.squashfs"
|
||||
size = 10M
|
||||
offset = 0x450000
|
||||
}
|
||||
}
|
||||
|
||||
# The SD card image
|
||||
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
file uImage {
|
||||
image = "uImage.da850-lego-ev3"
|
||||
}
|
||||
}
|
||||
size = 16M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 4M
|
||||
}
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext2"
|
||||
}
|
||||
}
|
||||
62
buildroot/board/lego/ev3/linux.fragment
Normal file
62
buildroot/board/lego/ev3/linux.fragment
Normal file
@@ -0,0 +1,62 @@
|
||||
CONFIG_ARCH_DAVINCI_DM644x=n
|
||||
CONFIG_ARCH_DAVINCI_DM355=n
|
||||
CONFIG_ARCH_DAVINCI_DM646x=n
|
||||
CONFIG_ARCH_DAVINCI_DA830=n
|
||||
CONFIG_ARCH_DAVINCI_DM365=n
|
||||
CONFIG_MACH_SFFSDR=n
|
||||
CONFIG_MACH_NEUROS_OSD2=n
|
||||
CONFIG_MACH_DM355_LEOPARD=n
|
||||
CONFIG_MACH_MITYOMAPL138=n
|
||||
CONFIG_MACH_OMAPL138_HAWKBOARD=n
|
||||
CONFIG_MACH_DAVINCI_DA850_EVM=n
|
||||
CONFIG_ATA=n
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_M25P80=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_BLK_DEV_RAM=y
|
||||
CONFIG_BLK_DEV_RAM_COUNT=1
|
||||
CONFIG_BLK_DEV_RAM_SIZE=32768
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_PWM_BEEPER=y
|
||||
CONFIG_SPI_DAVINCI=y
|
||||
CONFIG_PINCTRL_DA850_PUPD=y
|
||||
CONFIG_V4L_PLATFORM_DRIVERS=n
|
||||
CONFIG_SOUND=n
|
||||
CONFIG_SND=n
|
||||
CONFIG_SND_SOC=n
|
||||
CONFIG_SND_EDMA_SOC=n
|
||||
CONFIG_SND_DAVINCI_SOC_MCASP=n
|
||||
CONFIG_SND_SOC_TLV320AIC3X=n
|
||||
CONFIG_SND_SIMPLE_CARD=n
|
||||
CONFIG_DAVINCI_WATCHDOG=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_DAVINCI=y
|
||||
CONFIG_USB_MUSB_HDRC=y
|
||||
CONFIG_USB_MUSB_GADGET=y
|
||||
CONFIG_USB_MUSB_DA8XX=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGER_MTD=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||
CONFIG_RTC_DRV_OMAP=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_TI_ADS7950=y
|
||||
CONFIG_PWM_TIECAP=y
|
||||
CONFIG_PWM_TIEHRPWM=y
|
||||
CONFIG_SQUASHFS=y
|
||||
CONFIG_SQUASHFS_LZ4=y
|
||||
CONFIG_SQUASHFS_LZO=y
|
||||
CONFIG_SQUASHFS_XZ=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_TILCDC=n
|
||||
CONFIG_DRM_DUMB_VGA_DAC=n
|
||||
CONFIG_DRM_TINYDRM=y
|
||||
CONFIG_TINYDRM_ST7586=y
|
||||
CONFIG_FB_DA8XX=n
|
||||
@@ -0,0 +1,31 @@
|
||||
From cdd8d11858fa34f6e813fae46b5556e9fb3570dc Mon Sep 17 00:00:00 2001
|
||||
From: David Lechner <david@lechnology.com>
|
||||
Date: Sun, 19 Nov 2017 19:54:32 -0600
|
||||
Subject: [PATCH] configs: legoev3: increase flash image sizes
|
||||
|
||||
This increases the kernel image to 4M and the rootfs image to 10M.
|
||||
|
||||
It is getting hard to get a kernel image to fit in 3M and the rootfs image
|
||||
size now matches the filesyssize variable.
|
||||
|
||||
Signed-off-by: David Lechner <david@lechnology.com>
|
||||
---
|
||||
include/configs/legoev3.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h
|
||||
index 79fa3c4..2eeaf85 100644
|
||||
--- a/include/configs/legoev3.h
|
||||
+++ b/include/configs/legoev3.h
|
||||
@@ -204,7 +204,7 @@
|
||||
"mmcargs=setenv bootargs mem=${memsize} console=${console} root=/dev/mmcblk0p2 rw rootwait lpj=747520\0" \
|
||||
"mmcboot=bootm ${loadaddr}\0" \
|
||||
"flashargs=setenv bootargs mem=${memsize} initrd=${filesysaddr},${filesyssize} root=/dev/ram0 rw rootfstype=squashfs console=${console} lpj=747520\0" \
|
||||
- "flashboot=sf probe 0; sf read ${loadaddr} 0x50000 0x300000; sf read ${filesysaddr} 0x350000 0x960000; bootm ${loadaddr}\0" \
|
||||
+ "flashboot=sf probe 0; sf read ${loadaddr} 0x50000 0x400000; sf read ${filesysaddr} 0x450000 0xA00000; bootm ${loadaddr}\0" \
|
||||
"loadimage=fatload mmc 0 ${loadaddr} uImage\0" \
|
||||
"loadbootscr=fatload mmc 0 ${bootscraddr} boot.scr\0" \
|
||||
"bootscript=source ${bootscraddr}\0" \
|
||||
--
|
||||
2.7.4
|
||||
|
||||
14
buildroot/board/lego/ev3/post-image.sh
Executable file
14
buildroot/board/lego/ev3/post-image.sh
Executable file
@@ -0,0 +1,14 @@
|
||||
#!/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}"
|
||||
82
buildroot/board/lego/ev3/readme.txt
Normal file
82
buildroot/board/lego/ev3/readme.txt
Normal file
@@ -0,0 +1,82 @@
|
||||
Lego Mindstorms EV3
|
||||
|
||||
Intro
|
||||
=====
|
||||
|
||||
This is the buildroot basic board support for the Lego Mindstorms EV3
|
||||
programmable brick.
|
||||
|
||||
The Lego Mindstorms EV3 brick comprises a Texas Instruments AM1808 SoC, with
|
||||
an ARM 926EJ-S main processor running at 300 MHz.
|
||||
See:
|
||||
- https://en.wikipedia.org/wiki/Lego_Mindstorms_EV3
|
||||
- http://www.lego.com/en-us/mindstorms/products/ev3/31313-mindstorms-ev3/
|
||||
- http://www.ti.com/product/am1808
|
||||
|
||||
How it works
|
||||
============
|
||||
|
||||
Boot process :
|
||||
--------------
|
||||
|
||||
The EV3 boots from an EEPROM. This loads whatever is on the built-in 16MB flash
|
||||
(usually U-Boot) and runs it. The U-Boot from the official LEGO firmware and
|
||||
mainline U-Boot will attempt to boot a Linux kernel from the external µSD card.
|
||||
It will try to load a uImage (and optional boot.scr) from the first µSD card
|
||||
partition, which must be formatted with a FAT filesystem. If no µSD is found or
|
||||
it does not contain a uImage file, then the EV3 will boot the uImage from the
|
||||
built-in 16MB flash.
|
||||
|
||||
How to build it
|
||||
===============
|
||||
|
||||
Configure Buildroot
|
||||
-------------------
|
||||
|
||||
The lego_ev3_defconfig configuration provides basic support to boot on the Lego
|
||||
Mindstorms EV3 programmable brick:
|
||||
|
||||
$ make lego_ev3_defconfig
|
||||
|
||||
Build everything
|
||||
----------------
|
||||
|
||||
Note: you will need to have access to the network, since Buildroot will
|
||||
download the packages' sources.
|
||||
|
||||
$ make
|
||||
|
||||
Result of the build
|
||||
-------------------
|
||||
|
||||
After building, you should obtain this tree:
|
||||
|
||||
output/images/
|
||||
├── boot.vfat
|
||||
├── flash.bin
|
||||
├── rootfs.ext2
|
||||
├── rootfs.ext3 -> rootfs.ext2
|
||||
├── rootfs.squashfs
|
||||
├── sdcard.img
|
||||
├── u-boot.bin
|
||||
├── uImage -> uImage.da850-lego-ev3
|
||||
└── uImage.da850-lego-ev3
|
||||
|
||||
Installation
|
||||
============
|
||||
|
||||
You can use either flash.bin or the sdcard.img. To load flash.bin, use the
|
||||
official Lego Mindstorms EV3 programming software firmware update tool to load
|
||||
the image. To use sdcard.img, use a disk writing tool such as Etcher or dd to
|
||||
write the image to the µSD card.
|
||||
|
||||
Finish
|
||||
======
|
||||
|
||||
To have a serial console, you will need a proper USB to Lego serial port
|
||||
adapter plugged into the EV3 sensors port 1.
|
||||
See:
|
||||
- http://botbench.com/blog/2013/08/15/ev3-creating-console-cable/
|
||||
- http://botbench.com/blog/2013/08/05/mindsensors-ev3-usb-console-adapter/
|
||||
|
||||
The serial port config to use is 115200/8-N-1.
|
||||
Reference in New Issue
Block a user