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 ...@@ -30,6 +30,7 @@ export TEXTDOMAIN=${PROJECT_NAME}-image-hardware-setup
export TEXTDOMAINDIR="/usr/share/locale" export TEXTDOMAINDIR="/usr/share/locale"
INSTALL_PACKAGES='apt-get -yq install' INSTALL_PACKAGES='apt-get -yq install'
EMMC_DIR=/opt/scripts/tools/eMMC
enable_serial_console() { enable_serial_console() {
# By default, spawn a console on the serial port # By default, spawn a console on the serial port
...@@ -60,20 +61,20 @@ beaglebone_flasher() { ...@@ -60,20 +61,20 @@ beaglebone_flasher() {
return return
fi fi
if [ ! -d /boot/eMMC ]; then if [ ! -d "$EMMC_DIR" ]; then
mkdir /boot/eMMC mkdir -p "$EMMC_DIR"
fi fi
$INSTALL_PACKAGES wget rsync $INSTALL_PACKAGES wget rsync
wget "https://code.freedombone.net/bashrc/${PROJECT_NAME}/raw/master/image_build/emmc_functions.sh" -O /boot/eMMC/functions.sh wget "https://code.freedombone.net/bashrc/${PROJECT_NAME}/raw/master/image_build/emmc_functions.sh" -O "$EMMC_DIR/functions.sh"
if [ ! -f /boot/eMMC/functions.sh ]; then if [ ! -f "$EMMC_DIR/functions.sh" ]; then
exit 62 exit 62
fi 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 #!/bin/bash -e
source /boot/eMMC/functions.sh source $EMMC_DIR/functions.sh
mkfs_options="" mkfs_options=""
device_eeprom="$device_eeprom" device_eeprom="$device_eeprom"
check_if_run_as_root check_if_run_as_root
...@@ -86,7 +87,7 @@ activate_cylon_leds ...@@ -86,7 +87,7 @@ activate_cylon_leds
prepare_drive prepare_drive
EOF EOF
chmod +x /boot/eMMC/flasher.sh chmod +x "$EMMC_DIR/flasher.sh"
} }
beaglebone_setup_boot() { beaglebone_setup_boot() {
...@@ -135,7 +136,6 @@ loadfdt=load mmc \${mmcdev}:\${mmcpart} \${fdtaddr} /dtbs/\${fdtfile} ...@@ -135,7 +136,6 @@ loadfdt=load mmc \${mmcdev}:\${mmcpart} \${fdtaddr} /dtbs/\${fdtfile}
loadfiles=run loadkernel; run loadinitrd; run loadfdt 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=/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} uenvcmd=run loadfiles; run mmcargs; bootz \${loadaddr} \${initrd_addr}:\${initrd_size} \${fdtaddr}
EOF 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