Frank Lin PIAT
2014-Aug-24 01:54 UTC
[syslinux] Library_modules (list of & wiki write permissions)
Hello,
I poked a little bit to extract the list of modules dependencies in
Syslinux v6 (see below). I have attached a bash script that generate a
nice table from the tarball. The output can either be an ASCII table, or
wiki markup, typically for the page Library_modules[1].
I am not in the wiki Editor group, so I can't put that in the wiki.
anyway, here's an updated dependency tree for 6.02:
|chain.c32 |com32/chain | libutil.c32 libcom32.c32
|complex.c32 |com32/cmenu | libmenu.c32 libcom32.c32
|display.c32 |com32/cmenu | libmenu.c32 libcom32.c32
|libmenu.c32 |com32/cmenu/libmenu | libutil.c32 libcom32.c32
|simple.c32 |com32/cmenu | libmenu.c32 libcom32.c32
|test2.c32 |com32/cmenu | libmenu.c32 libcom32.c32
|test.c32 |com32/cmenu | libmenu.c32 libcom32.c32
|ldlinux.c32 |com32/elflink/ldlinux |
|ldlinux.e32 |com32/elflink/ldlinux |
|ldlinux.e64 |com32/elflink/ldlinux |
|gfxboot.c32 |com32/gfxboot | libcom32.c32
|libgpl.c32 |com32/gpllib |
|hdt.c32 |com32/hdt | libutil.c32 libgpl.c32 libcom32.c32
libmenu.c32
|libcom32.c32 |com32/lib |
|libutil.c32 |com32/libutil |
|liblua.c32 |com32/lua/src |
|lua.c32 |com32/lua/src | liblua.c32 libgpl.c32 libcom32.c32
|mboot.c32 |com32/mboot | libcom32.c32
|menu.c32 |com32/menu | libutil.c32
|vesamenu.c32 |com32/menu | libutil.c32 libcom32.c32
|cat.c32 |com32/modules |
|cmd.c32 |com32/modules | libcom32.c32
|config.c32 |com32/modules | libcom32.c32
|cptime.c32 |com32/modules | libutil.c32
|cpuid.c32 |com32/modules |
|cpuidtest.c32 |com32/modules | libgpl.c32
|debug.c32 |com32/modules |
|disk.c32 |com32/modules | libgpl.c32
|dmitest.c32 |com32/modules | libgpl.c32
|elf.c32 |com32/modules | libcom32.c32
|ethersel.c32 |com32/modules | libcom32.c32
|gpxecmd.c32 |com32/modules | libcom32.c32
|hexdump.c32 |com32/modules | libcom32.c32
|host.c32 |com32/modules | libcom32.c32
|ifcpu64.c32 |com32/modules | libcom32.c32
|ifcpu.c32 |com32/modules | libutil.c32 libgpl.c32 libcom32.c32
|ifmemdsk.c32 |com32/modules | libcom32.c32
|ifplop.c32 |com32/modules | libcom32.c32
|kbdmap.c32 |com32/modules | libcom32.c32
|kontron_wdt.c32 |com32/modules | libcom32.c32
|linux.c32 |com32/modules | libcom32.c32
|ls.c32 |com32/modules |
|meminfo.c32 |com32/modules |
|pcitest.c32 |com32/modules | libcom32.c32
|pmload.c32 |com32/modules | libcom32.c32
|poweroff.c32 |com32/modules |
|prdhcp.c32 |com32/modules | libutil.c32 libcom32.c32
|pwd.c32 |com32/modules |
|pxechn.c32 |com32/modules | libutil.c32 libcom32.c32
|reboot.c32 |com32/modules | libcom32.c32
|sanboot.c32 |com32/modules | libcom32.c32
|sdi.c32 |com32/modules | libcom32.c32
|vesainfo.c32 |com32/modules |
|vpdtest.c32 |com32/modules | libgpl.c32
|whichsys.c32 |com32/modules | libcom32.c32
|zzjson.c32 |com32/modules | libgpl.c32
|rosh.c32 |com32/rosh | libutil.c32 libcom32.c32
|advdump.c32 |com32/samples |
|entrydump.c32 |com32/samples |
|fancyhello.c32 |com32/samples | libutil.c32
|hello.c32 |com32/samples |
|keytest.c32 |com32/samples | libutil.c32
|localboot.c32 |com32/samples | libcom32.c32
|resolv.c32 |com32/samples |
|serialinfo.c32 |com32/samples |
|sysdump.c32 |com32/sysdump | libcom32.c32
[1] http://www.syslinux.org/wiki/index.php?title=Library_modules
-------------- next part --------------
#!/bin/bash
# syslinux_module_deps - show syslinux module dependencies.
# version 0.1
# license MIT
# Copyright: Frank lin Piat <fpiat at klabs.be>
#
# Known bugs:
# * on amd64 architecture: ldd don't show module deps for i386.
set -e
fwtype="bios efi32 efi64"
# bash hack here: no recursive associative arrays...
# so we declares variables based on the name in $fwtype, thanks to
"eval".
for fw in $fwtype ; do
eval declare -A $fw
done
## Extraction libraries dependencies
extract() {
for fw in $fwtype ; do
for f in $(find $fw -name '*.c32' -o -name '*.e[36][24]' ); do
bf=$(echo $f | grep -o "com32/.*")
eval $fw[$bf]=\"$( ldd $f | grep ' => ' | awk '{print
$1}' | xargs)\"
done
done
modules=$(for fw in $fwtype ; do eval echo \${!$fw[@]} | tr " "
'\n' ; done | sort -u )
}
## Print for Mediawiki page
printwiki() {
echo '{| class="wikitable sortable" border="1"
cellpadding="10" cellspacing="0" bgcolor="#f9f9f9"
style="padding: 1em; border: 1px dashed darkgray;"'
echo '|+ <code>Library modules c32 dependencies:</code>'
echo '! UPSTREAM PATH '
echo '! MODULE '
echo '! class="unsortable" | LIBRARY DEPENDENCY'
echo '|-'
for module in $modules ; do
deps=$(for fw in $fwtype ; do
eval echo \${$fw[$module]} ; done | tr '\n' ' ' )
echo "|-"
echo "| [[$(basename $module)]]"
echo "| $(dirname $module)"
(echo $deps | sed -e '1i|' -e 's, , <br /> ,' | xargs )
done
echo "|}"
}
## Print as ASCI^wUTF^wASCII table
printtable() {
echo "============="
for module in $modules ; do
deps=$(for fw in $fwtype ; do eval echo \${$fw[$module]} ; done | tr
'\n' ' ' )
#echo "|$(basename $module) | $(dirname $module | grep -o
"com32/.*" ) | $deps"
printf "|%-17s|%-23s|%s\n" "$(basename $module)"
"$(dirname $module | grep -o "com32/.*" )" "$deps"
done
}
## Assuming you fetched syslinux tarball locally:
# ver=syslinux-6.02
# cd /tmp
# wget https://www.kernel.org/pub/linux/utils/boot/syslinux/${ver}.tar.gz
# tar -zxvf ${ver}.tar.gz
# cd ${ver}
extract
if [ "$1" = "wiki" ]; then
printwiki
else
printtable
fi
> Hello, > > I poked a little bit to extract the list of modules dependencies in > Syslinux v6 (see below). I have attached a bash script that generate a > nice table from the tarball. The output can either be an ASCII table, or > wiki markup, typically for the page Library_modules[1]. > > I am not in the wiki Editor group, so I can't put that in the wiki. > > anyway, here's an updated dependency tree for 6.02: > > |chain.c32 |com32/chain | libutil.c32 libcom32.c32 > |complex.c32 |com32/cmenu | libmenu.c32 libcom32.c32 > |display.c32 |com32/cmenu | libmenu.c32 libcom32.c32 > |libmenu.c32 |com32/cmenu/libmenu | libutil.c32 libcom32.c32 > |simple.c32 |com32/cmenu | libmenu.c32 libcom32.c32 > |test2.c32 |com32/cmenu | libmenu.c32 libcom32.c32 > |test.c32 |com32/cmenu | libmenu.c32 libcom32.c32 > |ldlinux.c32 |com32/elflink/ldlinux | > |ldlinux.e32 |com32/elflink/ldlinux | > |ldlinux.e64 |com32/elflink/ldlinux | > |gfxboot.c32 |com32/gfxboot | libcom32.c32 > |libgpl.c32 |com32/gpllib | > |hdt.c32 |com32/hdt | libutil.c32 libgpl.c32 libcom32.c32 libmenu.c32 > |libcom32.c32 |com32/lib | > |libutil.c32 |com32/libutil | > |liblua.c32 |com32/lua/src | > |lua.c32 |com32/lua/src | liblua.c32 libgpl.c32 libcom32.c32 > |mboot.c32 |com32/mboot | libcom32.c32 > |menu.c32 |com32/menu | libutil.c32 > |vesamenu.c32 |com32/menu | libutil.c32 libcom32.c32 > |cat.c32 |com32/modules | > |cmd.c32 |com32/modules | libcom32.c32 > |config.c32 |com32/modules | libcom32.c32 > |cptime.c32 |com32/modules | libutil.c32 > |cpuid.c32 |com32/modules | > |cpuidtest.c32 |com32/modules | libgpl.c32 > |debug.c32 |com32/modules | > |disk.c32 |com32/modules | libgpl.c32 > |dmitest.c32 |com32/modules | libgpl.c32 > |elf.c32 |com32/modules | libcom32.c32 > |ethersel.c32 |com32/modules | libcom32.c32 > |gpxecmd.c32 |com32/modules | libcom32.c32 > |hexdump.c32 |com32/modules | libcom32.c32 > |host.c32 |com32/modules | libcom32.c32 > |ifcpu64.c32 |com32/modules | libcom32.c32 > |ifcpu.c32 |com32/modules | libutil.c32 libgpl.c32 libcom32.c32 > |ifmemdsk.c32 |com32/modules | libcom32.c32 > |ifplop.c32 |com32/modules | libcom32.c32 > |kbdmap.c32 |com32/modules | libcom32.c32 > |kontron_wdt.c32 |com32/modules | libcom32.c32 > |linux.c32 |com32/modules | libcom32.c32 > |ls.c32 |com32/modules | > |meminfo.c32 |com32/modules | > |pcitest.c32 |com32/modules | libcom32.c32 > |pmload.c32 |com32/modules | libcom32.c32 > |poweroff.c32 |com32/modules | > |prdhcp.c32 |com32/modules | libutil.c32 libcom32.c32 > |pwd.c32 |com32/modules | > |pxechn.c32 |com32/modules | libutil.c32 libcom32.c32 > |reboot.c32 |com32/modules | libcom32.c32 > |sanboot.c32 |com32/modules | libcom32.c32 > |sdi.c32 |com32/modules | libcom32.c32 > |vesainfo.c32 |com32/modules | > |vpdtest.c32 |com32/modules | libgpl.c32 > |whichsys.c32 |com32/modules | libcom32.c32 > |zzjson.c32 |com32/modules | libgpl.c32 > |rosh.c32 |com32/rosh | libutil.c32 libcom32.c32 > |advdump.c32 |com32/samples | > |entrydump.c32 |com32/samples | > |fancyhello.c32 |com32/samples | libutil.c32 > |hello.c32 |com32/samples | > |keytest.c32 |com32/samples | libutil.c32 > |localboot.c32 |com32/samples | libcom32.c32 > |resolv.c32 |com32/samples | > |serialinfo.c32 |com32/samples | > |sysdump.c32 |com32/sysdump | libcom32.c32 > > > > [1] http://www.syslinux.org/wiki/index.php?title=Library_modules > > > >I don't understand what info is not already included in the Library modules wiki page. BTW, the wiki page is already updated to 6.03-pre18. Regards, Ady.