Make buildroot a git submodule

This commit is contained in:
Michel-FK 2019-03-24 23:24:40 +01:00
parent eb4f2c0959
commit 4c4f5b8001
46 changed files with 46 additions and 102 deletions

5
.gitignore vendored
View File

@ -1,3 +1,4 @@
dl/*
output/*
*/dl/*
*/output/*
*~
br.log

3
.gitmodules vendored Normal file
View File

@ -0,0 +1,3 @@
[submodule "buildroot"]
path = buildroot
url = git://git.buildroot.net/buildroot

View File

@ -1,2 +0,0 @@
source "$BR2_EXTERNAL_FUNKEY_PATH/package/rtl8723bs-firmware/Config.in"
source "$BR2_EXTERNAL_FUNKEY_PATH/package/mednafen/Config.in"

1
FunKey/Config.in Normal file
View File

@ -0,0 +1 @@
source "$BR2_EXTERNAL_FUNKEY_PATH/package/mednafen/Config.in"

View File

@ -3,8 +3,8 @@
Intro
=====
This directory contains a buildroot configuration for building a
FunKey OS.
This directory contains a buildroot-based external configuration for
building the FunKey.
How to build it
===============
@ -14,7 +14,7 @@ Configure Buildroot
There is only one FunKey defconfig files in Buildroot:
$ make funkey_defconfig
$ ./fun funkey_defconfig
Build the rootfs
----------------
@ -22,9 +22,9 @@ Build the rootfs
Note: you will need to have access to the network, since Buildroot
will download the packages' sources.
You may now build your rootfs with:
You may now build your FunKey with:
$ make
$ ./have fun
(This may take a while, consider getting yourself a coffee ;-) )
@ -33,7 +33,7 @@ Result of the build
After building, you should obtain this tree:
output/images/
FunKey/output/images/
+-- boot.scr
+-- boot.vfat
+-- rootfs.ext2
@ -49,11 +49,11 @@ 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.
"sdcard.img" in the FunKey/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 dd if=<FunKey directory>/FunKey/output/images/sdcard.img of=/dev/sdX
Alternatively, you can use the Etcher graphical tool to burn the image
to the SD card safely and on any platform:

View File

@ -63,6 +63,7 @@ BR2_PACKAGE_XAPP_XPROP=y
BR2_PACKAGE_XAPP_XSET=y
BR2_PACKAGE_XAPP_XSETROOT=y
BR2_PACKAGE_XDRIVER_XF86_VIDEO_FBDEV=y
BR2_PACKAGE_XTERM=y
BR2_PACKAGE_DHCPCD=y
BR2_PACKAGE_DROPBEAR=y
BR2_PACKAGE_WPA_SUPPLICANT=y

View File

@ -3,7 +3,7 @@
Intro
=====
This directory contains a buildroot external configuration for
This directory contains a buildroot-based external configuration for
building the FunKey.
How to build it
@ -14,8 +14,7 @@ Configure Buildroot
There is only one Funkey defconfig files in Buildroot:
$ make BR2_EXTERNAL=<Funkey directory> O=<Funkey directory>/output
funkey_defconfig
$ ./fun funkey_defconfig
Build the rootfs
----------------
@ -23,9 +22,9 @@ Build the rootfs
Note: you will need to have access to the network, since Buildroot
will download the packages' sources.
You may now build your rootfs with:
You may now build your FunKey with:
$ make BR2_EXTERNAL=<Funkey directory> O=<Funkey directory>/output
$ ./have fun
(This may take a while, consider getting yourself a coffee ;-) )
@ -34,14 +33,13 @@ Result of the build
After building, you should obtain this tree:
output/images/
FunKey/output/images/
+-- boot.scr
+-- boot.vfat
+-- rootfs.ext2
+-- rootfs.ext4 -> rootfs.ext2
+-- sdcard.img
+-- sun8i-v3s-licheepi-zero-dock.dtb
+-- sun8i-v3s-licheepi-zero.dtb
+-- sun8i-v3s-funkey.dtb
+-- u-boot.bin
+-- u-boot-sunxi-with-spl.bin
`-- zImage
@ -50,13 +48,17 @@ 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.
"sdcard.img" in the FunKey/output/images/ directory.
Copy the bootable "sdcard.img" onto an SD card with "dd":
$ sudo dd if=<Funkey directory>/output/images/sdcard.img of=/dev/sdX
$ sudo dd if=<Funkey directory>/FunKey/output/images/sdcard.img of=/dev/sdX
Insert the SDcard into your Funkey board, and power it up. Your new
system should come up now and start two consoles: one on the serial
port on the P1 header, one on the LCD output where you can login using
a USB keyboard.
Alternatively, you can use the Etcher graphical tool to burn the image
to the SD card safely and on any platform:
https://etcher.io/
Once the SD card is burned, insert it into your FunKey board, and
power it up. Your new system should come up now and start a console on
the UART0 serial port.

View File

@ -1,45 +0,0 @@
#!/bin/sh
#set -x
THIS=$(basename $0)
if [ $(id -u) -ne 0 ]; then
echo "This script must be run as root. Try 'sudo activate_wifi <SSID> <password>'" >&2
exit 1
fi
if [ $# -ne 2 ]; then
echo "Usage: ${0} <SSID> <password>" >&2
exit 2
fi
SSID=${1}
PASSWORD=${2}
cat <<EOF > /etc/wpa_supplicant.conf
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
ap_scan=1
network={
ssid="$SSID"
psk="$PASSWORD"
scan_ssid=1
key_mgmt=WPA-EAP WPA-PSK IEEE8021X NONE
pairwise=TKIP CCMP
group=CCMP TKIP WEP104 WEP40
priority=5
}
EOF
egrep '^iface wlan0' /etc/network/interfaces
if [ $? -ne 0 ]; then
cat <<EOF >>/etc/network/interfaces
auto wlan0
iface wlan0 inet dhcp
pre-up wpa_supplicant -Dnl80211 -i wlan0 -c /etc/wpa_supplicant.conf -B
post-down killall -q wpa_supplicant
EOF
fi
ifup wlan0

1
buildroot Submodule

@ -0,0 +1 @@
Subproject commit 4fa524144bd2019f98159f21802de08be7b5bea0

2
fun Executable file
View File

@ -0,0 +1,2 @@
#!/bin/sh
make -C buildroot BR2_EXTERNAL=../FunKey O=../FunKey/output $*

11
have Executable file
View File

@ -0,0 +1,11 @@
#!/bin/sh
case "$1" in
fun)
buildroot/utils/brmake -C buildroot BR2_EXTERNAL=../FunKey O=../FunKey/output
;;
*)
echo "You can only have fun!" >&2
exit 1
;;
esac

View File

@ -1,10 +0,0 @@
config BR2_PACKAGE_RTL8723BS_FIRMWARE
bool "rtl8723bs-firmware"
depends on BR2_LINUX_KERNEL
help
rtl8723bs wifi driver
https://github.com/hadess/rtl8723bs
comment "This package only contains the binary firmware for the RTL8723BS Wi-Fi chip, as the driver itself is now in linux staging"
depends on !BR2_LINUX_KERNEL

View File

@ -1,21 +0,0 @@
################################################################################
#
# rtl8723bs-firmware
#
################################################################################
RTL8723BS_FIRMWARE_VERSION = cc77e7b6092c54500058cd027b679421b9399905
RTL8723BS_FIRMWARE_SITE = $(call github,hadess,rtl8723bs,$(RTL8723BS_FIRMWARE_VERSION))
RTL8723BS_FIRMWARE_LICENSE = GPL-2.0, proprietary (*.bin firmware blobs)
RTL8723BS_FIRMWARE_BINS = rtl8723bs_ap_wowlan.bin rtl8723bs_wowlan.bin \
rtl8723bs_bt.bin rtl8723bs_nic.bin
define RTL8723BS_FIRMWARE_INSTALL_FIRMWARE
$(foreach bin, $(RTL8723BS_FIRMWARE_BINS), \
$(INSTALL) -D -m 644 $(@D)/$(bin) $(TARGET_DIR)/lib/firmware/rtlwifi/$(bin)
)
endef
RTL8723BS_FIRMWARE_POST_INSTALL_TARGET_HOOKS += RTL8723BS_INSTALL_FIRMWARE
$(eval $(generic-package))