Aktuelle Zeit: Di 22. Mai 2012, 21:49



Ein neues Thema erstellen Auf das Thema antworten  [ 11 Beiträge ]  Gehe zu Seite Vorherige  1, 2
 U-Boot Environment Variables 
Autor Nachricht
Foren-Mitglied
Foren-Mitglied
Benutzeravatar

Registriert: Mi 25. Aug 2010, 10:03
Beiträge: 82


Bedankte sich: 7 mal
Erhielt: 22 Danksagungen in 15 Beiträgen

Bedanke dich für den Beitrag 
Beitrag Re: U-Boot Environment Variables
Ok habe alles wieder hinbekommen.
Habe die config-debian modifiziert und hat super geklappt.

Code:

#!/bin/sh

# This code is covered by the GNU General Public License (GPLv2 or higher)

NVRAM=$(which nvram)
FW_PRINTENV=$(which fw_printenv)

path=$(mount | grep ext[23] | sed -n '/sda1/ {s/\/dev\/sda1 on \(.*\) type.*/\1/; p}')

if [ -n "$NVRAM" ]; then
   PRINTENV="$NVRAM -c printenv"
   SETENV="$NVRAM -c set"
   GETENV="$NVRAM -c get"
elif [ -n "$FW_PRINTENV" ]; then
   if [ -z "$(which fw_setenv)" ]; then
      echo "Program fw_setenv not found, cannot modify U-Boot environment..."
      exit 1
   elif [ ! -f /etc/fw_env.config ]; then
      echo "Configuration file for fw_printenv not found."
      exit 1
   else
      PRINTENV=$FW_PRINTENV
      SETENV=$(which fw_setenv)
      GETENV="$FW_PRINTENV -n"
   fi
else
   echo "No tool found for modifying U-Boot environment..."
   exit 1
fi

BOOTVER=$($GETENV buffalo_ver | sed 's/^.*=//')
if [ -z "$BOOTVER" ]; then
   echo "Unable to detect Buffalo bootloader version.  Please ensure that your bootloader supports automatic initrd position/size detection."
   exit 1
else
   BOOTVER_MAJOR=${BOOTVER%.*}
   BOOTVER_MINOR=${BOOTVER#*.}
   if [ $BOOTVER_MAJOR -eq 1 -a $BOOTVER_MINOR -lt 10 ]; then
      echo "Incompatible bootloader version detected.  Please update to the latest firmware version."
      exit 1
   fi
fi

printf "Saving U-Boot environment to ubootenv.bak... "
$PRINTENV > ubootenv.bak || exit 1
echo "done."

echo "Changing U-Boot environment... "
$SETENV bootcmd "ide reset; ext2load ide 0:1 0x00100000 /\$(kernel);ext2load ide 0:1 0x00800000 /\$(initrd);setenv bootargs \$(bootargs_base) \$(bootargs_root) \$(buffalo_ver);bootm 0x00100000 0x00800000"
echo "done."

echo "Abgeschlossen"


Grüße

_________________
LS-Live v2 (ARM) - 1,5TB - Debian Squeeze - Kernel 2.6.32
LS-Live v2 (ARM) - 1,5TB - Open Stock
LS-XHL - 2TB - Open Stock


Do 10. Nov 2011, 16:43
Profil
Dieser Werbeblock wird nur bei Gästen angezeigt
Beiträge der letzten Zeit anzeigen:  Sortiere nach  

Bookmarke diesen Thread bei:

MrWong Mr Wong |  Linkarena Linkarena |  del.icio.us del.icio.us |  Digg Digg |  Icio Icio |  Google Google |  Yigg Yigg |  Oneview Oneview |  Facebook Facebook |  Twitter Twitter

Was ist eigentlich Social Bookmarking? | Bookmark-Button Generator

Ein neues Thema erstellen Auf das Thema antworten  [ 11 Beiträge ]  Gehe zu Seite Vorherige  1, 2





Suche nach:

Ähnliche Beiträge

Linkstation Mini piept und blinkt - Boot-Sektor mit TFTP-Boot wiederherstellen.
Forum: Artikel - Forum
Autor: Jan
Antworten: 2
TFTP Boot Recovery Horror Linkstation LS-CHL v2
Forum: Buffalo Linkstation Pro/Live mit BitTorrent
Autor: oxygen8
Antworten: 3
LS -CHL nach TFTP Boot blinkt gelb
Forum: Buffalo Linkstation Pro/Live mit BitTorrent
Autor: yeeti_hund
Antworten: 0
LS -CHL nach TFTP Boot blinkt gelb
Forum: Buffalo Linkstation Pro/Live mit BitTorrent
Autor: yeeti_hund
Antworten: 0
Linkstation LS-CHL-V2C6E Telnet und TFTP BOOT Hilfe
Forum: Buffalo Linkstation Pro/Live mit BitTorrent
Autor: djxfx
Antworten: 7

Wer ist online?

Mitglieder in diesem Forum: Amazon [Bot], joyraider und 12 Gäste


Deine Berechtigungen

 Du darfst keine neuen Themen in diesem Forum erstellen.
 Du darfst keine Antworten zu Themen in diesem Forum erstellen.
 Du darfst deine Beiträge in diesem Forum nicht ändern.
 Du darfst deine Beiträge in diesem Forum nicht löschen.
 Du darfst keine Dateianhänge in diesem Forum erstellen.

Gehe zu:  


| Discountnetz.com - where you always are welcome... | Mein Blog - Bloggen Querbeet... | Powered by phpBB © phpBB Group. | Deutsche Übersetzung durch phpBB.de | Impressum |