Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hw-rpi-dunfell-wifi #2

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 9 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
[submodule "assignment-autotest"]
path = assignment-autotest
url = https://github.com/cu-ecen-5013/assignment-autotest.git
[submodule "meta-raspberrypi"]
path = meta-raspberrypi
url = https://git.yoctoproject.org/git/meta-raspberrypi
[submodule "meta-openembedded"]
path = meta-openembedded
url = https://git.openembedded.org/meta-openembedded
[submodule "poky"]
path = poky
url = git://git.yoctoproject.org/poky
125 changes: 119 additions & 6 deletions build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -9,11 +9,47 @@ git submodule update
# local.conf won't exist until this step on first execution
source poky/oe-init-build-env

CONFLINE="MACHINE = \"qemuarm64\""
CONFLINE="MACHINE = \"raspberrypi3\""

#Create image of the type rpi-sdimg
IMAGE="IMAGE_FSTYPES = \"wic.bz2\""

#Set GPU memory as minimum
MEMORY="GPU_MEM = \"16\""

#Add wifi support
DISTRO_F="DISTRO_FEATURES_append = \"wifi\""
#add firmware support
IMAGE_ADD="IMAGE_INSTALL_append = \"linux-firmware-rpidistro-bcm43430 v4l-utils python3 ntp wpa-supplicant\""

#Licence
LICENCE="LICENSE_FLAGS_WHITELIST = \"commercial\""

IMAGE_F="IMAGE_FEATURES += \"ssh-server-openssh\""

cat conf/local.conf | grep "${CONFLINE}" > /dev/null
local_conf_info=$?

cat conf/local.conf | grep "${IMAGE}" > /dev/null
local_image_info=$?

cat conf/local.conf | grep "${MEMORY}" > /dev/null
local_memory_info=$?

cat conf/local.conf | grep "${DISTRO_F}" > /dev/null
local_distro_info=$?

cat conf/local.conf | grep "${IMAGE_ADD}" > /dev/null
local_imgadd_info=$?

cat conf/local.conf | grep "${LICENCE}" > /dev/null
local_licn_info=$?

cat conf/local.conf | grep "${IMAGE_F}" > /dev/null
local_imgf_info=$?



if [ $local_conf_info -ne 0 ];then
echo "Append ${CONFLINE} in the local.conf file"
echo ${CONFLINE} >> conf/local.conf
Expand All @@ -22,16 +58,93 @@ else
echo "${CONFLINE} already exists in the local.conf file"
fi

if [ $local_image_info -ne 0 ];then
echo "Append ${IMAGE} in the local.conf file"
echo ${IMAGE} >> conf/local.conf
else
echo "${IMAGE} already exists in the local.conf file"
fi

if [ $local_memory_info -ne 0 ];then
echo "Append ${MEMORY} in the local.conf file"
echo ${MEMORY} >> conf/local.conf
else
echo "${MEMORY} already exists in the local.conf file"
fi

if [ $local_distro_info -ne 0 ];then
echo "Append ${DISTRO_F} in the local.conf file"
echo ${DISTRO_F} >> conf/local.conf
else
echo "${DISTRO_F} already exists in the local.conf file"
fi

if [ $local_imgadd_info -ne 0 ];then
echo "Append ${IMAGE_ADD} in the local.conf file"
echo ${IMAGE_ADD} >> conf/local.conf
else
echo "${IMAGE_ADD} already exists in the local.conf file"
fi

if [ $local_licn_info -ne 0 ];then
echo "Append ${LICENCE} in the local.conf file"
echo ${LICENCE} >> conf/local.conf
else
echo "${LICENCE} already exists in the local.conf file"
fi

if [ $local_imgf_info -ne 0 ];then
echo "Append ${IMAGE_F} in the local.conf file"
echo ${IMAGE_F} >> conf/local.conf
else
echo "${IMAGE_F} already exists in the local.conf file"
fi




bitbake-layers show-layers | grep "meta-aesd" > /dev/null
bitbake-layers show-layers | grep "meta-raspberrypi" > /dev/null
layer_info=$?

bitbake-layers show-layers | grep "meta-python" > /dev/null
layer_python_info=$?

bitbake-layers show-layers | grep "meta-oe" > /dev/null
layer_metaoe_info=$?

bitbake-layers show-layers | grep "meta-networking" > /dev/null
layer_networking_info=$?

if [ $layer_metaoe_info -ne 0 ];then
echo "Adding meta-oe layer"
bitbake-layers add-layer ../meta-openembedded/meta-oe
else
echo "layer meta-oe already exists"
fi


if [ $layer_python_info -ne 0 ];then
echo "Adding meta-python layer"
bitbake-layers add-layer ../meta-openembedded/meta-python
else
echo "layer meta-python already exists"
fi


if [ $layer_networking_info -ne 0 ];then
echo "Adding meta-networking layer"
bitbake-layers add-layer ../meta-openembedded/meta-networking
else
echo "layer meta-networking already exists"
fi


if [ $layer_info -ne 0 ];then
echo "Adding meta-aesd layer"
bitbake-layers add-layer ../meta-aesd
echo "Adding meta-raspberrypi layer"
bitbake-layers add-layer ../meta-raspberrypi
else
echo "meta-aesd layer already exists"
echo "layer meta-raspberrypi already exists"
fi

set -e
bitbake core-image-aesd
bitbake core-image-base
1 change: 1 addition & 0 deletions meta-openembedded
Submodule meta-openembedded added at 96e84a
1 change: 1 addition & 0 deletions meta-raspberrypi
Submodule meta-raspberrypi added at 8cffbf
1 change: 1 addition & 0 deletions poky
Submodule poky added at c21419
12 changes: 12 additions & 0 deletions wpa_supplicant.conf
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
update_config=1

network={
ssid="<WIFI_NAME>"
psk="<password>"
proto=RSN
key_mgmt=WPA-PSK
pairwise=CCMP
auth_alg=OPEN
}