Tiny Core Base > Alpha Releases

Tiny Core 14.0 Alpha 1 Testing

<< < (16/22) > >>

curaga:
You can ignore the IM warning. It's about Chinese (etc) input.

curaga:
The exfat module location doesn't matter for loading it etc, putting all those in the same dir was simpler in sorter.sh. As for virtio disks, it's quite possible some scripts are missing vda* cases.

patrikg:
Maybe you should ask some good person to let you in in the wiki, to add some section and text in the wiki what nice you doing. To add support for virtio device recognition in the tc.

Rich:
Hi nick65go
The Qemu discussion has been split into a separate thread:
https://forum.tinycorelinux.net/index.php/topic,26118.0.html

nick65go:
I was looking over one of the "main" function for me, tce-load. I re-aranged and commented a little the script, so it seems more compacted and quick tree logic from first words/test.ex: instead of

--- Code: ---copyInstall() {
    [ -d /mnt/test ] || sudo /bin/mkdir -p /mnt/test
    sudo /bin/mount $1 /mnt/test -t squashfs -o loop,ro
    if [ "$?" == 0 ]; then
        if [ "$(ls -A /mnt/test)" ]; then
            yes "$FORCE" | sudo /bin/cp -ai /mnt/test/. / 2>/dev/null
            [ -n "`find /mnt/test/ -type d -name modules`" ] && MODULES=TRUE
        fi
        sudo /bin/umount -d /mnt/test
    fi
    [ "$BOOTING" ] || rmdir /mnt/test
}
--- End code ---
I wrote it like
--- Code: ---# $1=THISAPP, ex: abc.tcz; mount it on /mnt/test; then copy its files into / ; eventualy set flag MODULES
_copyInstall() {
    [ -d /mnt/test ] || sudo /bin/mkdir -p /mnt/test
    [ "$(sudo /bin/mount $1 /mnt/test -t squashfs -o loop,ro)" ] && ( [ "$BOOTING" ] || rmdir /mnt/test ) || break
    [ "$(ls -A /mnt/test)" ] ( yes "$FORCE" | sudo /bin/cp -ai /mnt/test/. / 2>/dev/null || ( [ -n "`find /mnt/test/ -type d -name modules`" ] && MODULES=TRUE )
    sudo /bin/umount -d /mnt/test
}
--- End code ---


same for

--- Code: ---update_system() {
    if [ "$BOOTING" ]; then
        [ "$MODULES" ] && sudo /bin/touch /etc/sysconfig/newmodules
    else
        [ "$THISAPP" != "$EXTENSION" ] || [ "$DOWNLOAD_ONLY" ] || [ "$LOAD_ONLY" ] || echo "$THISAPP" >> ../$ONBOOTNAME
        if [ "$MODULES" ]; then
            sudo /sbin/depmod -a 2>/dev/null
            sudo /sbin/udevadm trigger
        fi
        sudo /sbin/ldconfig 2>/dev/null
    fi
   
    if [ -x "$TCEINSTALLED"/$2 ]; then
        if [ "$BOOTING" ] ; then
            echo "$TCEINSTALLED"/$2 >> /tmp/setup.lst
        else
            sudo "$TCEINSTALLED"/$2
        fi
    else
        touch "$TCEINSTALLED"/$2
    fi
}
--- End code ---
which became like this
--- Code: ---# $1=THISAPP; $2=THISAPP_without_EXTENSION; $BOOTING is used one time only
update_system() {
    if  [ "$BOOTING" ]; then
        [ "$MODULES" ] && sudo /bin/touch /etc/sysconfig/newmodules
        [ -x "$TCEINSTALLED"/$2 ] && echo "$TCEINSTALLED"/$2 >> /tmp/setup.lst
    else
        sudo /sbin/ldconfig 2>/dev/null
        [ "$MODULES" ] && (sudo /sbin/depmod -a 2>/dev/null || sudo /sbin/udevadm trigger)
        [ -x "$TCEINSTALLED"/$2 ] && sudo "$TCEINSTALLED"/$2
        touch "$TCEINSTALLED"/$2
        [ "$THISAPP" != "$EXTENSION" ] || [ "$DOWNLOAD_ONLY" ] || [ "$LOAD_ONLY" ] || echo "$THISAPP" >> ../$ONBOOTNAME
    fi
}
--- End code ---


for example I can quickly see what $BOOTING will do in update_system(), or what copyInstall() is about.
The original functions are already fast, so is not about extra speed. Any chance that this type of main tree and branches to be used in TC14?

Navigation

[0] Message Index

[#] Next page

[*] Previous page

Go to full version