mirror of
https://github.com/PartialVolume/shredos.x86_64.git
synced 2026-02-20 09:35:26 +00:00
Merge shredos 2021.08.2 onto 2020.05 build - add new files
This commit is contained in:
26
README
Normal file
26
README
Normal file
@@ -0,0 +1,26 @@
|
||||
Buildroot is a simple, efficient and easy-to-use tool to generate embedded
|
||||
Linux systems through cross-compilation.
|
||||
|
||||
The documentation can be found in docs/manual. You can generate a text
|
||||
document with 'make manual-text' and read output/docs/manual/manual.text.
|
||||
Online documentation can be found at http://buildroot.org/docs.html
|
||||
|
||||
To build and use the buildroot stuff, do the following:
|
||||
|
||||
1) run 'make menuconfig'
|
||||
2) select the target architecture and the packages you wish to compile
|
||||
3) run 'make'
|
||||
4) wait while it compiles
|
||||
5) find the kernel, bootloader, root filesystem, etc. in output/images
|
||||
|
||||
You do not need to be root to build or run buildroot. Have fun!
|
||||
|
||||
Buildroot comes with a basic configuration for a number of boards. Run
|
||||
'make list-defconfigs' to view the list of provided configurations.
|
||||
|
||||
Please feed suggestions, bug reports, insults, and bribes back to the
|
||||
buildroot mailing list: buildroot@buildroot.org
|
||||
You can also find us on #buildroot on OFTC IRC.
|
||||
|
||||
If you would like to contribute patches, please read
|
||||
https://buildroot.org/manual.html#submitting-patches
|
||||
29
arch/Config.in.s390x
Normal file
29
arch/Config.in.s390x
Normal file
@@ -0,0 +1,29 @@
|
||||
choice
|
||||
prompt "Target Architecture Variant"
|
||||
help
|
||||
Specific CPU variant to use
|
||||
|
||||
config BR2_s390x_z13
|
||||
bool "z13"
|
||||
|
||||
config BR2_s390x_z14
|
||||
bool "z14"
|
||||
|
||||
config BR2_s390x_z15
|
||||
bool "z15"
|
||||
|
||||
endchoice
|
||||
|
||||
config BR2_ARCH
|
||||
default "s390x" if BR2_s390x
|
||||
|
||||
config BR2_ENDIAN
|
||||
default "BIG"
|
||||
|
||||
config BR2_GCC_TARGET_ARCH
|
||||
default "arch11" if BR2_s390x_z13
|
||||
default "arch12" if BR2_s390x_z14
|
||||
default "arch13" if BR2_s390x_z15
|
||||
|
||||
config BR2_READELF_ARCH_NAME
|
||||
default "IBM S/390" if BR2_s390x
|
||||
301
board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts
Normal file
301
board/acmesystems/acqua-a5/at91-sama5d3_acqua.dts
Normal file
@@ -0,0 +1,301 @@
|
||||
/*
|
||||
* acme-acqua.dts - Device Tree file for Acqua A5 Board
|
||||
*
|
||||
* Copyright (C) 2014 Atmel,
|
||||
* 2014 Nicolas Ferre <nicolas.ferre@atmel.com>
|
||||
*
|
||||
* 2020 Sergio Tanzilli <tanzilli@acmesystems.it>
|
||||
*
|
||||
* Licensed under GPLv2 or later.
|
||||
*/
|
||||
/dts-v1/;
|
||||
#include "sama5d31.dtsi"
|
||||
|
||||
/ {
|
||||
model = "Acme Systems Acqua SOM";
|
||||
compatible = "acme,acqua", "atmel,sama5d3", "atmel,sama5";
|
||||
|
||||
chosen {
|
||||
stdout-path = "serial0:115200n8";
|
||||
bootargs = "mem=256M console=ttyS0,115200 root=/dev/mmcblk0p2 rootfstype=ext4 rw rootwait consoleblank=0";
|
||||
};
|
||||
|
||||
memory {
|
||||
reg = <0x20000000 0x10000000>;
|
||||
};
|
||||
|
||||
clocks {
|
||||
slow_xtal {
|
||||
clock-frequency = <32768>;
|
||||
};
|
||||
|
||||
main_xtal {
|
||||
clock-frequency = <12000000>;
|
||||
};
|
||||
};
|
||||
|
||||
ahb {
|
||||
apb {
|
||||
hlcdc: hlcdc@f0030000 {
|
||||
status = "disabled";
|
||||
hlcdc-display-controller {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_lcd_base &pinctrl_lcd_rgb888_alt>;
|
||||
port@0 {
|
||||
hlcdc_panel_output: endpoint@0 {
|
||||
remote-endpoint = <&panel_input>;
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
/* MicroSD mounted on the SOM */
|
||||
|
||||
mmc0: mmc@f0000000 {
|
||||
pinctrl-0 = <&pinctrl_mmc0_clk_cmd_dat0 &pinctrl_mmc0_dat1_3 &pinctrl_mmc0_cd>;
|
||||
status = "okay";
|
||||
slot@0 {
|
||||
reg = <0>;
|
||||
bus-width = <4>;
|
||||
};
|
||||
};
|
||||
|
||||
/* Optional MicroSD to mount on the carrier board */
|
||||
|
||||
mmc1: mmc@f8000000 {
|
||||
pinctrl-0 = <&pinctrl_mmc1_clk_cmd_dat0 &pinctrl_mmc1_dat1_3 &pinctrl_mmc1_cd>;
|
||||
status = "disabled";
|
||||
slot@0 {
|
||||
reg = <0>;
|
||||
bus-width = <4>;
|
||||
cd-gpios = <&pioE 1 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
|
||||
spi0: spi@f0004000 {
|
||||
cs-gpios = <&pioD 13 0>, <0>, <0>, <&pioD 16 0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
can0: can@f000c000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
tcb0: timer@f0010000 {
|
||||
timer0: timer@0 {
|
||||
compatible = "atmel,tcb-timer";
|
||||
reg = <0>;
|
||||
};
|
||||
|
||||
timer1: timer@1 {
|
||||
compatible = "atmel,tcb-timer";
|
||||
reg = <1>;
|
||||
};
|
||||
};
|
||||
|
||||
i2c0: i2c@f0014000 {
|
||||
pinctrl-0 = <&pinctrl_i2c0_pu>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c1: i2c@f0018000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
macb1: ethernet@f802c000 {
|
||||
compatible = "atmel,sama5d3-macb", "cdns,at91sam9260-macb", "cdns,macb";
|
||||
|
||||
status = "okay";
|
||||
phy-mode = "rmii";
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
nvmem-cells = <ð0_addr>;
|
||||
nvmem-cell-names = "mac-address";
|
||||
|
||||
phy0: ethernet-phy@1 {
|
||||
interrupt-parent = <&pioE>;
|
||||
interrupts = <30 IRQ_TYPE_EDGE_FALLING>;
|
||||
reg = <1>;
|
||||
};
|
||||
|
||||
/*ethernet-phy@1 {
|
||||
reg = <0x1>;
|
||||
};*/
|
||||
};
|
||||
|
||||
/* Bit banging internal I2C to manage the AT24MAC402 chip */
|
||||
|
||||
i2c3@ {
|
||||
compatible = "i2c-gpio";
|
||||
gpios = <&pioE 1 0 /* SDA */
|
||||
&pioE 2 0 /* SCK */
|
||||
>;
|
||||
i2c-gpio,delay-us = <4>; /* ~178 kHz */
|
||||
#address-cells = <1>;
|
||||
#size-cells = <0>;
|
||||
|
||||
/* EEPROM contains the eth0 MAC address */
|
||||
|
||||
eeprom@58 {
|
||||
compatible = "atmel,24mac402";
|
||||
pagesize = <256>;
|
||||
read-only;
|
||||
reg = <0x58>;
|
||||
#address-cells = <1>;
|
||||
#size-cells = <1>;
|
||||
|
||||
eth0_addr: eth-mac-addr@9A {
|
||||
reg = <0x0 0x06>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
pwm0: pwm@f002c000 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&pinctrl_pwm0_pwmh0_0 &pinctrl_pwm0_pwmh1_0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
usart0: serial@f001c000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usart1: serial@f0020000 {
|
||||
pinctrl-0 = <&pinctrl_usart1 &pinctrl_usart1_rts_cts>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
uart0: serial@f0024000 {
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
spi1: spi@f8008000 {
|
||||
cs-gpios = <&pioC 25 0>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
adc0: adc@f8018000 {
|
||||
atmel,adc-vref = <3300>;
|
||||
atmel,adc-channels-used = <0xfe>;
|
||||
pinctrl-0 = <
|
||||
&pinctrl_adc0_adtrg
|
||||
&pinctrl_adc0_ad1
|
||||
&pinctrl_adc0_ad2
|
||||
&pinctrl_adc0_ad3
|
||||
&pinctrl_adc0_ad4
|
||||
&pinctrl_adc0_ad5
|
||||
&pinctrl_adc0_ad6
|
||||
&pinctrl_adc0_ad7
|
||||
>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
i2c2: i2c@f801c000 {
|
||||
dmas = <0>, <0>; /* Do not use DMA for i2c2 */
|
||||
pinctrl-0 = <&pinctrl_i2c2_pu>;
|
||||
status = "disabled";
|
||||
};
|
||||
|
||||
|
||||
dbgu: serial@ffffee00 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
pinctrl@fffff200 {
|
||||
board {
|
||||
pinctrl_i2c0_pu: i2c0_pu {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 30 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>,
|
||||
<AT91_PIOA 31 AT91_PERIPH_A AT91_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
pinctrl_i2c2_pu: i2c2_pu {
|
||||
atmel,pins =
|
||||
<AT91_PIOA 18 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>,
|
||||
<AT91_PIOA 19 AT91_PERIPH_B AT91_PINCTRL_PULL_UP>;
|
||||
};
|
||||
|
||||
pinctrl_key_gpio: key_gpio_0 {
|
||||
atmel,pins =
|
||||
<AT91_PIOE 29 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
|
||||
};
|
||||
|
||||
pinctrl_mmc0_cd: mmc0_cd {
|
||||
atmel,pins =
|
||||
<AT91_PIOE 0 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
|
||||
};
|
||||
|
||||
pinctrl_mmc1_cd: mmc1_cd {
|
||||
atmel,pins =
|
||||
<AT91_PIOE 1 AT91_PERIPH_GPIO AT91_PINCTRL_PULL_UP_DEGLITCH>;
|
||||
};
|
||||
|
||||
pinctrl_usba_vbus: usba_vbus {
|
||||
atmel,pins =
|
||||
<AT91_PIOE 9 AT91_PERIPH_GPIO AT91_PINCTRL_DEGLITCH>; /* PE9, conflicts with A9 */
|
||||
};
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
usb0: gadget@500000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb1: ohci@600000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
usb2: ehci@700000 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
|
||||
panel: panel {
|
||||
/* compatible = "acme,43inch", "simple-panel"; */
|
||||
compatible = "acme,50inch", "simple-panel";
|
||||
/* compatible = "acme,70inch", "simple-panel"; */
|
||||
|
||||
status = "disable";
|
||||
|
||||
port@0 {
|
||||
panel_input: endpoint@0 {
|
||||
remote-endpoint = <&hlcdc_panel_output>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
|
||||
leds {
|
||||
compatible = "gpio-leds";
|
||||
|
||||
led0 {
|
||||
label = "led0";
|
||||
gpios = <&pioE 3 GPIO_ACTIVE_LOW>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led1 {
|
||||
label = "led1";
|
||||
gpios = <&pioE 4 GPIO_ACTIVE_LOW>;
|
||||
default-state = "off";
|
||||
};
|
||||
|
||||
led2 {
|
||||
label = "led2";
|
||||
gpios = <&pioE 5 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
|
||||
led3 {
|
||||
label = "led3";
|
||||
gpios = <&pioE 6 GPIO_ACTIVE_LOW>;
|
||||
linux,default-trigger = "mmc0";
|
||||
default-state = "off";
|
||||
};
|
||||
};
|
||||
};
|
||||
28
board/acmesystems/acqua-a5/genimage.cfg
Normal file
28
board/acmesystems/acqua-a5/genimage.cfg
Normal file
@@ -0,0 +1,28 @@
|
||||
# Minimal SD card image for the Acme Systems Acqua A5
|
||||
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"boot.bin",
|
||||
"zImage",
|
||||
"at91-sama5d3_acqua.dtb"
|
||||
}
|
||||
}
|
||||
size = 16M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
44
board/acmesystems/acqua-a5/readme.txt
Normal file
44
board/acmesystems/acqua-a5/readme.txt
Normal file
@@ -0,0 +1,44 @@
|
||||
Acme Systems Acqua A5
|
||||
|
||||
Intro
|
||||
=====
|
||||
|
||||
The Acqua A5 is a system on module based on the Microchip SAMA5D31 SoC:
|
||||
|
||||
https://www.acmesystems.it/acqua
|
||||
|
||||
The files here support configurations that build a microSD image for a
|
||||
minimal system that can be accessed through the serial console. You will
|
||||
need an USB-to-serial interface in order to access that console from
|
||||
your computer:
|
||||
|
||||
https://www.acmesystems.it/DPI
|
||||
|
||||
How to build the image
|
||||
======================
|
||||
|
||||
If you have an Acqua module with 256 MiB of RAM, type:
|
||||
|
||||
$ make acmesystems_acqua_a5_256mb_defconfig
|
||||
|
||||
If you have the 512 MiB version, type instead:
|
||||
|
||||
$ make acmesystems_acqua_a5_512mb_defconfig
|
||||
|
||||
You can optionally tweak the configuration and add packages by typing:
|
||||
|
||||
$ make menuconfig
|
||||
|
||||
Then, proceed with the build:
|
||||
|
||||
$ make
|
||||
|
||||
How to write the microSD card
|
||||
=============================
|
||||
|
||||
The system image is the file "sdcard.img" in the "output/images"
|
||||
directory. Write it to the card by invoking:
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX bs=1M
|
||||
|
||||
where `sdX' is the block device representing the microSD card.
|
||||
5
board/arcturus/aarch64-ucls1012a/post-build.sh
Executable file
5
board/arcturus/aarch64-ucls1012a/post-build.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p ${TARGET_DIR}/lib/firmware
|
||||
cp -f ${BUILD_DIR}/linux-custom/firmware/ppfe/* ${TARGET_DIR}/lib/firmware/
|
||||
cp -f ${BUILD_DIR}/linux-custom/br2-ucls1012a.its ${BINARIES_DIR}/
|
||||
@@ -0,0 +1,4 @@
|
||||
label stm32mp157c-dk2-buildroot
|
||||
kernel /boot/zImage
|
||||
devicetree /boot/stm32mp157a-dhcor-avenger96.dtb
|
||||
append root=/dev/mmcblk1p4 rootwait
|
||||
41
board/arrow/avenger96/readme.txt
Normal file
41
board/arrow/avenger96/readme.txt
Normal file
@@ -0,0 +1,41 @@
|
||||
Arrow Avenger96
|
||||
|
||||
Intro
|
||||
=====
|
||||
|
||||
This configuration supports the Arrow Avenger96 board:
|
||||
|
||||
https://wiki.dh-electronics.com/index.php/Avenger96
|
||||
|
||||
How to build
|
||||
============
|
||||
|
||||
$ make avenger96_defconfig
|
||||
$ make
|
||||
|
||||
How to write the microSD card
|
||||
=============================
|
||||
|
||||
WARNING! This will destroy all the card content. Use with care!
|
||||
|
||||
Once the build process is finished you will have an image called
|
||||
"sdcard.img" in the output/images/ directory.
|
||||
|
||||
Copy the bootable "sdcard.img" onto an microSD card with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
|
||||
Boot the board
|
||||
==============
|
||||
|
||||
(1) Configure the boot switches for boot from microsd: 1-0-1
|
||||
|
||||
(2) Insert the microSD card in the slot
|
||||
|
||||
(3) Plug a serial adapter (beware: 1v8 levels!) to the low speed
|
||||
expansion connector
|
||||
|
||||
(4) Plug in power cable
|
||||
|
||||
(5) The system will start, with the console on UART, but also visible
|
||||
on the screen.
|
||||
31
board/atmel/sama5d27_wlsom1_ek_mmc/genimage.cfg
Normal file
31
board/atmel/sama5d27_wlsom1_ek_mmc/genimage.cfg
Normal file
@@ -0,0 +1,31 @@
|
||||
# Image for SD card boot on Microchip SAMA5D27 WLSOM1 EK
|
||||
#
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"at91-sama5d27_wlsom1_ek.dtb",
|
||||
"boot.bin",
|
||||
"u-boot.bin"
|
||||
}
|
||||
}
|
||||
size = 16M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 1M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
||||
7
board/bananapi/bananapi-m2-zero/boot.cmd
Normal file
7
board/bananapi/bananapi-m2-zero/boot.cmd
Normal file
@@ -0,0 +1,7 @@
|
||||
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
|
||||
|
||||
mmc dev 0
|
||||
fatload mmc 0 $kernel_addr_r zImage
|
||||
fatload mmc 0 $fdt_addr_r sun8i-h2-plus-bananapi-m2-zero.dtb
|
||||
|
||||
bootz $kernel_addr_r - $fdt_addr_r
|
||||
33
board/bananapi/bananapi-m2-zero/genimage.cfg
Normal file
33
board/bananapi/bananapi-m2-zero/genimage.cfg
Normal file
@@ -0,0 +1,33 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"sun8i-h2-plus-bananapi-m2-zero.dtb",
|
||||
"boot.scr"
|
||||
}
|
||||
}
|
||||
size = 64M
|
||||
}
|
||||
|
||||
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 boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
34
board/bananapi/bananapi-m2-zero/readme.txt
Normal file
34
board/bananapi/bananapi-m2-zero/readme.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
Intro
|
||||
=====
|
||||
|
||||
This default configuration will allow you to start experimenting with the
|
||||
Buildroot environment for the Bananapi M2 Zero. With the current configuration
|
||||
it will bring-up the board, and allow access through the serial console.
|
||||
|
||||
Bananapi M2 Zero link:
|
||||
http://www.banana-pi.org/m2z.html
|
||||
|
||||
This configuration uses U-Boot mainline and kernel mainline.
|
||||
|
||||
How to build
|
||||
============
|
||||
|
||||
$ make bananapi_m2_zero_defconfig
|
||||
$ make
|
||||
|
||||
Note: you will need access to the internet to download the required
|
||||
sources.
|
||||
|
||||
How to write the SD card
|
||||
========================
|
||||
|
||||
Once the build process is finished you will have an image called "sdcard.img"
|
||||
in the output/images/ directory.
|
||||
|
||||
Copy the bootable "sdcard.img" onto an SD card with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
$ sync
|
||||
|
||||
Insert the micro SDcard in your Bananapi M2 Zero and power it up. The console
|
||||
is on the Debug UART on the CON3 header, with serial settings 115200 8N1.
|
||||
15
board/beaglebone/rootfs_overlay/etc/qt5/eglfs_kms_cfg.json
Normal file
15
board/beaglebone/rootfs_overlay/etc/qt5/eglfs_kms_cfg.json
Normal file
@@ -0,0 +1,15 @@
|
||||
{
|
||||
"device": "/dev/dri/card0",
|
||||
"hwcursor": false,
|
||||
"pbuffers": true,
|
||||
"outputs": [
|
||||
{
|
||||
"name": "VGA1",
|
||||
"mode": "off"
|
||||
},
|
||||
{
|
||||
"name": "HDMI1",
|
||||
"mode": "1024x768"
|
||||
}
|
||||
]
|
||||
}
|
||||
4
board/beaglev/extlinux.conf
Normal file
4
board/beaglev/extlinux.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
label linux
|
||||
kernel /boot/Image
|
||||
devicetree /boot/jh7100-beaglev-starlight.dtb
|
||||
append console=ttyS0,115200 earlyprintk root=PARTUUID=0fef845a-c6e1-45bc-82f7-002fa720f958 rootwait
|
||||
12
board/beaglev/genimage.cfg
Normal file
12
board/beaglev/genimage.cfg
Normal file
@@ -0,0 +1,12 @@
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
gpt = true
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type-uuid = 72ec70a6-cf74-40e6-bd49-4bda08e8f224
|
||||
partition-uuid = 0fef845a-c6e1-45bc-82f7-002fa720f958
|
||||
bootable = "true"
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
11
board/beaglev/post-build.sh
Executable file
11
board/beaglev/post-build.sh
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/sh
|
||||
BOARD_DIR=$(dirname $0)
|
||||
|
||||
# Bring the extlinux.conf file in.
|
||||
install -D -m 0644 ${BOARD_DIR}/extlinux.conf \
|
||||
${TARGET_DIR}/boot/extlinux/extlinux.conf
|
||||
|
||||
# To be reflashed through Xmodem, the bootloader needs to be prepended
|
||||
# with a 4-byte header that contains the total size of the file.
|
||||
perl -e 'print pack("l", (stat @ARGV[0])[7])' ${BINARIES_DIR}/fw_payload.bin > ${BINARIES_DIR}/fw_payload.bin.out
|
||||
cat ${BINARIES_DIR}/fw_payload.bin >> ${BINARIES_DIR}/fw_payload.bin.out
|
||||
124
board/beaglev/readme.txt
Normal file
124
board/beaglev/readme.txt
Normal file
@@ -0,0 +1,124 @@
|
||||
BeagleV
|
||||
=======
|
||||
|
||||
BeagleV is a low-cost RISC-V 64-bit based platform, powered by a
|
||||
Starfive JH7100 processor. The current defconfig in Buildroot has been
|
||||
tested with the JH7100 chip used on the beta version of the BeagleV
|
||||
board.
|
||||
|
||||
How to build
|
||||
============
|
||||
|
||||
$ make beaglev_defconfig
|
||||
$ make
|
||||
|
||||
Build results
|
||||
=============
|
||||
|
||||
After building, output/images contains:
|
||||
|
||||
+ bootloader-BEAGLEV-buildroot.bin.out
|
||||
+ ddrinit-2133-buildroot.bin.out
|
||||
+ Image
|
||||
+ fw_payload.bin
|
||||
+ fw_payload.bin.out
|
||||
+ fw_payload.elf
|
||||
+ rootfs.ext2
|
||||
+ rootfs.ext4
|
||||
+ sdcard.img
|
||||
+ u-boot.bin
|
||||
|
||||
The four important files are:
|
||||
|
||||
- bootloader-BEAGLEV-buildroot.bin.out, the first stage bootloader
|
||||
|
||||
- ddrinit-2133-buildroot.bin.out, the DDR initialization firmware
|
||||
|
||||
- fw_payload.bin.out, which is the bootloader image, containing
|
||||
both OpenSBI and U-Boot.
|
||||
|
||||
- sdcard.img, the SD card image, which contains the root filesystem,
|
||||
kernel image and Device Tree.
|
||||
|
||||
Flashing the SD card image
|
||||
==========================
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
|
||||
Preparing the board
|
||||
===================
|
||||
|
||||
Connect the Beagle-V fan to the 5V supply (pin 2 or 4 of the GPIO
|
||||
connector) and GND (pin 6 of the GPIO connector).
|
||||
|
||||
Connect a TTL UART cable to pin 8 (TX), 10 (RX) and 14 (GND).
|
||||
|
||||
Insert your SD card.
|
||||
|
||||
Power-up the board using an USB-C cable.
|
||||
|
||||
Flashing OpenSBI/U-Boot
|
||||
=======================
|
||||
|
||||
The bootloader pre-flashed on the Beagle-V has a non-working
|
||||
fdt_addr_r environment variable value, so it won't work
|
||||
as-is. Reflashing the bootloader with the bootloader image produced by
|
||||
Buildroot is necessary.
|
||||
|
||||
When the board starts up, a pre-loader shows a count down of 2
|
||||
seconds, interrupt by pressing any key. You should reach a menu like
|
||||
this:
|
||||
|
||||
--------8<----------
|
||||
|
||||
bootloader version:210209-4547a8d
|
||||
ddr 0x00000000, 1M test
|
||||
ddr 0x00100000, 2M test
|
||||
DDR clk 2133M,Version: 210302-5aea32f
|
||||
0
|
||||
***************************************************
|
||||
*************** FLASH PROGRAMMING *****************
|
||||
***************************************************
|
||||
|
||||
0:update uboot
|
||||
1:quit
|
||||
select the function:
|
||||
|
||||
--------8<----------
|
||||
|
||||
Press 0 and Enter. You will now see "C" characters being
|
||||
displayed. Ask your serial port communication program to send
|
||||
fw_payload.bin.out using the Xmodem protocol.
|
||||
|
||||
After reflashing is complete, restart the board, it will automatically
|
||||
start the system from the SD card, and reach the login prompt.
|
||||
|
||||
Flashing low-level bootloaders
|
||||
==============================
|
||||
|
||||
The BeagleV comes pre-flashed with functional low-level bootloaders
|
||||
(called "secondboot" and "ddrinit"). Re-flashing them is not necessary
|
||||
to use this Buildroot defconfig. However, for the sake of
|
||||
completeness, Buildroot builds and provides those low-level bootloader
|
||||
images.
|
||||
|
||||
You can flash them as follows:
|
||||
|
||||
- In the same "pre-loader" menu as the one used above, instead of
|
||||
entering 0 or 1, enter the magic "root@s5t" string. This enters the
|
||||
"expert" features.
|
||||
|
||||
- Then, press 0 and send over X-modem the
|
||||
bootloader-BEAGLEV-buildroot.bin.out file.
|
||||
|
||||
- Then, press 1 and send over X-modem the
|
||||
ddrinit-2133-buildroot.bin.out.
|
||||
|
||||
Note that the reflashing mechanism itself relies on those low-level
|
||||
bootloaders, so if you flash non-working versions, you'll have to go
|
||||
through a recovery process. This requires wiring up to a separate
|
||||
debug UART, which pins are located near the HDMI connector. See
|
||||
https://wiki.seeedstudio.com/BeagleV-Update-bootloader-ddr-init-boot-uboot-Recover-bootloader/
|
||||
section "Recover the bootloader" for more details. The instructions
|
||||
make use of a jh7100-recover tool, which Buildroot has built as part
|
||||
of this defconfig: it is available as output/host/bin/jh7100-recover.
|
||||
1
board/chromebook/elm/kernel.args
Normal file
1
board/chromebook/elm/kernel.args
Normal file
@@ -0,0 +1 @@
|
||||
root=PARTUUID=%U/PARTNROFF=1 rootwait rw noinitrd kern_guid=%U console=tty0
|
||||
38
board/chromebook/elm/kernel.its
Normal file
38
board/chromebook/elm/kernel.its
Normal file
@@ -0,0 +1,38 @@
|
||||
/dts-v1/;
|
||||
|
||||
/ {
|
||||
description = "Chrome OS kernel image with FDT";
|
||||
#address-cells = <1>;
|
||||
|
||||
images {
|
||||
kernel-1 {
|
||||
data = /incbin/("Image");
|
||||
type = "kernel_noload";
|
||||
arch = "arm64";
|
||||
os = "linux";
|
||||
compression = "none";
|
||||
load = <0>;
|
||||
entry = <0>;
|
||||
};
|
||||
|
||||
fdt-1 {
|
||||
description = "mt8173-elm.dtb";
|
||||
data = /incbin/("mt8173-elm.dtb");
|
||||
type = "flat_dt";
|
||||
arch = "arm64";
|
||||
compression = "none";
|
||||
|
||||
hash-1 {
|
||||
algo = "sha1";
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
configurations {
|
||||
default = "conf-1";
|
||||
conf-1 {
|
||||
kernel = "kernel-1";
|
||||
fdt = "fdt-1";
|
||||
};
|
||||
};
|
||||
};
|
||||
477
board/chromebook/elm/linux.config
Normal file
477
board/chromebook/elm/linux.config
Normal file
@@ -0,0 +1,477 @@
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_IRQ_TIME_ACCOUNTING=y
|
||||
CONFIG_BSD_PROCESS_ACCT=y
|
||||
CONFIG_BSD_PROCESS_ACCT_V3=y
|
||||
CONFIG_IKCONFIG=y
|
||||
CONFIG_IKCONFIG_PROC=y
|
||||
CONFIG_NUMA_BALANCING=y
|
||||
CONFIG_MEMCG=y
|
||||
CONFIG_BLK_CGROUP=y
|
||||
CONFIG_CGROUP_PIDS=y
|
||||
CONFIG_CGROUP_HUGETLB=y
|
||||
CONFIG_CPUSETS=y
|
||||
CONFIG_CGROUP_DEVICE=y
|
||||
CONFIG_CGROUP_CPUACCT=y
|
||||
CONFIG_CGROUP_PERF=y
|
||||
CONFIG_USER_NS=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_RELAY=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_KALLSYMS_ALL=y
|
||||
# CONFIG_COMPAT_BRK is not set
|
||||
CONFIG_SLAB=y
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_ARCH_MEDIATEK=y
|
||||
CONFIG_ARM64_VA_BITS_48=y
|
||||
CONFIG_SCHED_MC=y
|
||||
CONFIG_SCHED_SMT=y
|
||||
CONFIG_NR_CPUS=4
|
||||
CONFIG_NUMA=y
|
||||
CONFIG_PARAVIRT=y
|
||||
CONFIG_CRASH_DUMP=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_RANDOMIZE_BASE=y
|
||||
# CONFIG_EFI is not set
|
||||
# CONFIG_SUSPEND is not set
|
||||
CONFIG_PM=y
|
||||
CONFIG_PM_DEBUG=y
|
||||
CONFIG_PM_ADVANCED_DEBUG=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_ARM_CPUIDLE=y
|
||||
CONFIG_ARM_PSCI_CPUIDLE=y
|
||||
CONFIG_CPU_FREQ=y
|
||||
CONFIG_CPU_FREQ_STAT=y
|
||||
CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
|
||||
CONFIG_CPU_FREQ_GOV_POWERSAVE=y
|
||||
CONFIG_CPU_FREQ_GOV_USERSPACE=y
|
||||
CONFIG_CPU_FREQ_GOV_ONDEMAND=y
|
||||
CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
|
||||
CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
|
||||
CONFIG_CPUFREQ_DT=y
|
||||
CONFIG_ARM_SCPI_CPUFREQ=y
|
||||
CONFIG_ARM_MEDIATEK_CPUFREQ=y
|
||||
CONFIG_ARM_SCPI_PROTOCOL=y
|
||||
CONFIG_JUMP_LABEL=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
# CONFIG_BLK_DEBUG_FS is not set
|
||||
# CONFIG_MQ_IOSCHED_KYBER is not set
|
||||
# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
|
||||
CONFIG_KSM=y
|
||||
CONFIG_MEMORY_FAILURE=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_UNIX_DIAG=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_INET_UDP_DIAG=y
|
||||
# CONFIG_IPV6 is not set
|
||||
CONFIG_CFG80211=y
|
||||
# CONFIG_CFG80211_DEFAULT_PS is not set
|
||||
CONFIG_MAC80211=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_FW_LOADER_USER_HELPER=y
|
||||
CONFIG_FW_LOADER_USER_HELPER_FALLBACK=y
|
||||
CONFIG_BRCMSTB_GISB_ARB=y
|
||||
CONFIG_VEXPRESS_CONFIG=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_MTD_CFI=y
|
||||
CONFIG_MTD_CFI_ADV_OPTIONS=y
|
||||
CONFIG_MTD_CFI_INTELEXT=y
|
||||
CONFIG_MTD_CFI_AMDSTD=y
|
||||
CONFIG_MTD_CFI_STAA=y
|
||||
CONFIG_MTD_PHYSMAP=y
|
||||
CONFIG_MTD_PHYSMAP_OF=y
|
||||
CONFIG_MTD_DATAFLASH=y
|
||||
CONFIG_MTD_SST25L=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_NAND_DENALI_DT=y
|
||||
CONFIG_MTD_SPI_NOR=y
|
||||
CONFIG_OF_OVERLAY=y
|
||||
# CONFIG_BLK_DEV is not set
|
||||
CONFIG_SRAM=y
|
||||
CONFIG_EEPROM_AT24=m
|
||||
CONFIG_EEPROM_AT25=m
|
||||
CONFIG_RAID_ATTRS=m
|
||||
CONFIG_SCSI=y
|
||||
# CONFIG_SCSI_PROC_FS is not set
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_SCSI_SAS_LIBSAS=y
|
||||
CONFIG_SCSI_UFSHCD=y
|
||||
CONFIG_SCSI_UFSHCD_PLATFORM=y
|
||||
CONFIG_MD=y
|
||||
CONFIG_BLK_DEV_MD=m
|
||||
CONFIG_BLK_DEV_DM=m
|
||||
CONFIG_DM_MIRROR=m
|
||||
CONFIG_DM_ZERO=m
|
||||
CONFIG_NETDEVICES=y
|
||||
# CONFIG_ETHERNET is not set
|
||||
CONFIG_PHYLIB=y
|
||||
CONFIG_USB_CATC=m
|
||||
CONFIG_USB_KAWETH=m
|
||||
CONFIG_USB_PEGASUS=m
|
||||
CONFIG_USB_RTL8150=m
|
||||
CONFIG_USB_RTL8152=m
|
||||
CONFIG_USB_LAN78XX=m
|
||||
CONFIG_USB_USBNET=m
|
||||
CONFIG_USB_NET_CDC_EEM=m
|
||||
CONFIG_USB_NET_HUAWEI_CDC_NCM=m
|
||||
CONFIG_USB_NET_CDC_MBIM=m
|
||||
CONFIG_USB_NET_DM9601=m
|
||||
CONFIG_USB_NET_SR9700=m
|
||||
CONFIG_USB_NET_SR9800=m
|
||||
CONFIG_USB_NET_SMSC75XX=m
|
||||
CONFIG_USB_NET_SMSC95XX=m
|
||||
CONFIG_USB_NET_GL620A=m
|
||||
CONFIG_USB_NET_PLUSB=m
|
||||
CONFIG_USB_NET_MCS7830=m
|
||||
CONFIG_USB_NET_RNDIS_HOST=m
|
||||
CONFIG_USB_ALI_M5632=y
|
||||
CONFIG_USB_AN2720=y
|
||||
CONFIG_USB_EPSON2888=y
|
||||
CONFIG_USB_KC2190=y
|
||||
CONFIG_USB_NET_CX82310_ETH=m
|
||||
CONFIG_USB_NET_KALMIA=m
|
||||
CONFIG_USB_NET_QMI_WWAN=m
|
||||
CONFIG_USB_NET_INT51X1=m
|
||||
CONFIG_USB_IPHETH=m
|
||||
CONFIG_USB_SIERRA_NET=m
|
||||
CONFIG_USB_VL600=m
|
||||
CONFIG_USB_NET_CH9200=m
|
||||
CONFIG_USB_NET_AQC111=m
|
||||
# CONFIG_WLAN_VENDOR_ADMTEK is not set
|
||||
# CONFIG_WLAN_VENDOR_ATH is not set
|
||||
# CONFIG_WLAN_VENDOR_ATMEL is not set
|
||||
# CONFIG_WLAN_VENDOR_BROADCOM is not set
|
||||
# CONFIG_WLAN_VENDOR_CISCO is not set
|
||||
# CONFIG_WLAN_VENDOR_INTEL is not set
|
||||
# CONFIG_WLAN_VENDOR_INTERSIL is not set
|
||||
CONFIG_MWIFIEX=m
|
||||
CONFIG_MWIFIEX_SDIO=m
|
||||
# CONFIG_WLAN_VENDOR_MEDIATEK is not set
|
||||
# CONFIG_WLAN_VENDOR_RALINK is not set
|
||||
# CONFIG_WLAN_VENDOR_REALTEK is not set
|
||||
# CONFIG_WLAN_VENDOR_RSI is not set
|
||||
# CONFIG_WLAN_VENDOR_ST is not set
|
||||
# CONFIG_WLAN_VENDOR_TI is not set
|
||||
# CONFIG_WLAN_VENDOR_ZYDAS is not set
|
||||
# CONFIG_WLAN_VENDOR_QUANTENNA is not set
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_KEYBOARD_ADC=m
|
||||
CONFIG_KEYBOARD_GPIO=y
|
||||
CONFIG_KEYBOARD_CROS_EC=y
|
||||
CONFIG_MOUSE_ELAN_I2C=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ATMEL_MXT=m
|
||||
CONFIG_TOUCHSCREEN_ELAN=y
|
||||
CONFIG_INPUT_MISC=y
|
||||
# CONFIG_SERIO_SERPORT is not set
|
||||
CONFIG_SERIO_AMBAKMI=y
|
||||
CONFIG_LEGACY_PTY_COUNT=16
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_8250_DW=y
|
||||
CONFIG_SERIAL_8250_MT6577=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_SERIAL_XILINX_PS_UART=y
|
||||
CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
|
||||
CONFIG_SERIAL_FSL_LPUART=y
|
||||
CONFIG_SERIAL_FSL_LPUART_CONSOLE=y
|
||||
CONFIG_SERIAL_FSL_LINFLEXUART=y
|
||||
CONFIG_SERIAL_FSL_LINFLEXUART_CONSOLE=y
|
||||
CONFIG_SERIAL_DEV_BUS=y
|
||||
CONFIG_VIRTIO_CONSOLE=y
|
||||
CONFIG_IPMI_HANDLER=m
|
||||
CONFIG_IPMI_DEVICE_INTERFACE=m
|
||||
CONFIG_IPMI_SI=m
|
||||
CONFIG_TCG_TPM=y
|
||||
CONFIG_TCG_TIS_I2C_INFINEON=y
|
||||
CONFIG_I2C_CHARDEV=y
|
||||
CONFIG_I2C_MUX_PCA954x=y
|
||||
CONFIG_I2C_DESIGNWARE_PLATFORM=y
|
||||
CONFIG_I2C_GPIO=m
|
||||
CONFIG_I2C_MT65XX=y
|
||||
CONFIG_I2C_RK3X=y
|
||||
CONFIG_I2C_SLAVE=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_CADENCE_QUADSPI=y
|
||||
CONFIG_SPI_NXP_FLEXSPI=y
|
||||
CONFIG_SPI_GPIO=y
|
||||
CONFIG_SPI_MT65XX=y
|
||||
CONFIG_SPI_PL022=y
|
||||
CONFIG_SPI_ROCKCHIP=y
|
||||
CONFIG_SPI_SPIDEV=y
|
||||
CONFIG_PINCTRL_SINGLE=y
|
||||
CONFIG_PINCTRL_MAX77620=y
|
||||
CONFIG_GPIO_ALTERA=m
|
||||
CONFIG_GPIO_DWAPB=y
|
||||
CONFIG_GPIO_MB86S7X=y
|
||||
CONFIG_GPIO_PL061=y
|
||||
CONFIG_GPIO_XGENE=y
|
||||
CONFIG_GPIO_MAX732X=y
|
||||
CONFIG_GPIO_PCA953X=y
|
||||
CONFIG_GPIO_PCA953X_IRQ=y
|
||||
CONFIG_GPIO_BD9571MWV=m
|
||||
CONFIG_GPIO_MAX77620=y
|
||||
CONFIG_POWER_RESET_BRCMSTB=y
|
||||
CONFIG_POWER_RESET_XGENE=y
|
||||
CONFIG_POWER_RESET_SYSCON=y
|
||||
CONFIG_SYSCON_REBOOT_MODE=y
|
||||
CONFIG_BATTERY_SBS=m
|
||||
CONFIG_BATTERY_BQ27XXX=y
|
||||
CONFIG_SENSORS_ARM_SCPI=y
|
||||
CONFIG_SENSORS_LM90=m
|
||||
CONFIG_SENSORS_PWM_FAN=m
|
||||
CONFIG_SENSORS_INA2XX=m
|
||||
CONFIG_SENSORS_INA3221=m
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_CPU_THERMAL=y
|
||||
CONFIG_DEVFREQ_THERMAL=y
|
||||
CONFIG_THERMAL_EMULATION=y
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_MEDIATEK_WATCHDOG=y
|
||||
CONFIG_MFD_BD9571MWV=y
|
||||
CONFIG_MFD_AXP20X_I2C=y
|
||||
CONFIG_MFD_HI6421_PMIC=y
|
||||
CONFIG_MFD_MAX77620=y
|
||||
CONFIG_MFD_MT6397=y
|
||||
CONFIG_MFD_RK808=y
|
||||
CONFIG_MFD_SEC_CORE=y
|
||||
CONFIG_MFD_ROHM_BD718XX=y
|
||||
CONFIG_REGULATOR_DEBUG=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_REGULATOR_AXP20X=y
|
||||
CONFIG_REGULATOR_BD718XX=y
|
||||
CONFIG_REGULATOR_BD9571MWV=y
|
||||
CONFIG_REGULATOR_DA9211=y
|
||||
CONFIG_REGULATOR_FAN53555=y
|
||||
CONFIG_REGULATOR_GPIO=y
|
||||
CONFIG_REGULATOR_HI6421V530=y
|
||||
CONFIG_REGULATOR_MAX77620=y
|
||||
CONFIG_REGULATOR_MAX8973=y
|
||||
CONFIG_REGULATOR_MT6397=y
|
||||
CONFIG_REGULATOR_PFUZE100=y
|
||||
CONFIG_REGULATOR_PWM=y
|
||||
CONFIG_REGULATOR_RK808=y
|
||||
CONFIG_REGULATOR_S2MPS11=y
|
||||
CONFIG_REGULATOR_VCTRL=m
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
|
||||
CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
|
||||
CONFIG_MEDIA_SDR_SUPPORT=y
|
||||
CONFIG_VIDEO_V4L2_SUBDEV_API=y
|
||||
CONFIG_MEDIA_USB_SUPPORT=y
|
||||
CONFIG_USB_VIDEO_CLASS=m
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_I2C_CH7006=m
|
||||
CONFIG_DRM_I2C_SIL164=m
|
||||
CONFIG_DRM_I2C_NXP_TDA998X=m
|
||||
CONFIG_DRM_MALI_DISPLAY=m
|
||||
CONFIG_DRM_PANEL_LVDS=m
|
||||
CONFIG_DRM_PANEL_SIMPLE=y
|
||||
CONFIG_DRM_PANEL_TRULY_NT35597_WQXGA=m
|
||||
CONFIG_DRM_DISPLAY_CONNECTOR=y
|
||||
CONFIG_DRM_PARADE_PS8640=y
|
||||
CONFIG_DRM_SII902X=m
|
||||
CONFIG_DRM_THINE_THC63LVD1024=m
|
||||
CONFIG_DRM_TI_SN65DSI86=m
|
||||
CONFIG_DRM_ANALOGIX_ANX78XX=y
|
||||
CONFIG_DRM_I2C_ADV7511=m
|
||||
CONFIG_DRM_MEDIATEK=y
|
||||
CONFIG_DRM_MEDIATEK_HDMI=y
|
||||
CONFIG_FB_MODE_HELPERS=y
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_PWM=y
|
||||
CONFIG_BACKLIGHT_LP855X=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_SOC_MT8173=y
|
||||
CONFIG_SND_SOC_MT8173_RT5650_RT5676=y
|
||||
CONFIG_I2C_HID=m
|
||||
CONFIG_USB_CONN_GPIO=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD_PLATFORM=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_USB_MTU3=y
|
||||
CONFIG_USB_MUSB_HDRC=y
|
||||
CONFIG_USB_DWC3=y
|
||||
CONFIG_USB_DWC2=y
|
||||
CONFIG_USB_CHIPIDEA=y
|
||||
CONFIG_USB_CHIPIDEA_UDC=y
|
||||
CONFIG_USB_CHIPIDEA_HOST=y
|
||||
CONFIG_USB_ISP1760=y
|
||||
CONFIG_USB_SERIAL=y
|
||||
CONFIG_USB_SERIAL_CONSOLE=y
|
||||
CONFIG_USB_SERIAL_PL2303=y
|
||||
CONFIG_USB_HSIC_USB3503=y
|
||||
CONFIG_NOP_USB_XCEIV=y
|
||||
CONFIG_USB_ULPI=y
|
||||
CONFIG_USB_GADGET=y
|
||||
CONFIG_USB_SNP_UDC_PLAT=y
|
||||
CONFIG_USB_BDC_UDC=y
|
||||
CONFIG_USB_ETH=m
|
||||
CONFIG_USB_ETH_EEM=y
|
||||
CONFIG_TYPEC=m
|
||||
CONFIG_TYPEC_TCPM=m
|
||||
CONFIG_TYPEC_FUSB302=m
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_BLOCK_MINORS=32
|
||||
CONFIG_MMC_ARMMMCI=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_OF_ARASAN=y
|
||||
CONFIG_MMC_SDHCI_CADENCE=y
|
||||
CONFIG_MMC_SDHCI_F_SDH30=y
|
||||
CONFIG_MMC_SPI=y
|
||||
CONFIG_MMC_DW=y
|
||||
CONFIG_MMC_DW_EXYNOS=y
|
||||
CONFIG_MMC_DW_HI3798CV200=y
|
||||
CONFIG_MMC_DW_K3=y
|
||||
CONFIG_MMC_MTK=y
|
||||
CONFIG_MMC_SDHCI_XENON=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_PWM=y
|
||||
CONFIG_LEDS_SYSCON=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_TIMER=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_CPU=y
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||
CONFIG_LEDS_TRIGGER_PANIC=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_DS1307=m
|
||||
CONFIG_RTC_DRV_MAX77686=y
|
||||
CONFIG_RTC_DRV_RK808=m
|
||||
CONFIG_RTC_DRV_PCF85363=m
|
||||
CONFIG_RTC_DRV_RX8581=m
|
||||
CONFIG_RTC_DRV_S5M=y
|
||||
CONFIG_RTC_DRV_DS3232=y
|
||||
CONFIG_RTC_DRV_PCF2127=m
|
||||
CONFIG_RTC_DRV_PL031=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_FSL_EDMA=y
|
||||
CONFIG_MV_XOR_V2=y
|
||||
CONFIG_PL330_DMA=y
|
||||
CONFIG_MTK_CQDMA=y
|
||||
CONFIG_QCOM_HIDMA_MGMT=y
|
||||
CONFIG_QCOM_HIDMA=y
|
||||
# CONFIG_VIRTIO_MENU is not set
|
||||
CONFIG_CHROME_PLATFORMS=y
|
||||
CONFIG_CROS_EC=y
|
||||
CONFIG_CROS_EC_I2C=y
|
||||
CONFIG_CROS_EC_SPI=y
|
||||
CONFIG_COMMON_CLK_RK808=y
|
||||
CONFIG_COMMON_CLK_SCPI=y
|
||||
CONFIG_COMMON_CLK_CS2000_CP=y
|
||||
CONFIG_COMMON_CLK_S2MPS11=y
|
||||
CONFIG_COMMON_CLK_XGENE=y
|
||||
CONFIG_COMMON_CLK_PWM=y
|
||||
CONFIG_COMMON_CLK_VC5=y
|
||||
CONFIG_COMMON_CLK_MT6797_MMSYS=y
|
||||
CONFIG_COMMON_CLK_MT6797_IMGSYS=y
|
||||
CONFIG_COMMON_CLK_MT6797_VDECSYS=y
|
||||
CONFIG_COMMON_CLK_MT6797_VENCSYS=y
|
||||
CONFIG_HWSPINLOCK=y
|
||||
CONFIG_ARM_MHU=y
|
||||
CONFIG_PLATFORM_MHU=y
|
||||
CONFIG_ARM_SMMU=y
|
||||
CONFIG_ARM_SMMU_V3=y
|
||||
CONFIG_MTK_IOMMU=y
|
||||
CONFIG_REMOTEPROC=y
|
||||
CONFIG_MTK_CMDQ=y
|
||||
CONFIG_MTK_PMIC_WRAP=y
|
||||
CONFIG_EXTCON_USB_GPIO=y
|
||||
CONFIG_IIO=y
|
||||
CONFIG_MAX9611=m
|
||||
CONFIG_SENSORS_ISL29018=m
|
||||
CONFIG_MPL3115=m
|
||||
CONFIG_PWM=y
|
||||
CONFIG_PWM_MTK_DISP=y
|
||||
CONFIG_PWM_MEDIATEK=y
|
||||
CONFIG_PHY_XGENE=y
|
||||
CONFIG_PHY_FSL_IMX8MQ_USB=y
|
||||
CONFIG_PHY_MTK_TPHY=y
|
||||
CONFIG_PHY_QCOM_USB_HS=y
|
||||
CONFIG_PHY_SAMSUNG_USB2=y
|
||||
CONFIG_EXT2_FS=y
|
||||
CONFIG_EXT3_FS=y
|
||||
CONFIG_EXT4_FS_POSIX_ACL=y
|
||||
CONFIG_FANOTIFY=y
|
||||
CONFIG_FANOTIFY_ACCESS_PERMISSIONS=y
|
||||
CONFIG_QUOTA=y
|
||||
CONFIG_AUTOFS4_FS=y
|
||||
CONFIG_FUSE_FS=m
|
||||
CONFIG_CUSE=m
|
||||
CONFIG_OVERLAY_FS=y
|
||||
CONFIG_OVERLAY_FS_INDEX=y
|
||||
CONFIG_OVERLAY_FS_XINO_AUTO=y
|
||||
CONFIG_OVERLAY_FS_METACOPY=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_HUGETLBFS=y
|
||||
CONFIG_CONFIGFS_FS=y
|
||||
CONFIG_PSTORE=y
|
||||
CONFIG_NFS_FS=m
|
||||
CONFIG_NFS_V3_ACL=y
|
||||
CONFIG_NFS_V4=m
|
||||
CONFIG_NFS_SWAP=y
|
||||
CONFIG_CIFS=m
|
||||
CONFIG_CIFS_STATS2=y
|
||||
CONFIG_CIFS_WEAK_PW_HASH=y
|
||||
CONFIG_NLS_CODEPAGE_437=y
|
||||
CONFIG_NLS_ISO8859_1=y
|
||||
CONFIG_SECURITY=y
|
||||
CONFIG_CRYPTO_CRYPTD=y
|
||||
CONFIG_CRYPTO_DH=m
|
||||
CONFIG_CRYPTO_ECDH=m
|
||||
CONFIG_CRYPTO_SEQIV=y
|
||||
CONFIG_CRYPTO_ECHAINIV=y
|
||||
CONFIG_CRYPTO_CBC=y
|
||||
CONFIG_CRYPTO_ECB=y
|
||||
CONFIG_CRYPTO_XXHASH=m
|
||||
CONFIG_CRYPTO_SHA1=y
|
||||
CONFIG_CRYPTO_SHA3=m
|
||||
CONFIG_CRYPTO_DES=m
|
||||
CONFIG_CRYPTO_ANSI_CPRNG=y
|
||||
CONFIG_CRYPTO_DEV_CCREE=m
|
||||
CONFIG_PACKING=y
|
||||
CONFIG_INDIRECT_PIO=y
|
||||
CONFIG_CRC_CCITT=m
|
||||
CONFIG_CRC_T10DIF=y
|
||||
CONFIG_LIBCRC32C=m
|
||||
CONFIG_DMA_CMA=y
|
||||
CONFIG_CMA_SIZE_MBYTES=32
|
||||
CONFIG_IRQ_POLL=y
|
||||
CONFIG_PRINTK_TIME=y
|
||||
CONFIG_DEBUG_INFO=y
|
||||
CONFIG_MAGIC_SYSRQ=y
|
||||
CONFIG_DEBUG_FS=y
|
||||
CONFIG_DEBUG_KERNEL=y
|
||||
# CONFIG_SCHED_DEBUG is not set
|
||||
# CONFIG_DEBUG_PREEMPT is not set
|
||||
CONFIG_STACKTRACE=y
|
||||
# CONFIG_FTRACE is not set
|
||||
# CONFIG_STRICT_DEVMEM is not set
|
||||
56
board/chromebook/elm/readme.txt
Normal file
56
board/chromebook/elm/readme.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
Mediatek MT8173 aka Chromebook Elm
|
||||
==================================
|
||||
|
||||
This file describes booting the Chromebook from an SD card containing
|
||||
Buildroot kernel and rootfs, using the original bootloader. This is
|
||||
the least invasive way to get Buildroot onto the devices and a good
|
||||
starting point.
|
||||
|
||||
The bootloader will only boot a kernel from a GPT partition marked
|
||||
bootable with cgpt tool from vboot-utils package.
|
||||
The kernel image must be signed using futility from the same package.
|
||||
The signing part is done by sign.sh script in this directory.
|
||||
|
||||
It does not really matter where rootfs is as long as the kernel is able
|
||||
to find it, but this particular configuration assumes the kernel is on
|
||||
partition 1 and rootfs is on partition 2 of the SD card.
|
||||
Make sure to check kernel.args if you change this.
|
||||
|
||||
Making the boot media
|
||||
---------------------
|
||||
Start by configuring and building the images.
|
||||
|
||||
make chromebook_elm_defconfig
|
||||
make menuconfig # if necessary
|
||||
make
|
||||
|
||||
The important files are:
|
||||
|
||||
uImage.kpart (kernel and device tree, signed)
|
||||
rootfs.tar
|
||||
bootsd.img (SD card image containing both kernel and rootfs)
|
||||
|
||||
Write the image directly to some SD card.
|
||||
WARNING: make sure there is nothing important on that card,
|
||||
and double-check the device name!
|
||||
|
||||
SD=/dev/mmcblk1 # may be /dev/sdX on some hosts
|
||||
dd if=output/images/bootsd.img of=$SD
|
||||
|
||||
Switching to developer mode and booting from SD
|
||||
-----------------------------------------------
|
||||
Power Chromebook down, then power it up while holding Esc+F3.
|
||||
BEWARE: switching to developer mode deletes all user data.
|
||||
Create backups if you need them.
|
||||
|
||||
While in developer mode, Chromebook will boot into a white screen saying
|
||||
"OS verification is off".
|
||||
|
||||
Press Ctrl-D at this screen to boot Chromium OS from eMMC.
|
||||
Press Ctrl-U at this screen to boot from SD (or USB)
|
||||
Press Power to power it off.
|
||||
Do NOT press Space unless you mean it.
|
||||
This will switch it back to normal mode.
|
||||
|
||||
The is no way to get rid of the white screen without re-flashing the bootloader.
|
||||
|
||||
41
board/chromebook/elm/sign.sh
Executable file
41
board/chromebook/elm/sign.sh
Executable file
@@ -0,0 +1,41 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This script creates u-boot FIT image containing the kernel and the DT,
|
||||
# then signs it using futility from vboot-utils.
|
||||
# The resulting file is called uImage.kpart.
|
||||
|
||||
BOARD_DIR=$(dirname $0)/${BOARD_NAME}
|
||||
mkimage=$HOST_DIR/bin/mkimage
|
||||
futility=$HOST_DIR/bin/futility
|
||||
devkeys=$HOST_DIR/share/vboot/devkeys
|
||||
|
||||
run() { echo "$@"; "$@"; }
|
||||
die() { echo "$@" >&2; exit 1; }
|
||||
test -f $BINARIES_DIR/Image || \
|
||||
die "No kernel image found"
|
||||
test -x $mkimage || \
|
||||
die "No mkimage found (host-uboot-tools has not been built?)"
|
||||
test -x $futility || \
|
||||
die "No futility found (host-vboot-utils has not been built?)"
|
||||
|
||||
# kernel.its references Image and mt8173-elm.dtb, and all three
|
||||
# files must be in current directory for mkimage.
|
||||
run cp $BOARD_DIR/kernel.its $BINARIES_DIR/kernel.its || exit 1
|
||||
echo "# entering $BINARIES_DIR for the next command"
|
||||
(cd $BINARIES_DIR && run $mkimage -f kernel.its uImage.itb) || exit 1
|
||||
|
||||
# futility requires non-empty file to be supplied with --bootloader
|
||||
# even if it does not make sense for the target platform.
|
||||
echo > $BINARIES_DIR/dummy.txt
|
||||
|
||||
run $futility vbutil_kernel \
|
||||
--keyblock $devkeys/kernel.keyblock \
|
||||
--signprivate $devkeys/kernel_data_key.vbprivk \
|
||||
--arch aarch64 \
|
||||
--version 1 \
|
||||
--config $BOARD_DIR/kernel.args \
|
||||
--vmlinuz $BINARIES_DIR/uImage.itb \
|
||||
--bootloader $BINARIES_DIR/dummy.txt \
|
||||
--pack $BINARIES_DIR/uImage.kpart || exit 1
|
||||
|
||||
rm -f $BINARIES_DIR/kernel.its $BINARIES_DIR/dummy.txt
|
||||
69
board/chromebook/mksd.sh
Executable file
69
board/chromebook/mksd.sh
Executable file
@@ -0,0 +1,69 @@
|
||||
#!/bin/sh
|
||||
|
||||
# This scripts makes a minimal bootable SD card image for the Chromebook.
|
||||
# The resulting file is called bootsd.img. It should be written directly
|
||||
# to the card:
|
||||
#
|
||||
# SD=/dev/mmcblk1 # check your device name!
|
||||
# dd if=output/images/bootsd.img of=$SD
|
||||
#
|
||||
# The partitions are created just large enough to hold the kernel and
|
||||
# the rootfs image. Most of the card will be empty, and the secondary
|
||||
# GPT will not be in its proper location.
|
||||
|
||||
# cgpt does not create protective MBR, and the kernel refuses to read
|
||||
# GPT unless there's some kind of MBR in sector 0. So we need parted
|
||||
# to write that single sector before doing anything with the GPT.
|
||||
cgpt=$HOST_DIR/bin/cgpt
|
||||
parted=$HOST_DIR/sbin/parted
|
||||
kernel=$BINARIES_DIR/uImage.kpart
|
||||
rootfs=$BINARIES_DIR/rootfs.ext2
|
||||
|
||||
run() { echo "$@"; "$@"; }
|
||||
die() { echo "$@" >&2; exit 1; }
|
||||
test -f $kernel || die "No kernel image found"
|
||||
test -f $rootfs || die "No rootfs image found"
|
||||
test -x $cgpt || die "cgpt not found (host-vboot-utils have not been built?)"
|
||||
|
||||
# True file sizes in bytes
|
||||
kernelsize=`stat -t $kernel | cut -d\ -f2`
|
||||
rootfssize=`stat -t $rootfs | cut -d\ -f2`
|
||||
|
||||
# The card is partitioned in sectors of 8KB.
|
||||
# 4 sectors are reserved for MBR+GPT. Their actual size turns out
|
||||
# to be 33 512-blocks which is just over 2 sectors, but we align
|
||||
# it to a nice round number.
|
||||
sec=8192
|
||||
kernelsec=$(((kernelsize+8191)>>13))
|
||||
rootfssec=$(((rootfssize+8191)>>13))
|
||||
headersec=4
|
||||
|
||||
# There is also a copy of MBR+GPT at the end of the image.
|
||||
# It's going to be useless but both tools assume it's there.
|
||||
imagesec=$((2*headersec+kernelsec+rootfssec))
|
||||
bootsd="$BINARIES_DIR/bootsd.img"
|
||||
run dd bs=$sec count=$imagesec if=/dev/zero of=$bootsd
|
||||
|
||||
# cgpt needs offsets and sizes in 512-blocks.
|
||||
block=512
|
||||
kernelstart=$((headersec<<4))
|
||||
kernelblocks=$((kernelsec<<4))
|
||||
rootfsblocks=$((rootfssec<<4))
|
||||
rootfsstart=$((kernelstart+kernelblocks))
|
||||
|
||||
# This command initializes both GPT and MBR
|
||||
run $parted -s $bootsd mklabel gpt
|
||||
|
||||
# The kernel partition must be marked as bootable, that's why -S -T -P
|
||||
run $cgpt add -i 1 -b $kernelstart -s $kernelblocks \
|
||||
-t kernel -l kernel \
|
||||
-S 1 -T 1 -P 10 $bootsd
|
||||
|
||||
# It does not really matter where the rootfs partition is located as long
|
||||
# as the kernel can find it.
|
||||
# However, if anything is changed here, kernel.args must be updated as well.
|
||||
run $cgpt add -i 2 -b $rootfsstart -s $rootfsblocks \
|
||||
-t data -l rootfs $bootsd
|
||||
|
||||
run dd bs=$block if=$kernel of=$bootsd seek=$kernelstart
|
||||
run dd bs=$block if=$rootfs of=$bootsd seek=$rootfsstart
|
||||
@@ -0,0 +1,15 @@
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition u-boot {
|
||||
in-partition-table = "no"
|
||||
image = "%UBOOTBIN%"
|
||||
offset = 1024
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext2"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,37 @@
|
||||
From e9a88fddc149fc52cdc5a8997f9fd3a29416c643 Mon Sep 17 00:00:00 2001
|
||||
From: =?UTF-8?q?Vincent=20Stehl=C3=A9?= <vincent.stehle@freescale.com>
|
||||
Date: Tue, 12 Aug 2014 10:17:31 +0200
|
||||
Subject: [PATCH] mx6qsabre_common: boot Linux to /init in mfgtools mode
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
Buildroot supplies a nice /init wrapper script to use when booting from a
|
||||
ramdisk.
|
||||
|
||||
This patch tells u-boot to tell the kernel to boot into /init (instead of
|
||||
/linuxrc) on i.MX6, when booting in mfgtools mode. This way we can boot a
|
||||
buildroot system entirely through USB.
|
||||
|
||||
Signed-off-by: Vincent Stehlé <vincent.stehle@freescale.com>
|
||||
Signed-off-by: Julien Olivain <julien.olivain@oss.nxp.com>
|
||||
---
|
||||
include/configs/imx_env.h | 2 +-
|
||||
1 file changed, 1 insertion(+), 1 deletion(-)
|
||||
|
||||
diff --git a/include/configs/imx_env.h b/include/configs/imx_env.h
|
||||
index c03748d93f..aa1a8bf488 100644
|
||||
--- a/include/configs/imx_env.h
|
||||
+++ b/include/configs/imx_env.h
|
||||
@@ -29,7 +29,7 @@
|
||||
|
||||
#define CONFIG_MFG_ENV_SETTINGS_DEFAULT \
|
||||
"mfgtool_args=setenv bootargs console=${console},${baudrate} " \
|
||||
- "rdinit=/linuxrc " \
|
||||
+ "rdinit=/init " \
|
||||
"clk_ignore_unused "\
|
||||
"\0" \
|
||||
"kboot="MFG_BOOT_CMD"\0"\
|
||||
--
|
||||
2.26.2
|
||||
|
||||
@@ -0,0 +1,4 @@
|
||||
Label imx7d-sabresd-buildroot
|
||||
kernel /boot/zImage
|
||||
devicetree /boot/imx7d-sdb.dtb
|
||||
append root=PARTUUID=${uuid} rootwait rw console=${console},${baudrate}
|
||||
73
board/freescale/imx8mnevk/readme.txt
Normal file
73
board/freescale/imx8mnevk/readme.txt
Normal file
@@ -0,0 +1,73 @@
|
||||
***************************
|
||||
Freescale i.MX8MN EVK board
|
||||
***************************
|
||||
|
||||
This file documents the Buildroot support for the i.MX8M Nano EVK board.
|
||||
|
||||
Build
|
||||
=====
|
||||
|
||||
First, configure Buildroot for the i.MX8MN EVK board:
|
||||
|
||||
make freescale_imx8mnevk_defconfig
|
||||
|
||||
Build all components:
|
||||
|
||||
make
|
||||
|
||||
You will find in output/images/ the following files:
|
||||
- bl31.bin
|
||||
- boot.vfat
|
||||
- ddr4_201810_fw.bin
|
||||
- ddr_fw.bin
|
||||
- fsl-imx8mn-ddr4-evk.dtb
|
||||
- Image
|
||||
- imx8-boot-sd.bin
|
||||
- rootfs.ext2
|
||||
- rootfs.ext4
|
||||
- rootfs.tar
|
||||
- sdcard.img
|
||||
- u-boot.bin
|
||||
- u-boot.imx
|
||||
- u-boot.itb
|
||||
- u-boot-nodtb.bin
|
||||
- u-boot-spl.bin
|
||||
- u-boot-spl-ddr.bin
|
||||
|
||||
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
|
||||
|
||||
Buildroot prepares a bootable "sdcard.img" image in the output/images/
|
||||
directory, ready to be dumped on a SD card. Launch the following
|
||||
command as root:
|
||||
|
||||
dd if=output/images/sdcard.img of=/dev/<your-sd-device>
|
||||
|
||||
*** 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/imx/genimage.cfg.template_imx8.
|
||||
|
||||
Boot the i.MX8MN EVK board
|
||||
==========================
|
||||
|
||||
To boot your newly created system (refer to the i.MX8MNano EVK Quick Start Guide
|
||||
[1] for guidance):
|
||||
- insert the SD card in the SD slot of the board;
|
||||
- Configure the switches as follows (X = "don't care"):
|
||||
SW1101: 1100XXXXXX [D1-D10]
|
||||
SW1102: XXXXXXXXXX [D1-D10]
|
||||
- put a micro USB cable into the Debug USB Port and connect using a terminal
|
||||
emulator at 115200 bps, 8n1;
|
||||
- power on the board.
|
||||
|
||||
Enjoy!
|
||||
|
||||
References
|
||||
==========
|
||||
[1] https://www.nxp.com/design/development-boards/i-mx-evaluation-and-development-boards/evaluation-kit-for-the-i-mx-8m-nano-applications-processor:8MNANOD4-EVK
|
||||
71
board/freescale/imx8mpevk/readme.txt
Normal file
71
board/freescale/imx8mpevk/readme.txt
Normal file
@@ -0,0 +1,71 @@
|
||||
*********************
|
||||
NXP i.MX8MP EVK board
|
||||
*********************
|
||||
|
||||
This file documents the Buildroot support for the i.MX 8M Plus EVK board.
|
||||
|
||||
Build
|
||||
=====
|
||||
|
||||
First, configure Buildroot for the i.MX 8M Plus EVK board:
|
||||
|
||||
make freescale_imx8mpevk_defconfig
|
||||
|
||||
Build all components:
|
||||
|
||||
make
|
||||
|
||||
You will find in output/images/ the following files:
|
||||
- bl31.bin
|
||||
- boot.vfat
|
||||
- ddr_fw.bin
|
||||
- Image
|
||||
- imx8-boot-sd.bin
|
||||
- imx8mp-evk.dtb
|
||||
- lpddr4_pmu_train_fw.bin
|
||||
- rootfs.ext2
|
||||
- rootfs.ext4
|
||||
- rootfs.tar
|
||||
- sdcard.img
|
||||
- u-boot.bin
|
||||
- u-boot.itb
|
||||
- u-boot-nodtb.bin
|
||||
- u-boot-spl.bin
|
||||
- u-boot-spl-ddr.bin
|
||||
|
||||
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
|
||||
|
||||
Buildroot prepares a bootable "sdcard.img" image in the output/images/
|
||||
directory, ready to be dumped on a SD card. Launch the following
|
||||
command as root:
|
||||
|
||||
dd if=output/images/sdcard.img of=/dev/<your-sd-device>
|
||||
|
||||
*** 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/imx/genimage.cfg.template_imx8.
|
||||
|
||||
Boot the i.MX 8M Plus EVK board
|
||||
===============================
|
||||
|
||||
To boot your newly created system (refer to the i.MX 8M Plus EVK Documentation
|
||||
[1] for guidance):
|
||||
- insert the SD card in the SD slot of the board;
|
||||
- Configure the switches as follows (X = "don't care"):
|
||||
SW4: 0011 SW4[1-4]
|
||||
- put a micro USB cable into the Debug USB Port and connect using a terminal
|
||||
emulator at 115200 bps, 8n1;
|
||||
- power on the board.
|
||||
|
||||
Enjoy!
|
||||
|
||||
References
|
||||
==========
|
||||
[1] https://www.nxp.com/document/guide/get-started-with-the-i-mx-8m-plus-evk:GS-iMX-8M-Plus-EVK
|
||||
4
board/friendlyarm/nanopc-t4/extlinux.conf
Normal file
4
board/friendlyarm/nanopc-t4/extlinux.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
label RK3399_NanoPC_T4 linux
|
||||
kernel /Image
|
||||
devicetree /rk3399-nanopc-t4.dtb
|
||||
append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p4 rootwait
|
||||
39
board/friendlyarm/nanopc-t4/genimage.cfg
Normal file
39
board/friendlyarm/nanopc-t4/genimage.cfg
Normal file
@@ -0,0 +1,39 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"Image",
|
||||
"rk3399-nanopc-t4.dtb",
|
||||
"extlinux"
|
||||
}
|
||||
}
|
||||
size = 64M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
|
||||
hdimage {
|
||||
gpt = true
|
||||
}
|
||||
|
||||
partition loader1 {
|
||||
image = "idbloader.img"
|
||||
offset = 32K
|
||||
}
|
||||
|
||||
partition loader2 {
|
||||
image = "u-boot.itb"
|
||||
offset = 8M
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 16M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
5
board/friendlyarm/nanopc-t4/post-build.sh
Executable file
5
board/friendlyarm/nanopc-t4/post-build.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
|
||||
45
board/friendlyarm/nanopc-t4/readme.txt
Normal file
45
board/friendlyarm/nanopc-t4/readme.txt
Normal file
@@ -0,0 +1,45 @@
|
||||
FriendlyARM NANOPC-T4
|
||||
=====================
|
||||
|
||||
Build:
|
||||
|
||||
$ make friendlyarm_nanopc_t4_defconfig
|
||||
$ make
|
||||
|
||||
Files created in output directory
|
||||
=================================
|
||||
|
||||
output/images
|
||||
|
||||
├── bl31.elf
|
||||
├── boot.vfat
|
||||
├── extlinux
|
||||
├── idbloader.img
|
||||
├── Image
|
||||
├── rk3399-nanopc-t4.dtb
|
||||
├── rootfs.ext2
|
||||
├── rootfs.ext4 -> rootfs.ext2
|
||||
├── rootfs.tar
|
||||
├── sdcard.img
|
||||
├── u-boot.bin
|
||||
└── u-boot.itb
|
||||
|
||||
Creating bootable SD card:
|
||||
==========================
|
||||
|
||||
Simply invoke (as root)
|
||||
|
||||
sudo dd if=output/images/sdcard.img of=/dev/sdX && sync
|
||||
|
||||
Where X is your SD card device
|
||||
|
||||
Serial console
|
||||
--------------
|
||||
|
||||
Baudrate for this board is 1500000
|
||||
|
||||
Login:
|
||||
------
|
||||
Apply power and press the PWR button for 3 sec. Enter 'root' as login user, and the prompt is ready.
|
||||
|
||||
https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/npc_t4.html
|
||||
4
board/friendlyarm/nanopi-m4/extlinux.conf
Normal file
4
board/friendlyarm/nanopi-m4/extlinux.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
label RK3399_NANOPI_M4 linux
|
||||
kernel /Image
|
||||
devicetree /rk3399-nanopi-m4.dtb
|
||||
append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p4 rw rootwait
|
||||
39
board/friendlyarm/nanopi-m4/genimage.cfg
Normal file
39
board/friendlyarm/nanopi-m4/genimage.cfg
Normal file
@@ -0,0 +1,39 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"Image",
|
||||
"rk3399-nanopi-m4.dtb",
|
||||
"extlinux"
|
||||
}
|
||||
}
|
||||
size = 64M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
|
||||
hdimage {
|
||||
gpt = true
|
||||
}
|
||||
|
||||
partition loader1 {
|
||||
image = "idbloader.img"
|
||||
offset = 32K
|
||||
}
|
||||
|
||||
partition loader2 {
|
||||
image = "u-boot.itb"
|
||||
offset = 8M
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 16M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
5
board/friendlyarm/nanopi-m4/post-build.sh
Executable file
5
board/friendlyarm/nanopi-m4/post-build.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
|
||||
45
board/friendlyarm/nanopi-m4/readme.txt
Normal file
45
board/friendlyarm/nanopi-m4/readme.txt
Normal file
@@ -0,0 +1,45 @@
|
||||
FriendlyARM NANOPI-M4
|
||||
=====================
|
||||
|
||||
Build:
|
||||
|
||||
$ make friendlyarm_nanopi_m4_defconfig
|
||||
$ make
|
||||
|
||||
Files created in output directory
|
||||
=================================
|
||||
|
||||
output/images
|
||||
|
||||
├── bl31.elf
|
||||
├── boot.vfat
|
||||
├── extlinux
|
||||
├── idbloader.img
|
||||
├── Image
|
||||
├── rk3399-nanopi-m4.dtb
|
||||
├── rootfs.ext2
|
||||
├── rootfs.ext4 -> rootfs.ext2
|
||||
├── rootfs.tar
|
||||
├── sdcard.img
|
||||
├── u-boot.bin
|
||||
└── u-boot.itb
|
||||
|
||||
Creating bootable SD card:
|
||||
==========================
|
||||
|
||||
Simply invoke (as root)
|
||||
|
||||
sudo dd if=output/images/sdcard.img of=/dev/sdX && sync
|
||||
|
||||
Where X is your SD card device
|
||||
|
||||
Serial console
|
||||
--------------
|
||||
|
||||
Baudrate for this board is 1500000
|
||||
|
||||
Login:
|
||||
------
|
||||
Enter 'root' as login user, and the prompt is ready.
|
||||
|
||||
https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/nanopi_m4.html
|
||||
4
board/friendlyarm/nanopi-neo4/extlinux.conf
Normal file
4
board/friendlyarm/nanopi-neo4/extlinux.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
label NanoPi Neo4 linux
|
||||
kernel /boot/Image
|
||||
devicetree /boot/rk3399-nanopi-neo4.dtb
|
||||
append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p1 rootwait
|
||||
22
board/friendlyarm/nanopi-neo4/genimage.cfg
Normal file
22
board/friendlyarm/nanopi-neo4/genimage.cfg
Normal file
@@ -0,0 +1,22 @@
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition u-boot-tpl-spl-dtb {
|
||||
in-partition-table = "no"
|
||||
image = "idbloader.img"
|
||||
offset = 32K
|
||||
}
|
||||
|
||||
partition u-boot-dtb {
|
||||
in-partition-table = "no"
|
||||
image = "u-boot.itb"
|
||||
offset = 8M
|
||||
size = 30M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
5
board/friendlyarm/nanopi-neo4/post-build.sh
Executable file
5
board/friendlyarm/nanopi-neo4/post-build.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
install -m 0644 -D $BOARD_DIR/extlinux.conf $TARGET_DIR/boot/extlinux/extlinux.conf
|
||||
53
board/friendlyarm/nanopi-neo4/readme.txt
Normal file
53
board/friendlyarm/nanopi-neo4/readme.txt
Normal file
@@ -0,0 +1,53 @@
|
||||
Intro
|
||||
=====
|
||||
|
||||
NanoPi Neo4 is a RK3399 SoC based ARM64 board.
|
||||
|
||||
|
||||
Official wiki: http://wiki.friendlyarm.com/wiki/index.php/NanoPi_NEO4
|
||||
Mainline wiki: https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/neo4.html
|
||||
|
||||
Build
|
||||
=====
|
||||
|
||||
Run NanoPi Neo4 configuration
|
||||
|
||||
$ make friendlyarm_nanopi_neo4_defconfig
|
||||
|
||||
To build, run make comamnd.
|
||||
|
||||
$ make
|
||||
|
||||
Files created in output directory
|
||||
=================================
|
||||
|
||||
output/images
|
||||
|
||||
├── bl31.bin
|
||||
├── bl31.elf
|
||||
├── Image
|
||||
├── rk3399-nanopi-neo4.dtb
|
||||
├── rootfs.ext2
|
||||
├── rootfs.ext4 -> rootfs.ext2
|
||||
├── rootfs.tar
|
||||
├── sdcard.img
|
||||
├── u-boot.bin
|
||||
├── u-boot.itb
|
||||
├── u-boot-spl-dtb.bin
|
||||
├── u-boot-tpl-dtb.bin
|
||||
├── u-boot-tpl-dtb.img
|
||||
└── u-boot-tpl-spl-dtb.img
|
||||
|
||||
Creating bootable SD card:
|
||||
=========================
|
||||
|
||||
Simply invoke (as root)
|
||||
|
||||
# dd if=output/images/sdcard.img of=/dev/sdX && sync
|
||||
|
||||
Where X is your SD card device
|
||||
|
||||
Serial console
|
||||
--------------
|
||||
|
||||
Baudrate for this board is 1500000
|
||||
8
board/friendlyarm/nanopi-r1/boot.cmd
Normal file
8
board/friendlyarm/nanopi-r1/boot.cmd
Normal file
@@ -0,0 +1,8 @@
|
||||
setenv fdt_high ffffffff
|
||||
|
||||
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
|
||||
|
||||
fatload mmc 0 $kernel_addr_r zImage
|
||||
fatload mmc 0 $fdt_addr_r sun8i-h3-nanopi-r1.dtb
|
||||
|
||||
bootz $kernel_addr_r - $fdt_addr_r
|
||||
36
board/friendlyarm/nanopi-r1/genimage.cfg
Normal file
36
board/friendlyarm/nanopi-r1/genimage.cfg
Normal file
@@ -0,0 +1,36 @@
|
||||
# Minimal SD card image for the NanoPi M1
|
||||
#
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"sun8i-h3-nanopi-r1.dtb",
|
||||
"boot.scr"
|
||||
}
|
||||
}
|
||||
size = 10M
|
||||
}
|
||||
|
||||
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 boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
||||
2
board/friendlyarm/nanopi-r1/kernel/linux-extras.config
Normal file
2
board/friendlyarm/nanopi-r1/kernel/linux-extras.config
Normal file
@@ -0,0 +1,2 @@
|
||||
# USB ethernet
|
||||
CONFIG_USB_RTL8152=y
|
||||
170
board/friendlyarm/nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts
Normal file
170
board/friendlyarm/nanopi-r1/kernel/sun8i-h3-nanopi-r1.dts
Normal file
@@ -0,0 +1,170 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Igor Pecovnik <igor@armbian.com>
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively,
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "sun8i-h3-nanopi.dtsi"
|
||||
|
||||
/ {
|
||||
model = "FriendlyElec NanoPi-R1";
|
||||
compatible = "friendlyarm,nanopi-r1", "allwinner,sun8i-h3";
|
||||
|
||||
aliases {
|
||||
serial1 = &uart3;
|
||||
ethernet0 = &emac;
|
||||
ethernet1 = &emac;
|
||||
ethernet2 = &sdio_wifi;
|
||||
};
|
||||
|
||||
wifi_pwrseq: wifi_pwrseq {
|
||||
compatible = "mmc-pwrseq-simple";
|
||||
pinctrl-names = "default";
|
||||
reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
|
||||
};
|
||||
|
||||
reg_gmac_3v3: gmac-3v3 {
|
||||
compatible = "regulator-fixed";
|
||||
regulator-name = "gmac-3v3";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
startup-delay-us = <100000>;
|
||||
enable-active-high;
|
||||
gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
leds {
|
||||
/delete-node/ status;
|
||||
/delete-node/ pwr;
|
||||
led1 {
|
||||
label = "LED1";
|
||||
gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
|
||||
linux,default-trigger = "heartbeat";
|
||||
};
|
||||
|
||||
led2 {
|
||||
label = "LED2";
|
||||
gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
linux,default-trigger = "netdev";
|
||||
};
|
||||
|
||||
led3 {
|
||||
label = "LED3";
|
||||
gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>;
|
||||
default-state = "off";
|
||||
linux,default-trigger = "netdev";
|
||||
};
|
||||
};
|
||||
|
||||
r_gpio_keys {
|
||||
compatible = "gpio-keys";
|
||||
input-name = "k1";
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&sw_r_npi>;
|
||||
|
||||
/delete-node/ k1;
|
||||
reset {
|
||||
label = "reset";
|
||||
linux,code = <BTN_1>;
|
||||
gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
|
||||
};
|
||||
};
|
||||
};
|
||||
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_gmac_3v3>;
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-mode = "rgmii";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&external_mdio {
|
||||
ext_rgmii_phy: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <7>;
|
||||
};
|
||||
};
|
||||
|
||||
&mmc1 {
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
vqmmc-supply = <®_vcc3v3>;
|
||||
mmc-pwrseq = <&wifi_pwrseq>;
|
||||
bus-width = <4>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
|
||||
sdio_wifi: sdio_wifi@1 {
|
||||
reg = <1>;
|
||||
compatible = "brcm,bcm4329-fmac";
|
||||
interrupt-parent = <&pio>;
|
||||
interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
|
||||
interrupt-names = "host-wake";
|
||||
};
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_8bit_pins>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
vqmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&ohci1 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usb_otg {
|
||||
dr_mode = "peripheral";
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&usbphy {
|
||||
status = "okay";
|
||||
};
|
||||
29
board/friendlyarm/nanopi-r1/readme.txt
Normal file
29
board/friendlyarm/nanopi-r1/readme.txt
Normal file
@@ -0,0 +1,29 @@
|
||||
NanoPi R1
|
||||
|
||||
Intro
|
||||
=====
|
||||
|
||||
This default configuration will allow you to start experimenting with the
|
||||
buildroot environment for the NanoPi R1. With the current configuration
|
||||
it will bring-up the board, and allow access through the serial console.
|
||||
|
||||
How to build it
|
||||
===============
|
||||
|
||||
Configure Buildroot:
|
||||
|
||||
$ make friendlyarm_nanopi_r1_defconfig
|
||||
|
||||
Compile everything and build the SD card image:
|
||||
|
||||
$ make
|
||||
|
||||
How to write the SD card
|
||||
========================
|
||||
|
||||
Once the build process is finished you will have an image called "sdcard.img"
|
||||
in the output/images/ directory.
|
||||
|
||||
Copy the bootable "sdcard.img" onto an SD card with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
22
board/friendlyarm/nanopi-r1/uboot/nanopi_r1_defconfig
Normal file
22
board/friendlyarm/nanopi-r1/uboot/nanopi_r1_defconfig
Normal file
@@ -0,0 +1,22 @@
|
||||
CONFIG_ARM=y
|
||||
CONFIG_ARCH_SUNXI=y
|
||||
CONFIG_SPL=y
|
||||
CONFIG_MACH_SUN8I_H3=y
|
||||
CONFIG_DRAM_CLK=408
|
||||
CONFIG_DRAM_ZQ=3881979
|
||||
CONFIG_DRAM_ODT_EN=y
|
||||
CONFIG_MACPWR="PD6"
|
||||
# CONFIG_VIDEO_DE2 is not set
|
||||
CONFIG_NR_DRAM_BANKS=1
|
||||
# CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
|
||||
CONFIG_CONSOLE_MUX=y
|
||||
CONFIG_SYS_CLK_FREQ=480000000
|
||||
# CONFIG_CMD_FLASH is not set
|
||||
# CONFIG_SPL_DOS_PARTITION is not set
|
||||
# CONFIG_SPL_EFI_PARTITION is not set
|
||||
CONFIG_DEFAULT_DEVICE_TREE="sun8i-h3-nanopi-r1"
|
||||
CONFIG_SUN8I_EMAC=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_SYS_USB_EVENT_POLL_VIA_INT_QUEUE=y
|
||||
CONFIG_MMC_SUNXI_SLOT_EXTRA=2
|
||||
102
board/friendlyarm/nanopi-r1/uboot/sun8i-h3-nanopi-r1.dts
Normal file
102
board/friendlyarm/nanopi-r1/uboot/sun8i-h3-nanopi-r1.dts
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright (C) 2019 Igor Pecovnik <igor@armbian.com>
|
||||
*
|
||||
* This file is dual-licensed: you can use it either under the terms
|
||||
* of the GPL or the X11 license, at your option. Note that this dual
|
||||
* licensing only applies to this file, and not this project as a
|
||||
* whole.
|
||||
*
|
||||
* a) This file is free software; you can redistribute it and/or
|
||||
* modify it under the terms of the GNU General Public License as
|
||||
* published by the Free Software Foundation; either version 2 of the
|
||||
* License, or (at your option) any later version.
|
||||
*
|
||||
* This file is distributed in the hope that it will be useful,
|
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
* GNU General Public License for more details.
|
||||
*
|
||||
* Or, alternatively,
|
||||
*
|
||||
* b) Permission is hereby granted, free of charge, to any person
|
||||
* obtaining a copy of this software and associated documentation
|
||||
* files (the "Software"), to deal in the Software without
|
||||
* restriction, including without limitation the rights to use,
|
||||
* copy, modify, merge, publish, distribute, sublicense, and/or
|
||||
* sell copies of the Software, and to permit persons to whom the
|
||||
* Software is furnished to do so, subject to the following
|
||||
* conditions:
|
||||
*
|
||||
* The above copyright notice and this permission notice shall be
|
||||
* included in all copies or substantial portions of the Software.
|
||||
*
|
||||
* THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
||||
* EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
|
||||
* OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
||||
* NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
|
||||
* HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
|
||||
* WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
|
||||
* FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
|
||||
* OTHER DEALINGS IN THE SOFTWARE.
|
||||
*/
|
||||
|
||||
#include "sun8i-h3-nanopi.dtsi"
|
||||
|
||||
/ {
|
||||
model = "FriendlyARM NanoPi R1";
|
||||
compatible = "friendlyarm,nanopi-neo", "allwinner,sun8i-h3";
|
||||
|
||||
reg_gmac_3v3: gmac-3v3 {
|
||||
compatible = "regulator-fixed";
|
||||
pinctrl-names = "default";
|
||||
regulator-name = "gmac-3v3";
|
||||
regulator-min-microvolt = <3300000>;
|
||||
regulator-max-microvolt = <3300000>;
|
||||
startup-delay-us = <100000>;
|
||||
enable-active-high;
|
||||
gpio = <&pio 3 6 GPIO_ACTIVE_HIGH>;
|
||||
};
|
||||
|
||||
};
|
||||
|
||||
&ehci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&pio {
|
||||
gmac_power_pin_nanopi: gmac_power_pin@0 {
|
||||
pins = "PD6";
|
||||
function = "gpio_out";
|
||||
};
|
||||
};
|
||||
|
||||
&ohci0 {
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&mmc2 {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&mmc2_8bit_pins>;
|
||||
vmmc-supply = <®_vcc3v3>;
|
||||
bus-width = <8>;
|
||||
non-removable;
|
||||
cap-mmc-hw-reset;
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&emac {
|
||||
pinctrl-names = "default";
|
||||
pinctrl-0 = <&emac_rgmii_pins>;
|
||||
phy-supply = <®_gmac_3v3>;
|
||||
phy-handle = <&ext_rgmii_phy>;
|
||||
phy-mode = "rgmii";
|
||||
|
||||
status = "okay";
|
||||
};
|
||||
|
||||
&external_mdio {
|
||||
ext_rgmii_phy: ethernet-phy@1 {
|
||||
compatible = "ethernet-phy-ieee802.3-c22";
|
||||
reg = <7>;
|
||||
};
|
||||
};
|
||||
11
board/globalscale/espressobin/genimage.cfg
Normal file
11
board/globalscale/espressobin/genimage.cfg
Normal file
@@ -0,0 +1,11 @@
|
||||
# Minimal image, no U-boot since v3/v5 cannot boot from sdcard, see
|
||||
# readme.txt for details on configuring the on-board u-boot.
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
14
board/globalscale/espressobin/linux-extras.config
Normal file
14
board/globalscale/espressobin/linux-extras.config
Normal file
@@ -0,0 +1,14 @@
|
||||
#
|
||||
# The Espressobin has a switchcore with full support in the kernel.
|
||||
# This fragment enables DSA and its drivers, inclding VLAN aware bridge
|
||||
# support to allow users to easily set up a LAN switch + WAN interface.
|
||||
#
|
||||
CONFIG_NET_DSA=m
|
||||
CONFIG_VLAN_8021Q=y
|
||||
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_BRIDGE_IGMP_SNOOPING=y
|
||||
CONFIG_BRIDGE_VLAN_FILTERING=y
|
||||
|
||||
CONFIG_NET_DSA_MV88E6XXX=m
|
||||
CONFIG_NET_DSA_MV88E6XXX_PTP=y
|
||||
90
board/globalscale/espressobin/readme.txt
Normal file
90
board/globalscale/espressobin/readme.txt
Normal file
@@ -0,0 +1,90 @@
|
||||
Marvell ESPRESSObin
|
||||
===================
|
||||
|
||||
This default configuration allows you to quickly get up and running with
|
||||
the Marvell ESPRESSObin board by Globalscale Technologies Inc.
|
||||
|
||||
The ESPRESSObin is based on the Marvell Armada 88F3720 SoC, coupled with
|
||||
a Marvell 88E6341 switch core "Topaz", with three exposed gigabit ports.
|
||||
|
||||
_________________________
|
||||
|# U W L L U #|
|
||||
|# S A A A S #|
|
||||
|# B N N N B #|
|
||||
|# 0 1 #|
|
||||
|# Mini #|
|
||||
|# -PCI #|
|
||||
|# #|
|
||||
|# 5 #|
|
||||
|#__V___usb_PWR_SATA__SW_#|
|
||||
|
||||
Fig 1: Overview of board
|
||||
|
||||
Notice difference in Ethernet port layout compared to the Globalscale
|
||||
docs. They order the ports; LAN2, LAN1, WAN (left to right in figure
|
||||
above). For more information, see http://espressobin.net
|
||||
|
||||
|
||||
Building
|
||||
--------
|
||||
|
||||
$ make globalscale_espressobin_defconfig
|
||||
$ make
|
||||
|
||||
This generates the kernel image, the devicetree binary, the rootfs as a
|
||||
tar.gz, and a filesystem image containing everything.
|
||||
|
||||
All build artifacts are located in `output/images/`
|
||||
|
||||
|
||||
Booting
|
||||
-------
|
||||
|
||||
To boot, you need a UART connection, using the on-board micro USB port
|
||||
set to 115200 8N1.
|
||||
|
||||
By default, the ESPRESSObin comes with a pre-flashed U-Boot set up to
|
||||
load the kernel, device-tree and rootfs from SPI NOR flash. The board
|
||||
jumpers can be changed to boot from different sources, see the quick
|
||||
start guide for each board revision for details:
|
||||
|
||||
- ftp://downloads.globalscaletechnologies.com/Downloads/Espressobin/ESPRESSObin%20V5/
|
||||
- ftp://downloads.globalscaletechnologies.com/Downloads/Espressobin/ESPRESSObin%20V7/
|
||||
|
||||
Note: the v5, and earlier, cannot boot from sdcard, so you have to set
|
||||
up the factory U-Boot to boot into Buildroot:
|
||||
|
||||
1. Flash rootfs image to sdcard drive, your `of=` device may differ:
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/mmcblk0 bs=1M
|
||||
$ sync
|
||||
|
||||
2. Boot board from SPI NOR, interrupt boot by pressing any key ...
|
||||
3. Check with `printenv` that the default setup is OK, otherwise ensure
|
||||
the following are set, and define `bootcmd` for automatic boot:
|
||||
|
||||
> setenv kernel_addr 0x5000000
|
||||
> setenv fdt_addr 0x1800000
|
||||
> setenv fdt_name boot/armada-3720-espressobin.dtb
|
||||
> setenv console console=ttyMV0,115200 earlycon=ar3700_uart,0xd0012000
|
||||
> setenv bootcmd 'mmc dev 0; ext4load mmc 0:1 $kernel_addr $image_name;ext4load mmc 0:1 $fdt_addr $fdt_name;setenv bootargs $console root=/dev/mmcblk0p1 rw rootwait; booti $kernel_addr - $fdt_addr'
|
||||
|
||||
4. Call the boot command, or `reset` the board to start:
|
||||
|
||||
> run bootcmd
|
||||
|
||||
|
||||
Networking
|
||||
----------
|
||||
|
||||
To enable Ethernet networking, load the `mv88e6xxx` kernel module, and
|
||||
bring up each respective interface needed:
|
||||
|
||||
# modprobe mv88e6xxx
|
||||
# ifconfig wan up
|
||||
|
||||
A more advanced scenario is setting up switching between the ports using
|
||||
the Linux bridge. The kernel switchdev layer, and DSA driver, ensure
|
||||
switch functions are "offloaded" to the HW switch, i.e., all traffic
|
||||
between LAN ports never reach the CPU. For this you need the iproute2
|
||||
suite of tools.
|
||||
11
board/hardkernel/odroidc2/boot.cmd
Normal file
11
board/hardkernel/odroidc2/boot.cmd
Normal file
@@ -0,0 +1,11 @@
|
||||
setenv kernel_filename "Image"
|
||||
setenv fdt_filename "meson-gxbb-odroidc2.dtb"
|
||||
setenv bootargs "console=ttyAML0,115200n8 earlyprintk root=/dev/mmcblk1p2 rootwait rw"
|
||||
|
||||
echo > Loading Kernel...
|
||||
fatload mmc 0:1 ${kernel_addr_r} ${kernel_filename}
|
||||
echo > Loading FDT...
|
||||
fatload mmc 0:1 ${fdt_addr_r} ${fdt_filename}
|
||||
|
||||
echo > Booting System...
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
23
board/hardkernel/odroidc2/rootfs_overlay/etc/init.d/S09modload
Executable file
23
board/hardkernel/odroidc2/rootfs_overlay/etc/init.d/S09modload
Executable file
@@ -0,0 +1,23 @@
|
||||
#!/bin/sh
|
||||
#
|
||||
|
||||
load_drivers()
|
||||
{
|
||||
echo "Loading needed modules..."
|
||||
for file in $(echo "dwmac_generic dwmac-meson8b meson_dw_hdmi meson_gxbb_wdt"); do
|
||||
modprobe ${file}
|
||||
done
|
||||
}
|
||||
|
||||
case "$1" in
|
||||
start)
|
||||
load_drivers
|
||||
;;
|
||||
stop)
|
||||
;;
|
||||
restart|reload)
|
||||
;;
|
||||
*)
|
||||
echo "Usage: $0 {start|stop|restart}"
|
||||
exit 1
|
||||
esac
|
||||
8
board/kontron/pitx-imx8m/boot.cmd
Normal file
8
board/kontron/pitx-imx8m/boot.cmd
Normal file
@@ -0,0 +1,8 @@
|
||||
echo "Root File Sytem on MMC${devnum}"
|
||||
setenv rootfs /dev/mmcblk${devnum}p1
|
||||
setenv bootargs root=${rootfs} rootwait rw ${extrabootargs}
|
||||
|
||||
load ${devtype} ${devnum} ${kernel_addr_r} boot/Image
|
||||
load ${devtype} ${devnum} ${fdt_addr_r} boot/imx8mq-kontron-pitx-imx8m.dtb
|
||||
|
||||
booti ${kernel_addr_r} - ${fdt_addr_r}
|
||||
16
board/kontron/pitx-imx8m/genimage.cfg
Normal file
16
board/kontron/pitx-imx8m/genimage.cfg
Normal file
@@ -0,0 +1,16 @@
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition imx-boot {
|
||||
in-partition-table = "no"
|
||||
image = "imx8-boot-sd.bin"
|
||||
offset = 33k
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
offset = 8M
|
||||
}
|
||||
}
|
||||
4
board/kontron/pitx-imx8m/post-build.sh
Executable file
4
board/kontron/pitx-imx8m/post-build.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
mkdir -p $TARGET_DIR/boot/
|
||||
cp $BINARIES_DIR/boot.scr $TARGET_DIR/boot/boot.scr
|
||||
3
board/kontron/pitx-imx8m/post-image.sh
Executable file
3
board/kontron/pitx-imx8m/post-image.sh
Executable file
@@ -0,0 +1,3 @@
|
||||
#!/bin/sh
|
||||
|
||||
support/scripts/genimage.sh -c $(dirname $0)/genimage.cfg
|
||||
74
board/kontron/pitx-imx8m/readme.txt
Normal file
74
board/kontron/pitx-imx8m/readme.txt
Normal file
@@ -0,0 +1,74 @@
|
||||
Kontron pitx-imx8m
|
||||
==================
|
||||
|
||||
https://www.kontron.com/produkte/pitx-imx8m/p155258
|
||||
|
||||
|
||||
How to build it
|
||||
===============
|
||||
|
||||
Configure buildroot:
|
||||
|
||||
$ make kontron_pitx_imx8m_defconfig
|
||||
|
||||
Change settings to fit your needs (optional):
|
||||
|
||||
$ make menuconfig
|
||||
|
||||
Compile everything and buildr the rootfs image:
|
||||
|
||||
$ make
|
||||
|
||||
|
||||
Result of the build
|
||||
===================
|
||||
|
||||
After building, the output/images directory contains:
|
||||
|
||||
output/images/
|
||||
├── bl31.bin
|
||||
├── boot.scr
|
||||
├── ddr_fw.bin
|
||||
├── Image
|
||||
├── imx8-boot-sd.bin
|
||||
├── imx8mq-kontron-pitx-imx8m.dtb
|
||||
├── lpddr4_pmu_train_fw.bin
|
||||
├── rootfs.ext2
|
||||
├── rootfs.ext4 -> rootfs.ext2
|
||||
├── rootfs.tar
|
||||
├── sdcard.img
|
||||
├── signed_hdmi_imx8m.bin
|
||||
├── u-boot.bin
|
||||
├── u-boot.itb
|
||||
├── u-boot-nodtb.bin
|
||||
├── u-boot-spl.bin
|
||||
└── u-boot-spl-ddr.bin
|
||||
|
||||
|
||||
Flashing the SD card image
|
||||
==========================
|
||||
|
||||
To install the image on a SDCard simply copy sdcard.img to the storage (e.g. SD, eMMC)
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=<your-sd-device>
|
||||
|
||||
|
||||
Preparing the board
|
||||
===================
|
||||
|
||||
* Connect a serial line to the board
|
||||
* Insert the SD card
|
||||
* Make sure the boot source selection DIP switches are set correctly
|
||||
* SW1 1-4 OFF
|
||||
* SW1 2-3 OFF
|
||||
* Power-up the board
|
||||
|
||||
|
||||
Booting the board
|
||||
=================
|
||||
|
||||
By default the bootloader will search for the first valid image, starting
|
||||
with the internal eMMC. To make sure the bootloader loads bootscript from
|
||||
the correct location (SD card) set the boot_targets environment variable:
|
||||
|
||||
$ setenv boot_targets mmc1
|
||||
4
board/kontron/smarc-sal28/extlinux.conf
Normal file
4
board/kontron/smarc-sal28/extlinux.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
label buildroot
|
||||
kernel /boot/Image
|
||||
devicetreedir /boot
|
||||
append root=PARTUUID=%PARTUUID% rootwait
|
||||
23
board/kontron/smarc-sal28/genimage.cfg
Normal file
23
board/kontron/smarc-sal28/genimage.cfg
Normal file
@@ -0,0 +1,23 @@
|
||||
image sdcard-emmc.img {
|
||||
hdimage {
|
||||
gpt = true
|
||||
}
|
||||
|
||||
partition rcw {
|
||||
offset = 4k
|
||||
in-partition-table = "no"
|
||||
image = "rcw.bin"
|
||||
}
|
||||
|
||||
partition u-boot {
|
||||
offset = 1M
|
||||
in-partition-table = "no"
|
||||
image = "u-boot.rom"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
offset = 2M
|
||||
image = rootfs.ext4
|
||||
partition-uuid = %PARTUUID%
|
||||
}
|
||||
}
|
||||
7
board/kontron/smarc-sal28/post-build.sh
Executable file
7
board/kontron/smarc-sal28/post-build.sh
Executable file
@@ -0,0 +1,7 @@
|
||||
#!/bin/sh
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
PARTUUID="$($HOST_DIR/bin/uuidgen)"
|
||||
|
||||
install -d "$TARGET_DIR/boot/extlinux/"
|
||||
sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/extlinux.conf" > "$TARGET_DIR/boot/extlinux/extlinux.conf"
|
||||
sed "s/%PARTUUID%/$PARTUUID/g" "$BOARD_DIR/genimage.cfg" > "$BINARIES_DIR/genimage.cfg"
|
||||
88
board/kontron/smarc-sal28/readme.txt
Normal file
88
board/kontron/smarc-sal28/readme.txt
Normal file
@@ -0,0 +1,88 @@
|
||||
Kontron SMARC-sAL28
|
||||
===================
|
||||
|
||||
How to build it
|
||||
===============
|
||||
|
||||
Configure Buildroot:
|
||||
|
||||
$ make kontron_smarc_sal28_defconfig
|
||||
|
||||
Change settings to fit your needs (optional):
|
||||
|
||||
$ make menuconfig
|
||||
|
||||
Compile everything and build the rootfs image:
|
||||
|
||||
$ make
|
||||
|
||||
Copying the image to a storage device
|
||||
=====================================
|
||||
|
||||
Buildroot builds an image which can be written to the internal eMMC
|
||||
storage, a SD card or an USB thumb drive. You can use the following
|
||||
command on your host:
|
||||
|
||||
$ sudo dd if=output/images/sdcard-emmc.img of=/dev/sdx bs=1M
|
||||
|
||||
Where /dev/sdx is the corresponding block device of your SD card or USB
|
||||
thumb drive. To flash it on your internal eMMC use the following command on
|
||||
the board:
|
||||
|
||||
# dd if=sdcard-emmc.img of=/dev/mmcblk1 bs=1M
|
||||
|
||||
Be sure you have not booted from the internal eMMC in this case!
|
||||
|
||||
Booting the board
|
||||
=================
|
||||
|
||||
By default the bootloader will search for the first valid image, starting
|
||||
with the internal eMMC. Consult the vendor documentation on how to use the
|
||||
DIP switches to select specific boot devices. To use the bootloader
|
||||
environment set the boot_targets correspondingly. E.g.:
|
||||
|
||||
# setenv boot_targets usb0
|
||||
|
||||
To boot from an USB thumb drive.
|
||||
|
||||
The device tree is loaded according to the filename in fdtfile. The
|
||||
following command will set the default device tree, which works on almost
|
||||
all variants (with less features of course):
|
||||
|
||||
# setenv fdtfile freescale/fsl-ls1028a-kontron-sl28.dtb
|
||||
|
||||
Set this to a device tree which fits your board variant.
|
||||
|
||||
Connect your serial cable to SER1 and open your favorite terminal emulation
|
||||
program (baudrate 115200, 8n1). E.g.:
|
||||
|
||||
$ picocom -b 115200 /dev/ttyUSB0
|
||||
|
||||
You will get a warning reported by fdisk when you examine the SD card.
|
||||
This is because the genimage.cfg file doesn't specify the SD card size
|
||||
(as people will naturally have different sized cards), so the
|
||||
secondary GPT header is placed after the rootfs rather than at the end
|
||||
of the disk where it is expected to be.
|
||||
|
||||
You will see something like this at boot time:
|
||||
|
||||
[ 4.552797] GPT:Primary header thinks Alt. header is not at the end of the disk.
|
||||
[ 4.560237] GPT:266272 != 7864319
|
||||
[ 4.563565] GPT:Alternate GPT header not at the end of the disk.
|
||||
[ 4.569596] GPT:266272 != 7864319
|
||||
[ 4.572925] GPT: Use GNU Parted to correct GPT errors.
|
||||
|
||||
Updating the bootloader
|
||||
=======================
|
||||
|
||||
Buildroot will automatically build the u-boot bootloader. The resulting
|
||||
image is called u-boot.rom and you can find it in the images/ directory.
|
||||
|
||||
To update the bootloader on the board you could either copy it to an
|
||||
USB thumb drive or you could put it on a TFTP server. The following
|
||||
example assumes you have the bootloader image copied to the root of
|
||||
a thumb drive:
|
||||
|
||||
# usb start
|
||||
# load usb 0:1 $loadaddr u-boot.rom
|
||||
# sf probe 0 && sf update $fileaddr 0x210000 $filesize
|
||||
@@ -0,0 +1,8 @@
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.0", DRIVERS=="fsl_enetc", NAME="eno0"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.1", DRIVERS=="fsl_enetc", NAME="eno1"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.2", DRIVERS=="fsl_enetc", NAME="eno2"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.6", DRIVERS=="fsl_enetc", NAME="eno3"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.0", DRIVERS=="fsl_enetc_vf", NAME="eno0vf0"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.1", DRIVERS=="fsl_enetc_vf", NAME="eno0vf1"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.2", DRIVERS=="fsl_enetc_vf", NAME="eno1vf0"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:01.3", DRIVERS=="fsl_enetc_vf", NAME="eno1vf1"
|
||||
@@ -0,0 +1,6 @@
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p0", NAME="swp0"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p1", NAME="swp1"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p2", NAME="swp2"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p3", NAME="swp3"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p4", NAME="swp4"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p5", NAME="swp5"
|
||||
@@ -0,0 +1,19 @@
|
||||
# Map the GBE0 and GBE1 names from the SMARC standard to the network
|
||||
# interfaces. This depends on the variant of the board.
|
||||
|
||||
# get the variant compatible string
|
||||
PROGRAM=="/bin/grep '^kontron,sl28-var[1-4]$' /sys/firmware/devicetree/base/compatible", ENV{sl28_compatible}="%c"
|
||||
|
||||
# variant 1
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.1", DRIVERS=="fsl_enetc", ENV{sl28_compatible}=="kontron,sl28-var1", NAME="gbe0"
|
||||
|
||||
# variant 2
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p0", ENV{sl28_compatible}=="kontron,sl28-var2", NAME="gbe0"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.5", DRIVERS=="mscc_felix", ATTR{phys_port_name}=="p1", ENV{sl28_compatible}=="kontron,sl28-var2", NAME="gbe1"
|
||||
|
||||
# variant 3
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.0", DRIVERS=="fsl_enetc", ENV{sl28_compatible}=="kontron,sl28-var3", NAME="gbe0"
|
||||
|
||||
# variant 4
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.0", DRIVERS=="fsl_enetc", ENV{sl28_compatible}=="kontron,sl28-var4", NAME="gbe0"
|
||||
ACTION=="add", SUBSYSTEM=="net", KERNELS=="0000:00:00.1", DRIVERS=="fsl_enetc", ENV{sl28_compatible}=="kontron,sl28-var4", NAME="gbe1"
|
||||
31
board/microchip/sam9x60ek_mmc/genimage.cfg
Normal file
31
board/microchip/sam9x60ek_mmc/genimage.cfg
Normal file
@@ -0,0 +1,31 @@
|
||||
# Image for SD card boot on Microchip SAM9X60-EK
|
||||
#
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"at91-sam9x60ek.dtb",
|
||||
"boot.bin",
|
||||
"u-boot.bin"
|
||||
}
|
||||
}
|
||||
size = 16M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 1M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
||||
31
board/microchip/sama5d2_icp/genimage.cfg
Normal file
31
board/microchip/sama5d2_icp/genimage.cfg
Normal file
@@ -0,0 +1,31 @@
|
||||
# Image for SD card boot on Microchip SAMA5D2 ICP (Industrial Connectivity Platform)
|
||||
#
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"zImage",
|
||||
"at91-sama5d2_icp.dtb",
|
||||
"boot.bin",
|
||||
"u-boot.bin"
|
||||
}
|
||||
}
|
||||
size = 16M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 1M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,11 @@
|
||||
|
||||
# Xorg does not implement real dynamic linking and requires that its
|
||||
# modules get loaded in the right order.
|
||||
# https://forums.gentoo.org/viewtopic-p-8245578.html#8245578
|
||||
Section "Module"
|
||||
Load "vgahw"
|
||||
Load "fb"
|
||||
Load "shadowfb"
|
||||
Load "int10"
|
||||
Load "vbe"
|
||||
EndSection
|
||||
@@ -0,0 +1,4 @@
|
||||
label Olinuxino
|
||||
kernel /boot/zImage
|
||||
fdtdir /boot
|
||||
append console=ttyS0,115200 root=/dev/mmcblk0p1 rootwait panic=10 ${extra}
|
||||
9
board/olpc/genimage.cfg
Normal file
9
board/olpc/genimage.cfg
Normal file
@@ -0,0 +1,9 @@
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
71
board/olpc/linux.config
Normal file
71
board/olpc/linux.config
Normal file
@@ -0,0 +1,71 @@
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_NO_HZ=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_PREEMPT=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_CFG80211=y
|
||||
CONFIG_CFG80211_WEXT=y
|
||||
CONFIG_MAC80211=y
|
||||
CONFIG_RFKILL=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_SCSI=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_BLK_DEV_SR=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_MTD=y
|
||||
CONFIG_MTD_BLOCK=y
|
||||
CONFIG_GPIO_SYSFS=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_LIBERTAS=m
|
||||
CONFIG_INPUT_MOUSEDEV=y
|
||||
CONFIG_INPUT_MOUSEDEV_PSAUX=y
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_X=1200
|
||||
CONFIG_INPUT_MOUSEDEV_SCREEN_Y=900
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_INPUT_TABLET=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_POWER_SUPPLY=y
|
||||
CONFIG_BATTERY_OLPC=y
|
||||
CONFIG_REGULATOR_FIXED_VOLTAGE=y
|
||||
CONFIG_MEDIA_SUPPORT=y
|
||||
CONFIG_MEDIA_CAMERA_SUPPORT=y
|
||||
CONFIG_MEDIA_CONTROLLER=y
|
||||
CONFIG_VIDEO_V4L2_SUBDEV_API=y
|
||||
CONFIG_MEDIA_USB_SUPPORT=y
|
||||
CONFIG_USB_VIDEO_CLASS=m
|
||||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_PANEL_SIMPLE=m
|
||||
CONFIG_FRAMEBUFFER_CONSOLE=y
|
||||
CONFIG_FB_SIMPLE=y
|
||||
CONFIG_LCD_CLASS_DEVICE=y
|
||||
CONFIG_BACKLIGHT_CLASS_DEVICE=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_MMC=y
|
||||
CONFIG_MMC_SDHCI=y
|
||||
CONFIG_NEW_LEDS=y
|
||||
CONFIG_LEDS_CLASS=y
|
||||
CONFIG_LEDS_GPIO=y
|
||||
CONFIG_LEDS_TRIGGERS=y
|
||||
CONFIG_LEDS_TRIGGER_HEARTBEAT=y
|
||||
CONFIG_LEDS_TRIGGER_DEFAULT_ON=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_MSDOS_FS=y
|
||||
CONFIG_VFAT_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_FONTS=y
|
||||
CONFIG_FONT_TER16x32=y
|
||||
47
board/olpc/olpc.fth
Normal file
47
board/olpc/olpc.fth
Normal file
@@ -0,0 +1,47 @@
|
||||
\ OLPC XO boot script
|
||||
|
||||
: (visible) " unfreeze visible" evaluate ;
|
||||
' (visible) catch drop forget (visible)
|
||||
|
||||
" /aliases" find-device " last" get-property
|
||||
abort" No last alias"
|
||||
" /pci/sd@c" 2over substring? if " root=/dev/mmcblk0p1 " to boot-file then
|
||||
" /sd/sdhci@d4280000" 2over substring? if " root=/dev/mmcblk1p1 " to boot-file then
|
||||
" /pci/usb@" 2over substring? if " root=/dev/sda1 " to boot-file then
|
||||
" /usb@" 2over substring? if " root=/dev/sda1 " to boot-file then
|
||||
" /pci/nandflash@c" 2over substring? if " root=/dev/mtdblock0 rootfstype=jffs2 " to boot-file then
|
||||
2drop
|
||||
|
||||
root-device " compatible" get-property dend if 0 0 then ( compatible$ )
|
||||
" olpc,xo-1.75" 2over sindex -1 > if ( compatible$ )
|
||||
\ Version check on XO-1.75
|
||||
" mrvl,mmp2" 2over sindex -1 = if ( compatible$ )
|
||||
2drop ( )
|
||||
cr
|
||||
." Firmware Q4E00 or newer is needed to boot a Devicetree enabled kernel." cr
|
||||
cr
|
||||
." One way to update is to copy http://dev.laptop.org/~quozl/q4e00ja.rom" cr
|
||||
." to a FAT partition on a USB flash stick and run ""flash u:\q4e00ja.rom""" cr
|
||||
cr
|
||||
." Aborting boot." cr
|
||||
" show-sad" evaluate
|
||||
abort
|
||||
then
|
||||
then ( compatible$ )
|
||||
|
||||
" mmp" 2swap sindex -1 > if
|
||||
\ A Marvell MMP-based machine
|
||||
" last:\boot\zImage" to boot-device
|
||||
boot-file " console=ttyS2,115200 " $cat2 to boot-file
|
||||
else
|
||||
\ Assume XO-1
|
||||
" last:\boot\bzImage" to boot-device
|
||||
boot-file " console=ttyS0,115200 reboot=pci " $cat2 to boot-file
|
||||
then
|
||||
|
||||
\ Pick a terminal that looks better on the XO screen
|
||||
root-device " architecture" get-property dend if 0 0 else 1- then
|
||||
" OLPC" $= if boot-file " fbcon=font:TER16x32 vt.color=0xf0 " $cat2 to boot-file then
|
||||
|
||||
boot-file " console=tty0 rootwait" $cat2 to boot-file
|
||||
boot
|
||||
4
board/olpc/post-build.sh
Executable file
4
board/olpc/post-build.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
install -m 0644 -D $BOARD_DIR/olpc.fth $TARGET_DIR/boot/olpc.fth
|
||||
98
board/olpc/readme.txt
Normal file
98
board/olpc/readme.txt
Normal file
@@ -0,0 +1,98 @@
|
||||
OLPC XO Laptops
|
||||
===============
|
||||
|
||||
This document explains how to build and run images that run on the OLPC
|
||||
XO laptops.
|
||||
|
||||
Supported models
|
||||
----------------
|
||||
|
||||
* OLPC XO-1
|
||||
The original NS Geode based OLPC laptop, uses the x86 architecture.
|
||||
Can be booted either from an internal MTD device formatted with JFFS2
|
||||
or from a FAT or EXT4 partition on a SD card or a USB flash stick.
|
||||
|
||||
* OLPC XO-7.5
|
||||
The ARM-based laptop. Needs a recent enough firmware to provide a good
|
||||
enough flattened device tree to the kernel. Can be from a FAT or EXT4
|
||||
partition on a internal eMMC, a SD card or a USB flash stick.
|
||||
|
||||
Configure and build
|
||||
===================
|
||||
|
||||
$ make olpc_xo1_defconfig # Configure for XO-1
|
||||
|
||||
or:
|
||||
|
||||
$ make olpc_xo175_defconfig # Configure for XO-1.75
|
||||
|
||||
Then:
|
||||
|
||||
$ make menuconfig # Customize the build configuration
|
||||
$ make # Build
|
||||
|
||||
Preparing the machine
|
||||
=====================
|
||||
|
||||
Firmware security
|
||||
-----------------
|
||||
|
||||
Most OLPC machines were shipped with the security system that disallows
|
||||
booting unsigned software. If this is the case with your machine, in order
|
||||
to run the image you've built on it you'll need to get a developer key and
|
||||
deactivate the security system.
|
||||
|
||||
The procedure is descriped in the OLPC wiki:
|
||||
http://wiki.laptop.org/go/Activation_and_Developer_Keys
|
||||
|
||||
Firmware upgrade
|
||||
----------------
|
||||
|
||||
It is always preferrable to use an up to date firmware. The firmware images
|
||||
are available at http://wiki.laptop.org/go/Firmware. For the XO-1.75 laptop
|
||||
to boot the mainline kernel a firmware Q4E00JA or newer is needed. You can
|
||||
get it at http://dev.laptop.org/~quozl/q4e00ja.rom.
|
||||
|
||||
To update the firmware, place the .rom file on to your bootable media,
|
||||
connect a charged battery pack and a wall adapter, and enter the Open
|
||||
Firmware prompt by pressing ESC during the early boot (needs an unlocked
|
||||
laptop -- see "Firmware security" above). Then use the "flash" command
|
||||
to update the firmware:
|
||||
|
||||
ok flash ext:\q4e00ja.rom \ Flash the "q4e00ja.rom" from the SD card
|
||||
ok flash u:\q4e00ja.rom \ Flash the "q4e00ja.rom" from USB stick
|
||||
|
||||
Create the bootable SD card or USB flash stick
|
||||
==============================================
|
||||
|
||||
When the build is finished, an image file called "sdcard.img" will be created.
|
||||
It is suitable for writing directly to a SD card, USB flash stick or (on a
|
||||
XO-1.75) the internal eMMC flash.
|
||||
|
||||
Before writing the image, please double check that you're using the right
|
||||
device (e.g. with "lsblk" command). Doing the following will DESTROY ALL DATA
|
||||
that's currently on the media.
|
||||
|
||||
# cat output/images/sdcard.img >/dev/<device>
|
||||
|
||||
Flashing the JFFS2 image (XO-1 only)
|
||||
====================================
|
||||
|
||||
Unlike XO-1.75, the internal NAND flash on XO-1 is accessed without a
|
||||
FTL and needs a flash-friendly filesystem. A build configured for XO-1
|
||||
creates a file named "root.jffs2" that can be written to it.
|
||||
|
||||
One way to write it is from the Open Firmware prompt. First, partition
|
||||
and format a USB flash disk with a FAT file system and place the
|
||||
"root.jffs2" file onto it. Then power on the machine, enter the
|
||||
Open Firmware port by pressing the ESC key and run the following:
|
||||
|
||||
ok patch noop ?open-crcs copy-nand \ Disable CRC check
|
||||
ok copy-nand u:\root.jffs2
|
||||
|
||||
Booting the machine
|
||||
===================
|
||||
|
||||
Once your machine is unlocked, it will automatically boot from your media
|
||||
wherever it will detect it attached to the USB bus or the SD card slot,
|
||||
otherwise it will proceed booting from the internal flash.
|
||||
55
board/olpc/xo-1.75/linux.config
Normal file
55
board/olpc/xo-1.75/linux.config
Normal file
@@ -0,0 +1,55 @@
|
||||
CONFIG_ARCH_MMP=y
|
||||
CONFIG_MACH_MMP2_DT=y
|
||||
CONFIG_MACH_MMP3_DT=y
|
||||
CONFIG_USB_EHCI_MV_U2O=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_NR_CPUS=2
|
||||
CONFIG_HIGHMEM=y
|
||||
CONFIG_FORCE_MAX_ZONEORDER=16
|
||||
CONFIG_ZBOOT_ROM_TEXT=0x0
|
||||
CONFIG_ZBOOT_ROM_BSS=0x0
|
||||
CONFIG_ARM_APPENDED_DTB=y
|
||||
CONFIG_ARM_ATAG_DTB_COMPAT=y
|
||||
CONFIG_VFP=y
|
||||
CONFIG_NEON=y
|
||||
CONFIG_SENSORS_LIS3_SPI=y
|
||||
CONFIG_SERIO_OLPC_APSP=y
|
||||
CONFIG_REGULATOR_88PG86X=m
|
||||
CONFIG_MEDIA_PLATFORM_SUPPORT=y
|
||||
CONFIG_V4L_PLATFORM_DRIVERS=y
|
||||
CONFIG_VIDEO_MMP_CAMERA=y
|
||||
CONFIG_DRM_ARMADA=y
|
||||
CONFIG_DRM_CHRONTEL_CH7033=m
|
||||
CONFIG_DRM_DISPLAY_CONNECTOR=m
|
||||
CONFIG_DRM_SIMPLE_BRIDGE=m
|
||||
CONFIG_DRM_ETNAVIV=m
|
||||
CONFIG_USB_EHCI_MV=y
|
||||
CONFIG_MMC_SDHCI_PLTFM=y
|
||||
CONFIG_MMC_SDHCI_PXAV3=y
|
||||
CONFIG_OLPC_XO175=y
|
||||
CONFIG_OLPC_XO175_EC=y
|
||||
CONFIG_PHY_PXA_USB=y
|
||||
CONFIG_PHY_MMP3_USB=y
|
||||
CONFIG_CRYPTO_LZO=m
|
||||
CONFIG_LIBERTAS_SDIO=m
|
||||
CONFIG_LIBERTAS_THINFIRM=m
|
||||
CONFIG_MWIFIEX=m
|
||||
CONFIG_MWIFIEX_SDIO=m
|
||||
CONFIG_MTD_SPI_NOR=m
|
||||
CONFIG_SRAM=y
|
||||
CONFIG_I2C_PXA=y
|
||||
CONFIG_SERIAL_OF_PLATFORM=y
|
||||
CONFIG_SPI=y
|
||||
CONFIG_SPI_PXA2XX=y
|
||||
CONFIG_SPI_SLAVE=y
|
||||
CONFIG_SND_SOC=y
|
||||
CONFIG_SND_MMP_SOC_SSPA=y
|
||||
CONFIG_SND_SOC_RT5631=y
|
||||
CONFIG_SND_AUDIO_GRAPH_CARD=y
|
||||
CONFIG_PWRSEQ_SD8787=m
|
||||
CONFIG_RTC_DRV_DS1307=y
|
||||
CONFIG_DMADEVICES=y
|
||||
CONFIG_MMP_TDMA=y
|
||||
CONFIG_INPUT_TOUCHSCREEN=y
|
||||
CONFIG_TOUCHSCREEN_ZFORCE=y
|
||||
CONFIG_COMMON_CLK_MMP2_AUDIO=y
|
||||
80
board/olpc/xo-1/linux.config
Normal file
80
board/olpc/xo-1/linux.config
Normal file
@@ -0,0 +1,80 @@
|
||||
# CONFIG_64BIT is not set
|
||||
CONFIG_IOSF_MBI=y
|
||||
CONFIG_MGEODE_LX=y
|
||||
CONFIG_X86_MSR=y
|
||||
CONFIG_HZ_100=y
|
||||
CONFIG_KEXEC=y
|
||||
CONFIG_CMDLINE_BOOL=y
|
||||
CONFIG_ACPI=y
|
||||
CONFIG_CPU_IDLE=y
|
||||
CONFIG_CPU_IDLE_GOV_LADDER=y
|
||||
CONFIG_OLPC=y
|
||||
CONFIG_OLPC_XO1_PM=y
|
||||
CONFIG_OLPC_XO1_RTC=y
|
||||
CONFIG_OLPC_XO1_SCI=y
|
||||
# CONFIG_VIRTUALIZATION is not set
|
||||
CONFIG_SPARSEMEM_MANUAL=y
|
||||
CONFIG_CMA=y
|
||||
CONFIG_MTD_CMDLINE_PARTS=y
|
||||
CONFIG_MTD_REDBOOT_PARTS=y
|
||||
CONFIG_MTD_REDBOOT_DIRECTORY_BLOCK=0
|
||||
CONFIG_MTD_ONENAND=y
|
||||
CONFIG_MTD_ONENAND_GENERIC=y
|
||||
CONFIG_MTD_RAW_NAND=y
|
||||
CONFIG_MTD_NAND_CAFE=y
|
||||
CONFIG_MTD_UBI=y
|
||||
CONFIG_CS5535_MFGPT=y
|
||||
CONFIG_CS5535_CLOCK_EVENT_SRC=y
|
||||
CONFIG_MOUSE_PS2_OLPC=y
|
||||
CONFIG_SERIAL_8250_NR_UARTS=1
|
||||
CONFIG_SERIAL_8250_RUNTIME_UARTS=1
|
||||
CONFIG_SERIAL_8250_EXTENDED=y
|
||||
CONFIG_SERIAL_8250_MANY_PORTS=y
|
||||
CONFIG_SERIAL_8250_SHARE_IRQ=y
|
||||
CONFIG_SERIAL_8250_DETECT_IRQ=y
|
||||
CONFIG_SERIAL_8250_RSA=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
# CONFIG_HW_RANDOM_VIA is not set
|
||||
CONFIG_NVRAM=y
|
||||
CONFIG_SCx200_ACB=y
|
||||
CONFIG_PINCTRL=y
|
||||
CONFIG_PINCTRL_SINGLE=y
|
||||
CONFIG_GPIO_CS5535=y
|
||||
CONFIG_THERMAL=y
|
||||
CONFIG_WATCHDOG=y
|
||||
CONFIG_GEODE_WDT=y
|
||||
CONFIG_MFD_CS5535=y
|
||||
CONFIG_MFD_MAX8925=y
|
||||
CONFIG_VIDEO_CAFE_CCIC=y
|
||||
CONFIG_FB_TILEBLITTING=y
|
||||
CONFIG_FB_VESA=y
|
||||
CONFIG_FB_GEODE=y
|
||||
CONFIG_FB_GEODE_LX=y
|
||||
CONFIG_BACKLIGHT_MAX8925=y
|
||||
CONFIG_VGACON_SOFT_SCROLLBACK=y
|
||||
CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
|
||||
CONFIG_SND_OSSEMUL=y
|
||||
CONFIG_SND_DYNAMIC_MINORS=y
|
||||
CONFIG_SND_AC97_POWER_SAVE=y
|
||||
CONFIG_SND_CS5535AUDIO=y
|
||||
CONFIG_USB_EHCI_ROOT_HUB_TT=y
|
||||
CONFIG_USB_OHCI_HCD=y
|
||||
CONFIG_MMC_SDHCI_PCI=y
|
||||
CONFIG_STAGING=y
|
||||
CONFIG_FB_OLPC_DCON=y
|
||||
CONFIG_XO1_RFKILL=y
|
||||
CONFIG_RESET_CONTROLLER=y
|
||||
CONFIG_GENERIC_PHY=y
|
||||
CONFIG_PROC_KCORE=y
|
||||
CONFIG_HUGETLBFS=y
|
||||
CONFIG_JFFS2_FS=y
|
||||
CONFIG_JFFS2_FS_WBUF_VERIFY=y
|
||||
CONFIG_JFFS2_SUMMARY=y
|
||||
CONFIG_JFFS2_FS_XATTR=y
|
||||
CONFIG_JFFS2_COMPRESSION_OPTIONS=y
|
||||
CONFIG_UBIFS_FS=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_LIBERTAS_USB=m
|
||||
CONFIG_LIBERTAS_MESH=y
|
||||
CONFIG_LIBERTAS_THINFIRM=m
|
||||
CONFIG_LIBERTAS_THINFIRM_USB=m
|
||||
4
board/orangepi/orangepi-rk3399/extlinux.conf
Normal file
4
board/orangepi/orangepi-rk3399/extlinux.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
label RK3399_ROCKPRO64 linux
|
||||
kernel /Image
|
||||
devicetree /rk3399-orangepi.dtb
|
||||
append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk1p4 rw rootwait
|
||||
39
board/orangepi/orangepi-rk3399/genimage.cfg
Normal file
39
board/orangepi/orangepi-rk3399/genimage.cfg
Normal file
@@ -0,0 +1,39 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"Image",
|
||||
"rk3399-orangepi.dtb",
|
||||
"extlinux"
|
||||
}
|
||||
}
|
||||
size = 64M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
|
||||
hdimage {
|
||||
gpt = true
|
||||
}
|
||||
|
||||
partition loader1 {
|
||||
image = "idbloader.img"
|
||||
offset = 32K
|
||||
}
|
||||
|
||||
partition loader2 {
|
||||
image = "u-boot.itb"
|
||||
offset = 8M
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 16M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
5
board/orangepi/orangepi-rk3399/post-build.sh
Executable file
5
board/orangepi/orangepi-rk3399/post-build.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
|
||||
56
board/orangepi/orangepi-rk3399/readme.txt
Normal file
56
board/orangepi/orangepi-rk3399/readme.txt
Normal file
@@ -0,0 +1,56 @@
|
||||
Orangepi Rk3399
|
||||
================
|
||||
http://www.orangepi.org/Orange%20Pi%20RK3399/
|
||||
|
||||
Build:
|
||||
======
|
||||
$ make orangepi_rk3399_defconfig
|
||||
$ make
|
||||
|
||||
Files created in output directory
|
||||
=================================
|
||||
|
||||
output/images
|
||||
|
||||
├── bl31.elf
|
||||
├── boot.vfat
|
||||
├── extlinux
|
||||
├── idbloader.img
|
||||
├── Image
|
||||
├── rk3399-orangepi.dtb
|
||||
├── rootfs.ext2
|
||||
├── rootfs.ext4 -> rootfs.ext2
|
||||
├── rootfs.tar
|
||||
├── sdcard.img
|
||||
├── u-boot.bin
|
||||
└── u-boot.itb
|
||||
|
||||
Creating bootable SD card:
|
||||
==========================
|
||||
|
||||
Simply invoke (as root)
|
||||
|
||||
sudo dd if=output/images/sdcard.img of=/dev/sdX && sync
|
||||
|
||||
Where X is your SD card device.
|
||||
|
||||
Booting:
|
||||
========
|
||||
Orangepi-RK3399 by default boots from emmc. For SD card boot to
|
||||
happen, emmc should be empty. If emmc happens to have any bootable
|
||||
image then erase emmc so that bootrom will look for a proper image in SD.
|
||||
|
||||
emmc can be erased once after booted into linux as shown in below link.
|
||||
|
||||
https://wiki.amarulasolutions.com/bsp/setup/rockchip/rk3399_emmc.html
|
||||
|
||||
Serial console:
|
||||
---------------
|
||||
|
||||
Baudrate for this board is 1500000.
|
||||
|
||||
Login:
|
||||
------
|
||||
Enter 'root' as login user, and the prompt is ready.
|
||||
|
||||
https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/orangepi.html
|
||||
6
board/orangepi/orangepi-zero-plus/boot.cmd
Normal file
6
board/orangepi/orangepi-zero-plus/boot.cmd
Normal file
@@ -0,0 +1,6 @@
|
||||
setenv bootargs console=ttyS0,115200 earlyprintk root=/dev/mmcblk0p2 rootwait
|
||||
|
||||
fatload mmc 0 $kernel_addr_r Image
|
||||
fatload mmc 0 $fdt_addr_r sun50i-h5-orangepi-zero-plus.dtb
|
||||
|
||||
booti $kernel_addr_r - $fdt_addr_r
|
||||
39
board/orangepi/orangepi-zero-plus/genimage.cfg
Normal file
39
board/orangepi/orangepi-zero-plus/genimage.cfg
Normal file
@@ -0,0 +1,39 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"Image",
|
||||
"sun50i-h5-orangepi-zero-plus.dtb",
|
||||
"boot.scr"
|
||||
}
|
||||
}
|
||||
size = 64M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition spl {
|
||||
in-partition-table = "no"
|
||||
image = "sunxi-spl.bin"
|
||||
offset = 8192
|
||||
}
|
||||
|
||||
partition u-boot {
|
||||
in-partition-table = "no"
|
||||
image = "u-boot.itb"
|
||||
offset = 40K
|
||||
size = 1M # 1MB - 40K
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
34
board/orangepi/orangepi-zero-plus/readme.txt
Normal file
34
board/orangepi/orangepi-zero-plus/readme.txt
Normal file
@@ -0,0 +1,34 @@
|
||||
Intro
|
||||
=====
|
||||
|
||||
This default configuration will allow you to start experimenting with the
|
||||
buildroot environment for the Orangepi Zero Plus. With the current configuration
|
||||
it will bring-up the board, and allow access through the serial console.
|
||||
|
||||
Orangepi Zero Plus link:
|
||||
http://www.orangepi.org/OrangePiZeroPlus/
|
||||
|
||||
This configuration uses U-Boot mainline and kernel mainline.
|
||||
|
||||
How to build
|
||||
============
|
||||
|
||||
$ make orangepi_zero_plus_defconfig
|
||||
$ make
|
||||
|
||||
Note: you will need access to the internet to download the required
|
||||
sources.
|
||||
|
||||
How to write the SD card
|
||||
========================
|
||||
|
||||
Once the build process is finished you will have an image called "sdcard.img"
|
||||
in the output/images/ directory.
|
||||
|
||||
Copy the bootable "sdcard.img" onto an SD card with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
$ sudo sync
|
||||
|
||||
Insert the micro SDcard in your Orangepi Zero Plus and power it up. The console
|
||||
is on the serial line, 115200 8N1.
|
||||
6
board/pcengines/apu2/isolinux.cfg
Normal file
6
board/pcengines/apu2/isolinux.cfg
Normal file
@@ -0,0 +1,6 @@
|
||||
serial 0 115200
|
||||
default 1
|
||||
label 1
|
||||
kernel __KERNEL_PATH__
|
||||
initrd __INITRD_PATH__
|
||||
append root=/dev/sr0 console=ttyS0,115200n8
|
||||
51
board/pcengines/apu2/linux.config
Normal file
51
board/pcengines/apu2/linux.config
Normal file
@@ -0,0 +1,51 @@
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_CGROUPS=y
|
||||
CONFIG_BLK_DEV_INITRD=y
|
||||
CONFIG_SMP=y
|
||||
CONFIG_HYPERVISOR_GUEST=y
|
||||
CONFIG_PARAVIRT=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_INET=y
|
||||
# CONFIG_WIRELESS is not set
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_SATA_AHCI=y
|
||||
CONFIG_ATA_PIIX=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_IGB=y
|
||||
CONFIG_NE2K_PCI=y
|
||||
CONFIG_8139CP=y
|
||||
# CONFIG_WLAN is not set
|
||||
CONFIG_INPUT_EVDEV=y
|
||||
CONFIG_SERIAL_8250=y
|
||||
CONFIG_SERIAL_8250_CONSOLE=y
|
||||
CONFIG_VIRTIO_CONSOLE=y
|
||||
CONFIG_HW_RANDOM_VIRTIO=m
|
||||
CONFIG_DRM=y
|
||||
CONFIG_SOUND=y
|
||||
CONFIG_SND=y
|
||||
# CONFIG_SND_PCI is not set
|
||||
CONFIG_USB=y
|
||||
CONFIG_USB_XHCI_HCD=y
|
||||
CONFIG_USB_EHCI_HCD=y
|
||||
CONFIG_USB_UHCI_HCD=y
|
||||
CONFIG_USB_STORAGE=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO_BALLOON=y
|
||||
CONFIG_VIRTIO_INPUT=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_AUTOFS4_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
CONFIG_UNWINDER_FRAME_POINTER=y
|
||||
40
board/pcengines/apu2/readme.txt
Normal file
40
board/pcengines/apu2/readme.txt
Normal file
@@ -0,0 +1,40 @@
|
||||
Intro
|
||||
=====
|
||||
|
||||
This is a board configuration for the apu2 platform by PC Engines.
|
||||
|
||||
https://pcengines.ch/apu2.htm
|
||||
|
||||
Since the apu2 does not have any graphical output, the default configuration
|
||||
will ensure that the kernel output as well as the login prompt will be sent to
|
||||
the serial port.
|
||||
|
||||
How to build
|
||||
============
|
||||
|
||||
The provided defconfig creates a hybrid isolinux image that can be booted from
|
||||
either an USB stick or a CD.
|
||||
|
||||
$ make pcengines_apu2_defconfig
|
||||
$ make
|
||||
|
||||
How to write to an USB stick
|
||||
============================
|
||||
|
||||
Once the build process is finished you will have an image
|
||||
called "rootfs.iso9660" in the output/images/ directory.
|
||||
|
||||
Copy the bootable "rootfs.iso9660" onto the USB stick with "dd":
|
||||
|
||||
$ sudo dd if=output/images/rootfs.iso9660 of=/dev/sdX bs=1M conv=fsync
|
||||
$ sudo sync
|
||||
|
||||
How to connect to the apu2
|
||||
==========================
|
||||
|
||||
Connect to the DB9 serial port of the apu2 board (either directly or through a
|
||||
USB adapter) with a baudrate of 115200.
|
||||
|
||||
For example with miniterm (part of pyserial):
|
||||
|
||||
$ miniterm.py -f direct /dev/ttyUSB0 115200
|
||||
4
board/pine64/rockpro64/extlinux.conf
Normal file
4
board/pine64/rockpro64/extlinux.conf
Normal file
@@ -0,0 +1,4 @@
|
||||
label RK3399_ROCKPRO64 linux
|
||||
kernel /Image
|
||||
devicetree /rk3399-rockpro64.dtb
|
||||
append earlycon=uart8250,mmio32,0xff1a0000 root=/dev/mmcblk0p4 rw rootwait
|
||||
39
board/pine64/rockpro64/genimage.cfg
Normal file
39
board/pine64/rockpro64/genimage.cfg
Normal file
@@ -0,0 +1,39 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"Image",
|
||||
"rk3399-rockpro64.dtb",
|
||||
"extlinux"
|
||||
}
|
||||
}
|
||||
size = 64M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
|
||||
hdimage {
|
||||
gpt = true
|
||||
}
|
||||
|
||||
partition loader1 {
|
||||
image = "idbloader.img"
|
||||
offset = 32K
|
||||
}
|
||||
|
||||
partition loader2 {
|
||||
image = "u-boot.itb"
|
||||
offset = 8M
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
offset = 16M
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
}
|
||||
}
|
||||
5
board/pine64/rockpro64/post-build.sh
Executable file
5
board/pine64/rockpro64/post-build.sh
Executable file
@@ -0,0 +1,5 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
install -m 0644 -D $BOARD_DIR/extlinux.conf $BINARIES_DIR/extlinux/extlinux.conf
|
||||
60
board/pine64/rockpro64/readme.txt
Normal file
60
board/pine64/rockpro64/readme.txt
Normal file
@@ -0,0 +1,60 @@
|
||||
PINE64 ROCKPro64
|
||||
================
|
||||
https://www.pine64.org/rockpro64/
|
||||
|
||||
Build:
|
||||
======
|
||||
$ make rockpro64_defconfig
|
||||
$ make
|
||||
|
||||
Files created in output directory
|
||||
=================================
|
||||
|
||||
output/images
|
||||
|
||||
├── bl31.elf
|
||||
├── boot.vfat
|
||||
├── extlinux
|
||||
├── idbloader.img
|
||||
├── Image
|
||||
├── rk3399-rockpro64.dtb
|
||||
├── rootfs.ext2
|
||||
├── rootfs.ext4 -> rootfs.ext2
|
||||
├── rootfs.tar
|
||||
├── sdcard.img
|
||||
├── u-boot.bin
|
||||
└── u-boot.itb
|
||||
|
||||
Creating bootable SD card:
|
||||
==========================
|
||||
|
||||
Simply invoke (as root)
|
||||
|
||||
sudo dd if=output/images/sdcard.img of=/dev/sdX && sync
|
||||
|
||||
Where X is your SD card device.
|
||||
|
||||
Booting:
|
||||
========
|
||||
RockPro64 has a 40-pin PI-2 GPIO Bus.
|
||||
|
||||
Connect a jumper between pin 23 and pin 25 for SD card boot.
|
||||
|
||||
Serial console:
|
||||
---------------
|
||||
The pin layout for serial console on PI-2 GPIO Bus is as follows:
|
||||
|
||||
pin 6: gnd
|
||||
pin 8: tx
|
||||
pin 10: rx
|
||||
|
||||
Initially connect pin 6 and pin 8(transmit). Apply power to RockPro64, once the
|
||||
power is on then connect pin 10(receive).
|
||||
|
||||
Baudrate for this board is 1500000.
|
||||
|
||||
Login:
|
||||
------
|
||||
Enter 'root' as login user, and the prompt is ready.
|
||||
|
||||
https://wiki.amarulasolutions.com/bsp/rockchip/rk3399/rockpro64.html
|
||||
11
board/qemu/aarch64-sbsa/assemble-flash-images
Executable file
11
board/qemu/aarch64-sbsa/assemble-flash-images
Executable file
@@ -0,0 +1,11 @@
|
||||
#!/bin/bash
|
||||
|
||||
set -e
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
cp -f ${BOARD_DIR}/grub.cfg ${BINARIES_DIR}/efi-part/EFI/BOOT/grub.cfg
|
||||
|
||||
# The QEMU sbsa machine expects flash devices to be 256M.
|
||||
truncate -s 256M ${BINARIES_DIR}/SBSA_FLASH0.fd
|
||||
truncate -s 256M ${BINARIES_DIR}/SBSA_FLASH1.fd
|
||||
30
board/qemu/aarch64-sbsa/genimage.cfg
Normal file
30
board/qemu/aarch64-sbsa/genimage.cfg
Normal file
@@ -0,0 +1,30 @@
|
||||
image efi-part.vfat {
|
||||
vfat {
|
||||
file startup.nsh {
|
||||
image = "efi-part/startup.nsh"
|
||||
}
|
||||
file EFI {
|
||||
image = "efi-part/EFI"
|
||||
}
|
||||
file Image {
|
||||
image = "Image"
|
||||
}
|
||||
}
|
||||
size = 32M
|
||||
}
|
||||
|
||||
image disk.img {
|
||||
hdimage {
|
||||
gpt = true
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xEF
|
||||
image = "efi-part.vfat"
|
||||
}
|
||||
|
||||
partition root {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext2"
|
||||
}
|
||||
}
|
||||
6
board/qemu/aarch64-sbsa/grub.cfg
Normal file
6
board/qemu/aarch64-sbsa/grub.cfg
Normal file
@@ -0,0 +1,6 @@
|
||||
set default="0"
|
||||
set timeout="5"
|
||||
|
||||
menuentry "Buildroot" {
|
||||
linux /Image root=/dev/sda2 rootwait console=ttyAMA0
|
||||
}
|
||||
68
board/qemu/aarch64-sbsa/linux.config
Normal file
68
board/qemu/aarch64-sbsa/linux.config
Normal file
@@ -0,0 +1,68 @@
|
||||
CONFIG_SYSVIPC=y
|
||||
CONFIG_POSIX_MQUEUE=y
|
||||
CONFIG_NO_HZ_IDLE=y
|
||||
CONFIG_HIGH_RES_TIMERS=y
|
||||
CONFIG_TASKSTATS=y
|
||||
CONFIG_SCHED_AUTOGROUP=y
|
||||
CONFIG_PROFILING=y
|
||||
CONFIG_ARCH_VEXPRESS=y
|
||||
CONFIG_COMPAT=y
|
||||
CONFIG_FW_CFG_SYSFS=y
|
||||
CONFIG_FW_CFG_SYSFS_CMDLINE=y
|
||||
CONFIG_ACPI=y
|
||||
CONFIG_MODULES=y
|
||||
CONFIG_MODULE_UNLOAD=y
|
||||
CONFIG_BLK_DEV_BSGLIB=y
|
||||
CONFIG_BINFMT_MISC=y
|
||||
CONFIG_TRANSPARENT_HUGEPAGE=y
|
||||
CONFIG_NET=y
|
||||
CONFIG_PACKET=y
|
||||
CONFIG_PACKET_DIAG=y
|
||||
CONFIG_UNIX=y
|
||||
CONFIG_NET_KEY=y
|
||||
CONFIG_INET=y
|
||||
CONFIG_IP_MULTICAST=y
|
||||
CONFIG_IP_ADVANCED_ROUTER=y
|
||||
CONFIG_BRIDGE=m
|
||||
CONFIG_NET_SCHED=y
|
||||
CONFIG_VSOCKETS=y
|
||||
CONFIG_PCI=y
|
||||
CONFIG_PCI_HOST_GENERIC=y
|
||||
CONFIG_DEVTMPFS=y
|
||||
CONFIG_DEVTMPFS_MOUNT=y
|
||||
CONFIG_VIRTIO_BLK=y
|
||||
CONFIG_BLK_DEV_SD=y
|
||||
CONFIG_CHR_DEV_SG=y
|
||||
CONFIG_SCSI_CONSTANTS=y
|
||||
CONFIG_SCSI_LOGGING=y
|
||||
CONFIG_SCSI_SCAN_ASYNC=y
|
||||
CONFIG_SCSI_VIRTIO=y
|
||||
CONFIG_ATA=y
|
||||
CONFIG_SATA_AHCI_PLATFORM=y
|
||||
CONFIG_NETDEVICES=y
|
||||
CONFIG_DUMMY=y
|
||||
CONFIG_MACVLAN=y
|
||||
CONFIG_VIRTIO_NET=y
|
||||
CONFIG_NLMON=y
|
||||
CONFIG_SERIAL_AMBA_PL011=y
|
||||
CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
|
||||
CONFIG_VIRTIO_CONSOLE=y
|
||||
CONFIG_HW_RANDOM=y
|
||||
CONFIG_HW_RANDOM_VIRTIO=y
|
||||
CONFIG_TCG_TPM=y
|
||||
CONFIG_TCG_TIS=y
|
||||
CONFIG_DRM=y
|
||||
CONFIG_DRM_VIRTIO_GPU=y
|
||||
CONFIG_RTC_CLASS=y
|
||||
CONFIG_RTC_DRV_PL031=y
|
||||
CONFIG_VIRTIO_PCI=y
|
||||
CONFIG_VIRTIO_MMIO=y
|
||||
CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
|
||||
CONFIG_MAILBOX=y
|
||||
CONFIG_PL320_MBOX=y
|
||||
CONFIG_ARM_SMMU_V3=y
|
||||
CONFIG_EXT4_FS=y
|
||||
CONFIG_FUSE_FS=y
|
||||
CONFIG_VIRTIO_FS=y
|
||||
CONFIG_TMPFS=y
|
||||
CONFIG_TMPFS_POSIX_ACL=y
|
||||
32
board/qemu/aarch64-sbsa/readme.txt
Normal file
32
board/qemu/aarch64-sbsa/readme.txt
Normal file
@@ -0,0 +1,32 @@
|
||||
Intro
|
||||
=====
|
||||
|
||||
The QEMU sbsa-ref machine is primarily meant for firmware development
|
||||
and testing according to ARM's SBSA and SBBR standards.
|
||||
|
||||
Build
|
||||
=====
|
||||
|
||||
$ make qemu_aarch64_sbsa_defconfig
|
||||
$ make
|
||||
|
||||
Emulation
|
||||
=========
|
||||
|
||||
Run the emulation with:
|
||||
|
||||
qemu-system-aarch64 \
|
||||
-M sbsa-ref \
|
||||
-cpu cortex-a57 \
|
||||
-smp 4 \
|
||||
-m 1024 \
|
||||
-nographic \
|
||||
-pflash output/images/SBSA_FLASH0.fd \
|
||||
-pflash output/images/SBSA_FLASH1.fd \
|
||||
-hda output/images/disk.img # qemu_aarch64_sbsa_defconfig
|
||||
|
||||
Note that if you want to run sbsa-ref emulation with QEMU provided by
|
||||
your distro (i.e., not host-qemu by Buildroot) then you may need to
|
||||
install the SeaBIOS package for some required drivers. On Debian:
|
||||
|
||||
# apt install seabios
|
||||
@@ -0,0 +1,34 @@
|
||||
From e96b73478232aa42b773cd19371808af69fd4b95 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 25 Apr 2020 09:49:11 +0200
|
||||
Subject: [PATCH] net: xilinx: xemaclite: add 2.00.b revision
|
||||
|
||||
Patch added for the kernel 3.14
|
||||
- fix networking in Qemu using a small patch
|
||||
- disable DTS, because linux.bin does not include any DTB the
|
||||
default Qemu included DTB is used and this is okay and works fine
|
||||
|
||||
https://git.buildroot.net/buildroot/commit/board/qemu/microblazebe-mmu/xilinx-xemaclite.patch?id=fa2798548368d51998fad18d7f6d1ae0ed065b33
|
||||
|
||||
[Romain: convert to git format]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
Cc: Waldemar Brodkorb <wbx@openadk.org>
|
||||
---
|
||||
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
|
||||
index 0de52e70abcc..d8c13140ca77 100644
|
||||
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
|
||||
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
|
||||
@@ -1278,6 +1278,7 @@ static const struct of_device_id xemaclite_of_match[] = {
|
||||
{ .compatible = "xlnx,opb-ethernetlite-1.01.b", },
|
||||
{ .compatible = "xlnx,xps-ethernetlite-1.00.a", },
|
||||
{ .compatible = "xlnx,xps-ethernetlite-2.00.a", },
|
||||
+ { .compatible = "xlnx,xps-ethernetlite-2.00.b", },
|
||||
{ .compatible = "xlnx,xps-ethernetlite-2.01.a", },
|
||||
{ .compatible = "xlnx,xps-ethernetlite-3.00.a", },
|
||||
{ /* end of list */ },
|
||||
--
|
||||
2.25.3
|
||||
|
||||
@@ -0,0 +1,34 @@
|
||||
From e96b73478232aa42b773cd19371808af69fd4b95 Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 25 Apr 2020 09:49:11 +0200
|
||||
Subject: [PATCH] net: xilinx: xemaclite: add 2.00.b revision
|
||||
|
||||
Patch added for the kernel 3.14
|
||||
- fix networking in Qemu using a small patch
|
||||
- disable DTS, because linux.bin does not include any DTB the
|
||||
default Qemu included DTB is used and this is okay and works fine
|
||||
|
||||
https://git.buildroot.net/buildroot/commit/board/qemu/microblazebe-mmu/xilinx-xemaclite.patch?id=fa2798548368d51998fad18d7f6d1ae0ed065b33
|
||||
|
||||
[Romain: convert to git format]
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
Cc: Waldemar Brodkorb <wbx@openadk.org>
|
||||
---
|
||||
drivers/net/ethernet/xilinx/xilinx_emaclite.c | 1 +
|
||||
1 file changed, 1 insertion(+)
|
||||
|
||||
diff --git a/drivers/net/ethernet/xilinx/xilinx_emaclite.c b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
|
||||
index 0de52e70abcc..d8c13140ca77 100644
|
||||
--- a/drivers/net/ethernet/xilinx/xilinx_emaclite.c
|
||||
+++ b/drivers/net/ethernet/xilinx/xilinx_emaclite.c
|
||||
@@ -1278,6 +1278,7 @@ static const struct of_device_id xemaclite_of_match[] = {
|
||||
{ .compatible = "xlnx,opb-ethernetlite-1.01.b", },
|
||||
{ .compatible = "xlnx,xps-ethernetlite-1.00.a", },
|
||||
{ .compatible = "xlnx,xps-ethernetlite-2.00.a", },
|
||||
+ { .compatible = "xlnx,xps-ethernetlite-2.00.b", },
|
||||
{ .compatible = "xlnx,xps-ethernetlite-2.01.a", },
|
||||
{ .compatible = "xlnx,xps-ethernetlite-3.00.a", },
|
||||
{ /* end of list */ },
|
||||
--
|
||||
2.25.3
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
From b9af6f34e43bf5264d75933f2080f16b8741048d Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 25 Jul 2020 11:46:01 +0200
|
||||
Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From [1]
|
||||
"GCC 10 (PR 91233) won't silently allow registers that are not architecturally
|
||||
available to be present in the clobber list anymore, resulting in build failure
|
||||
for mips*r6 targets in form of:
|
||||
...
|
||||
.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target
|
||||
146 | __asm__ volatile ( \
|
||||
| ^~~~~~~
|
||||
|
||||
This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension.
|
||||
This patch provides the alternative clobber list for r6 targets that won't include
|
||||
those registers."
|
||||
|
||||
Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build
|
||||
for mips r6 cpus with gcc 10 for the same reason as glibc.
|
||||
|
||||
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8
|
||||
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
index 2203e2d0ae2a..e28096faecf6 100644
|
||||
--- a/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
@@ -30,12 +30,21 @@ static __always_inline long gettimeofday_fallback(
|
||||
register long nr asm("v0") = __NR_gettimeofday;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (tv), "r" (tz), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (tv), "r" (tz), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -54,12 +63,21 @@ static __always_inline long clock_gettime_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -78,12 +96,21 @@ static __always_inline int clock_getres_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -100,12 +127,21 @@ static __always_inline long clock_gettime32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_gettime;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -120,12 +156,21 @@ static __always_inline int clock_getres32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_getres;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
From b9af6f34e43bf5264d75933f2080f16b8741048d Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 25 Jul 2020 11:46:01 +0200
|
||||
Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From [1]
|
||||
"GCC 10 (PR 91233) won't silently allow registers that are not architecturally
|
||||
available to be present in the clobber list anymore, resulting in build failure
|
||||
for mips*r6 targets in form of:
|
||||
...
|
||||
.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target
|
||||
146 | __asm__ volatile ( \
|
||||
| ^~~~~~~
|
||||
|
||||
This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension.
|
||||
This patch provides the alternative clobber list for r6 targets that won't include
|
||||
those registers."
|
||||
|
||||
Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build
|
||||
for mips r6 cpus with gcc 10 for the same reason as glibc.
|
||||
|
||||
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8
|
||||
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
index 2203e2d0ae2a..e28096faecf6 100644
|
||||
--- a/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
@@ -30,12 +30,21 @@ static __always_inline long gettimeofday_fallback(
|
||||
register long nr asm("v0") = __NR_gettimeofday;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (tv), "r" (tz), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (tv), "r" (tz), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -54,12 +63,21 @@ static __always_inline long clock_gettime_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -78,12 +96,21 @@ static __always_inline int clock_getres_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -100,12 +127,21 @@ static __always_inline long clock_gettime32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_gettime;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -120,12 +156,21 @@ static __always_inline int clock_getres32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_getres;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
From b9af6f34e43bf5264d75933f2080f16b8741048d Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 25 Jul 2020 11:46:01 +0200
|
||||
Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From [1]
|
||||
"GCC 10 (PR 91233) won't silently allow registers that are not architecturally
|
||||
available to be present in the clobber list anymore, resulting in build failure
|
||||
for mips*r6 targets in form of:
|
||||
...
|
||||
.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target
|
||||
146 | __asm__ volatile ( \
|
||||
| ^~~~~~~
|
||||
|
||||
This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension.
|
||||
This patch provides the alternative clobber list for r6 targets that won't include
|
||||
those registers."
|
||||
|
||||
Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build
|
||||
for mips r6 cpus with gcc 10 for the same reason as glibc.
|
||||
|
||||
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8
|
||||
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
index 2203e2d0ae2a..e28096faecf6 100644
|
||||
--- a/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
@@ -30,12 +30,21 @@ static __always_inline long gettimeofday_fallback(
|
||||
register long nr asm("v0") = __NR_gettimeofday;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (tv), "r" (tz), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (tv), "r" (tz), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -54,12 +63,21 @@ static __always_inline long clock_gettime_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -78,12 +96,21 @@ static __always_inline int clock_getres_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -100,12 +127,21 @@ static __always_inline long clock_gettime32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_gettime;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -120,12 +156,21 @@ static __always_inline int clock_getres32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_getres;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
@@ -0,0 +1,149 @@
|
||||
From b9af6f34e43bf5264d75933f2080f16b8741048d Mon Sep 17 00:00:00 2001
|
||||
From: Romain Naour <romain.naour@gmail.com>
|
||||
Date: Sat, 25 Jul 2020 11:46:01 +0200
|
||||
Subject: [PATCH] mips: Do not include hi and lo in clobber list for R6
|
||||
MIME-Version: 1.0
|
||||
Content-Type: text/plain; charset=UTF-8
|
||||
Content-Transfer-Encoding: 8bit
|
||||
|
||||
From [1]
|
||||
"GCC 10 (PR 91233) won't silently allow registers that are not architecturally
|
||||
available to be present in the clobber list anymore, resulting in build failure
|
||||
for mips*r6 targets in form of:
|
||||
...
|
||||
.../sysdep.h:146:2: error: the register ‘lo’ cannot be clobbered in ‘asm’ for the current target
|
||||
146 | __asm__ volatile ( \
|
||||
| ^~~~~~~
|
||||
|
||||
This is because base R6 ISA doesn't define hi and lo registers w/o DSP extension.
|
||||
This patch provides the alternative clobber list for r6 targets that won't include
|
||||
those registers."
|
||||
|
||||
Since kernel 5.4 and mips support for generic vDSO [2], the kernel fail to build
|
||||
for mips r6 cpus with gcc 10 for the same reason as glibc.
|
||||
|
||||
[1] https://sourceware.org/git/?p=glibc.git;a=commit;h=020b2a97bb15f807c0482f0faee2184ed05bcad8
|
||||
[2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?id=24640f233b466051ad3a5d2786d2951e43026c9d
|
||||
|
||||
Signed-off-by: Romain Naour <romain.naour@gmail.com>
|
||||
---
|
||||
arch/mips/include/asm/vdso/gettimeofday.h | 45 +++++++++++++++++++++++
|
||||
1 file changed, 45 insertions(+)
|
||||
|
||||
diff --git a/arch/mips/include/asm/vdso/gettimeofday.h b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
index 2203e2d0ae2a..e28096faecf6 100644
|
||||
--- a/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
+++ b/arch/mips/include/asm/vdso/gettimeofday.h
|
||||
@@ -30,12 +30,21 @@ static __always_inline long gettimeofday_fallback(
|
||||
register long nr asm("v0") = __NR_gettimeofday;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (tv), "r" (tz), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (tv), "r" (tz), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -54,12 +63,21 @@ static __always_inline long clock_gettime_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -78,12 +96,21 @@ static __always_inline int clock_getres_fallback(
|
||||
#endif
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -100,12 +127,21 @@ static __always_inline long clock_gettime32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_gettime;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
@@ -120,12 +156,21 @@ static __always_inline int clock_getres32_fallback(
|
||||
register long nr asm("v0") = __NR_clock_getres;
|
||||
register long error asm("a3");
|
||||
|
||||
+#if MIPS_ISA_REV >= 6
|
||||
+ asm volatile(
|
||||
+ " syscall\n"
|
||||
+ : "=r" (ret), "=r" (error)
|
||||
+ : "r" (clkid), "r" (ts), "r" (nr)
|
||||
+ : "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
+ "$14", "$15", "$24", "$25", "memory");
|
||||
+#else
|
||||
asm volatile(
|
||||
" syscall\n"
|
||||
: "=r" (ret), "=r" (error)
|
||||
: "r" (clkid), "r" (ts), "r" (nr)
|
||||
: "$1", "$3", "$8", "$9", "$10", "$11", "$12", "$13",
|
||||
"$14", "$15", "$24", "$25", "hi", "lo", "memory");
|
||||
+#endif
|
||||
|
||||
return error ? -ret : ret;
|
||||
}
|
||||
--
|
||||
2.17.1
|
||||
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user