Skip to content
Snippets Groups Projects
Commit 1a21a198 authored by Bob Mottram's avatar Bob Mottram
Browse files

emmc directory variable

parent b68c16bd
No related branches found
No related tags found
No related merge requests found
......@@ -30,6 +30,7 @@ export TEXTDOMAIN=${PROJECT_NAME}-image-hardware-setup
export TEXTDOMAINDIR="/usr/share/locale"
INSTALL_PACKAGES='apt-get -yq install'
EMMC_DIR=/opt/scripts/tools/eMMC
enable_serial_console() {
# By default, spawn a console on the serial port
......@@ -60,20 +61,20 @@ beaglebone_flasher() {
return
fi
if [ ! -d /boot/eMMC ]; then
mkdir /boot/eMMC
if [ ! -d "$EMMC_DIR" ]; then
mkdir -p "$EMMC_DIR"
fi
$INSTALL_PACKAGES wget rsync
wget "https://code.freedombone.net/bashrc/${PROJECT_NAME}/raw/master/image_build/emmc_functions.sh" -O /boot/eMMC/functions.sh
if [ ! -f /boot/eMMC/functions.sh ]; then
wget "https://code.freedombone.net/bashrc/${PROJECT_NAME}/raw/master/image_build/emmc_functions.sh" -O "$EMMC_DIR/functions.sh"
if [ ! -f "$EMMC_DIR/functions.sh" ]; then
exit 62
fi
chmod +x /boot/eMMC/functions.sh
chmod +x "$EMMC_DIR/functions.sh"
cat >> /boot/eMMC/flasher.sh <<EOF
cat >> "$EMMC_DIR/flasher.sh" <<EOF
#!/bin/bash -e
source /boot/eMMC/functions.sh
source $EMMC_DIR/functions.sh
mkfs_options=""
device_eeprom="$device_eeprom"
check_if_run_as_root
......@@ -86,7 +87,7 @@ activate_cylon_leds
prepare_drive
EOF
chmod +x /boot/eMMC/flasher.sh
chmod +x "$EMMC_DIR/flasher.sh"
}
beaglebone_setup_boot() {
......@@ -135,7 +136,6 @@ loadfdt=load mmc \${mmcdev}:\${mmcpart} \${fdtaddr} /dtbs/\${fdtfile}
loadfiles=run loadkernel; run loadinitrd; run loadfdt
mmcargs=setenv bootargs init=/lib/systemd/systemd console=tty0 console=\${console} root=\${mmcroot} rootfstype=\${mmcrootfstype} rootflags=\${mmcrootflags} ifnames=0 slub_debug=FZP slab_nomerge page_poison=1
#mmcargs=setenv bootargs init=/boot/eMMC/flasher.sh
uenvcmd=run loadfiles; run mmcargs; bootz \${loadaddr} \${initrd_addr}:\${initrd_size} \${fdtaddr}
EOF
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment