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

Updated a few things #1

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open
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
21 changes: 13 additions & 8 deletions quickstart.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ KERNELDIR=""
# Either uncomment one of the boards below, or add your own"
BOARD=""
#BOARD="stm32f429discovery"
#BOARD="stm32f429discovery1"
#BOARD="stm32f469discovery"


Expand Down Expand Up @@ -45,6 +46,9 @@ init()
if [ "$BOARD" == "stm32f429discovery" ]; then
BOARDAFBOOT=stm32f429i-disco
BOARDDTB=stm32f429-disco
elif [ "$BOARD" == "stm32f429discovery1" ]; then
BOARDAFBOOT=stm32f429i-disco1
BOARDDTB=stm32f429-disco
elif [ "$BOARD" == "stm32f469discovery" ]; then
echo "###################################################"
echo "Don't forget to make the kernel changes detailed at"
Expand Down Expand Up @@ -175,8 +179,9 @@ bootloader()
cpio()
{
# Pre-built userspace
CPIO=$PWD/Stm32_mini_rootfs.cpio
if [ ! -f Stm32_mini_rootfs.cpio ]; then
CPIO=Stm32_mini_rootfs.cpio
CPIO_FILE=$PWD/$CPIO
if [ ! -f $CPIO ]; then
echo "###################################################"
echo "Downloading a pre-built userspace CPIO (RAMFS)"
echo "###################################################"
Expand All @@ -191,9 +196,9 @@ cpio()

kernel()
{
KERNELBUILDDIR=build-stm32
KERNELBUILDDIR=$TOPDIR/build-stm32
echo "###################################################"
echo "Building the kernel - output will be in $KERNELDIR/$KERNELBUILDDIR"
echo "Building the kernel - output will be in $KERNELBUILDDIR"
echo "###################################################"
cd $KERNELDIR
BRANCH=`git branch | grep "*" | sed 's/* //'`
Expand All @@ -210,7 +215,7 @@ kernel()
--set-val INITRAMFS_ROOT_UID 0 \
--set-val INITRAMFS_ROOT_GID 0 \
--enable BLK_DEV_INITRD \
--set-str INITRAMFS_SOURCE $CPIO \
--set-str INITRAMFS_SOURCE $CPIO_FILE \
--enable RD_GZIP \
--enable INITRAMFS_COMPRESSION_GZIP
make $CFLAGS
Expand All @@ -219,13 +224,13 @@ kernel()

flash()
{
DTB=$KERNELDIR/$KERNELBUILDDIR/arch/arm/boot/dts/$BOARDDTB.dtb
DTB=$KERNELBUILDDIR/arch/arm/boot/dts/$BOARDDTB.dtb
echo "###################################################"
echo "Flashing DTB ($DTB)"
echo "###################################################"
st-flash --reset write $KERNELDIR/$KERNELBUILDDIR/arch/arm/boot/dts/$BOARDDTB.dtb 0x08004000
st-flash --reset write $KERNELBUILDDIR/arch/arm/boot/dts/$BOARDDTB.dtb 0x08004000

KERNEL=$KERNELDIR/$KERNELBUILDDIR/arch/arm/boot/xipImage
KERNEL=$KERNELBUILDDIR/arch/arm/boot/xipImage
echo "###################################################"
echo "Flashing Kernel ($KERNEL)"
echo "###################################################"
Expand Down