configs/odroidc2: new defconfig
Signed-off-by: Dagg Stompler <daggs@gmx.com> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@bootlin.com>
This commit is contained in:
parent
f0de62b706
commit
c8ee85ecd9
@ -635,6 +635,8 @@ F: arch/Config.in.powerpc
|
||||
F: package/kvm-unit-tests
|
||||
|
||||
N: Dagg Stompler <daggs@gmx.com>
|
||||
F: board/odroidc2/
|
||||
F: configs/odroidc2_defconfig
|
||||
F: package/meson-tools/
|
||||
F: package/odroidc2-firmware/
|
||||
|
||||
|
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}
|
39
board/hardkernel/odroidc2/genimage.cfg
Normal file
39
board/hardkernel/odroidc2/genimage.cfg
Normal file
@ -0,0 +1,39 @@
|
||||
image boot.vfat {
|
||||
vfat {
|
||||
files = {
|
||||
"Image",
|
||||
"meson-gxbb-odroidc2.dtb",
|
||||
"boot.scr"
|
||||
}
|
||||
}
|
||||
size = 64M
|
||||
}
|
||||
|
||||
image sdcard.img {
|
||||
hdimage {
|
||||
}
|
||||
|
||||
partition bl1 {
|
||||
in-partition-table = "no"
|
||||
image = "bl1.bin.hardkernel"
|
||||
offset = 0
|
||||
}
|
||||
|
||||
partition u-boot {
|
||||
in-partition-table = "no"
|
||||
image = "uboot-odc2.img"
|
||||
offset = 49664
|
||||
}
|
||||
|
||||
partition boot {
|
||||
partition-type = 0xC
|
||||
bootable = "true"
|
||||
image = "boot.vfat"
|
||||
}
|
||||
|
||||
partition rootfs {
|
||||
partition-type = 0x83
|
||||
image = "rootfs.ext4"
|
||||
size = 512M
|
||||
}
|
||||
}
|
21
board/hardkernel/odroidc2/post-image.sh
Executable file
21
board/hardkernel/odroidc2/post-image.sh
Executable file
@ -0,0 +1,21 @@
|
||||
#!/bin/sh
|
||||
|
||||
BOARD_DIR="$(dirname $0)"
|
||||
|
||||
${HOST_DIR}/bin/fip_create \
|
||||
--bl30 ${BINARIES_DIR}/bl30.bin \
|
||||
--bl301 ${BINARIES_DIR}/bl301.bin \
|
||||
--bl31 ${BINARIES_DIR}/bl31.bin \
|
||||
--bl33 ${BINARIES_DIR}/u-boot.bin \
|
||||
${BINARIES_DIR}/fip.bin
|
||||
|
||||
${HOST_DIR}/bin/fip_create --dump ${BINARIES_DIR}/fip.bin
|
||||
|
||||
cat ${BINARIES_DIR}/bl2.package ${BINARIES_DIR}/fip.bin \
|
||||
> ${BINARIES_DIR}/boot_new.bin
|
||||
|
||||
${HOST_DIR}/bin/amlbootsig ${BINARIES_DIR}/boot_new.bin ${BINARIES_DIR}/u-boot.img
|
||||
|
||||
dd if=${BINARIES_DIR}/u-boot.img of=${BINARIES_DIR}/uboot-odc2.img bs=512 skip=96
|
||||
|
||||
support/scripts/genimage.sh -c ${BOARD_DIR}/genimage.cfg
|
64
board/hardkernel/odroidc2/readme.txt
Normal file
64
board/hardkernel/odroidc2/readme.txt
Normal file
@ -0,0 +1,64 @@
|
||||
ODROID-C2
|
||||
|
||||
Intro
|
||||
=====
|
||||
To be able to use ODROID-C2 board with the images generated by
|
||||
Buildroot, you have to prepare the SDCard or eMMC.
|
||||
|
||||
How to build it
|
||||
===============
|
||||
|
||||
$ make odroidc2_defconfig
|
||||
|
||||
Then you can edit the build options using
|
||||
|
||||
$ make menuconfig
|
||||
|
||||
Compile all and build rootfs image:
|
||||
|
||||
$ make
|
||||
|
||||
Note: you will need to have access to the network, since Buildroot will
|
||||
download the packages' sources.
|
||||
|
||||
Result of the build
|
||||
-------------------
|
||||
|
||||
After building, you should obtain this tree:
|
||||
|
||||
output/images/
|
||||
+-- bl1.bin.hardkernel
|
||||
+-- bl2.package
|
||||
+-- bl301.bin
|
||||
+-- bl30.bin
|
||||
+-- bl31.bin
|
||||
+-- boot_new.bin
|
||||
+-- boot.scr [1]
|
||||
+-- boot.vfat
|
||||
+-- fip.bin
|
||||
+-- Image [2]
|
||||
+-- meson-gxbb-odroidc2.dtb
|
||||
+-- rootfs.ext2
|
||||
+-- rootfs.ext4
|
||||
+-- rootfs.tar
|
||||
+-- sdcard.img
|
||||
+-- u-boot.bin
|
||||
+-- u-boot.img
|
||||
+-- uboot-odc2.img [3]
|
||||
|
||||
[1] This is the ODROID-C2 configuration file used in u-boot.
|
||||
[2] This is the ODROID-C2 kernel image file which will be booted.
|
||||
[3] This is the ODROID-C2 signed u-boot image which will be used.
|
||||
|
||||
How to write the SD card or eMMC
|
||||
================================
|
||||
|
||||
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 or eMMC with "dd":
|
||||
|
||||
$ sudo dd if=output/images/sdcard.img of=/dev/sdX
|
||||
|
||||
Insert the SDcard into your ODROID-C2, and power it up. Your new system
|
||||
should come up now.
|
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
|
37
configs/odroidc2_defconfig
Normal file
37
configs/odroidc2_defconfig
Normal file
@ -0,0 +1,37 @@
|
||||
# Architecture
|
||||
BR2_aarch64=y
|
||||
|
||||
# System
|
||||
BR2_TARGET_GENERIC_HOSTNAME="odroidc2"
|
||||
BR2_TARGET_GENERIC_GETTY_PORT="ttyAML0"
|
||||
BR2_TARGET_GENERIC_GETTY_BAUDRATE_115200=y
|
||||
BR2_TARGET_ROOTFS_EXT2=y
|
||||
BR2_TARGET_ROOTFS_EXT2_4=y
|
||||
BR2_ROOTFS_OVERLAY="board/hardkernel/odroidc2/rootfs_overlay"
|
||||
BR2_ROOTFS_POST_IMAGE_SCRIPT="board/hardkernel/odroidc2/post-image.sh"
|
||||
|
||||
# Kernel
|
||||
BR2_LINUX_KERNEL=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION=y
|
||||
BR2_LINUX_KERNEL_CUSTOM_VERSION_VALUE="5.7"
|
||||
BR2_LINUX_KERNEL_DTS_SUPPORT=y
|
||||
BR2_LINUX_KERNEL_INTREE_DTS_NAME="amlogic/meson-gxbb-odroidc2"
|
||||
BR2_LINUX_KERNEL_USE_ARCH_DEFAULT_CONFIG=y
|
||||
|
||||
# U-Boot
|
||||
BR2_TARGET_UBOOT=y
|
||||
BR2_TARGET_UBOOT_BUILD_SYSTEM_LEGACY=y
|
||||
BR2_TARGET_UBOOT_BOARDNAME="odroid-c2"
|
||||
BR2_TARGET_UBOOT_CUSTOM_VERSION="2020.07"
|
||||
BR2_TARGET_UBOOT_NEEDS_DTC=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT=y
|
||||
BR2_TARGET_UBOOT_BOOT_SCRIPT_SOURCE="board/hardkernel/odroidc2/boot.cmd"
|
||||
|
||||
# Firmware
|
||||
BR2_PACKAGE_ODROIDC2_FIRMWARE=y
|
||||
|
||||
# Required tools to create the SD image
|
||||
BR2_PACKAGE_HOST_DOSFSTOOLS=y
|
||||
BR2_PACKAGE_HOST_GENIMAGE=y
|
||||
BR2_PACKAGE_HOST_MESON_TOOLS=y
|
||||
BR2_PACKAGE_HOST_MTOOLS=y
|
Loading…
Reference in New Issue
Block a user