Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
slendidev committed Jan 30, 2022
0 parents commit 90d2544
Show file tree
Hide file tree
Showing 73 changed files with 11,256 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "buildroot"]
path = buildroot
url = https://github.com/buildroot/buildroot.git
674 changes: 674 additions & 0 deletions LICENSE.txt

Large diffs are not rendered by default.

54 changes: 54 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
RELEASE_DIR = release

BUILDROOT=buildroot
BUILDROOT_EXTERNAL=buildroot-external
DEFCONFIG_DIR = $(BUILDROOT_EXTERNAL)/configs

TARGETS := $(notdir $(patsubst %_defconfig,%,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))
TARGETS_CONFIG := $(notdir $(patsubst %_defconfig,%-config,$(wildcard $(DEFCONFIG_DIR)/*_defconfig)))

.NOTPARALLEL: $(TARGETS) $(TARGETS_CONFIG) all

.PHONY: $(TARGETS) $(TARGETS_CONFIG) all clean help

all: $(TARGETS)

$(RELEASE_DIR):
mkdir -p $(RELEASE_DIR)

$(TARGETS_CONFIG): %-config:
@echo "config $*"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=../$(BUILDROOT_EXTERNAL) "$*_defconfig"

$(TARGETS): %: $(RELEASE_DIR) %-config
@echo "build $@"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=../$(BUILDROOT_EXTERNAL) 2>&1 | tee logs/buildroot_$@_output.txt
#cp -f $(BUILDROOT)/output/images/sdcard.img $(RELEASE_DIR)/[email protected]
rsync -ah --progress $(BUILDROOT)/output/images/sdcard.img $(RELEASE_DIR)/YROS_$@.img
rm $(RELEASE_DIR)/YROS_$@.img.xz
xz -3 -T0 -v $(RELEASE_DIR)/YROS_$@.img

# Do not clean when building for one target
ifneq ($(words $(filter $(TARGETS),$(MAKECMDGOALS))), 1)
@echo "clean $@"
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=../$(BUILDROOT_EXTERNAL) clean
endif
@echo "finished $@"

clean:
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=../$(BUILDROOT_EXTERNAL) clean

menuconfig:
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=../$(BUILDROOT_EXTERNAL) menuconfig

savedefconfig:
$(MAKE) -C $(BUILDROOT) BR2_EXTERNAL=../$(BUILDROOT_EXTERNAL) savedefconfig

help:
@echo "Supported targets: $(TARGETS)"
@echo "Run 'make <target>' to build a target image."
@echo "Run 'make all' to build all target images."
@echo "Run 'make clean' to clean the build output."
@echo "Run 'make <target>-config' to configure YROS for a target."
@echo "Run 'make menuconfig' to update current config utilising a menu based program."
@echo "Run 'make savedefconfig' to save current config back to config directory."
6 changes: 6 additions & 0 deletions Plans.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
[ ] Bluetooth setup (connect to robot with phone and configure from there:)
[ ] Phone management app
[ ] Initial setup
[ ] WiFi networking setup
[ ] Root password setup

3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
<h1 align="center">Yet another Robot Operating System</h1>

This project utilizes [Buildroot](https://buildroot.org/) to create a fast, portable installation for [yrosd](https://github.com/xslendix/yrosd).
1 change: 1 addition & 0 deletions buildroot
Submodule buildroot added at 5777d6
Empty file added buildroot-external/Config.in
Empty file.
1 change: 1 addition & 0 deletions buildroot-external/board/raspberrypi/cmdline.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
root=/dev/mmcblk0p2 rootwait console=tty1 console=ttyAMA0,115200 dwc_otg.lpm_enable=0 fsck.repair=yes zram.enabled=1 zram.num_devices=4 logo.nologo rootwait quiet
63 changes: 63 additions & 0 deletions buildroot-external/board/raspberrypi/config.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
# Please note that this is only a sample, we recommend you to change it to fit
# your needs.
# You should override this file using a post-build script.
# See http://buildroot.org/manual.html#rootfs-custom
# and http://elinux.org/RPiconfig for a description of config.txt syntax
# We always use the same names, the real used variant is selected by
# BR2_PACKAGE_RPI_FIRMWARE_{DEFAULT,X,CD} choice
start_file=start.elf
fixup_file=fixup.dat

kernel=Image

# To use an external initramfs file
# initramfs rootfs.cpio.gz

# Disable overscan assuming the display supports displaying the full resolution
# If the text shown on the screen disappears off the edge, comment this out
# disable_overscan=1
# dtoverlay=vc4-fkms-v3d
# hdmi_drive=2
# hdmi_group=2
# hdmi_mode=14
# max_framebuffers=2
# enable_tvout=0

# uncomment if you get no picture on HDMI for a default "safe" mode
# hdmi_safe=1

# How much memory in MB to assign to the GPU on Pi models having
# 256, 512 or 1024 MB total memory
gpu_mem_256=128
gpu_mem_512=128
gpu_mem_1024=128

# Enable the onboard soundcard
dtparam=audio=on

# Disable rainbow color splash
disable_splash=1

# Enable some optional hardware interfaces
dtparam=i2c_arm=on
dtparam=i2c_arm_baudrate=100000
dtoverlay=i2s-mmap
dtparam=i2s=on
dtparam=spi=on

# Disable GPIO IRQ
dtoverlay=gpio-no-irq

dtoverlay=miniuart-bt

dtoverlay=krnbt=on

arm_64bit=1

#[pi3]
#dtoverlay=vc4-kms-v3d

#[pi4]
#dtoverlay=vc4-kms-v3d-pi4

#dtoverlay=disable-wifi
33 changes: 33 additions & 0 deletions buildroot-external/board/raspberrypi/genimage-raspberrypi.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
image boot.vfat {
vfat {
files = {
"bcm2708-rpi-b.dtb",
"bcm2708-rpi-b-plus.dtb",
"bcm2708-rpi-cm.dtb",
"rpi-firmware/bootcode.bin",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup.dat",
"rpi-firmware/start.elf",
"zImage"
}
}

size = 32M
}

image sdcard.img {
hdimage {
}

partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}

partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
}
31 changes: 31 additions & 0 deletions buildroot-external/board/raspberrypi/genimage-raspberrypi0.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
image boot.vfat {
vfat {
files = {
"bcm2708-rpi-zero.dtb",
"rpi-firmware/bootcode.bin",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup.dat",
"rpi-firmware/start.elf",
"zImage"
}
}

size = 32M
}

image sdcard.img {
hdimage {
}

partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}

partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
}
32 changes: 32 additions & 0 deletions buildroot-external/board/raspberrypi/genimage-raspberrypi0w.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
image boot.vfat {
vfat {
files = {
"bcm2708-rpi-zero-w.dtb",
"rpi-firmware/bootcode.bin",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup.dat",
"rpi-firmware/start.elf",
"rpi-firmware/overlays",
"zImage"
}
}

size = 32M
}

image sdcard.img {
hdimage {
}

partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}

partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
}
31 changes: 31 additions & 0 deletions buildroot-external/board/raspberrypi/genimage-raspberrypi2.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
image boot.vfat {
vfat {
files = {
"bcm2709-rpi-2-b.dtb",
"rpi-firmware/bootcode.bin",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup.dat",
"rpi-firmware/start.elf",
"zImage"
}
}

size = 32M
}

image sdcard.img {
hdimage {
}

partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}

partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
}
34 changes: 34 additions & 0 deletions buildroot-external/board/raspberrypi/genimage-raspberrypi3-64.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
image boot.vfat {
vfat {
files = {
"bcm2710-rpi-3-b.dtb",
"bcm2710-rpi-3-b-plus.dtb",
"bcm2837-rpi-3-b.dtb",
"rpi-firmware/bootcode.bin",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup.dat",
"rpi-firmware/start.elf",
"rpi-firmware/overlays",
"Image"
}
}

size = 32M
}

image sdcard.img {
hdimage {
}

partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}

partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
}
34 changes: 34 additions & 0 deletions buildroot-external/board/raspberrypi/genimage-raspberrypi3.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
image boot.vfat {
vfat {
files = {
"bcm2710-rpi-3-b.dtb",
"bcm2710-rpi-3-b-plus.dtb",
"bcm2710-rpi-cm3.dtb",
"rpi-firmware/bootcode.bin",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup.dat",
"rpi-firmware/start.elf",
"rpi-firmware/overlays",
"zImage"
}
}

size = 32M
}

image sdcard.img {
hdimage {
}

partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}

partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
}
31 changes: 31 additions & 0 deletions buildroot-external/board/raspberrypi/genimage-raspberrypi4-64.cfg
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
image boot.vfat {
vfat {
files = {
"bcm2711-rpi-4-b.dtb",
"rpi-firmware/cmdline.txt",
"rpi-firmware/config.txt",
"rpi-firmware/fixup4.dat",
"rpi-firmware/start4.elf",
"rpi-firmware/overlays",
"Image"
}
}

size = 32M
}

image sdcard.img {
hdimage {
}

partition boot {
partition-type = 0xC
bootable = "true"
image = "boot.vfat"
}

partition rootfs {
partition-type = 0x83
image = "rootfs.ext4"
}
}
Loading

0 comments on commit 90d2544

Please sign in to comment.