Ergebnis 1 bis 10 von 120

Baum-Darstellung

  1. #31
    Developer
    Registriert seit
    18.07.2012
    Ort
    Ridderkerk, Niederlande
    Beiträge
    634
    Thanks
    144
    Thanked 713 Times in 304 Posts
    @spartak73: I use this modified flash_part_w_fw.sh file to create root.img:
    Code:
    #!/bin/bash
    #Version for Fortis HS-7810A with loader 6.26 (boot from USB, not flash)
    if [ `id -u` != 0 ]; then
        echo "You are not running this script as root. Try it again as root or with su/sudo command."
        echo "Bye Bye..."
        exit
    fi
    
    CURDIR=$1
    TUFSBOXDIR=$2
    OUTDIR=$3
    TMPKERNELDIR=$4
    TMPROOTDIR=$5
    
    echo "CURDIR       = $CURDIR"
    echo "TUFSBOXDIR   = $TUFSBOXDIR"
    echo "OUTDIR       = $OUTDIR"
    echo "TMPKERNELDIR = $TMPKERNELDIR"
    echo "TMPROOTDIR   = $TMPROOTDIR"
    
    MKFSEXT3=mke2fs
    
    OUTFILE=root.img
    
    if [ ! -e $OUTDIR ]; then
      mkdir $OUTDIR
    fi
    
    if [ -e $OUTFILE ]; then
      rm -f $OUTFILE
    fi
    
    if [ ! -e /mnt/temp ]; then
      sudo mkdir /mnt/temp
    fi
    
    echo "-----------------------------------------------------------------------------"
    # --- KERNEL ---
    # Size is 8MB max.
    echo ""
    echo "Copying kernel file..."
    cp -f $TMPKERNELDIR/uImage $OUTDIR/uImage
    #padding of kernel uImage is not needed
    #$PAD 0x800000 $CURDIR/uImage $CURDIR/mtd_kernel.pad.bin
    
    echo "-----------------------------------------------------------------------------"
    # --- ROOT ---
    # Size is 256MB
    echo ""
    echo "Creating root image file..."
    #Create an empty file of 256M size
    echo "dd if=/dev/zero of=$CURDIR/ext3.img bs=512 count=512000"
    dd if=/dev/zero of=$CURDIR/ext3.img bs=512 count=512000
    #Attach it to a loop device
    echo "sudo losetup /dev/loop0 $CURDIR/ext3.img"
    sudo losetup /dev/loop0 $CURDIR/ext3.img
    #Create an ext3 file system in the empty file
    echo "sudo $MKFSEXT3 -t ext3 -L root.img /dev/loop0"
    sudo $MKFSEXT3 -t ext3 -L root.img /dev/loop0
    #Detach the loop device
    echo "sudo losetup -d /dev/loop0"
    sudo losetup -d /dev/loop0
    #Mount $CURDIR/ext3.img on a temporary mount
    echo "sudo mount -t ext3 $CURDIR/ext3.img /mnt/temp"
    sudo mount -t ext3 $CURDIR/ext3.img /mnt/temp
    #Copy the root file system to the mount
    echo "cp -r -f -p $TMPROOTDIR/* /mnt/temp"
    cp -r -f -p $TMPROOTDIR/* /mnt/temp
    #Create a swap directory
    echo "Create a swap directory if not already done"
    if [ ! -e /mnt/temp/swap ]; then
      sudo mkdir /mnt/temp/swap
    fi
    #Unmount $CURDIR/ext3.img on the temporary mount
    echo "sudo umount /mnt/temp"
    sudo umount /mnt/temp
    echo "-----------------------------------------------------------------------------"
    echo ""
    echo "Preparation of root image file completed,"
    echo "checking file sizes..."
    SIZE=`stat $TMPKERNELDIR/uImage -t --format %s`
    SIZE=`printf "0x%x" $SIZE`
    if [[ $SIZE > "0x800000" ]]; then
      echo "KERNEL TOO BIG. $SIZE instead of 0x800000" > /dev/stderr
    else
      echo "Kernel (uImage) is $SIZE bytes... OK"
    fi
    
    SIZE=`stat ext3.img -t --format %s`
    SIZE=`printf "0x%x" $SIZE`
    if [[ $SIZE > "0xfffffff" ]]; then
      echo "ROOT TOO BIG. $SIZE instead of 0x10000000" > /dev/stderr
    else
      echo "Root image file is $SIZE bytes... OK"
    fi
    
    mv $CURDIR/ext3.img $OUTDIR/$OUTFILE
    echo "-----------------------------------------------------------------------------"
    echo ""
    echo "Creating zip-file..."
    cd $OUTDIR;zip $OUTFILE.zip $OUTFILE uImage
    The file replaces the file with the same name in the ../flash/hs7810a/scripts folder and is called from the flash shell script.

    After running this, you have the correct root.img, but uImage still has got a problem I have not solved yet and is addressed in this thread. I suspect it has something to do with a missing or empty initramfs.

    Regards,

    Audioniek.
    Receivers: Rebox: RE-4000, 8000, 9000, 2200, 2210, 2220, 4200, 4210, 4220, 8220, 8500, SAB Unix Triple, Golden Media Spark TripleX, Amiko Alien 2+, Sogno Spark Revolution, Kathrein UFS910(1 & 14W)/912/913/922(CX24116 & AVL2108 tuners), Vizyon revolution 820HD PVR, AB IPBox 91HD/9000HD/9000HD rev.2, Xsarius Alpha HD10, nBox BKSA/BSLA/BXZB/BZZB, Vitamin HD 5000
    Sats: Astra 1, 2 & 3, Hotbird
    Main activity: building my own E2 images for Fortis receivers

  2. The Following User Says Thank You to Audioniek For This Useful Post:



Ähnliche Themen

  1. Probleme mit TimerAufnahmen
    Von Pinbowler im Forum Anfänger/Newbie
    Antworten: 4
    Letzter Beitrag: 24.01.2013, 17:21
  2. [spark] Entwicklungsumgebung
    Von forenuser im Forum Beta Enigma2 Bereich für alle SH4 STB
    Antworten: 7
    Letzter Beitrag: 24.10.2012, 17:12
  3. [spark] Probleme mit IPTV
    Von balkanac82 im Forum Beta Enigma2 Bereich für alle SH4 STB
    Antworten: 0
    Letzter Beitrag: 15.08.2012, 22:08
  4. [topf] ORf ton probleme
    Von fotomek69 im Forum Beta Enigma2 Bereich für alle SH4 STB
    Antworten: 5
    Letzter Beitrag: 11.05.2012, 15:29

Berechtigungen

  • Neue Themen erstellen: Ja
  • Themen beantworten: Ja
  • Anhänge hochladen: Ja
  • Beiträge bearbeiten: Ja
  •