![]() |
|
|||
|
|
||||
|
||||||
| Dreambox Section All things dreambox here |
![]() |
|
|
LinkBack | Thread Tools | Display Modes |
|
|
#31 (permalink) | ||
|
Developer
UkCvs Senior Member
Join Date: Oct 2008
Posts: 971
iTrader: (0)
Casino cash: $312240
Thanks: 346
Thanked 1,622 Times in 731 Posts
Nominated 19 Times in 7 Posts
TOTW/F/M Award(s): 7Groans: 0
Groaned at 0 Times in 0 Posts
|
Quote:
![]() Quote:
|
||
|
|
|
|
|
#32 (permalink) |
|
Nagging Old Git
Team-UkCvs Senior Member
Join Date: Aug 2008 Location: A park bench, near you
Age: 75
Posts: 3,108
iTrader: (0)
Casino cash: $848260
Thanks: 2,645
Thanked 1,586 Times in 876 Posts
Nominated 2 Times in 2 Posts
TOTW/F/M Award(s): 2Groans: 1
Groaned at 0 Times in 0 Posts
|
Nice one, thanks, LraiZer- that explains that one perfectly. So it's an option for the experts, then? I'll leave well alone, LOL!
Back to head.ko now... The vital bit for the first time boot on a newly-compiled dm500 image appears to start here, at line #46 in the rcS of C12: Code:
# check if /var/.init exist .. then no flash erase is needed .. this is new !
if [ ! -e /var/.init ]; then
# new /var/.init not found.. check if old /var/tmp/init exist..
# then not flash erase ist needed
if [ -e /var/tmp/init ]; then
# ok old /var/tmp/init exist.. no create the new flash_erase detection file..
touch /var/.init
# delete /var/tmp folder now..
rm -rf /var/tmp
# create link to /tmp <- this is mounted to RAM
ln -sf /tmp /var/tmp
else
# flash erase is needed ...
init=1
fi
fi
if [ $init -eq 1 ] ; then
cp -a /var_init/* /var
touch /var/.init
sync
umount /var
/bin/mount -t jffs2 /dev/mtdblock/1 /var
fi
Cheers- AL
|
|
|
|
|
|
#33 (permalink) | |
|
Developer
UkCvs Senior Member
Join Date: Nov 2008
Posts: 209
iTrader: (0)
Casino cash: $104800
Thanks: 210
Thanked 319 Times in 111 Posts
Nominated 2 Times in 1 Post
TOTW/F/M Award(s): 1Groans: 0
Groaned at 0 Times in 0 Posts
|
Quote:
![]() just changed this Code:
#!/bin/sh
/bin/mount -n -t proc proc /proc
/bin/mount -n -t devpts devpts /dev/pts
export INSMOD="/sbin/insmod"
export RMMOD="/sbin/rmmod"
export MODDIR="/lib/modules/"$(uname -r)
#export TZ=CET-1CEST,M3.5.0/2,M10.5.0/3
/etc/init.d/init1
#set environment variables ( mID )
. /proc/bus/dbox.sh
# check if no DM500
if [ $mID -ne 07 ] ; then
init=0
/bin/boot || init=1
if [ $init -eq 1 ] ; then
/bin/eraseall /dev/mtd/1
fi
fi
# do not mount jffs2 when not booting from flash
if [ ! -e /root/platform/kernel/bild ] ; then
mount -t jffs2 /dev/mtdblock/1 /var
fi
/bin/mount -t ramfs none /tmp
# /var/run links here
mkdir /tmp/run
init=0
# check if /var/.init exist .. then no flash erase is needed .. this is new !
if [ ! -e /var/.init ]; then
# new /var/.init not found.. check if old /var/tmp/init exist..
# then not flash erase ist needed
if [ -e /var/tmp/init ]; then
# ok old /var/tmp/init exist.. no create the new flash_erase detection file..
touch /var/.init
# delete /var/tmp folder now..
rm -rf /var/tmp
# create link to /tmp <- this is mounted to RAM
ln -sf /tmp /var/tmp
else
# flash erase is needed ...
init=1
fi
fi
if [ $init -eq 1 ] ; then
cp -a /var_init/* /var
touch /var/.init
sync
umount /var
/bin/mount -t jffs2 /dev/mtdblock/1 /var
fi
ln -sf sound/dsp /dev/dsp
Code:
#!/bin/sh
/bin/mount -n -t proc proc /proc
/bin/mount -n -t devpts devpts /dev/pts
export INSMOD="/sbin/insmod"
export RMMOD="/sbin/rmmod"
export MODDIR="/lib/modules/"$(uname -r)
# check if no DM500
if [ $mID -ne 07 ] ; then
init=0
/bin/boot || init=1
if [ $init -eq 1 ] ; then
/bin/eraseall /dev/mtd/1
fi
fi
# do not mount jffs2 when not booting from flash
if [ ! -e /root/platform/kernel/bild ] ; then
mount -t jffs2 /dev/mtdblock/1 /var
fi
/bin/mount -t ramfs none /tmp
# /var/run links here
mkdir /tmp/run
init=0
# check if /var/.init exist .. then no flash erase is needed .. this is new !
if [ ! -e /var/.init ]; then
# new /var/.init not found.. check if old /var/tmp/init exist..
# then not flash erase ist needed
if [ -e /var/tmp/init ]; then
# ok old /var/tmp/init exist.. no create the new flash_erase detection file..
touch /var/.init
# delete /var/tmp folder now..
rm -rf /var/tmp
# create link to /tmp <- this is mounted to RAM
ln -sf /tmp /var/tmp
else
# flash erase is needed ...
init=1
fi
fi
if [ $init -eq 1 ] ; then
cp -a /var_init/* /var
touch /var/.init
sync
umount /var
/bin/mount -t jffs2 /dev/mtdblock/1 /var
fi
#export TZ=CET-1CEST,M3.5.0/2,M10.5.0/3
/etc/init.d/init1
#set environment variables ( mID )
. /proc/bus/dbox.sh
ln -sf sound/dsp /dev/dsp
Code:
#export TZ=CET-1CEST,M3.5.0/2,M10.5.0/3 /etc/init.d/init1 #set environment variables ( mID ) . /proc/bus/dbox.sh box boots fine. now it needs a test with a commando image and a different head.ko file. Will still need in the init1 file Code:
if [ -f /lib/modules/$(uname -r)/.reload_modules ] ; then
$RMMOD $MODDIR/extra/head.ko
$RMMOD /var/driver/head.ko
fi
if [ -e /var/driver/head.ko ] ; then
$INSMOD /var/driver/head.ko
else
$INSMOD $MODDIR/extra/head.ko
fi
|
|
|
|
|
| The Following User Says Thank You to scruff1963 For This Useful Post: | PaphosAL (03-01-2011) |
|
|
#34 (permalink) |
|
Nagging Old Git
Team-UkCvs Senior Member
Join Date: Aug 2008 Location: A park bench, near you
Age: 75
Posts: 3,108
iTrader: (0)
Casino cash: $848260
Thanks: 2,645
Thanked 1,586 Times in 876 Posts
Nominated 2 Times in 2 Posts
TOTW/F/M Award(s): 2Groans: 1
Groaned at 0 Times in 0 Posts
|
Disagree about the pointlessness of moving the existing head.ko from $MODDIR/extra - you haven't thought this through fully.
We need the new one in /var_init/driver to copy to the new /var/driver when it's first created, don't we? So why have two in squashfs root, when one will suffice? Your earlier fall-back code to load from /var_init/driver looked flawless to me...
|
|
|
|
|
|
#35 (permalink) | |
|
Developer
UkCvs Senior Member
Join Date: Nov 2008
Posts: 209
iTrader: (0)
Casino cash: $104800
Thanks: 210
Thanked 319 Times in 111 Posts
Nominated 2 Times in 1 Post
TOTW/F/M Award(s): 1Groans: 0
Groaned at 0 Times in 0 Posts
|
Quote:
If you leave the original where it's supposedto be then space is where it was. If you put it into /var_init/etc/driver then on 1st boot it will be put into /var/etc/driver taking space from the jffs which isn't needed as it exists in the squashfs area. Only people needing a different one need to lose the space in /var or do I take it space is no longer an issue ? If you leave it where it is then there is no need for one in /var/etc/driver or /var_init/etc/driver unless the user needs to use the space in /var then they just put one into /var/etc/driver which will take precedence over the one in /lib/modules/2.6.9/extra which is why I did this bit of code Code:
if [ -f /lib/modules/$(uname -r)/.reload_modules ] ; then
$RMMOD $MODDIR/extra/head.ko
$RMMOD /var/driver/head.ko
fi
if [ -e /var/driver/head.ko ] ; then
$INSMOD /var/driver/head.ko
else
$INSMOD $MODDIR/extra/head.ko
fi
I don't understand your obsession with space but I tailored it to keep you happy and your trying to throw away 300kb of it
|
|
|
|
|
![]() |
| Bookmarks |
| Currently Active Users Viewing This Thread: 1 (0 members and 1 guests) | |
| Thread Tools | |
| Display Modes | |
|
|